fft_zzfft2d - double complex-complex 2D FFT


SYNOPSIS

#include <fft.h> (fixed-format sources)
#include <f90fft.h> (free-format sources)

integer function fft_zzfft2d(isign, scale, n1, n2, ld1, cdata, iopt)

integer isign
real*8 scale
integer n1
integer n2
integer ld1
complex*16 cdata(ld1,n2)
integer iopt

DESCRIPTION

The function, "fft_zzfft2d", performs a double complex-to-double complex 2D FFT.

INPUT

The parameter, "isign", specifies the sign of double complex exponential. It expects a "1" or "-1"; a value of zero "0" is invalid.

The parameter, "scale", specified the scale factor to be applied to the data.

The size parameters, "n1" and "n2", specify the 2D 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 parameter, "ld1", specifies the leading dimension of the double complex array. If it is the same as the fft size, "n1", then the routine will be more efficient.

The double complex array, "cdata", is the I/O array; it 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 double 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_flag
      integer :: isign, ier
      real    :: fft_scale
      complex*16, allocatable :: cdata(:,:)

      fft_size1 = fft_nrfft5(100)
      fft_size2 = fft_nrfft5(50)

      allocate(cdata(fft_size1, fft_size2))

      ...
      fft_flag = FFT_ESTIMATE

      ! forward FFT
      isign = -1
      fft_scale = 1.0D+00/(dble(fft_size1)*dble(fft_size2))
      ier = fft_zzfftm(isign, fft_scale, fft_size1, fft_size2, fft_size1, cdata, fft_flag)

      ! inverse FFT
      isign = 1
      fft_scale = 1.0
      ier = fft_zzfftm(isign, fft_scale, fft_size1, fft_size2, fft_size1, cdata, fft_flag)
    

AUTHOR

Phuong Vu, HPC
Jerry Ehlers, EPTG