identify_halo Subroutine

private subroutine identify_halo(haloTreeID, elemPos, haloLevel, levelDesc, tree, updated, nesting, minLevel, stencil)

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))

Arguments

Type IntentOptional 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

Calls

proc~~identify_halo~~CallsGraph proc~identify_halo identify_halo proc~tem_levelof tem_LevelOf proc~identify_halo->proc~tem_levelof proc~identify_local_element identify_local_element proc~identify_halo->proc~identify_local_element interface~positionofval~5 positionofval proc~identify_halo->interface~positionofval~5 proc~identify_local_element->proc~tem_levelof proc~identify_local_element->interface~positionofval~5 proc~tem_posofpath tem_PosOfPath proc~identify_local_element->proc~tem_posofpath proc~tem_pathof tem_PathOf proc~identify_local_element->proc~tem_pathof proc~add_ghostfromfiner add_ghostFromFiner proc~identify_local_element->proc~add_ghostfromfiner proc~tem_tidinfo tem_tIDinfo proc~identify_local_element->proc~tem_tidinfo proc~add_all_virtual_children add_all_virtual_children proc~identify_local_element->proc~add_all_virtual_children interface~append~2 append proc~identify_local_element->interface~append~2 proc~posofval_label posofval_label interface~positionofval~5->proc~posofval_label proc~add_ghostfromfiner->proc~tem_levelof proc~add_ghostfromfiner->interface~positionofval~5 proc~add_ghostfromfiner->proc~tem_posofpath proc~add_ghostfromfiner->proc~tem_pathof proc~add_ghostfromfiner->proc~add_ghostfromfiner proc~add_ghostfromfiner->interface~append~2 proc~tem_directchildren tem_directChildren proc~add_ghostfromfiner->proc~tem_directchildren proc~tem_find_bcs_fromfiner tem_find_BCs_fromFiner proc~add_ghostfromfiner->proc~tem_find_bcs_fromfiner interface~sortedposofval~5 sortedposofval proc~posofval_label->interface~sortedposofval~5 proc~tem_elemsize tem_ElemSize proc~tem_tidinfo->proc~tem_elemsize proc~tem_coordofid tem_CoordOfId proc~tem_tidinfo->proc~tem_coordofid proc~tem_baryofid tem_BaryOfId proc~tem_tidinfo->proc~tem_baryofid proc~add_all_virtual_children->proc~tem_levelof proc~add_all_virtual_children->interface~positionofval~5 proc~add_all_virtual_children->proc~add_all_virtual_children proc~add_all_virtual_children->interface~append~2 proc~tem_childnumber tem_childNumber proc~add_all_virtual_children->proc~tem_childnumber proc~tem_find_bcs_fromcoarser tem_find_BCs_fromCoarser proc~add_all_virtual_children->proc~tem_find_bcs_fromcoarser proc~tem_idofcoord tem_IdOfCoord proc~add_all_virtual_children->proc~tem_idofcoord proc~add_all_virtual_children->proc~tem_coordofid interface~init~22 init proc~add_all_virtual_children->interface~init~22 proc~append_ga_dynlong append_ga_dynlong interface~append~2->proc~append_ga_dynlong proc~append_ga_dynlong_vec append_ga_dynlong_vec interface~append~2->proc~append_ga_dynlong_vec proc~tem_find_bcs_fromfiner->interface~append~2 proc~tem_find_bcs_fromfiner->interface~init~22 proc~stenciltochild stencilToChild proc~tem_find_bcs_fromfiner->proc~stenciltochild proc~update_childneighborid update_childNeighborID proc~tem_find_bcs_fromfiner->proc~update_childneighborid proc~sortposofval_label sortposofval_label interface~sortedposofval~5->proc~sortposofval_label proc~childtostencil childToStencil proc~tem_find_bcs_fromcoarser->proc~childtostencil interface~expand~2 expand proc~append_ga_dynlong->interface~expand~2 proc~tem_elemsize->proc~tem_levelof proc~tem_elemsizelevel tem_ElemSizeLevel proc~tem_elemsize->proc~tem_elemsizelevel proc~tem_coordofid->proc~tem_levelof proc~tem_baryofid->proc~tem_coordofid proc~tem_baryofid->proc~tem_elemsizelevel proc~init_ga2d_real init_ga2d_real interface~init~22->proc~init_ga2d_real proc~append_ga_dynlong_vec->interface~expand~2

Called by

proc~~identify_halo~~CalledByGraph proc~identify_halo identify_halo proc~request_remotehalos request_remoteHalos proc~request_remotehalos->proc~identify_halo proc~communicate_elements communicate_elements proc~communicate_elements->proc~request_remotehalos proc~tem_find_allelements tem_find_allElements proc~tem_find_allelements->proc~communicate_elements proc~tem_create_leveldesc tem_create_levelDesc proc~tem_create_leveldesc->proc~tem_find_allelements

Contents

Source Code


Source Code

  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