File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed
Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -1028,17 +1028,19 @@ def _evaluate(self, **kwargs):
10281028 retval = 1 / self .function
10291029 else :
10301030 retval = self .function
1031+
10311032 # Apply interpolation from inner most dim
10321033 for d , i in self ._grid_map .items ():
10331034 retval = retval .diff (d , deriv_order = 0 , fd_order = 2 , x0 = {d : i })
10341035
1035- # Evaluate. Since we used `self.function` it will be on the grid when evaluate
1036- # is called again within FD
1036+ # Evaluate. Since we used `self.function` it will be on the grid when
1037+ # evaluate is called again within FD
1038+ retval = retval ._evaluate (** kwargs )
1039+
1040+ # If harmonic averaging, invert at the end
10371041 if self ._avg_mode == 'harmonic' :
10381042 from devito .finite_differences .differentiable import SafeInv
1039- retval = SafeInv (retval .evaluate , self .function )
1040- else :
1041- retval = retval .evaluate
1043+ retval = SafeInv (retval , self .function )
10421044
10431045 return retval
10441046
You can’t perform that action at this time.
0 commit comments