Mondaic
This API reference is not for the latest stable Salvus version.

salvus.mesh.data_structures.unstructured_mesh.unstructured_mesh

The unstructured mesh class for higher order quadrilateral and hexahedral meshes.

Classes

UnstructuredMesh

class 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.

Parameters
  • points npt.NDArray — Nodes of the mesh, array with shape (number of points, number of dimensions)
  • connectivity npt.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)).
  • scale float — A scaling of the mesh that is only applied to the points array upon writing to file.
  • global_variables dict — Global variables stored in the mesh.
  • global_strings dict — Global strings stored in the mesh.
  • global_arrays dict — Global arrays stored in the mesh.
  • elemental_fields dict[str, npt.NDArray] — Fields defined on the mesh.
  • nodal_fields dict[str, npt.NDArray] — Nodal fields.
  • side_sets dict[str, tuple[npt.NDArray, npt.NDArray]] — The side sets.
  • deformations dict[str, npt.NDArray] — Collects so far unapplied deformations.
Attributes
coordinate_system CoordinateSystem

The coordinate system of the mesh.

edges_per_element int

The 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.

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]

Element scalar fields.

first_order_connectivity npt.NDArray

First order connectivity constructed from the corner points in case the shape mapping order is larger than 1.

max_dist_abc float

Maximum distance of the absorbing damping layer from the edge of the domain.

ndim int

The dimensionality of the mesh.

nelem int

Total number of spectral elements in the unstructured mesh.

nodes_per_element int

The 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

Total number of nodes in the unstructured mesh.

number_of_elemental_fields int

The total number of elemental fields in the mesh.

number_of_elements int

Total number of spectral elements in the unstructured mesh.

number_of_global_arrays int

The total number of global arrays in the mesh.

number_of_global_strings int

The total number of global strings in the mesh.

number_of_global_variables int

The total number of global variables in the mesh.

number_of_nodal_fields int

The total number of nodal fields in the mesh.

number_of_nodes int

Total number of nodes in the unstructured mesh.

number_of_side_sets int

The total number of side sets in the mesh.

shape_order int

Shape mapping order, i.e. the number of points in each direction in the tensorized elements - 1.