Mondaic

salvus.mesh.data_structures.salvus_mesh.algorithms.points

salvus.mesh.data_structures.salvus_mesh.algorithms.points salvus mesh data_structures salvus_mesh algorithms points

Helper functions for point (vertex) data in Salvus meshes.

Functions

compute_bounding_box()

def compute_bounding_box(mesh: Mesh) -> npt.NDArray[np.float64]: ...

Compute the axis-aligned bounding box of a mesh.

Parameters
  • mesh Mesh — The mesh to compute the bounding box for.
Returns npt.NDArray[np.float64] — An array of shape (2, ndim) where the first row contains the minimum coordinates for each dimension and the second row contains the maximum coordinates for each dimension.

construct_global_points()

def construct_global_points(blocks: tuple[MeshBlock, ...]) -> npt.NDArray: ...

Computes global points from multiple blocks with shared vertices.

Always uses minimum index (first-occurrence) reduction for repeated/shared vertices, meaning that if the numerical coordinates differ between blocks, the coordinates from the block that appears first in the blocks list will be used.

Parameters
  • blocks tuple[MeshBlock, ...] — List of MeshBlock objects
Returns npt.NDArray — Global point array with proper handling of shared vertices