rfft2b
Return to Main Contents
NAME
RFFT2B - complex to real, two-dimensional backward fast Fourier transform
SYNOPSIS
SUBROUTINE RFFT2B (LDIM, L, M, R, WSAVE, LENSAV, WORK, LENWRK, IER)
INTEGER LDIM, L, M, LENSAV, LENWRK, IER
REAL R(LDIM,M), WSAVE(LENSAV), WORK(LENWRK)
DESCRIPTION
FFTPACK 5.0 routine RFFT2B computes the two-dimensional discrete
Fourier transform of the complex Fourier coefficients a real
periodic array. This transform is known as the backward transform
or Fourier synthesis, transforming from spectral to physical space.
Routine RFFT2B is normalized: a call to RFFT2B followed by a
call to RFFT2F (or vice-versa) reproduces the original array
within roundoff error.
Input Arguments
LDIM Integer first dimension of the two-dimensional real
array R, which must be at least 2*(L/2+1).
L Integer number of elements to be transformed in the first
dimension of the two-dimensional real array R. The value
of L must be less than or equal to that of LDIM. The
transform is most efficient when L is a product of small
primes.
M Integer number of elements to be transformed in the second
dimension of the two-dimensional real array R. The
transform is most efficient when M is a product of small
primes.
R Real array of two dimensions containing the L/2+1-by-M
complex subarray of spectral coefficients to be transformed.
R's first dimension is LDIM and its second dimension must be at
least as large as M.
WSAVE Real work array of length LENSAV. WSAVE's contents must
be initialized with a call to subroutine RFFT2I before the
first call to routine RFFT2F or RFFT2B with lengths L and M.
WSAVE's contents may be re-used for subsequent calls
to RFFT2F and RFFT2B with the same transform lengths L and M.
LENSAV Integer number of elements in the WSAVE array. LENSAV must
be at least L + M + INT(LOG(REAL(L))) + INT(LOG(REAL(M))) +8.
WORK Real array of dimension LENWRK, where LENWRK is defined
below. WORK provides workspace, and its contents need not
be saved between calls to routines RFFT2B and RFFT2F.
LENWRK Integer number of elements in the WORK array. LENWRK must
be at least LDIM*M.
Output Arguments
R Real output array R of size LDIM-by-M, where LDIM is at
least L. For purposes of exposition, assume the index
ranges of array R are defined by R(0:L-1,0:M-1), and the
complex Fouier coefficient array by C(0:L/2,0:M-2).
L/2 M-1
R(I,J) = SUM SUM C(L1,M1)
L1=0 M1=0
*EXP(SQRT(-1)*2*PI*(I*L1/L+J*M1/M))
L-1 M-1
+ SUM SUM CONJ(C(L1,M1))
L1=L/2+1 M1=0
*EXP(SQRT(-1)*2*PI*(I*(L-L1)/L+J*M1/M))
IER Integer error return
= 0 successful exit
= 2 input parameter LENSAV not big enough
= 3 input parameter LENWRK not big enough
= 6 input parameter LDIM < 2*(L/2+1)
= 20 input error returned by lower level routine