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
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
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 |
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
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 |