This routine creates children for each parent if children intersect with boundary object.
First loop over 8 children, and test for intersection of each child cube with the geometry objects inherited from the parent node. Then check for various object kinds, that might be intersected: If BOUNDARY objects are intersected, record the minimal bcID for later, boundaries are only marked as a leaf if the maxlevel has been reached. If NO BOUNDARY are intersected, the refinement can stop early here, and the node is marked as leaf. This avoids overly many elements before flooding. If a leaf is intersecting a SEED object, mark it already as flooded here. Children that do not intersect any objects do not need to be refined further at this stage and are marked as leaf nodes.
Todo
HK: The content of the childLoop should probably move into its own subroutine, it could then also be used to define the root node (treeID=0). Though this might just add a 9th check on all defined objects in most cases. Needs further thinking.
| Type | Intent | Optional | 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 |