Node:CFFT3DX, Previous:ZFFT3DX, Up:3D FFT



CFFT3DX Routine Documentation

CFFT3DX (MODE,SCALE,LTRANS,INPL,L,M,N,X,Y,
COMM,INFO)
SUBROUTINE
INTEGER MODE Input
The value of MODE on input determines the operation performed by CFFT3DX.
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 CFFT3DX.
  • MODE=1 : a backward (reverse) transform is performed. Initializations are assumed to have been performed by a prior call to CFFT3DX.
  • MODE=-2 : initializations and a forward transform are performed.
  • MODE=2 : initializations and a backward transform are performed.

REAL SCALE Input
On input: SCALE is the scaling factor to apply to the output sequences

LOGICAL LTRANS Input
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.

LOGICAL INPL Input
On input: if INPL is .TRUE. then X is overwritten by the output sequences; otherwise the output sequences are returned in Y.

INTEGER L Input
On input: L is the first dimension of the 3D transform.

INTEGER M Input
On input: M is the second dimension of the 3D transform.

INTEGER N Input
On input: N is the third dimension of the 3D transform.

COMPLEX 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 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+(k-1)*N*M). If INPL is .TRUE. then Y is not referenced.

COMPLEX 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.

INTEGER INFO Output
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
             SCALE = 1.0
             INPL = .FALSE.
             LTRANS = .FALSE.
             CALL CFFT3DX(0,SCALE,LTRANS,INPL,L,M,N,X,Y,COMM,INFO)
             CALL CFFT3DX(-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.001*REAL(I+J+K-3))
                      IY = IY + 1
        10      CONTINUE
        20   CONTINUE
             SCALE = 1.0/REAL(L*M*N)
             CALL CFFT3DX(1,SCALE,LTRANS,INPL,N,M,L,Y,X,COMM,INFO)