SCFFT3D,DZFFT3D(3) MathKeisan FFT routine SCFFT3D,DZFFT3D(3)
NAME
scfft3d, dzfft3d - three-dimensional real-to-complex FFT.
(OpenMP Parallel Support).
SYNOPSIS
libfft.a
INTEGER isign, n1, n2, n3, ldx, ldx2, ldy, ldy2, isys
COMPLEX y(ldy,ldy2,n3)
REAL scale, x(ldx,ldx2,n3), table(2*(n1+n2+n3)+195),
work(4*256*max(n1,n2,n3))
CALL SCFFT3D ( isign, n1, n2, n3, scale, x, ldx, ldx2,
y, ldy, ldy2, table, work, isys )
INTEGER isign, n1, n2, n3, ldx, ldx2, ldy, ldy2, isys
COMPLEX(kind=8) y(ldy,ldy2,n3)
REAL(kind=8) scale, x(ldx,ldx2,n3), table(2*(n1+n2+n3)+195),
work(4*256*max(n1,n2,n3))
CALL DZFFT3D ( isign, n1, n2, n3, scale, x, ldx, ldx2,
y, ldy, ldy2, table, work, isys )
libfft_64.a
INTEGER(kind=8) isign, n1, n2, n3, ldx, ldx2, ldy, ldy2, isys
COMPLEX(kind=8) y(ldy,ldy2,n3)
REAL(kind=8) scale, x(ldx,ldx2,n3), table(2*(n1+n2+n3)+195),
work(4*256*max(n1,n2,n3))
CALL SCFFT3D ( isign, n1, n2, n3, scale, x, ldx, ldx2,
y, ldy, ldy2, table, work, isys )
INTEGER(kind=8) isign, n1, n2, n3, ldx, ldx2, ldy, ldy2, isys
COMPLEX(kind=8) y(ldy,ldy2,n3)
REAL(kind=8) scale, x(ldx,ldx2,n3), table(2*(n1+n2+n3)+195),
work(4*256*max(n1,n2,n3))
CALL DZFFT3D ( isign, n1, n2, n3, scale, x, ldx, ldx2,
y, ldy, ldy2, table, work, isys )
DESCRIPTION
This subroutine computes the three-dimensional discrete Fourier trans-
form of the real 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/2,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/2, k2 = 0, ..., n2-1, k3 = 0, ..., n3-1
here
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 SCFFT3D or
DZFFT3D in a program, it must be called at least twice.
A result of Fourier theory is that a transform of real data is conju-
gate symmetric; hence, only the first n1/2 + 1 complex data points in
the first dimension will be output by this routine.
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, the transform is calculated and 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.
ldx Leading dimension of x, ldx >= n1.
ldx2 Second dimension of x, ldx2 >= n2.
ldy Leading dimension of y, ldy >= n1/2 + 1.
ldy2 Second dimension of y, ldy2 >= n2.
isys Currently unused.
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 values 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 SCFFT3D,DZFFT3D(3)