tem_stencil_zeroPos Function

public function tem_stencil_zeroPos(me) result(pos)

Identify the zero-position in the stencil Return -1 if not found in stencil

Arguments

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

stencil to map

Return Value integer

Position of zero-entry in the stencil


Source Code

  function tem_stencil_zeroPos( me ) result( pos )
    ! -------------------------------------------------------------------- !
    !> stencil to map
    type(tem_stencilHeader_type),intent(in) :: me
    !> Position of zero-entry in the stencil
    integer :: pos
    ! -------------------------------------------------------------------- !
    ! counter
    integer :: iQQ
    ! -------------------------------------------------------------------- !
    pos = -1
    do iQQ = 1, me%QQ
      if( me%cxDir( 1, iQQ ) == 0 .and.  &
        & me%cxDir( 2, iQQ ) == 0 .and.  &
        & me%cxDir( 3, iQQ ) == 0 ) then
        pos = iQQ
        exit
      end if
    end do
  end function tem_stencil_zeroPos