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.

Arguments

TypeIntentOptionalAttributesName
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 proc~tem_directchildren tem_directChildren proc~create_children~2->proc~tem_directchildren proc~is_intersecting is_intersecting proc~create_children~2->proc~is_intersecting interface~append~10 append proc~create_children~2->interface~append~10 proc~mark_leafnode mark_leafNode proc~create_children~2->proc~mark_leafnode interface~sdr_append_childintersectedobject sdr_append_childIntersectedObject proc~create_children~2->interface~sdr_append_childintersectedobject proc~sdr_set_nodeprop_bit sdr_set_nodeProp_bit proc~create_children~2->proc~sdr_set_nodeprop_bit proc~sdr_mark_floodnode sdr_mark_floodNode proc~create_children~2->proc~sdr_mark_floodnode proc~sdr_inheritbnd_eligiblechildren sdr_inHeritBnd_eligibleChildren proc~create_children~2->proc~sdr_inheritbnd_eligiblechildren proc~tem_coordofid tem_CoordOfId proc~create_children~2->proc~tem_coordofid proc~sdr_periodicplanecubeoverlap sdr_periodicPlaneCubeOverlap proc~is_intersecting->proc~sdr_periodicplanecubeoverlap proc~tem_trianglecubeoverlap tem_triangleCubeOverlap proc~is_intersecting->proc~tem_trianglecubeoverlap proc~tem_pointcubeoverlap tem_pointCubeOverlap proc~is_intersecting->proc~tem_pointcubeoverlap proc~tem_boxcubeoverlap tem_boxCubeOverlap proc~is_intersecting->proc~tem_boxcubeoverlap proc~tem_spherecubeoverlap tem_sphereCubeOverlap proc~is_intersecting->proc~tem_spherecubeoverlap proc~tem_ellipsoidcubeoverlap tem_ellipsoidCubeOverlap proc~is_intersecting->proc~tem_ellipsoidcubeoverlap proc~tem_linecubeoverlap tem_lineCubeOverlap proc~is_intersecting->proc~tem_linecubeoverlap proc~tem_cylindercubeoverlap tem_cylinderCubeOverlap proc~is_intersecting->proc~tem_cylindercubeoverlap proc~sdr_spacerinterwovencubeoverlap sdr_spacerInterwovenCubeOverlap proc~is_intersecting->proc~sdr_spacerinterwovencubeoverlap proc~mark_leafnode->proc~sdr_set_nodeprop_bit proc~sdr_append_childintersectedobjectall sdr_append_childIntersectedObjectAll interface~sdr_append_childintersectedobject->proc~sdr_append_childintersectedobjectall proc~sdr_append_childintersectedobjectgtminlevel sdr_append_childIntersectedObjectGTminLevel interface~sdr_append_childintersectedobject->proc~sdr_append_childintersectedobjectgtminlevel proc~tem_eligiblechildren tem_eligibleChildren proc~sdr_inheritbnd_eligiblechildren->proc~tem_eligiblechildren proc~sdr_nodeprop_btest sdr_nodeProp_btest proc~sdr_inheritbnd_eligiblechildren->proc~sdr_nodeprop_btest proc~sdr_append_childintersectedobjectall->interface~append~10 proc~sdr_append_childintersectedobjectall->proc~sdr_nodeprop_btest interface~placeat~8 placeat proc~sdr_append_childintersectedobjectall->interface~placeat~8 interface~mrgrnk mrgrnk proc~sdr_append_childintersectedobjectall->interface~mrgrnk proc~sdr_periodicplanecubeoverlap->proc~tem_trianglecubeoverlap proc~sdr_append_childintersectedobjectgtminlevel->interface~append~10 proc~sdr_append_childintersectedobjectgtminlevel->proc~sdr_nodeprop_btest proc~sdr_append_childintersectedobjectgtminlevel->interface~placeat~8 proc~sdr_append_childintersectedobjectgtminlevel->interface~mrgrnk proc~sdr_spacerinterwovencubeoverlap->proc~tem_spherecubeoverlap

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

Contents


Variables

TypeVisibilityAttributesNameInitial
integer, private :: iChild
integer, private :: iObject
integer, private :: nObjects
integer(kind=long_k), private :: treeID(8)
integer, private :: node_coord(4)
integer, private :: firstchild_coord(4)
integer, private :: node_pos
integer, private :: obj_pos
integer, private :: attr_pos
integer, private :: attr_kind
integer, private :: maxLevel
integer, private :: min_BCID
integer, private :: n_ni_seeds
integer, private :: seed_color(me%node%nColors)
integer, private :: propbits(me%node%propLength)
integer, private :: iColor
integer, private :: col_int
integer, private :: col_bit
integer, private :: objkind_count(sdr_object_kinds_max)
integer, private :: bc_color
integer, private :: bcid
integer, private :: child_sublevel
logical, private :: reached_leaf
logical, private :: reached_maxlevel
logical, private :: subresolution
logical, private :: color_seeded(me%node%nColors)
logical, private :: color_intersected(me%node%nColors)
logical, private :: nonecolor_intersected
logical, private :: child_hasBnd(8)
type(sdr_intersectObjPos_type), private :: child_objPos(8)
integer, private :: intersected_first
integer, private :: intersected_last
integer, private :: child_nodePos(8)
integer, private :: child_nObjects(8)
integer, private :: memLeft
type(tem_cube_type), private :: node_cube