ZFFT3DX Routine Documentation
ZFFT3DX (MODE,SCALE,LTRANS,INPL,L,M,N,X,Y, COMM,INFO)
|
SUBROUTINE |
The value of MODE on input determines the operation performed by
ZFFT3DX.
On input:
- MODE=0 : only initializations (specific to the value of
N) are performed; this is usually followed by calls to the same routine
with MODE=-1 or 1.
- MODE=-1 : a forward transform is performed. Initializations are
assumed to have been performed by a prior call to
ZFFT3DX.
- MODE=1 : a backward (reverse) transform is performed.
Initializations are assumed to have been performed by a prior call to
ZFFT3DX.
- MODE=-2 : initializations and a forward transform are performed.
- MODE=2 : initializations and a backward transform are performed.
|
| DOUBLE PRECISION SCALE
|
Input |
|
On input: SCALE is the scaling factor to apply to the output sequences
|
|
On input: if LTRANS is .TRUE. then a normal final transposition is performed internally to return transformed data using the same storage format as the input data. If LTRANS is .FALSE. then the final transposition is not performed and transformed data is stored, in X or Y, in transposed form.
|
|
On input: if INPL is .TRUE. then X is overwritten by the output sequences; otherwise the output sequences are returned in Y.
|
|
On input: L is the first dimension of the 3D transform.
|
|
On input: M is the second dimension of the 3D transform.
|
|
On input: N is the third dimension of the 3D transform.
|
| COMPLEX*16 X(L*M*N)
|
Input/Output |
On input: X contains the L by M by N complex 3D data array to be transformed; the (ijk)th element is stored in X(i+(j-1)*L+(k-1)*L*M).
On output: if INPL is .TRUE. then X contains the transformed data, either in the same locations as on input when LTRANS=.TRUE.; or in locations X(k+(j-1)*N+(i-1)*N*M) when LTRANS=.FALSE. If INPL is .FALSE. X remains unchanged.
|
| COMPLEX*16 Y(L*M*N)
|
Output |
|
On output: if INPL is .FALSE. then Y contains the three-dimensional transformed data. If LTRANS=.TRUE. then the (ijk)th data element is stored in Y(i+(j-1)*L+(k-1)*L*M); otherwise, the (ijk)th data element is stored in Y(k+(j-1)*N+(i-1)*N*M). If INPL is .TRUE. then Y is not referenced.
|
| COMPLEX*16 COMM(L*M*N+5*(L+M+N)+200)
|
Input/Output |
|
COMM is a communication array. Some portions of the array are used to store
initializations for subsequent calls with the same sequence dimensions.
The remainder is used as temporary store.
|
|
On output: INFO is an error indicator. On successful exit, INFO
contains 0. If INFO = -i on exit, the i-th argument had an illegal
value.
|
Example:
C Forward 3D FFT is performed unscaled, without final transpose
C and out-of-place on data stored in array X and output to Y.
C Manipulations are stored in vector Y which is then transformed
C back, with scaling, into the first M rows of X.
C
COMPLEX *16 X(L*M*N), Y(L*M*N)
SCALE = 1.0D0
INPL = .FALSE.
LTRANS = .FALSE.
CALL ZFFT3DX(0,SCALE,LTRANS,INPL,L,M,N,X,Y,COMM,INFO)
CALL ZFFT3DX(-1,SCALE,LTRANS,INPL,L,M,N,X,Y,COMM,INFO)
IY = 1
DO 20 I = 1, L
DO 40 J = 1, M
DO 10 K = 1, N
Y(IY) = Y(IY)*EXP(-0.001D0*DBLE(I+J+K-3))
IY = IY + 1
10 CONTINUE
20 CONTINUE
SCALE = 1.0D0/DBLE(L*M*N)
CALL ZFFT3DX(1,SCALE,LTRANS,INPL,N,M,L,Y,X,COMM,INFO)