Skip to content

Commit e62fdb9

Browse files
author
Lachlan Grose
committed
refactor: 🔥 cleaning up p2 interpolator
1 parent 14c7580 commit e62fdb9

File tree

1 file changed

+1
-40
lines changed

1 file changed

+1
-40
lines changed

LoopStructural/interpolators/_p2interpolator.py

Lines changed: 1 addition & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -156,46 +156,7 @@ def add_norm_constraints(self, w=1.0):
156156

157157
pass
158158

159-
def add_gradient_orthogonal_constraint(self, points, vector, w=1.0, B=0):
160-
"""
161-
constraints scalar field to be orthogonal to a given vector
162-
163-
Parameters
164-
----------
165-
position
166-
normals
167-
w
168-
B
169-
170-
Returns
171-
-------
172-
173-
"""
174-
pass
175-
# if points.shape[0] > 0:
176-
# vertices, element_gradients, tetras, inside = self.support.get_tetra_gradient_for_location(points[:,:3])
177-
# #e, inside = self.support.elements_for_array(points[:, :3])
178-
# #nodes = self.support.nodes[self.support.elements[e]]
179-
# vector /= np.linalg.norm(vector,axis=1)[:,None]
180-
# vecs = vertices[:, 1:, :] - vertices[:, 0, None, :]
181-
# vol = np.abs(np.linalg.det(vecs)) # / 6
182-
# # d_t = self.support.get_elements_gradients(e)
183-
# norm = np.linalg.norm(element_gradients, axis=2)
184-
# element_gradients /= norm[:, :, None]
185-
186-
# A = np.einsum('ij,ijk->ik', vector, element_gradients)
187-
188-
# A *= vol[:, None]
189-
190-
# gi = np.zeros(self.support.n_nodes).astype(int)
191-
# gi[:] = -1
192-
# gi[self.region] = np.arange(0, self.nx).astype(int)
193-
# w /= 3
194-
# idc = gi[tetras]
195-
# B = np.zeros(idc.shape[0])+B
196-
# outside = ~np.any(idc == -1, axis=1)
197-
# self.add_constraints_to_least_squares(A[outside, :] * w,
198-
# B[outside], idc[outside, :])
159+
199160

200161
def add_value_constraints(self, w=1.0):
201162
points = self.get_value_constraints()

0 commit comments

Comments
 (0)