FIXME : Add documentation
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(redist_type), | intent(inout) | :: | r | |||
complex, | intent(in), | dimension (r%to_low(1):, r%to_low(2):) | :: | from_here | ||
complex, | intent(inout), | dimension (r%from_low(1):, r%from_low(2):) | :: | to_here |
subroutine c_redist_22_inv_old_copy (r, from_here, to_here)
use mp, only: iproc
implicit none
type (redist_type), intent (in out) :: r
complex, dimension (r%to_low(1):, &
r%to_low(2):), intent (in) :: from_here
complex, dimension (r%from_low(1):, &
r%from_low(2):), intent (in out) :: to_here
integer :: i, nn
!CMR
! In the GS2 standard FFT situation this routine maps
! yxf(ik,iyxf) to xxf(it,ixxf) data type
! where it is kx (or x) index, ik is ky (or y) index,
! ixxf is (y,ig,isgn,"les") and iyxf is (x,ig,isgn,"les")
!
nn = r%to(iproc)%nn
!$OMP PARALLEL DO DEFAULT(none) &
!$OMP SHARED(nn, to_here, from_here, r, iproc) &
!$OMP SCHEDULE(static)
do i = 1, nn
!
! redistribute from local processor to local processor
! NB r%from(iproc)%nn is #elements sent by THIS processor to THIS processor
! In this situation the data at (r%from(iproc)%k(i),r%from(iproc)%l(i))
! should come from (r%to(iproc)%k(i), r%to(iproc)%l(i)).
!
! This do loop, in GS2 standard FFT situation, corresponds to:
! to_here(it,ixxf)=from_here(ik,iyxf)
!
to_here(r%from(iproc)%k(i), &
r%from(iproc)%l(i)) &
= from_here(r%to(iproc)%k(i), &
r%to(iproc)%l(i))
end do
!$OMP END PARALLEL DO
end subroutine c_redist_22_inv_old_copy