This subroutine fills the array of inverse directions according to the given array of directions.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(out) | :: | me(:) |
array of positions of the inverse offsets in cxDir |
||
integer, | intent(in) | :: | cxDir(:,:) |
array of given offsets |
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