FFTRI
Computes parameters needed by FFTRF and FFTRB.
Required Arguments
N — Length of the sequence to be transformed. (Input)
WFFTR — Array of length 2N + 15 containing parameters needed by FFTRF and FFTRB. (Output)
FORTRAN 90 Interface
Generic: CALL FFTRI (N, WFFTR)
Specific: The specific interface names are S_FFTRI and D_FFTRI.
FORTRAN 77 Interface
Single: CALL FFTRI (N, WFFTR)
Double: The double precision name is DFFTRI.
Description
The routine FFTRI initializes the routines FFTRF and FFTRB. An efficient way to make multiple calls for the same N to routine FFTRF or FFTRB, is to use routine FFTRI for initialization. (In this case, replace FFTRF or FFTRB with F2TRF or F2TRB, respectively.) The routine FFTRI is based on the routine RFFTI in FFTPACK. The package FFTPACK was developed by Paul Swarztrauber at the National Center for Atmospheric Research.
If the Intel® Math Kernel Library or IBM Engineering and Scientific Subroutine Library is used, parameters computed by FFTRI are not used. In this case, there is no need to call FFTRI.
Comments
Different WFFTR arrays are needed for different values of N.
Example
In this example, we compute three distinct real FFTs by calling FFTRI once and then calling F2TRF three times.
 
USE FFTRI_INT
USE CONST_INT
USE F2TRF_INT
USE UMACH_INT
 
IMPLICIT NONE
INTEGER N
PARAMETER (N=7)
!
INTEGER I, K, NOUT
REAL COEF(N), COS, FLOAT, TWOPI, WFFTR(29), SEQ(N)
INTRINSIC COS, FLOAT
!
TWOPI = CONST('PI')
TWOPI = 2* TWOPI
! Get output unit number
CALL UMACH (2, NOUT)
! Set the work vector
CALL FFTRI (N, WFFTR)
!
DO 20 K=1, 3
! This loop fills out the data vector
! with a pure exponential signal
DO 10 I=1, N
SEQ(I) = COS(FLOAT(K*(I-1))*TWOPI/FLOAT(N))
10 CONTINUE
! Compute the Fourier transform of SEQ
CALL F2TRF (N, SEQ, COEF, WFFTR)
! Print results
WRITE (NOUT,99998)
99998 FORMAT (/, 9X, 'INDEX', 5X, 'SEQ', 6X, 'COEF')
WRITE (NOUT,99999) (I, SEQ(I), COEF(I), I=1,N)
99999 FORMAT (1X, I11, 5X, F5.2, 5X, F5.2)
!
20 CONTINUE
END
Output
 
INDEX SEQ COEF
1 1.00 0.00
2 0.62 3.50
3 -0.22 0.00
4 -0.90 0.00
5 -0.90 0.00
6 -0.22 0.00
7 0.62 0.00
 
 
INDEX SEQ COEF
1 1.00 0.00
2 -0.22 0.00
3 -0.90 0.00
4 0.62 3.50
5 0.62 0.00
6 -0.90 0.00
7 -0.22 0.00
 
 
INDEX SEQ COEF
1 1.00 0.00
2 -0.90 0.00
3 0.62 0.00
4 -0.22 0.00
5 -0.22 0.00
6 0.62 3.50
7 -0.90 0.00
Published date: 03/19/2020
Last modified date: 03/19/2020