NAME

GFT_do_fft - Performs forward and backward 1D, 2D and 3D Complex-Complex, Real-Complex and multiple 1D Complex-Complex and 1D Real-Complex FFTs.

SYNOPSIS

CALL GFT_do_fft(FFT=h, ISIGN=si, SCALE=sc, C_IN=x, C_OUT=y, code=ierr)
CALL GFT_do_fft(FFT=h, ISIGN=si, SCALE=sc, C_IN=x, R_OUT=y, code=ierr)
CALL GFT_do_fft(FFT=h, ISIGN=si, SCALE=sc, R_IN=x, C_OUT=y, code=ierr)

PARAMETERS

<INOUT> h    : GFT handel can be typed to one of the following derived data types: 
                 1) GFT_CC  : to perform a Complex-Complex FFT and inverse.
                 2) GFT_RCR : to perform a Real-Complex FFT and inverse.
                 3) GFT_MRCR: to perform a multiple 1D Real-Complex FFT and inverse.
                 4) GFT_MCC : to perform a multiple 1D Complex-Complex FFT and inverse.
<IN>    si   : Integer scalar. Sign of the FFT. It can be valued to 1 or -1.
<IN>    sc   : Real scalar. Scale of the FFT.
               if n,m,l denote the sizes of the FFT and si=-1 (backward FFT)
               then sc=1/n for 1D FFT, sc=1/(n*m) for 2D FFT and sc=1/(n*m*l) for 3D FFT.
<IN>    x    : Complex or Real FFT array of rank 1, 2 or 3.
               If complex, size(x,dim=1) >= n/2+1.
<OUT>   y    : Complex or Real FFT array of rank 1, 2 or 3.
               If real, size(y,dim=1) >= n+2. If complex, size(y,dim=1) >= n/2+1.
<OUT>   ierr : Integer. Optional error code. It will always return 0 in this release.

EXAMPLES

In this example, we perform a 2D Complex-Real FFT and inverse of size n x m.

     USE GFT
     INTEGER, PARAMETER                             :: Ldx=17, Ldy=16
     COMPLEX(KIND=GFT_prec), DIMENSION(0:Ldx/2,Ldy) :: x
     REAL(KIND=GFT_prec), DIMENSION(0:Ldx-1,Ldy)    :: y
     INTEGER                                        :: n, m, si
     REAL(KIND=GFT_prec)                            :: sc
     TYPE(GFT_RCR)                                  :: h
     ...
     n=15; m=12
     CALL GFT_set_fft(Nx=n, Ny=m, FFT=h)

     !... Forward FFT
     si=1 ; sc = 1.0_GFT_Prec
     CALL GFT_do_fft(FFT=h, ISIGN=si, SCALE=sc, C_IN=x, R_OUT=y)
     PRINT *, y(0:n-1,1:m)

     !... Backward FFT
     si=-1 ; sc = 1.0_GFT_Prec / REAL(n*m, kind=GFT_Prec)
     CALL GFT_do_fft(FFT=h, ISIGN=si, SCALE=sc, R_IN=y, C_OUT=x)
     PRINT *, x(0:n/2,1:m)

     CALL GFT_end_fft(FFT=h)
     ...

DISCUSSION

On vector processor, performance of 2D and 3D FFTs depends on the size of the Blocking Factor which default value (equal to 1) can be changed using GFT_set_bf routine.

SEE ALSO

Back to the routines' list...
Last modified: Thu May 23 11:55:40 CEST 2002