Skip to content

Commit 9b487fd

Browse files
author
Lachlan Grose
committed
fix: gradient constraints in pli weighted by vol
1 parent 78b9eab commit 9b487fd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

LoopStructural/interpolators/piecewiselinear_interpolator.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ def add_gradient_constraints(self, w=1.0):
208208
w*=points[:,6]
209209
self.add_constraints_to_least_squares(A[outside, :],
210210
B[outside], idc[outside, :],
211-
w=w*vol[outside],
211+
w=w,
212212
name = 'gradient_strike')
213213
A = np.einsum('ji,ijk->ik', dip_vector, element_gradients)
214214
# A *= vol[:, None]
@@ -388,6 +388,6 @@ def add_gradient_orthogonal_constraints(self, points, vector, w=1.0,
388388
B = np.zeros(idc.shape[0])+B
389389
outside = ~np.any(idc == -1, axis=1)
390390
self.add_constraints_to_least_squares(A[outside, :],
391-
B[outside], idc[outside, :], w=w*vol[outside],name='gradient orthogonal')
391+
B[outside], idc[outside, :], w=w,name='gradient orthogonal')
392392

393393

0 commit comments

Comments
 (0)