FIXME : Add documentation
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex, | intent(in), | dimension (:,xxf_lo%llim_proc:) | :: | xxf | ||
real, | intent(out), | dimension (:,yxf_lo%llim_proc:) | :: | yxf |
subroutine transform_y5d (xxf, yxf)
use gs2_layouts, only: xxf_lo, yxf_lo
use redistribute, only: gather
use job_manage, only: time_message
use fft_work, only: time_fft
use array_utils, only: zero_array
implicit none
complex, dimension (:,xxf_lo%llim_proc:), intent (in) :: xxf
# ifdef FFT
real, dimension (:,yxf_lo%llim_proc:), intent (out) :: yxf
# else
real, dimension (:,yxf_lo%llim_proc:), intent(in out) :: yxf
# endif
! Zero out the array as the subsequent gather doesn't populate
! every element as we skip communicating forbidden points and
! we are padding our data
call zero_array(fft)
!Note here we're doing the communication even if we're not using
!an FFT routine.
call gather (x2y, xxf, fft)
#if FFT == _FFTW3_
call time_message(.false., time_fft, ' FFT')
call FFTW_PREFIX(_execute_dft_c2r) (yf_fft%plan, fft, yxf)
call time_message(.false., time_fft, ' FFT')
#endif
end subroutine transform_y5d