tem_subTree_module Module

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).


Uses

Used by

  • module~~tem_subtree_module~~UsedByGraph module~tem_subtree_module tem_subTree_module program~tem_varsys_stfunvar_test tem_varSys_stfunVar_test program~tem_varsys_stfunvar_test->module~tem_subtree_module module~tem_spacetime_fun_module tem_spacetime_fun_module program~tem_varsys_stfunvar_test->module~tem_spacetime_fun_module module~tem_derived_module tem_derived_module program~tem_varsys_stfunvar_test->module~tem_derived_module module~tem_variable_module tem_variable_module program~tem_varsys_stfunvar_test->module~tem_variable_module program~tem_varsys_test tem_varSys_test program~tem_varsys_test->module~tem_subtree_module program~tem_varsys_test->module~tem_spacetime_fun_module module~tem_spacetime_var_module tem_spacetime_var_module program~tem_varsys_test->module~tem_spacetime_var_module program~tem_varsys_test->module~tem_variable_module module~tem_spacetime_fun_module->module~tem_subtree_module module~hvs_output_module hvs_output_module module~hvs_output_module->module~tem_subtree_module module~tem_varmap_module tem_varMap_module module~hvs_output_module->module~tem_varmap_module module~tem_tracking_module tem_tracking_module module~tem_tracking_module->module~tem_subtree_module module~tem_tracking_module->module~hvs_output_module module~tem_tracking_module->module~tem_varmap_module module~tem_simcontrol_module tem_simControl_module module~tem_tracking_module->module~tem_simcontrol_module program~tem_varsys_opvar_test tem_varSys_opVar_test program~tem_varsys_opvar_test->module~tem_subtree_module program~tem_varsys_opvar_test->module~tem_spacetime_fun_module program~tem_varsys_opvar_test->module~tem_derived_module program~tem_varsys_opvar_test->module~tem_variable_module module~tem_convergence_module tem_convergence_module module~tem_convergence_module->module~tem_subtree_module module~tem_convergence_module->module~tem_varmap_module module~tem_derived_module->module~tem_spacetime_fun_module module~tem_derived_module->module~tem_spacetime_var_module module~tem_derived_module->module~tem_variable_module program~tem_varsys_derivevar_test tem_varSys_deriveVar_test program~tem_varsys_derivevar_test->module~tem_spacetime_fun_module module~tem_spacetime_var_module->module~tem_spacetime_fun_module module~tem_spacetime_var_module->module~tem_variable_module program~tem_variable_evaltype_test tem_variable_evaltype_test program~tem_variable_evaltype_test->module~tem_spacetime_fun_module program~tem_variable_evaltype_test->module~tem_derived_module program~tem_variable_evaltype_test->module~tem_variable_module module~tem_varmap_module->module~tem_spacetime_fun_module module~tem_varmap_module->module~tem_spacetime_var_module module~tem_surfacedata_module tem_surfaceData_module module~tem_surfacedata_module->module~tem_spacetime_fun_module program~tem_spacetime_fun_test tem_spacetime_fun_test program~tem_spacetime_fun_test->module~tem_spacetime_fun_module program~tem_logical_opertor_test tem_logical_opertor_test program~tem_logical_opertor_test->module~tem_spacetime_fun_module program~tem_logical_opertor_test->module~tem_derived_module program~tem_logical_opertor_test->module~tem_variable_module program~tem_variable_extract_test tem_variable_extract_test program~tem_variable_extract_test->module~tem_spacetime_fun_module program~tem_variable_extract_test->module~tem_derived_module program~tem_variable_extract_test->module~tem_variable_module program~tem_variable_combine_test tem_variable_combine_Test program~tem_variable_combine_test->module~tem_spacetime_fun_module program~tem_variable_combine_test->module~tem_derived_module program~tem_variable_combine_test->module~tem_variable_module module~tem_face_module tem_face_module module~tem_face_module->module~tem_spacetime_fun_module program~tem_tracking_test tem_tracking_test program~tem_tracking_test->module~tem_tracking_module module~tem_variable_module->module~tem_spacetime_fun_module module~tem_bc_module tem_bc_module module~tem_bc_module->module~tem_spacetime_fun_module module~tem_bc_module->module~tem_varmap_module module~tem_simcontrol_module->module~tem_convergence_module module~tem_abortcriteria_module tem_abortCriteria_module module~tem_simcontrol_module->module~tem_abortcriteria_module module~tem_abortcriteria_module->module~tem_convergence_module program~tem_face_test~3 tem_face_test program~tem_face_test~3->module~tem_face_module module~tem_general_module tem_general_module module~tem_general_module->module~tem_simcontrol_module module~tem_general_module->module~tem_abortcriteria_module module~tem_depend_module tem_depend_module module~tem_depend_module->module~tem_varmap_module module~tem_restart_module tem_restart_module module~tem_restart_module->module~tem_varmap_module program~tem_face_test tem_face_test program~tem_face_test->module~tem_face_module program~tem_face_test~2 tem_face_test program~tem_face_test~2->module~tem_face_module module~tem_operation_var_module tem_operation_var_module module~tem_operation_var_module->module~tem_varmap_module module~tem_operation_var_module->module~tem_variable_module

