CFFT3D,ZFFT3D(3) MathKeisan FFT routine CFFT3D,ZFFT3D(3)
NAME
cfft3d, zfft3d - three-dimensional complex-to-complex FFT.
(OpenMP Parallel Support).
SYNOPSIS
libfft.a
INTEGER isign, n1, n2, n3, inc1x, inc2x, inc3x, inc1y,
inc2y, inc3y, ntable, nwork
COMPLEX x((n3-1)*inc3x + (n2-1)*inc2x + (n1-1)*inc1x + 1),
y((n3-1)*inc3y + (n2-1)*inc2y + (n1-1)*inc1y + 1)
REAL scale, table(ntable), work(nwork)
CALL CFFT3D ( isign, n1, n2, n3, scale, x, inc1x, inc2x, inc3x,
y, inc1y, inc2y, inc3y, table, ntable, work, nwork )
INTEGER isign, n1, n2, n3, inc1x, inc2x, inc3x, inc1y,
inc2y, inc3y, ntable, nwork
COMPLEX(kind=8) x((n3-1)*inc3x + (n2-1)*inc2x + (n1-1)*inc1x + 1),
y((n3-1)*inc3y + (n2-1)*inc2y + (n1-1)*inc1y + 1)
REAL(kind=8) scale, table(ntable), work(nwork)
CALL ZFFT3D ( isign, n1, n2, n3, scale, x, inc1x, inc2x, inc3x,
y, inc1y, inc2y, inc3y, table, ntable, work, nwork )
libfft_64.a
INTEGER(kind=8) isign, n1, n2, n3, inc1x, inc2x, inc3x, inc1y,
inc2y, inc3y, ntable, nwork
COMPLEX(kind=8) x((n3-1)*inc3x + (n2-1)*inc2x + (n1-1)*inc1x + 1),
y((n3-1)*inc3y + (n2-1)*inc2y + (n1-1)*inc1y + 1)
REAL(kind=8) scale, table(ntable), work(nwork)
CALL CFFT3D ( isign, n1, n2, n3, scale, x, inc1x, inc2x, inc3x,
y, inc1y, inc2y, inc3y, table, ntable, work, nwork )
INTEGER(kind=8) isign, n1, n2, n3, inc1x, inc2x, inc3x, inc1y,
inc2y, inc3y, ntable, nwork
COMPLEX(kind=8) x((n3-1)*inc3x + (n2-1)*inc2x + (n1-1)*inc1x + 1),
y((n3-1)*inc3y + (n2-1)*inc2y + (n1-1)*inc1y + 1)
REAL(kind=8) scale, table(ntable), work(nwork)
CALL ZFFT3D ( isign, n1, n2, n3, scale, x, inc1x, inc2x, inc3x,
y, inc1y, inc2y, inc3y, table, ntable, work, nwork )
DESCRIPTION
This subroutine computes the three-dimensional discrete Fourier trans-
form of the complex data stored in x; the transformed data is stored in
the complex array y. If we take x and y to be dimensioned as
x(0:n1-1,0:n2-1,0:n3-1) and y(0:n1-1,0:n2-1,0:n3-1), the transform is
expressed by the following formula:
n1-1 n2-1 n3-1
y(k1,k2,k3) = scale * Sum Sum Sum x(j1,j2,j3) * fac
j1=0 j2=0 j3=0
where
fac = exp(isign*j1*k1*2*pi*i/n1) * exp(isign*j2*k2*2*pi*i/n2) *
exp(isign*j3*k3*2*pi*i/n3)
for k1 = 0, ..., n1-1, k2 = 0, ..., n2-1, k3 = 0, ..., n3-1, where i =
sqrt(-1).
In order to accomodate multiple calls of the same size to this routine,
an additional initialization step is required prior to the computation
of any transforms. Hence, whenever it is desired to use (CZ)FFT3D in a
program, it must be called at least twice.
Set the OpenMp environmental variable OMP_NUM_THREADS to the number of
threads you would like to use.
ARGUMENTS
Input
isign Option flag:
If isign = 0, the routine is initialized for the given values of
n1, n2, and n3.
If isign = (+/-) 1, isign is the sign of the exponential in the
transform.
n1 Number of data points in the first dimension (n1>0).
n2 Number of data points in the second dimension (n2>0).
n3 Number of data points in the third dimension (n3>0).
scale Scaling factor for the transform.
Not used if isign = 0.
x Array of data to be transformed.
Not used if isign = 0.
inc1x Number of complex values between successive data points in the
first dimension of x.
inc1x != 0.
inc2x Number of complex values between successive data points in the
second dimension of x.
inc2x != 0.
inc3x Number of complex values between successive data points in the
third dimension of x.
inc3x != 0.
inc1y Number of complex values between successive data points in the
first dimension of y.
inc1y != 0.
inc2y Number of complex values between successive data points in the
second dimension of y.
inc2y != 0.
inc3y Number of complex values between successive data points in the
third dimension of y.
inc3y != 0.
ntable The size of table. ntable >= 2*(n1+n2+n3)+195.
nwork The size of work. nwork >= 4*n1*n2*n3. Note for MathKeisan 2.0
and earlier, nwork should be >= 6*n1*n2*n3
Working Storage
table If isign = 0, table is initialized for computing transforms of
dimension n1-by-n2-by-n3.
If isign != 0, table must have been initialized by a previous
call with these value of n1, n2, and n3 in which isign was 0.
work Workspace for computing the transform.
Not used if isign = 0.
Output
y Transformed data.
Not used if isign = 0.
SciLib routine CFFT3D,ZFFT3D(3)