!------------------------------------------------------------------------- subroutine cfft3b(f,nr1,nr2,nr3,nr1x,nr2x,nr3x,isign) !----------------------------------------------------------------------- ! driver routine for 3d fft using fftw libraries (PG) ! use fftw_mod implicit none ! integer nr1, nr2, nr3, nr1x, nr2x, nr3x, isign complex*16 f(nr1x*nr2x*nr3x) ! real*8 fac integer ibid ! ! initialization variables ! #ifdef B64 integer*8 plan(2) #else integer plan(2) #endif save plan data plan/0,0/ ! ! if (nr1.ne.nr1x .or. nr2.ne.nr2x .or. nr3.ne.nr3x ) & & call error('cfft3b','not implemented',1) if (isign.eq.1) then ibid=1 else if (isign.eq.-1) then ibid=2 else call error('cfft3b','isign unexpected',isign) end if ! if (plan(ibid).eq.0) & & call fftw3d_f77_create_plan & & (plan(ibid),nr1,nr2,nr3,isign,FFTW_ESTIMATE+FFTW_IN_PLACE) ! call fftwnd_f77_one(plan(ibid), f, 0) ! if (isign.eq.-1) then fac=1.0/dfloat(nr1*nr2*nr3) call SCAL(2*nr1*nr2*nr3, fac, f, 1) end if ! return end !