Next: , Previous: ZFFT3DX, Up: 3D FFT


CFFT3DX Routine Documentation
— SUBROUTINE: CFFT3DX (MODE,SCALE,LTRANS,INPL,L,M,N,X,Y,
COMM,INFO
)
— Input: INTEGER MODE

The value of MODE on input determines the operation performed by CFFT3DX.
On input:

  • MODE=0 : only initializations (specific to the values of L, M and N) are performed using a default plan; this is usually followed by calls to the same routine with MODE=-1 or 1.
  • MODE=-1 : a forward 3D transform is performed. Initializations are assumed to have been performed by a prior call to CFFT3DX.
  • MODE=1 : a backward (reverse) 3D transform is performed. Initializations are assumed to have been performed by a prior call to CFFT3DX.
  • MODE=-2 : (default) initializations and a forward 3D transform are performed.
  • MODE=2 : (default) initializations and a backward 3D transform are performed.
  • MODE=100 : similar to MODE=0; only initializations (specific to the values of L, M and M) are performed, but these are based on a plan that is first generated by timing a subset of all possible plans and choosing the quickest (i.e. the FFT computation was timed as fastest based on the chosen plan). The plan generation phase may take a significant amount of time depending on the values of L, M and N.

— Input: REAL SCALE

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

— Input: LOGICAL LTRANS

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.

— Input: LOGICAL INPL

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

— Input: INTEGER L

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

— Input: INTEGER M

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

— Input: INTEGER N

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

— Input/Output: COMPLEX X(L*M*N)

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.

— Output: COMPLEX Y(L*M*N)

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.

— Input/Output: COMPLEX COMM(L*M*N+5*(L+M+N)+300)

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.

— Output: INTEGER INFO

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)