This module contains subroutines needed to create and update subTrees from corresponding global trees.
The subroutine tem_create_subTree_of creates a subTree from a global tree using an array of shapes. This functionality is used when certain operations (e.g. tracking, source terms) shall be executed only on a subset of the fluid tree (or another tree).
interface for copying the property bits from the global tree or the level descriptor
Copy the properties of the level decriptor to the ones in subTree.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(tem_levelDesc_type), | intent(in) | :: | levelDesc(:) | level descriptor including all elements (fluid, ghost, halo) |
||
type(tem_subTree_type), | intent(inout) | :: | subTree | tree to pass information to |
Copy the properties of inTree to the ones in subTree.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(treelmesh_type), | intent(in) | :: | inTree | tree to get information from |
||
type(tem_subTree_type), | intent(inout) | :: | subTree | tree to pass information to |
Update the property of subTree with the ones from inTree, if something changed update the logical meshChange.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(treelmesh_type), | intent(in) | :: | inTree | tree to get information from |
||
type(tem_subTree_type), | intent(inout) | :: | subTree | tree to pass information to |
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. Only processes in comm will be involved.
Type | Intent | Optional | 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 |
|
integer, | intent(in), | optional | :: | comm | mpi communicator to use, defaults to the one in me%global%comm if not specified |
|
character(len=*), | intent(in), | optional | :: | dirname | directory to store the mesh in. is taken to be me%global%dirname if not specified |
|
type(tem_grwPoints_type), | intent(in), | optional | :: | grwPnts | array of point vaues that neeeds to be stored in the subtree |
Create a subTree from a given inTree and an array of shapes.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(treelmesh_type), | intent(in) | :: | inTree | Global mesh from which the elements are identified and then stored to |
||
type(tem_subTree_type), | intent(out) | :: | subTree | new mesh |
||
type(tem_shape_type), | intent(in) | :: | inShape(:) | shape objects on which to work |
||
type(tem_levelDesc_type), | intent(in), | optional | :: | levelDesc(:) | optional level descriptor needed for local shape |
|
type(tem_BC_prop_type), | intent(in), | optional | :: | bc_prop | bc property which is used to identify elements belong to certain BCs |
|
logical, | intent(in), | optional | :: | storePnts | To store space points in subTree |
|
type(tem_stencilHeader_type), | intent(in), | optional | :: | stencil | stencil used to find bcID on certain links |
|
character(len=*), | intent(in), | optional | :: | prefix | prefix for the subTree |
Create newtree out of intree by restricting to the elements of subtree.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(treelmesh_type), | intent(in) | :: | intree | The tree on which the subtree is defined. |
||
type(tem_subTree_type), | intent(in) | :: | subtree | Subtree describing the part of the mesh to create a new mesh from. |
||
type(treelmesh_type), | intent(out) | :: | newtree | Resulting new tree with the elements selected by subtree from newtree. |
||
logical, | intent(in), | optional | :: | keep_props | Flag to indicate whether to keep properties from intree also in newtree. If this is true, the properties will be copied from the intree to the
newtree. An actual copy is done, as we can not rely on the pointer
targets in intree to exist further on.
Default is |
Write the complete mesh including fluid, ghosts and halo elements to disk
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(treelmesh_type), | intent(in) | :: | globtree | mesh to locate the point in |
||
type(tem_levelDesc_type), | intent(in) | :: | levelDesc(:) | current level descriptor |
||
type(tem_debug_type), | intent(inout), | optional | :: | debug | debug info |
|
integer, | intent(in) | :: | myPart | Partition to use on the calling process (= MPI Rank in comm) |
Copy the properties of the level decriptor to the ones in subTree.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(tem_levelDesc_type), | intent(in) | :: | levelDesc(:) | level descriptor including all elements (fluid, ghost, halo) |
||
type(tem_subTree_type), | intent(inout) | :: | subTree | tree to pass information to |
Copy the properties of inTree to the ones in subTree.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(treelmesh_type), | intent(in) | :: | inTree | tree to get information from |
||
type(tem_subTree_type), | intent(inout) | :: | subTree | tree to pass information to |
This routine identify all the elements in inTree that has a certain property bit, save their positions in inTree into array: map2global, save the number of these elements into level wise array: countElems (e.g. for shape kind='property').
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=long_k), | intent(in) | :: | propBits | shape objects on which to work |
||
type(treelmesh_type), | intent(in) | :: | inTree | Global mesh from which the elements are identified and then stored to |
||
integer, | intent(out) | :: | countElems(globalMaxLevels) | How many elements there will be for each level in the track |
||
type(dyn_intarray_type), | intent(inout) | :: | map2global | growing array. Elements positions in inTree%treeID |
This subroutine collects the treeIDs of all elements in the level descriptor on the local partition (e.g. used in debug mesh, no general option for now).
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(tem_levelDesc_type), | intent(in) | :: | levelDesc(:) | level descriptor including all elements (fluid, ghost, halo) |
||
integer(kind=long_k), | intent(out), | allocatable | :: | treeID(:) | temporary array of treeIDs |
This routine identify elements that belong to certain bounaries. Labels of required boundaries are given by bcLabels. bc_prop contains boudnary_ID of all local elements. Firstly, bcLabels are converted into bcIDs. Then all elements in bc_prop are looped over to check if it matches one of the required bcID. If match, its position is save in map2global. Number of elements found on each level is saved in countElems.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=labelLen), | intent(in) | :: | bcLabels(:) | bcLabels |
||
type(tem_BC_prop_type), | intent(in) | :: | bc_prop | bc property |
||
logical, | intent(out) | :: | foundAny | if any element be identified |
||
type(dyn_intarray_type), | intent(inout) | :: | map2global | dynamic array. Elements positions in bc_prop%property%elemID |
||
integer, | intent(out), | allocatable | :: | bcIDs(:) | id of boundary condition to be tracked |
|
type(tem_stencilHeader_type), | intent(in), | optional | :: | stencil | stencil required to get useful links |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(treelmesh_type), | intent(in) | :: | inTree | Global mesh from which the elements are identified and then stored to |
||
integer, | intent(in) | :: | minLevel | level range of target elements |
||
integer, | intent(in) | :: | maxLevel | level range of target elements |
||
integer, | intent(out) | :: | countElems(globalMaxLevels) | How many elements there will be for each level in the track |
||
type(dyn_intarray_type), | intent(inout) | :: | map2global | growing array. Elements positions in inTree%treeID |