which can be assigned to one of its face properties.
Type | Intent | Optional | 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. |
The element property of the element.
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