Contents


Interfaces

private interface tem_copyPropertyBits

interface for copying the property bits from the global tree or the level descriptor

  • private subroutine tem_copyPropertyBitsFromLevelDesc(levelDesc, subTree)

    Copy the properties of the level decriptor to the ones in subTree.

    Arguments

    TypeIntentOptionalAttributesName
    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

  • private subroutine tem_copyPropertyBitsFromTree(inTree, subTree)

    Copy the properties of inTree to the ones in subTree.

    Arguments

    TypeIntentOptionalAttributesName
    type(treelmesh_type), intent(in) :: inTree

    tree to get information from

    type(tem_subTree_type), intent(inout) :: subTree

    tree to pass information to


Subroutines

public subroutine tem_updatePropertyBits(inTree, subTree)

Update the property of subTree with the ones from inTree, if something changed update the logical meshChange.

Arguments

TypeIntentOptionalAttributesName
type(treelmesh_type), intent(in) :: inTree

tree to get information from

type(tem_subTree_type), intent(inout) :: subTree

tree to pass information to

public subroutine tem_subTree_from(me, map2global, treeID, comm, dirname, grwPnts)

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.

Arguments

TypeIntentOptionalAttributesName
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

public subroutine tem_create_subTree_of(inTree, subTree, inShape, levelDesc, bc_prop, storePnts, stencil, prefix)

Create a subTree from a given inTree and an array of shapes.

Read more…

Arguments

TypeIntentOptionalAttributesName
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

public subroutine tem_create_tree_from_sub(intree, subtree, newtree, keep_props)

Create newtree out of intree by restricting to the elements of subtree.

Read more…

Arguments

TypeIntentOptionalAttributesName
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 .false., which means all properties will be dropped and newtree will have no properties at all.

public subroutine tem_write_debugMesh(globtree, levelDesc, debug, myPart)

Write the complete mesh including fluid, ghosts and halo elements to disk

Read more…

Arguments

TypeIntentOptionalAttributesName
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)

private subroutine tem_copyPropertyBitsFromLevelDesc(levelDesc, subTree)

Copy the properties of the level decriptor to the ones in subTree.

Arguments

TypeIntentOptionalAttributesName
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

private subroutine tem_copyPropertyBitsFromTree(inTree, subTree)

Copy the properties of inTree to the ones in subTree.

Arguments

TypeIntentOptionalAttributesName
type(treelmesh_type), intent(in) :: inTree

tree to get information from

type(tem_subTree_type), intent(inout) :: subTree

tree to pass information to

private subroutine tem_shape_initPropElements(propBits, inTree, countElems, map2global)

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').

Arguments

TypeIntentOptionalAttributesName
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

private subroutine tem_shape_initLocal(levelDesc, 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).

Arguments

TypeIntentOptionalAttributesName
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

private subroutine tem_shape_findElemByBCLabels(bcLabels, bc_prop, foundAny, map2global, bcIDs, stencil)

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.

Arguments

TypeIntentOptionalAttributesName
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

private subroutine tem_shape_initByLevels(inTree, minLevel, maxLevel, countElems, map2global)

Arguments

TypeIntentOptionalAttributesName
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