traverse_tree Subroutine

public recursive subroutine traverse_tree(node_pos, leVal, proto, geometry, temData, header, meshUniverse)

Recursively traverse the tree in a depth first manner to obtain the the ordering required by treelm.

Only consider flooded nodes here, no need to traverse further down any non-flooded node, as it does not belong to the computational domain. All virtual nodes containing at least one flooded leaf node has already been determined and set after flooding in sdr_flood_module::sdr_flood_tree. If the leaf node is reached, hand over to the ::refine_leaf routine, to find all elements, that actually should be created in the computational domain.

Todo

KM: Store has_boundary information for every leaf node in sdr_refine_leaf routine to avoid excessive boundary checking far away from the boundaries.

If this node is flooded or fluidifyable it needs to be included in the final mesh.

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: node_pos

Position of leaf in the preliminary tree

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

level value of current node

type(sdr_protoTree_type), intent(in) :: proto

preliminary tree

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

contains all geometrical objects

type(sdr_temData_type), intent(inout) :: temData

temData contains final treelmesh

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

Header information

type(treelmesh_type), intent(inout) :: meshUniverse

contains bounding cube information