tem_get_elemPrp Function

private function tem_get_elemPrp(levelDesc, elemPos) result(elemPrp)

which can be assigned to one of its face properties.

Arguments

Type IntentOptional Attributes Name
type(tem_levelDesc_type), intent(in) :: levelDesc

The level descriptor that contains the investigated element.

integer, intent(in) :: elemPos

The position of the element in the total list of the level descriptor.

Return Value integer

The element property of the element.


Calls

proc~~tem_get_elemprp~~CallsGraph proc~tem_get_elemprp tem_get_elemPrp proc~tem_abort tem_abort proc~tem_get_elemprp->proc~tem_abort mpi_abort mpi_abort proc~tem_abort->mpi_abort

Called by

proc~~tem_get_elemprp~~CalledByGraph proc~tem_get_elemprp tem_get_elemPrp proc~tem_get_faces tem_get_faces proc~tem_get_faces->proc~tem_get_elemprp proc~tem_collect_faces tem_collect_faces proc~tem_collect_faces->proc~tem_get_faces proc~tem_build_face_info tem_build_face_info proc~tem_build_face_info->proc~tem_collect_faces

Contents

Source Code


Source Code

  function tem_get_elemPrp(levelDesc, elemPos) result(elemPrp)
    ! --------------------------------------------------------------------------
    !> The level descriptor that contains the investigated element.
    type(tem_levelDesc_type), intent(in) :: levelDesc
    !> The position of the element in the total list of the level descriptor.
    integer, intent(in) :: elemPos
    !> The element property of the element.
    integer :: elemPrp
    ! --------------------------------------------------------------------------

    elemPrp = 0

    ! If the element does not exist, we can only assign the non-existing
    ! property.
    if(elemPos == 0) then
      elemPrp = tem_notExist_prp
      return
    elseif(elemPos < 0) then
      elemPrp = tem_bndFace_prp
      return
    end if

    ! Check for fluid
    if( levelDesc%offset(1,1)+1 <= elemPos .and.                               &
      & elemPos<=levelDesc%offset(1,1)+levelDesc%elem%nElems( eT_fluid )  ) then
      elemPrp = tem_fluidFace_prp
    ! Check for ghost from coarser
    else if (levelDesc%offset(1,2)+1<=elemPos .and.                          &
      & elemPos<=levelDesc%offset(1,2)+levelDesc%elem%nElems( eT_ghostFromCoarser) ) then
      elemPrp = tem_fromCoarserFace_prp
    ! Check for ghost from finer
    else if (levelDesc%offset(1,3)+1<=elemPos .and.                          &
      & elemPos<=levelDesc%offset(1,3)+levelDesc%elem%nElems( eT_ghostFromFiner )) then
      elemPrp = tem_fromFinerFace_prp
    ! Check for halo
    else if (levelDesc%offset(1,4)+1<=elemPos .and.                          &
      & elemPos<=levelDesc%offset(1,4)+levelDesc%elem%nElems( eT_halo ) ) then
      elemPrp = tem_remoteFace_prp
    ! Everything else should not occur
    else
      write(*,*) 'ERROR in tem_get_elemPrp: Unknown element property, '//      &
        &        'stopping ...'
      call tem_abort()
    end if

  end function tem_get_elemPrp