public subroutine sdr_smooth_leaf(proto, header, maxLevel)
This routine smoothens fluid domain with maximum level jumps of 1.
This is done by running over all leaf, flooded, non-intersected node
at each level and check for neighbor in all 26 directions.
If neighbor exist in protoTree and is not a leaf then get eligible
children of neighbor in the inverse direction of iDir and check
if any of eligible children is not a leaf then refine myself.
Algorithm:
Iterate over minLevel, maxLevel-2
- Iterate over all nodes in iLevel
+ if iNode is leaf, flooded and non intersected boundary
* Iterate over 26 directions
++ if neighbor in iDir exist in protoTree and not a leaf
** get eligible children of neighbor in inverse iDir
-- if any of eligible children in protoTree is not a leaf
+++ refine iNode
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed
arrows point from an interface to procedures which implement that interface.
This could include the module procedures in a generic interface or the
implementation in a submodule of an interface in a parent module.
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed
arrows point from an interface to procedures which implement that interface.
This could include the module procedures in a generic interface or the
implementation in a submodule of an interface in a parent module.