diff --git a/LoopStructural/interpolators/supports/_3d_base_structured.py b/LoopStructural/interpolators/supports/_3d_base_structured.py index 62e7b3c2f..e01e781ad 100644 --- a/LoopStructural/interpolators/supports/_3d_base_structured.py +++ b/LoopStructural/interpolators/supports/_3d_base_structured.py @@ -218,7 +218,7 @@ def check_position(self, pos): return False return pos - def _global_indicies(self, indexes, nsteps): + def _global_indicies(self, indexes: np.ndarray, nsteps: np.ndarray) -> np.ndarray: """ Convert from cell indexes to global cell index @@ -285,7 +285,9 @@ def position_to_cell_corners(self, pos): inside = self.inside(pos) ix, iy, iz = self.position_to_cell_index(pos) cornersx, cornersy, cornersz = self.cell_corner_indexes(ix, iy, iz) - globalidx = self.global_indicies(np.dstack([cornersx, cornersy, cornersz]).T) + globalidx = self.global_node_indicies( + np.dstack([cornersx, cornersy, cornersz]).T + ) # if global index is not inside the support set to -1 globalidx[~inside] = -1 return globalidx, inside @@ -360,7 +362,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): + def global_node_indicies(self, indexes) -> np.ndarray: """ Convert from node indexes to global node index @@ -374,7 +376,7 @@ def global_node_indicies(self, indexes): """ return self._global_indicies(indexes, self.nsteps) - def global_cell_indicies(self, indexes): + def global_cell_indicies(self, indexes) -> np.ndarray: """ Convert from cell indexes to global cell index