Computes the inverse Discrete Fourier Transform of several complex or real sequences.
Complex array containing the inverse of the Discrete Fourier Transform of the sequences in X. If X is an assumed shape complex array of rank 2, 3 or 4, the result is a complex array of the same shape and rank consisting of the inverse DFT for each of the last rank's indices. (Output)
X — Box containing the sequences for which the inverse transform is to be computed. X is an assumed shape complex array of rank 2, 3 or 4. If X is real or double, it is converted to complex internally prior to the computation. (Input)
WORK — A COMPLEX array of the same precision as the data. For rank-1 transforms the size of WORK is n+15. To define this array for each problem, set WORK(1) = 0. Each additional rank adds the dimension of the transform plus 15. Using the optional argument WORK increases the efficiency of the transform.
The option and derived type names are given in the following tables:
Option Names for IFFT |
Option Value |
Options_for_fast_dft |
1 |
Name of
Unallocated Option Array |
Use |
Derived Type |
?_ifft_box_options(:) |
Use when setting options for calls hereafter. |
?_options |
?_ifft_box_options_once(:) |
Use when setting options for next call only. |
?_options |
For a description on how to use these options, see Matrix Optional Data Changes. See fast_dft located in Chapter 6, “Transforms” for the specific options for this routine.
IFFT_BOX (X [,…])
Computes the inverse of the Discrete Fourier Transform of a box of complex sequences. This function uses fast_dft, fast_2dft, and fast_3dft from Chapter 6.
integer, parameter :: n=40, nr=4
real(kind(1e0)) :: err(nr), one=1e0
real(kind(1e0)) :: a(n,1,nr), b(n,nr), c(n,1,nr), yy(n,n,nr)
complex(kind(1e0)), dimension(n,nr) :: f, fa, fb, cc, aa
real(kind(1e0)),parameter::zero_par=0.e0
! Set Random Number generator seed
iopti_par(1)=s_options(s_rand_gen_generator_seed,zero_par)
iopti_par(2)=s_options(iseed_par,zero_par)
call rand_gen(dummy_par,iopt=iopti_par)
! Generate two random periodic sequences 'a' and 'b'.
! Compute the convolution 'c' of 'a' and 'b'.
! Compute f=inverse(transform(a)*transform(b)).
! Check the Convolution Theorem:
! inverse(transform(a)*transform(b)) = convolution(a,b).
if (ALL(err <= sqrt(epsilon(one))) .AND. MP_RANK == 0) then
write (*,*) 'FFT_BOX is correct.'
Visual Numerics, Inc. PHONE: 713.784.3131 FAX:713.781.9260 |