tem_subTree_type_module Module

Module for the subTree datatype.

The subTree datatype consists of an array of pointers (map2global) to the list of treeIDs of an actual tree in treelmesh format, global information on the subTree,



Derived Types

type, public ::  tem_subTree_type

Datatype for sub trees incl. local and global information as well as an array of pointers to the global list of treeIDs

Components

Type Visibility Attributes Name Initial
type(tem_global_type), public :: global

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

integer, public :: nElems

Total number of elements on this partition

integer, public :: nPoints

Total number of points on this partition

integer(kind=long_k), public :: glob_nPoints

Total number of points on this subTree

real(kind=rk), public, allocatable :: points(:,:)

(n, 3) array to store coordinate points for tracking

logical, public :: useGlobalMesh = .False.

does the subTree correspond with the corresponding one (valid for shape='all')

integer, public, allocatable :: map2global(:)

Position of the treeID in the corresponding tree on the partition only set for useGlobalMesh == False and useLocalShape == False

logical, public :: useLocalMesh = .False.

Does the subTree correspond local partition?

logical, public :: created_new_comm = .false.

Flag to indicate, whether a new communicator was created for this subtree.

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

Actual array of treeIDs in the subTree. This is only defined for useGlobalMesh = .False. and logical :: useLocalMesh = .True. set for useGlobalMesh == False and useLocalShape == False

integer, public, allocatable :: bc_ID(:)

array of bc_ids of boundary labels defined in tracking%shape boundary

integer(kind=long_k), public :: elemOffset

Offset of this partition

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.


Subroutines

public subroutine tem_local_subTree_from(me, map2global, treeID)

This subroutine creates a subTree based on a provided map or list of treeids (in case a local shape is used) to the corresponding tree. This routine shall be called from a single process only, it is not intended to communicate and broadcast its information. requires the setting of me%global before hand.

Arguments

Type IntentOptional Attributes Name
type(tem_subTree_type), intent(inout) :: me

subTree to be created from list of elements (map2global)

integer, intent(in), optional :: map2global(:)

position of the treeID in the global treeID list

integer(kind=long_k), intent(in), optional :: treeID(:)

list of treeIDs only use this in case a local shape is set

public subroutine tem_dump_subTree(me, globalTree, root_only)

This subroutine creates a new mesh in treelmesh format from a global and a sub tree and dumps it to disc in treelmesh format (needed for tracking in harvester format where the mesh has to be dumped to disc)

Arguments

Type IntentOptional Attributes Name
type(tem_subTree_type), intent(in) :: me

subTree to dump to disk

type(treelmesh_type), intent(in) :: globalTree

the global tree

logical, intent(in), optional :: root_only

root dump global mesh when true and all process dump its own mesh when false

public subroutine tem_treeIDfrom_subTree(me, glob_tree, treeID, bound)

This subroutine derives all treeIDs of a subTree from the corresponding global tree and stores them in treeID.

Arguments

Type IntentOptional Attributes Name
type(tem_subTree_type), intent(in) :: me

subTree of glob_tree

type(treelmesh_type), intent(in) :: glob_tree

corresponding global tree

integer(kind=long_k), intent(out), allocatable :: treeID(:)

complete treeID list

integer, intent(in) :: bound(2)

lower(1) and upper(2) bound of the element array

public subroutine tem_destroy_subTree(me)

This subroutine frees the resources used for a subtree.

Arguments

Type IntentOptional Attributes Name
type(tem_subTree_type), intent(inout) :: me

subTree of glob_tree