Mondaic

salvus.mesh.algorithms.unstructured_mesh.dmplex

salvus.mesh.algorithms.unstructured_mesh.dmplex salvus mesh algorithms unstructured_mesh dmplex

Functions for working with DMPlex representations of unstructured meshes.

Functions

discretize_blocks()

def discretize_blocks(
    n: int, mesh: DistributedMesh
) -> list[tuple[bindings.DMPlex, bindings.DMPlex]]: ...

Discretize the blocks in the DMPlex object

Two discretizations will be created per block: one for a tensorized GLL nodal basis of order n, and one for a discontinuous basis of order 0 (i.e. 1 point per element).

Parameters
  • n int — The polynomial degree of the GLL nodal basis.
  • mesh DistributedMesh — The distributed mesh.
Returns list[tuple[bindings.DMPlex, bindings.DMPlex]]

get_global_sf()

def get_global_sf(dm: bindings.DMPlex) -> bindings.PetscStarForest: ...

Get a global star forest for the given DMPlex.

Parameters
  • dm bindings.DMPlex — The DMPlex to get the global star forest for.
Returns bindings.PetscStarForest

label_blocks()

def label_blocks(mesh: DistributedMesh, dm: bindings.DMPlex) -> None: ...

Add labels to the DMPlex object corresponding to the blocks in the mesh.

Labels are added with the name “block_{block_id}” and mark the cells in the DMPlex that correspond to the elements in the block.

Collective over the communicator associated with the DMPlex. Updates the DMPlex object in-place.

Parameters
  • mesh DistributedMesh — The mesh containing the block information.
  • dm bindings.DMPlex — The DMPlex object to add the labels to.
Returns None