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

salvus.mesh.data_structures.mesh_block.mesh_block_collection

Salvus’ mesh block collection class.

Classes

MeshBlockCollection

class MeshBlockCollection(builtins.object):
    def __init__(
        self,
        mesh_blocks: Optional[
            Sequence[
                salvus.mesh.data_structures.mesh_block.mesh_block.MeshBlock
            ],
            salvus.mesh.data_structures.mesh_block.mesh_block.MeshBlock,
        ] = None,
    ): ...

A simple collection of a list of mesh block objects.

Parameters
  • mesh_blocks Optional[Sequence[salvus.mesh.data_structures.mesh_block.mesh_block.MeshBlock], salvus.mesh.data_structures.mesh_block.mesh_block.MeshBlock] — The mesh blocks making up the collection.
Attributes
ndim int

Dimensionality of the mesh grid collection.

nodes_per_element int

Dimension dependent number of nodes per linear element.

number_of_elements int

Total number of elements in all child mesh grids.

number_of_points int

Total number of grid points in all child mesh grids.

Methods
apply_element_wise_mask()
def apply_element_wise_mask(self, masking_function: Callable) -> None: ...

Apply an element wise mask to each of the children mesh grids.

Parameters
  • masking_function Callable — Masking function, evaluated for each element centroid.
Returns None
get_unstructured_mesh()
def get_unstructured_mesh(
    self, scaling_factor: float = 1.0
) -> (
    salvus.mesh.data_structures.unstructured_mesh.unstructured_mesh.UnstructuredMesh
): ...

Convert the list of mesh grids to an unstructured mesh object.

Parameters
  • scaling_factor float — The scaling factor of the to-be-built mesh.
Returns salvus.mesh.data_structures.unstructured_mesh.unstructured_mesh.UnstructuredMesh