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
MeshBlockCollectionclass MeshBlockCollection(builtins.object):
def __init__(
self,
mesh_blocks: (
collections.abc.Sequence[MeshBlock] | MeshBlock | None
) = None,
): ...A simple collection of a list of mesh block objects.
Parameters
mesh_blockscollections.abc.Sequence[MeshBlock] | MeshBlock | None — The mesh blocks making up the collection.
Attributes
ndim int
ndim intDimensionality of the mesh grid collection.
nodes_per_element int
nodes_per_element intDimension dependent number of nodes per linear element.
number_of_elements int
number_of_elements intTotal number of elements in all child mesh grids.
number_of_points int
number_of_points intTotal number of grid points in all child mesh grids.
Methods
apply_element_wise_mask()
apply_element_wise_mask()def apply_element_wise_mask(
self, masking_function: typing.Callable
) -> None: ...Apply an element wise mask to each of the children mesh grids.
Parameters
masking_functiontyping.Callable — Masking function, evaluated for each element centroid.
Returns None
get_unstructured_mesh()
get_unstructured_mesh()def get_unstructured_mesh(
self, scaling_factor: float = 1.0
) -> UnstructuredMesh: ...Convert the list of mesh grids to an unstructured mesh object.
Parameters
scaling_factorfloat — The scaling factor of the to-be-built mesh.
Returns UnstructuredMesh