prepare_target_elem_list Subroutine

public subroutine prepare_target_elem_list(nComp, elemoff, nChunkElems, res, LPList, nElems_gi, pntTreeID, target_ielem_list, scheme, tree, geomIncr)

This routine compares the macroscopic quantity obtained for an element against specified threshold and populates the list of target elements which participate in geometry change. In addition it sets the property bit(s) of target elements to fluidify in case of solidification and clears this bit in case of fluidification

     EXIT

else ! iVar != 1 or iDepend != 1 ! loop over the tree ID list which was found for the first geomIncr loop. ! Doing this we ensure the AND condition among ! different variables within a depend table and as the number of target ! elements is hardly 5% of the total geometry, it improves computational ! efficiency of the code. local_elem = 0 do iElem = 1, nElems_gi elemPos = LPlist( target_ielem_list( iElem )) iLevel = tem_LevelOf( tree%treeID( & & pntTreeID( target_ielem_list(iElem) ) ) ) elemProp = levelDesc( iLevel )%property( elemPos ) isSolid = btest( elemProp, prp_fluidify ) if( isSolid .neqv. geomIncr%solidify ) then ! if condition variable is a vector then all index must be satisfied cond = all(res( (target_ielem_list(iElem)-1)nComp + 1 & & : target_ielem_list(iElem)nComp) > 0.0_rk)

     ! Update the local tree ID list
     if ( cond ) then
       ! Update the property bit
       call mus_setSolidProp(                                    &
         &       property = levelDesc(iLevel)%property(elemPos), &
         &       solidify = geomIncr%solidify                    )
       ! and the ones in the global tree
       call mus_setSolidProp(                             &
         &   property = tree%ElemPropertyBits(pntTreeID(iElem)), &
         &   solidify = geomIncr%solidify                        )
       ! and update the flag meshChange because something changed
       ! geometry%tree%global%meshChange = .true.
       local_elem = local_elem + 1
       target_ielem_list(local_elem) = target_ielem_list(iElem)
     end if ! condition satisfies
   end if ! is my target
 end do ! iElem
 ! number of target elements is updated
 nElems_gi = local_elem

end if ! nElems_gi == 0

Arguments

TypeIntentOptionalAttributesName
integer, intent(in) :: nComp

total number of components

integer, intent(in) :: elemoff

offset of elements in chunk

integer, intent(in) :: nChunkElems

number of elements in chunk

real(kind=rk), intent(in) :: res(:)

result from condition variable

integer, intent(in) :: LPList(:)

list of level pointers

integer, intent(inout) :: nElems_gi

number of final elements

integer, intent(in) :: pntTreeID(:)

element position in global treeID list tree%treeID

integer, intent(inout) :: target_ielem_list(:)

target element list for second iGInc to reduce computation effort

type(mus_scheme_type), intent(inout) :: scheme

scheme information

type(treelmesh_type), intent(inout) :: tree

fluid tree from mesh, element property bits are set to solidify if condition variable is 1

type(mus_geomIncrHead_type), intent(inout) :: geomIncr

current geometry increment


Calls

proc~~prepare_target_elem_list~~CallsGraph proc~prepare_target_elem_list prepare_target_elem_list proc~mus_setprop mus_setProp proc~prepare_target_elem_list->proc~mus_setprop proc~tem_levelof tem_LevelOf proc~prepare_target_elem_list->proc~tem_levelof

Called by

proc~~prepare_target_elem_list~~CalledByGraph proc~prepare_target_elem_list prepare_target_elem_list proc~mus_geomincr mus_geomIncr proc~mus_geomincr->proc~prepare_target_elem_list proc~check_flow_status check_flow_status proc~check_flow_status->proc~mus_geomincr proc~mus_solve mus_solve proc~mus_solve->proc~check_flow_status program~musubi musubi program~musubi->proc~mus_solve

Contents


Variables

TypeVisibilityAttributesNameInitial
integer, private :: local_elem
integer, private :: iElem
integer, private :: iLevel
integer, private :: elemPos
integer, private :: neighPos
integer, private :: iField
integer, private :: iDir
integer(kind=long_k), private :: neighProp
logical, private :: isSolid
logical, private :: cond