Version:

salvus.mesh.data_structures.mesh_block.mesh_block_collection

salvus.mesh.data_structures.mesh_block.mesh_block_collection salvus mesh data_structures mesh_block mesh_block_collection
Salvus' mesh block collection class.

Classes

MeshBlockCollection

A simple collection of a list of mesh block objects.
SIGNATURE
class MeshBlockCollection(builtins.object):
    def __init__(
        self,
        mesh_blocks: (
            collections.abc.Sequence[MeshBlock] | MeshBlock | None
        ) = None,
    ): ...
ARGUMENTS
Optional
mesh_blocks
Type:collections.abc.Sequence[MeshBlock] | MeshBlock | None
Default value:None
Description:
The mesh blocks making up the collection.

Properties

  • 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

MeshBlockCollection.apply_element_wise_mask()
Apply an element wise mask to each of the children mesh grids.
SIGNATURE
def apply_element_wise_mask(
    self, masking_function: typing.Callable
) -> None: ...
ARGUMENTS
Required
masking_function
Type:typing.Callable
Description:
Masking function, evaluated for each element centroid.
MeshBlockCollection.get_unstructured_mesh()
Convert the list of mesh grids to an unstructured mesh object.
SIGNATURE
def get_unstructured_mesh(
    self, scaling_factor: float = 1.0
) -> UnstructuredMesh: ...
ARGUMENTS
Optional
scaling_factor
Type:float
Default value:1.0
Description:
The scaling factor of the to-be-built mesh.

Used in tutorials

Functionality from this module is used in the following tutorials.
PAGE CONTENTS