salvus.mesh.data_structures.unstructured_mesh.unstructured_mesh
The unstructured mesh class for higher order quadrilateral and hexahedral meshes.
Classes
UnstructuredMesh
UnstructuredMeshclass UnstructuredMesh(builtins.object):
def __init__(
self,
points: npt.NDArray,
connectivity: npt.NDArray,
scale: float = 1.0,
global_variables: dict = default,
global_strings: dict = default,
global_arrays: dict = default,
elemental_fields: dict[str, npt.NDArray] = default,
nodal_fields: dict[str, npt.NDArray] = default,
side_sets: dict[str, tuple[npt.NDArray, npt.NDArray]] = default,
deformations: dict[str, npt.NDArray] = default,
) -> None: ...Salvus’ representation of higher-order unstructured meshes.
pointsnpt.NDArray — Nodes of the mesh, array with shape (number of points, number of dimensions)connectivitynpt.NDArray — Connectivity of the mesh defining the elements in the mesh listing all nodes in tensorized order. Must have shape (number of elements, (shape order + 1) ** (number of dimensions)).scalefloat — A scaling of the mesh that is only applied to the points array upon writing to file.global_variablesdict — Global variables stored in the mesh.global_stringsdict — Global strings stored in the mesh.global_arraysdict — Global arrays stored in the mesh.elemental_fieldsdict[str, npt.NDArray] — Fields defined on the mesh.nodal_fieldsdict[str, npt.NDArray] — Nodal fields.side_setsdict[str, tuple[npt.NDArray, npt.NDArray]] — The side sets.deformationsdict[str, npt.NDArray] — Collects so far unapplied deformations.
coordinate_system CoordinateSystem
coordinate_system CoordinateSystemThe coordinate system of the mesh.
edges_per_element int
edges_per_element intThe number of edge for one element of the mesh.
We only support quads and hexes currently so it will be either 4 or 12.
element_nodal_fields dict[str, npt.NDArray]
element_nodal_fields dict[str, npt.NDArray]Element nodal fields.
element_nodes_shape tuple[int, ...]
element_nodes_shape tuple[int, ...]Return the shape of the element nodes array.
Useful for initializing element nodal fields.
Returns: The shape of the element nodes.
elemental_scalar_fields dict[str, npt.NDArray]
elemental_scalar_fields dict[str, npt.NDArray]Element scalar fields.
first_order_connectivity npt.NDArray
first_order_connectivity npt.NDArrayFirst order connectivity constructed from the corner points in case the shape mapping order is larger than 1.
max_dist_abc float
max_dist_abc floatMaximum distance of the absorbing damping layer from the edge of the domain.
ndim int
ndim intThe dimensionality of the mesh.
nelem int
nelem intTotal number of spectral elements in the unstructured mesh.
nodes_per_element int
nodes_per_element intThe number of nodes for one element of the mesh.
Will be 4 for first-order 2-D meshes, 9 for second-order 2-D meshes, 8 for first-order 3-D meshes, 125 for fourth-order 3-D meshes and so on.
npoint int
npoint intTotal number of nodes in the unstructured mesh.
number_of_elemental_fields int
number_of_elemental_fields intThe total number of elemental fields in the mesh.
number_of_elements int
number_of_elements intTotal number of spectral elements in the unstructured mesh.
number_of_global_arrays int
number_of_global_arrays intThe total number of global arrays in the mesh.
number_of_global_strings int
number_of_global_strings intThe total number of global strings in the mesh.
number_of_global_variables int
number_of_global_variables intThe total number of global variables in the mesh.
number_of_nodal_fields int
number_of_nodal_fields intThe total number of nodal fields in the mesh.
number_of_nodes int
number_of_nodes intTotal number of nodes in the unstructured mesh.
number_of_side_sets int
number_of_side_sets intThe total number of side sets in the mesh.
shape_order int
shape_order intShape mapping order, i.e. the number of points in each direction in the tensorized elements - 1.