@@ -327,7 +327,7 @@ def position_to_cell_corners(self, pos):
327327 globalidx [~ inside ] = - 1
328328 return globalidx , inside
329329
330- def evaluate_value (self , evaluation_points , property_name ):
330+ def evaluate_value (self , evaluation_points , property ):
331331 """
332332 Evaluate the value of of the property at the locations.
333333 Trilinear interpolation dot corner values
@@ -346,18 +346,18 @@ def evaluate_value(self, evaluation_points, property_name):
346346 v [:, :] = np .nan
347347
348348 v [inside , :] = self .position_to_dof_coefs (evaluation_points [inside , :]).T
349- v [inside , :] *= self . properties [ property_name ] [idc [inside , :]]
349+ v [inside , :] *= property [idc [inside , :]]
350350 return np .sum (v , axis = 1 )
351351
352- def evaluate_gradient (self , evaluation_points , property_name ):
352+ def evaluate_gradient (self , evaluation_points , property ):
353353 idc , inside = self .position_to_cell_corners (evaluation_points )
354354 T = np .zeros ((idc .shape [0 ], 2 , 4 ))
355355 T [inside , :, :] = self .calcul_T (evaluation_points [inside , :])
356356 # indices = np.array([self.position_to_cell_index(evaluation_points)])
357357 # idc = self.global_indicies(indices.swapaxes(0,1))
358358 # print(idc)
359- T [inside , 0 , :] *= self . properties [ property_name ] [idc [inside , :]]
360- T [inside , 1 , :] *= self . properties [ property_name ] [idc [inside , :]]
359+ T [inside , 0 , :] *= property [idc [inside , :]]
360+ T [inside , 1 , :] *= property [idc [inside , :]]
361361 # T[inside, 2, :] *= self.properties[property_name][idc[inside, :]]
362362 return np .array ([np .sum (T [:, 0 , :], axis = 1 ), np .sum (T [:, 1 , :], axis = 1 )]).T
363363
0 commit comments