tem_stencil_getHeaderPos Function

public function tem_stencil_getHeaderPos(me, val) result(headerPos)

find position stencil

Arguments

Type IntentOptional Attributes Name
type(grw_stencilelementarray_type), intent(in) :: me

List of element stencil definitions

integer, intent(in) :: val

Stencil to search for

Return Value integer

Position of the header in the list, 0 if not found


Called by

proc~~tem_stencil_getheaderpos~~CalledByGraph proc~tem_stencil_getheaderpos tem_stencil_getHeaderPos proc~tem_stencil_communicate tem_stencil_communicate proc~tem_stencil_communicate->proc~tem_stencil_getheaderpos proc~tem_debug_horizontaldependencies tem_debug_HorizontalDependencies proc~tem_debug_horizontaldependencies->proc~tem_stencil_getheaderpos proc~tem_build_treehorizontaldep tem_build_treeHorizontalDep proc~tem_build_treehorizontaldep->proc~tem_stencil_getheaderpos proc~redefine_halos redefine_halos proc~redefine_halos->proc~tem_stencil_communicate proc~tem_build_horizontaldependencies tem_build_horizontalDependencies proc~tem_build_horizontaldependencies->proc~tem_build_treehorizontaldep proc~communicate_elements communicate_elements proc~communicate_elements->proc~redefine_halos proc~tem_create_leveldesc tem_create_levelDesc proc~tem_create_leveldesc->proc~tem_build_horizontaldependencies proc~tem_find_allelements tem_find_allElements proc~tem_find_allelements->proc~communicate_elements proc~tem_dimbydim_construction tem_dimByDim_construction proc~tem_dimbydim_construction->proc~tem_create_leveldesc

Contents


Source Code

  function tem_stencil_getHeaderPos( me, val ) result( headerPos )
    ! -------------------------------------------------------------------- !
    !> List of element stencil definitions
    type( grw_stencilElementArray_type ), intent(in) :: me
    !> Stencil to search for
    integer, intent(in) :: val
    !> Position of the header in the list, 0 if not found
    integer :: headerPos
    ! -------------------------------------------------------------------- !
    integer :: iStencil
    ! -------------------------------------------------------------------- !

    headerPos = 0

    ! Run over all the stencils
    do iStencil = 1, me%nVals
      if ( me%val(iStencil)%headerPos == val ) then
        headerPos = iStencil
      end if
    end do

  end function tem_stencil_getHeaderPos