sdr_protoTree_module Module

This module provides the description of the evolving tree, as it is built up to match the given geometry.

The concept used here, is a proposal for an algorithm, following a level-wise iterative approach instead of an recursive one. This is better suited for parallel processing. Also it tries to follow more closely the principals from tem_construction and the solver layout. That is, treating seeder more like a solver in itself.

For flooding a concept of wet sides on coarser levels is used, all elements need to track just a single neighbor in each direction in this case. And the coarse ghost elements take care of flooding their children accordingly themselves.


Uses

Used by

  • module~~sdr_prototree_module~~UsedByGraph module~sdr_prototree_module sdr_protoTree_module module~sdr_boundary_module sdr_boundary_module module~sdr_boundary_module->module~sdr_prototree_module module~sdr_flooding_module sdr_flooding_module module~sdr_flooding_module->module~sdr_prototree_module module~sdr_flooding_module->module~sdr_boundary_module module~sdr_proto2treelm_module sdr_proto2treelm_module module~sdr_proto2treelm_module->module~sdr_prototree_module module~sdr_proto2treelm_module->module~sdr_boundary_module module~sdr_refinept_module sdr_refinePT_module module~sdr_refinept_module->module~sdr_prototree_module program~seeder seeder program~seeder->module~sdr_prototree_module program~seeder->module~sdr_flooding_module program~seeder->module~sdr_proto2treelm_module program~seeder->module~sdr_refinept_module

Derived Types

type, public ::  sdr_protoTree_type

The protoTree is used to describe the preliminary tree, before it is actually extended to the full information of the mesh.

Read more…

Components

Type Visibility Attributes Name Initial
integer, public :: nLevels

Keep track of the deepest level in the tree.

integer, public :: nLeafNodes

Number of leaf nodes.

integer, public :: nFloodedLeaves

Number of flooded leaves.

type(sdr_node_type), public :: node

List of all nodes in the tree, each node contains a list of the objects it is intersecting and a property bit mask. It is identified by its treeID.

Read more…
integer, public :: levelNode_first(0:globalMaxLevels)

The index of the first node on a given level in node%treeID%sorted.

integer, public :: levelNode_last(0:globalMaxLevels)

The index of the last node on a given level in node%treeID%sorted.

type(grw_intarray_type), public :: child_intersected_object

Temporary array intersected objects of 8 children which will later be copied to intersected_object in node_type.

Read more…

type, public ::  levelValues_type

Auxilary data type to provide data on the current level iteration.

Components

Type Visibility Attributes Name Initial
integer(kind=long_k), public :: ID_offset

First treeID on current level

real(kind=rk), public :: dx

Node cube length on current level

integer, public :: level

Number of the level itself.


Functions

public function sdr_node_neighbors(me, level_offset, iNode, coord) result(neighbors)

This routine identifies the 6 direct neighbors of a node in the prototree

Read more…

Arguments

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

neighbors are identified for this tree and neighbor of each node are stored at link_pos of each node in node_data type

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

First treeID on level

integer, intent(in) :: iNode

Node position in protoTree

integer, intent(in), optional :: coord(4)

if coord is present, no need to compute using tem_coordOfID

Return Value integer, (6)

public function sdr_neighbor_in_proto(proto, coord, iDir, neighbor_level) result(pos)

Find the neighbor position in protoTree for iDir on the same level or on any one above.

Arguments

Type IntentOptional Attributes Name
type(sdr_protoTree_type), intent(in) :: proto

preliminary tree

integer, intent(in) :: coord(4)
integer, intent(in) :: iDir
integer, intent(out) :: neighbor_level

Return Value integer

private function protoData_ofNode(node_pos, proto, geometry, level) result(protodata)

Small helping routine to get the variable data from a leaf.

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: node_pos
type(sdr_protoTree_type), intent(in) :: proto
type(sdr_geometry_type), intent(in) :: geometry
integer, intent(in) :: level

Return Value real(kind=rk), (11+proto%node%nColors)


Subroutines

public subroutine sdr_build_protoTree(me, geometry, header)

This routine builds the preliminary tree with geometry intersection and neighbor identification

Arguments

Type IntentOptional Attributes Name
type(sdr_protoTree_type), intent(out) :: me

preliminary tree created by this routine

type(sdr_geometry_type), intent(inout) :: geometry

type which contains all geometry object infos

type(sdr_confHead_type), intent(inout) :: header

some global information on solver name and version

public subroutine sdr_write_proto_as_restart(proto, geometry, itime, header, prefix)

Write current leaves of the prototree as treelm restart.

Read more…

Arguments

Type IntentOptional Attributes Name
type(sdr_protoTree_type), intent(in) :: proto

The prototree to output.

type(sdr_geometry_type), intent(in) :: geometry

Bounding cube, the prototree lives in.

integer, intent(in) :: itime

wave number in character format to prepend to filenames and timestamp

type(sdr_confHead_type), intent(in) :: header

some global information on solver name and version

character(len=*), intent(in), optional :: prefix

prefix for filenames

private subroutine create_children(me, parent, geometry, leVal, testAll, minlevel)

This routine creates children for each parent if children intersect with boundary object.

Read more…

Arguments

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

preliminary tree on which childern are created

integer, intent(in) :: parent

Position of parent node on the growing array of node_treeID and node_data in preliminary tree

type(sdr_geometry_type), intent(in) :: geometry

type which contains all geometry object infos

type(levelValues_type), intent(in) :: leVal

contains information on current level on which children are created

logical, intent(in) :: testAll

testAll objects only for root node

integer, intent(in) :: minlevel

private subroutine mark_leafNode(me, node_pos)

Small helping routine to keep track of leaf nodes.

Read more…

Arguments

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

Property bit mask to set the leaf bit in

integer, intent(in) :: node_pos

private subroutine sdr_mark_neighborHasBnd(proto, coord)

This routine marks 26 direct neighbors as has boundary bit

Arguments

Type IntentOptional Attributes Name
type(sdr_protoTree_type), intent(inout) :: proto

neighbors are identified for this tree and neighbors as marked with hasBoundary_bit

integer, intent(in) :: coord(4)

Coordinate of current node

private recursive subroutine write_childLeaves(meshunit, restunit, iLeaf, node_pos, proto, geometry, level)

Small helping routine to write leaves in order into a treelmesh formatted file.

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: meshunit
integer, intent(in) :: restunit
integer, intent(inout) :: iLeaf
integer, intent(in) :: node_pos
type(sdr_protoTree_type), intent(in) :: proto
type(sdr_geometry_type), intent(in) :: geometry
integer, intent(in) :: level