treelmesh_type Derived Type

type, public :: treelmesh_type

declaration of the overall mesh on the local partition

Components

TypeVisibility AttributesNameInitial
type(tem_global_type), public :: global

This entry provides some global informations on the mesh, which is needed across all partitions.

integer, public :: nElems
integer(kind=long_k), public :: elemOffset
integer(kind=long_k), public, allocatable:: Part_First(:)

List of treeIDs of the first element on each partition, has a length of global%nParts

integer(kind=long_k), public, allocatable:: Part_Last(:)

List of treeIDs of the last element on each partition, has a length of global%nParts

integer(kind=long_k), public, allocatable:: treeID(:)

The treeIDs of each element (the array has a length of nElems) these IDs identify the element in the complete mesh, with a breadth-first numbering scheme. Allowing easy computation of parents and children. [treeid] \ref treeID

# TreeID {#treeID} The coordinate description of an element has three spatial entries and a fourth entry indicating the refinement level in the octree, resulting in a tuple of four integers: \f$(x, y, z, L)\f$.

This coordinate fully describes the spatial shape and position of an element and is important to determine spatial relations between elements. It can be obtained from a given treeID by the following procedure. 1. First, the \ref tem_topology_module::tem_levelof "refinement level" is found. 2. Then a \ref tem_topology_module::tem_firstidatlevel "level-offset" is calculated. 3. After the offset is known, the Morton index of the node in question is obtained by subtracting the offset \f$s\f$ from the treeID of the node. 4. Finally a simple bit interleaving rule allows the \ref tem_topology_module::tem_coordofid "transformation from the Morton index to the three dimensional coordinates".

The spatial indices are limited by the refinement level: \f$x, y, z \in \mathbf{Z}_{\ge 0}: x, y, z < 2^L\f$. To avoid undefined coordinates, movements through the mesh by additions to indices are done in a modulo(\f$2^L\f$) safeguard resulting in a periodic universe cube. This enables the movement in the mesh in horizontal direction (e.g. for stencil neighbor identification) by index alteration and translation into a treeID again.

integer(kind=long_k), public, allocatable:: ElemPropertyBits(:)

Bit field of element properties for each element (the array has a length of nElems), each bit in the 8 byte integer indicates the presence or absence of a given property, which are further described in the Property component.

type(tem_property_type), public, pointer:: Property(:)=> null()

declaration of additional elemental properties, the array has a length of global%nProperties, each property provides a list of local element indices of elements with this property.

type(tem_path_type), public, allocatable:: pathList(:)

Path for all elements in the treeID array

character(len=pathLen), public :: weights_file =''

Name of the file that contains weight information for each element to allow load balancing. If empty string, balancing will be deactivated.

character(len=pathLen), public :: write_weights

File to write weights to after simulation. Defaults to the same name as weights_file, if you do not want to have the input file overwritten, you can provide a different file to write to by setting write_weights accordingly in the configuration.

real(kind=rk), public :: levelWeight(globalMaxLevels)

Level weights as provided by the solver.