floodwaves_tree Subroutine

private subroutine floodwaves_tree(proto, header, geometry)

This routine loop over all nodes are flood non-interesting leaf node with wet face and inherit the wetness of the virtual node to the eligble childrens

The algorithm works by flooding the domain, starting from the seed points up to boundary elements. This approach is quite robust to broken STL definitions, as any cracks below the resolution are automatically healed and there is no dependece on the orientation of the surfaces. To avoid unintended leaking, the flooding takes only the 6 side neighbors into account, that is the computational domain will always be connected by faces, there will be no parts of the domain which are only connected by edges or corners.

Seeds are already marked as flooded during the previous leaf identification, also the neighboring sides have already been marked as wet. Note, that seeds in nodes with boundaries are ignored and not flooded.

Several iterations are done, referred to as waves and within each the following algorithm is used:

Iterate over all nodes. - If node is a leaf + If not intersecting boundaries: * Check if any side is wet, and if so, flood yourself. If flooded, mark all neighboring sides as wet. + If intersecting boundaries: nothing to do!

  • For virtual nodes: (if not leaf)
  • Inherit wet sides down to the direct children on this side (eligible children).

The procedure is finished, if no property changed during a wave. (Flooded status and wet faces are encoded in the PropertyBits field.

Arguments

TypeIntentOptionalAttributesName
type(sdr_protoTree_type), intent(inout) :: proto

The proto tree description with all the data enabling the flooding.

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

some global information on solver name and version

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

Calls

proc~~floodwaves_tree~~CallsGraph proc~floodwaves_tree floodwaves_tree proc~sdr_mark_floodnode sdr_mark_floodNode proc~floodwaves_tree->proc~sdr_mark_floodnode proc~tem_directchildren tem_directChildren proc~floodwaves_tree->proc~tem_directchildren interface~tem_log tem_log proc~floodwaves_tree->interface~tem_log interface~sdr_wetneighborsface sdr_wetNeighborsFace proc~floodwaves_tree->interface~sdr_wetneighborsface proc~sdr_write_proto_as_restart sdr_write_proto_as_restart proc~floodwaves_tree->proc~sdr_write_proto_as_restart proc~tem_eligiblechildren tem_eligibleChildren proc~floodwaves_tree->proc~tem_eligiblechildren interface~tem_tostr tem_toStr proc~floodwaves_tree->interface~tem_tostr proc~sdr_wetneighborsface_all sdr_wetNeighborsFace_all interface~sdr_wetneighborsface->proc~sdr_wetneighborsface_all proc~sdr_wetneighborsface_single sdr_wetNeighborsFace_single interface~sdr_wetneighborsface->proc~sdr_wetneighborsface_single proc~tem_restart_writeheader tem_restart_writeHeader proc~sdr_write_proto_as_restart->proc~tem_restart_writeheader proc~protodata_ofnode protoData_ofNode proc~sdr_write_proto_as_restart->proc~protodata_ofnode proc~sdr_nodeprop_btest sdr_nodeProp_btest proc~sdr_write_proto_as_restart->proc~sdr_nodeprop_btest proc~sdr_append_protovar sdr_append_protoVar proc~sdr_write_proto_as_restart->proc~sdr_append_protovar proc~write_childleaves write_childLeaves proc~sdr_write_proto_as_restart->proc~write_childleaves proc~dump_tem_global dump_tem_global proc~sdr_write_proto_as_restart->proc~dump_tem_global proc~tem_solvertag tem_solverTag proc~sdr_write_proto_as_restart->proc~tem_solvertag proc~tem_create_varmap tem_create_varMap proc~sdr_write_proto_as_restart->proc~tem_create_varmap proc~tem_varsys_init tem_varSys_init proc~sdr_write_proto_as_restart->proc~tem_varsys_init proc~newunit newunit proc~sdr_write_proto_as_restart->proc~newunit proc~protodata_ofnode->proc~sdr_nodeprop_btest proc~sdr_wetneighborsface_all->proc~sdr_wetneighborsface_single proc~tem_varsys_append_statevar tem_varSys_append_stateVar proc~sdr_append_protovar->proc~tem_varsys_append_statevar proc~write_childleaves->proc~protodata_ofnode proc~write_childleaves->proc~sdr_nodeprop_btest proc~write_childleaves->proc~write_childleaves

Called by

proc~~floodwaves_tree~~CalledByGraph proc~floodwaves_tree floodwaves_tree proc~sdr_flood_tree sdr_flood_tree proc~sdr_flood_tree->proc~floodwaves_tree program~seeder seeder program~seeder->proc~sdr_flood_tree

Contents


Variables

TypeVisibilityAttributesNameInitial
integer, private :: iNode
integer, private :: faceBitCheck
integer, private :: iDir
integer, private :: iSide
integer(kind=long_k), private :: childIds(8)
integer(kind=long_k), private :: virtualId
integer, private, allocatable:: eligible_childs(:)
integer, private :: childPos
integer, private :: wetFace
integer, private :: wetFaceBit_pos
integer, private :: iChild
integer, private, allocatable:: old_prop(:,:)
integer, private :: iWave
integer, private :: iColor
integer, private :: col_int
integer, private :: col_bit
integer, private :: myColor
integer, private :: nodeprops
integer, private :: propLength