FIXME : Add documentation
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | nny_in | |||
integer, | intent(in) | :: | nnx_in | |||
integer, | intent(in) | :: | how_many_in |
subroutine init_3d (nny_in, nnx_in, how_many_in)
use fft_work, only: init_crfftw, init_rcfftw, delete_fft, FFT_TO_SPECTRAL_SPACE, FFT_TO_REAL_SPACE
implicit none
integer, intent(in) :: nny_in, nnx_in, how_many_in
integer, save :: nnx, nny, how_many
if (initialized_3d) then
if (nnx /= nnx_in .or. nny /= nny_in) then
call delete_fft(xf3d_cr)
call delete_fft(xf3d_rc)
elseif ( how_many /= how_many_in) then
call delete_fft(xf3d_cr)
call delete_fft(xf3d_rc)
else
return
end if
end if
initialized_3d = .true.
nny = nny_in
nnx = nnx_in
how_many = how_many_in
#if FFT == _FFTW3_
call init_crfftw (xf3d_cr, FFT_TO_REAL_SPACE, nny, nnx, how_many)
call init_rcfftw (xf3d_rc, FFT_TO_SPECTRAL_SPACE, nny, nnx, how_many)
#endif
end subroutine init_3d