salvus.mesh.data_structures.salvus_mesh.side_sets
salvus.mesh.data_structures.salvus_mesh.side_sets salvus mesh data_structures salvus_mesh side_sets Side set data structures for Salvus meshes.
Functions
legacy_from_side_set()
legacy_from_side_set()def legacy_from_side_set(
side_set: SideSet,
) -> tuple[npt.NDArray, npt.NDArray]: ...Convert a SideSet data structure to the legacy format.
side_setSideSet — SideSet to convert.
legacy_from_side_sets()
legacy_from_side_sets()def legacy_from_side_sets(
side_sets: tuple[SideSet, ...],
) -> dict[str, tuple[npt.NDArray, npt.NDArray]]: ...Convert a list of SideSet data structures to the legacy format.
side_setstuple[SideSet, ...] — List of SideSet instances to convert.
side_set_from_legacy()
side_set_from_legacy()def side_set_from_legacy(
legacy_name: str, legacy_data: tuple[npt.NDArray, npt.NDArray]
) -> SideSet: ...Convert a single legacy side set to the new SideSet data structure.
legacy_namestr — Name of the side set.legacy_datatuple[npt.NDArray, npt.NDArray] — Tuple of (elements, facets) in legacy format.
side_sets_from_legacy()
side_sets_from_legacy()def side_sets_from_legacy(
legacy_data: dict[str, tuple[npt.NDArray, npt.NDArray]],
) -> tuple[SideSet, ...]: ...Convert legacy side set data to the new SideSet data structure.
New format makes having a key-based storage superfluous. Anything on a mesh has a retrieval method.
legacy_datadict[str, tuple[npt.NDArray, npt.NDArray]] — Dictionary mapping side set names to their legacy data.
Classes
BoundaryCondition
BoundaryConditionclass BoundaryCondition(enum.Enum):
def __init__(self): ...Enumeration of supported boundary conditions for side sets.
Note that this enumeration is the union of allowed types between the wave equation (elastic and acoustic), the diffusion equation, and the Poisson equation.
SideSet
SideSetclass SideSet(builtins.object):
def __init__(
self,
name: str,
element_ids: npt.NDArray[np.int64],
face_ids: npt.NDArray[np.int64],
boundary_condition: BoundaryCondition | None = None,
boundary_condition_parameters: (
AbsorbingBoundaryParameters | None
) = None,
) -> None: ...Side set data structure for defining boundary facets on a mesh.
Elements refer to a mesh’ elements by their global index. Facets are referred to by their local (in-element) index.
namestr — Name of the side set.element_idsnpt.NDArray[np.int64] — 1D array of global element IDs.face_idsnpt.NDArray[np.int64] — 1D array of local face IDs.boundary_conditionBoundaryCondition | None — Boundary condition type for this side set.boundary_condition_parametersAbsorbingBoundaryParameters | None — Parameters for the boundary condition.
identity()
identity()def identity(name: str) -> SideSet: ...Identity side set for use in reduction operations.
namestr — Name of the side set.
from_legacy()
from_legacy()def from_legacy(
legacy_name: str, legacy_data: tuple[npt.NDArray, npt.NDArray]
) -> SideSet: ...Convert a single legacy side set to the new SideSet data structure.
legacy_namestr — Name of the side set.legacy_datatuple[npt.NDArray, npt.NDArray] — Tuple of (elements, facets) in legacy format.