SELF_ElementSetMesh_3D Module

Partition a 3-D mesh into element sets and extract one sub-mesh per set.

An element set is the collection of all global elements that share a set id s(e) in {1, ..., nSets}, for example one set per material type. Each set is run by its own DG model on its own Mesh3D, and a parent model (MultiSetModel3D) couples the sets where they share faces. This module builds those sub-meshes.

Numbering. Global elements are numbered e = 1..nGlobalElem and rank r (0-based) owns the contiguous range offsetElem(r+1)+1 .. offsetElem(r+2) of the global mesh. Within set k, the set-global id of element e with s(e) = k is

g_k(e) = #{ e' <= e : s(e') = k },

i.e. set-global ids follow global element order. Each rank's elements of set k therefore form one contiguous block of set-global ids, and every sub-mesh keeps the global mesh's element ownership: no element changes rank.

Faces. A face between two elements of the same set stays an interior face of that set's sub-mesh, with its neighbour renumbered to g_k. A face between elements of different sets becomes an interface face of both sub-meshes:

sideInfo(1) = 0, sideInfo(3) = 0, sideInfo(4) = 0, sideInfo(5) = SELF_BC_SET_INTERFACE,

with sideInfo(2) keeping the global side id. An interface face is never a physical boundary; the parent model fills its exterior state. Domain boundary faces are copied unchanged. Every sub-mesh keeps the global nUniqueSides and global side ids, because the CPU halo exchange derives its message tags from them.

Mortars. A 2:1 or anisotropic mortar must lie entirely inside one set (ValidateSetPartition). Mortars inside a set are copied with their element ids renumbered to g_k, and the mortar index in sideInfo(1) is renumbered to the sub-mesh's mortar tables.

Collectives. GatherSetOfElem is a collective over the global mesh's communicator, and so is ExtractSubMesh (through the decomposition it builds). Every rank must call them for every set, including sets in which it owns no elements. The other routines are rank-local and return the same result on every rank.

Boundary-condition id that marks an interface face between two element sets in a sub-mesh. It is not a physical boundary condition: the parent model writes the exterior state on these faces. The value is outside the range of HOHQMesh boundary indices and of the ids defined in SELF_Mesh.


Uses

  • module~~self_elementsetmesh_3d~~UsesGraph module~self_elementsetmesh_3d SELF_ElementSetMesh_3D module~self_constants SELF_Constants module~self_elementsetmesh_3d->module~self_constants module~self_mesh_3d SELF_Mesh_3D module~self_elementsetmesh_3d->module~self_mesh_3d mpi mpi module~self_elementsetmesh_3d->mpi iso_c_binding iso_c_binding module~self_constants->iso_c_binding iso_fortran_env iso_fortran_env module~self_constants->iso_fortran_env module~self_mesh_3d->iso_c_binding module~self_mesh_3d_t SELF_Mesh_3D_t module~self_mesh_3d->module~self_mesh_3d_t module~self_gpu SELF_GPU module~self_mesh_3d->module~self_gpu module~self_mesh_3d_t->module~self_constants module~self_mesh_3d_t->iso_c_binding module~self_supportroutines SELF_SupportRoutines module~self_mesh_3d_t->module~self_supportroutines module~self_mesh SELF_Mesh module~self_mesh_3d_t->module~self_mesh module~self_quadrature SELF_Quadrature module~self_mesh_3d_t->module~self_quadrature module~self_hdf5 SELF_HDF5 module~self_mesh_3d_t->module~self_hdf5 HDF5 HDF5 module~self_mesh_3d_t->HDF5 module~self_domaindecomposition SELF_DomainDecomposition module~self_mesh_3d_t->module~self_domaindecomposition module~self_mesh_2d_t SELF_Mesh_2D_t module~self_mesh_3d_t->module~self_mesh_2d_t module~self_lagrange~3 SELF_Lagrange module~self_mesh_3d_t->module~self_lagrange~3 module~self_gpu->iso_c_binding module~self_gpu_enums~2 SELF_GPU_enums module~self_gpu->module~self_gpu_enums~2 module~self_supportroutines->module~self_constants module~self_supportroutines->iso_fortran_env module~self_mesh->module~self_constants module~self_mesh->iso_c_binding module~self_mesh->module~self_domaindecomposition module~self_quadrature->module~self_constants module~self_quadrature->iso_fortran_env module~self_hdf5->module~self_constants module~self_hdf5->mpi module~self_hdf5->iso_fortran_env module~self_hdf5->HDF5 module~self_domaindecomposition->mpi module~self_domaindecomposition->iso_c_binding module~self_domaindecomposition->iso_fortran_env module~self_domaindecomposition_t SELF_DomainDecomposition_t module~self_domaindecomposition->module~self_domaindecomposition_t module~self_mesh_2d_t->module~self_constants module~self_mesh_2d_t->iso_c_binding module~self_mesh_2d_t->module~self_supportroutines module~self_mesh_2d_t->module~self_mesh module~self_mesh_2d_t->module~self_quadrature module~self_mesh_2d_t->module~self_hdf5 module~self_mesh_2d_t->HDF5 module~self_mesh_2d_t->module~self_domaindecomposition module~self_mesh_2d_t->module~self_lagrange~3 module~self_lagrange~3->module~self_constants module~self_lagrange~3->iso_c_binding module~self_lagrange~3->iso_fortran_env module~self_lagrange~3->module~self_gpu module~self_lagrange_t SELF_Lagrange_t module~self_lagrange~3->module~self_lagrange_t module~self_gpu_enums~2->iso_c_binding module~self_domaindecomposition_t->module~self_constants module~self_domaindecomposition_t->mpi module~self_domaindecomposition_t->iso_c_binding module~self_domaindecomposition_t->module~self_supportroutines module~self_domaindecomposition_t->module~self_lagrange~3 module~self_lagrange_t->module~self_constants module~self_lagrange_t->iso_c_binding module~self_lagrange_t->iso_fortran_env module~self_lagrange_t->module~self_supportroutines module~self_lagrange_t->module~self_quadrature module~self_lagrange_t->module~self_hdf5 module~self_lagrange_t->HDF5

