Skip to content

Commit

Permalink
fix: pytest failed
Browse files Browse the repository at this point in the history
  • Loading branch information
Lachlan Grose committed Oct 26, 2021
1 parent 761fd03 commit 9136c99
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion LoopStructural/interpolators/base_structured_3d_support.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import numpy as np
from LoopStructural.utils import getLogger
logger = getLogger(__name__)
class BaseStructuredSupport:
"""
Expand Down Expand Up @@ -325,7 +327,7 @@ def global_index_to_node_index(self, global_index):
z_index = global_index // self.nsteps[0, None] // \
self.nsteps[1, None]
return x_index, y_index, z_index

def global_node_indicies(self, indexes):
"""
Convert from node indexes to global node index
Expand Down
4 changes: 2 additions & 2 deletions LoopStructural/interpolators/structured_grid.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ def evaluate_gradient(self, evaluation_points, property_array):
raise BaseException
idc, inside = self.position_to_cell_corners(evaluation_points)
T = np.zeros((idc.shape[0], 3, 8))
T[inside, :, :] = self.get_element_gradient_for_location(evaluation_points[inside, :])
T[inside, :, :] = self.get_element_gradient_for_location(evaluation_points[inside, :])[1]
# indices = np.array([self.position_to_cell_index(evaluation_points)])
# idc = self.global_indicies(indices.swapaxes(0,1))
# print(idc)
Expand Down Expand Up @@ -298,4 +298,4 @@ def get_element_for_location(self, pos):
vertices, inside = self.position_to_cell_vertices(pos)
elements = self.global_node_indicies(np.array(self.position_to_cell_index(pos)))
a = self.position_to_dof_coefs(pos)
return vertices, c_return, elements, inside
return vertices, a, elements, inside

0 comments on commit 9136c99

Please sign in to comment.