tem_identify_inverseDirections Subroutine

public subroutine tem_identify_inverseDirections(me, cxDir)

This subroutine fills the array of inverse directions according to the given array of directions.

Arguments

Type IntentOptional Attributes Name
integer, intent(out) :: me(:)

array of positions of the inverse offsets in cxDir

integer, intent(in) :: cxDir(:,:)

array of given offsets


Called by

proc~~tem_identify_inversedirections~~CalledByGraph proc~tem_identify_inversedirections tem_identify_inverseDirections proc~init_stencilheader init_stencilHeader proc~init_stencilheader->proc~tem_identify_inversedirections interface~init~6 init interface~init~6->proc~init_stencilheader proc~tem_loadstencil tem_loadStencil proc~tem_loadstencil->proc~init_stencilheader

Source Code

  subroutine tem_identify_inverseDirections( me, cxDir )
    ! -------------------------------------------------------------------- !
    !> array of positions of the inverse offsets in cxDir
    integer, intent(out) :: me(:)
    !> array of given offsets
    integer, intent(in)  :: cxDir(:,:)
    ! -------------------------------------------------------------------- !
    ! counter variable
    integer :: iOffset, iCompare, QQ
    ! -------------------------------------------------------------------- !

    QQ = size(me)

    do iOffset=1,QQ
      do iCompare=1,QQ

        if ( (( -cxDir(1, iOffset) ) == ( cxDir(1, iCompare) ))       &
          &  .and. (( -cxDir(2, iOffset) ) == ( cxDir(2, iCompare) )) &
          &  .and. (( -cxDir(3, iOffset) ) == ( cxDir(3, iCompare) )) ) then
          me( iOffset ) = iCompare
          EXIT
        end if

      end do ! iCompare
    end do ! iOffset

  end subroutine tem_identify_inverseDirections