Used by

  • module~~self_elementsetmesh_3d~~UsedByGraph module~self_elementsetmesh_3d SELF_ElementSetMesh_3D module~self_multisetmodel3d_t SELF_MultiSetModel3D_t module~self_multisetmodel3d_t->module~self_elementsetmesh_3d module~self_multisetmodel3d SELF_MultiSetModel3D module~self_multisetmodel3d->module~self_multisetmodel3d_t module~self_multisetmodel3d~2 SELF_MultiSetModel3D module~self_multisetmodel3d~2->module~self_multisetmodel3d_t

Contents


Variables

TypeVisibilityAttributesNameInitial
integer, public, parameter:: SELF_BC_SET_INTERFACE =9100

Functions

public function ValidateSetPartition(globalMesh, setOfElem, nSets) result(ok)

Check that a global set map can be split into sub-meshes.

Read more…

Arguments

TypeIntentOptionalAttributesName
type(Mesh3D), intent(in) :: globalMesh
integer, intent(in) :: setOfElem(1:)
integer, intent(in) :: nSets

Return Value logical


Subroutines

public subroutine BuildSetNumbering(globalMesh, setOfElem, nSets, setGlobalId, setOffsets)

Number the elements of every set and partition each set over the ranks.

Read more…

Arguments

TypeIntentOptionalAttributesName
type(Mesh3D), intent(in) :: globalMesh
integer, intent(in) :: setOfElem(1:)
integer, intent(in) :: nSets
integer, intent(out) :: setGlobalId(1:)
integer, intent(out) :: setOffsets(1:,1:)

public subroutine ExtractSubMesh(globalMesh, iset, setOfElem, setGlobalId, setOffsets, comm, subMesh)

Build the sub-mesh of element set iset from this rank's slice of the global mesh.

Read more…

Arguments

TypeIntentOptionalAttributesName
type(Mesh3D), intent(in) :: globalMesh
integer, intent(in) :: iset
integer, intent(in) :: setOfElem(1:)
integer, intent(in) :: setGlobalId(1:)
integer, intent(in) :: setOffsets(1:,1:)
integer, intent(in) :: comm
type(Mesh3D), intent(out) :: subMesh

public subroutine GatherSetOfElem(globalMesh, setOfElemLocal, setOfElem)

Gather the set id of every global element onto every rank.

Read more…

Arguments

TypeIntentOptionalAttributesName
type(Mesh3D), intent(in) :: globalMesh
integer, intent(in) :: setOfElemLocal(1:globalMesh%nElem)
integer, intent(out) :: setOfElem(1:)