create_children Subroutine

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

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.

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

Calls

proc~~create_children~2~~CallsGraph proc~create_children~2 create_children append append proc~create_children~2->append bc_color_id bc_color_id proc~create_children~2->bc_color_id proc~is_intersecting is_intersecting proc~create_children~2->proc~is_intersecting proc~mark_leafnode mark_leafNode proc~create_children~2->proc~mark_leafnode sdr_append_childintersectedobject sdr_append_childintersectedobject proc~create_children~2->sdr_append_childintersectedobject sdr_inheritbnd_eligiblechildren sdr_inheritbnd_eligiblechildren proc~create_children~2->sdr_inheritbnd_eligiblechildren sdr_mark_floodnode sdr_mark_floodnode proc~create_children~2->sdr_mark_floodnode sdr_set_nodeprop_bit sdr_set_nodeprop_bit proc~create_children~2->sdr_set_nodeprop_bit tem_CoordOfId tem_CoordOfId proc~create_children~2->tem_CoordOfId tem_directChildren tem_directChildren proc~create_children~2->tem_directChildren val val proc~create_children~2->val proc~is_intersecting->val sdr_periodicplanecubeoverlap sdr_periodicplanecubeoverlap proc~is_intersecting->sdr_periodicplanecubeoverlap sdr_spacerinterwovencubeoverlap sdr_spacerinterwovencubeoverlap proc~is_intersecting->sdr_spacerinterwovencubeoverlap tem_boxCubeOverlap tem_boxCubeOverlap proc~is_intersecting->tem_boxCubeOverlap tem_cylinderCubeOverlap tem_cylinderCubeOverlap proc~is_intersecting->tem_cylinderCubeOverlap tem_ellipsoidCubeOverlap tem_ellipsoidCubeOverlap proc~is_intersecting->tem_ellipsoidCubeOverlap tem_lineCubeOverlap tem_lineCubeOverlap proc~is_intersecting->tem_lineCubeOverlap tem_pointCubeOverlap tem_pointCubeOverlap proc~is_intersecting->tem_pointCubeOverlap tem_sphereCubeOverlap tem_sphereCubeOverlap proc~is_intersecting->tem_sphereCubeOverlap tem_triangleCubeOverlap tem_triangleCubeOverlap proc~is_intersecting->tem_triangleCubeOverlap proc~mark_leafnode->sdr_set_nodeprop_bit

Called by

proc~~create_children~2~~CalledByGraph proc~create_children~2 create_children proc~sdr_build_prototree sdr_build_protoTree proc~sdr_build_prototree->proc~create_children~2 program~seeder seeder program~seeder->proc~sdr_build_prototree