Map requested halo to a position in my local fluid list or add recursively ghosts until I reach valid fluid elements return type of added element in levelPos(2) Also, non-existing elements are reported as such (levelPos(2))
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=long_k), | intent(in) | :: | haloTreeID |
neighboring treeID |
||
integer, | intent(out) | :: | elemPos |
type and position in list of found treeID |
||
integer, | intent(out) | :: | haloLevel | |||
type(tem_levelDesc_type), | intent(inout) | :: | levelDesc(minlevel:) | |||
type(treelmesh_type), | intent(in) | :: | tree | |||
logical, | intent(out) | :: | updated | |||
integer, | intent(in) | :: | nesting | |||
integer, | intent(in) | :: | minLevel | |||
type(tem_stencilHeader_type), | intent(in) | :: | stencil |
subroutine identify_halo( haloTreeID, elemPos, haloLevel, levelDesc, tree, &
& updated, nesting, minLevel, stencil )
! ---------------------------------------------------------------------------
!>
type(treelmesh_type), intent(in) :: tree
!>
integer, intent(in) :: minLevel
!>
integer, intent(in) :: nesting
!> neighboring treeID
integer(kind=long_k), intent(in) :: haloTreeID
!> type and position in list of found treeID
integer, intent(out) :: elemPos
!>
integer, intent(out) :: haloLevel
!>
logical, intent(out) :: updated
!>
type(tem_levelDesc_type), intent(inout) :: levelDesc(minlevel:)
!>
type(tem_stencilHeader_type), intent(in) :: stencil
! ---------------------------------------------------------------------------
haloLevel = tem_levelOf( haloTreeID )
elemPos = PositionOfVal( me = levelDesc( halolevel )%elem%tID, &
& val = haloTreeID )
if( elemPos == 0 ) then
! requested halo does not exist and has to be created somehow
call identify_local_element( targetID = haloTreeID, &
& levelDesc = levelDesc, &
& tree = tree, &
& elemPos = elemPos, &
& nesting = nesting, &
& updated = updated, &
& minLevel = minLevel, &
& stencil = stencil )
end if
end subroutine identify_halo