Skip to content

Commit

Permalink
fix: issue with 2d supports
Browse files Browse the repository at this point in the history
  • Loading branch information
lachlangrose committed Mar 7, 2024
1 parent 6b8d27b commit 79bf9c0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions LoopStructural/interpolators/_p1interpolator.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def add_norm_constraints(self, w=1.0):
points = self.get_norm_constraints()
if points.shape[0] > 0:
grad, elements, inside = self.support.evaluate_shape_derivatives(points[:, :3])
size = self.support.element_scale[elements[inside]]
size = self.support.element_size[elements[inside]]
wt = np.ones(size.shape[0])
wt *= w # s* size
elements = np.tile(self.support.elements[elements[inside]], (3, 1, 1))
Expand All @@ -69,7 +69,7 @@ def add_value_constraints(self, w=1.0):
points = self.get_value_constraints()
if points.shape[0] > 1:
N, elements, inside = self.support.evaluate_shape(points[:, :3])
size = self.support.element_scale[elements[inside]]
size = self.support.element_size[elements[inside]]
wt = np.ones(size.shape[0])
wt *= w # * size
self.add_constraints_to_least_squares(
Expand Down

0 comments on commit 79bf9c0

Please sign in to comment.