Skip to content

Commit

Permalink
fix: gradient constraints in pli weighted by vol
Browse files Browse the repository at this point in the history
  • Loading branch information
Lachlan Grose committed Nov 8, 2021
1 parent 78b9eab commit 9b487fd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions LoopStructural/interpolators/piecewiselinear_interpolator.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ def add_gradient_constraints(self, w=1.0):
w*=points[:,6]
self.add_constraints_to_least_squares(A[outside, :],
B[outside], idc[outside, :],
w=w*vol[outside],
w=w,
name = 'gradient_strike')
A = np.einsum('ji,ijk->ik', dip_vector, element_gradients)
# A *= vol[:, None]
Expand Down Expand Up @@ -388,6 +388,6 @@ def add_gradient_orthogonal_constraints(self, points, vector, w=1.0,
B = np.zeros(idc.shape[0])+B
outside = ~np.any(idc == -1, axis=1)
self.add_constraints_to_least_squares(A[outside, :],
B[outside], idc[outside, :], w=w*vol[outside],name='gradient orthogonal')
B[outside], idc[outside, :], w=w,name='gradient orthogonal')


0 comments on commit 9b487fd

Please sign in to comment.