CCFFT3D,ZZFFT3D(3)          MathKeisan FFT routine          CCFFT3D,ZZFFT3D(3)



NAME
       ccfft3d, zzfft3d - three-dimensional complex-to-complex FFT.
                          (OpenMP Parallel Support).

SYNOPSIS
       libfft.a

          INTEGER isign, n1, n2, n3, ldx, ldx2, ldy, ldy2, isys
          COMPLEX x(ldx,ldx2,n3), y(ldy,ldy2,n3)
          REAL    scale, table(2*(n1+n2+n3)+195)
          REAL    work(4*n1*n2*n3) ! for MathKeisan 2.0 and earlier
                                   ! should be work(7*n1*n2*n3)
          CALL  CCFFT3D  (  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) x(ldx,ldx2,n3), y(ldy,ldy2,n3)
          REAL(kind=8)    scale, table(2*(n1+n2+n3)+195)
          REAL(kind=8)    work(4*n1*n2*n3) ! for MathKeisan 2.0 and earlier
                                           ! should be work(7*n1*n2*n3)
          CALL ZZFFT3D ( 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) x(ldx,ldx2,n3), y(ldy,ldy2,n3)
          REAL(kind=8)    scale, table(2*(n1+n2+n3)+195)
          REAL(kind=8)    work(4*n1*n2*n3) ! for MathKeisan 2.0 and earlier
                                           ! should be work(7*n1*n2*n3)
          CALL  CCFFT3D  (  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) x(ldx,ldx2,n3), y(ldy,ldy2,n3)
          REAL(kind=8)    scale, table(2*(n1+n2+n3)+195)
          REAL(kind=8)    work(4*n1*n2*n3) ! for MathKeisan 2.0 and earlier
                                           ! should be work(7*n1*n2*n3)
          CALL ZZFFT3D ( 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 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
       [(CC)(ZZ)]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.

       ldx    Leading dimension of x.  ldx >= max(n1,1).

       ldx2   Second dimension of x.  ldx2 >= max(n2,1).

       ldy    Leading dimension of y.  ldy >= max(n1,1).

       ldy2   Second dimension of y.  ldy2 >= max(n2,1).

       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                                              CCFFT3D,ZZFFT3D(3)