tem_build_levelPointer Subroutine

private subroutine tem_build_levelPointer(levelPointer, tree, levelDesc)

Arguments

Type IntentOptional Attributes Name
integer, intent(out), allocatable :: levelPointer(:)

Pointer from original treeID list to level wise fluid list

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

the global tree

type(tem_levelDesc_type), intent(in) :: levelDesc(tree%global%minlevel:)

the level descriptor to be filled


Calls

proc~~tem_build_levelpointer~~CallsGraph proc~tem_build_levelpointer tem_build_levelPointer proc~tem_levelof tem_LevelOf proc~tem_build_levelpointer->proc~tem_levelof tem_positioninsorted tem_positioninsorted proc~tem_build_levelpointer->tem_positioninsorted

Called by

proc~~tem_build_levelpointer~~CalledByGraph proc~tem_build_levelpointer tem_build_levelPointer proc~tem_find_allelements tem_find_allElements proc~tem_find_allelements->proc~tem_build_levelpointer proc~tem_create_leveldesc tem_create_levelDesc proc~tem_create_leveldesc->proc~tem_find_allelements proc~tem_dimbydim_construction tem_dimByDim_construction proc~tem_dimbydim_construction->proc~tem_create_leveldesc proc~tem_build_face_info tem_build_face_info proc~tem_build_face_info->proc~tem_dimbydim_construction

Contents


Source Code

  subroutine tem_build_levelPointer( levelPointer, tree, levelDesc )
    ! ---------------------------------------------------------------------------
    !> Pointer from original treeID list to level wise fluid list
    integer, allocatable, intent(out)     :: levelPointer(:)
    !> the global tree
    type(treelmesh_type), intent(in)      :: tree
    !> the level descriptor to be filled
    type(tem_levelDesc_type), intent(in)  :: levelDesc(tree%global%minlevel:)
    ! ---------------------------------------------------------------------------
    integer :: iLevel, iElem
    ! ---------------------------------------------------------------------------

    ! KM: NOTE: scheme independent levelPointer is build for each scheme
    ! if ( allocated( levelPointer ) ) then deallocate( levelPointer )
    allocate( levelPointer( tree%nElems ))

    do iElem = 1, tree%nElems
      iLevel = tem_levelOf( tree%treeID( iElem ))
      levelPointer( iElem ) = tem_PositionInSorted(                            &
        &                      me    = levelDesc( iLevel )%total,              &
        &                      val   = tree%treeID( iElem ),                   &
        &                      upper = levelDesc( iLevel )%elem%nElems( eT_fluid ) )
    end do

  end subroutine tem_build_levelPointer