Indexfft_nrfft5 fft_nrfft5odd fft_ccfftm fft_ccfft2d fft_ccfft3d fft_crfftm fft_crfft2d fft_crfft3d fft_rcfftm fft_rcfft2d fft_rcfft3d fft_zzfftm fft_zzfft2d fft_zzfft3d
|
fft_ccfft3d - complex-complex 3D FFT
SYNOPSIS
#include <fft.h> (fixed-format sources)
#include <f90fft.h> (free-format sources)
integer function fft_ccfft3d(isign, scale, n1, n2, n3, ld1, ld2, cdata, iopt)
-
integer isign
real scale
integer n1
integer n2
integer n3
integer ld1
integer ld2
complex cdata(ld1,ld2,n3)
integer iopt
DESCRIPTION
The function, "fft_ccfft3d", performs a complex-to-complex
3D FFT -- essentially a 1D FFT along the first axis, followed by another
1D FFT along the second axis, followed by another 1D FFT along the third axis.
INPUT
The parameter, "isign", specifies the sign of complex
exponential. It expects a "1" or "-1"; a value of zero "0" is invalid.
The parameter, "scale", specifies the scale factor to be
applied to the data.
The size parameters, "n1", "n2" and "n3",
specifies the FFT sizes. These must be setup as mixed radix values
(must be even) in order to allow the FFT's to be more efficient.
It is recommended to use fft_nrfft5 to
calculate these values.
The leading dimension parameters, "ld1" and "ld2",
specify the leading dimensions of the complex array. If they are
the same as the FFT sizes, "n1" and "n2" respectively,
then the routine will be more efficient.
The complex array, "cdata", is the I/O array for the FFT's.
This is performed "in place".
The parameter, "iopt", is used to specify any other
information that is unique to a specific FFT implementation.
Currently, the use is for specifying whether to measure or estimate
the FFT's when using FFTW routines. The "fft.h" header
defines FFT_MEASURE and FFT_ESTIMATE, besides defining
the FFT functions, as integer.
OUTPUT
The fft results are returned in the complex data array and the returned
value is zero "0" if successful. A value of "-1" is returned if the
arguments are invalid. Otherwise, a value unique to each FFT
implementation is returned.
EXAMPLE
integer :: fft_size1, fft_size2, fft_size3, fft_flag
integer :: isign, ier
real :: fft_scale
complex, allocatable :: cdata(:,:,:)
fft_size1 = fft_nrfft5(100)
fft_size2 = fft_nrfft5(50)
fft_size3 = fft_nrfft5(200)
allocate(cdata(fft_size1, fft_size2, fft_size3))
...
fft_flag = FFT_ESTIMATE
! forward FFT
isign = -1
fft_scale = 1.0D+00/(dble(fft_size1)*dble(fft_size2)*dbl(fft_size3))
ier = fft_ccfft3d(isign, fft_scale, fft_size1, fft_size2, fft_size3, fft_size1, fft_size2, cdata, fft_flag)
! inverse FFT
isign = 1
fft_scale = 1.0
ier = fft_ccfft3d(isign, fft_scale, fft_size1, fft_size2, fft_size3, fft_size1, fft_size2, cdata, fft_flag)
AUTHOR
Phuong Vu, HPC
Jerry Ehlers, EPTG
|