1 subroutine zfftmb ( lot, jump, n, inc, c, lenc, wsave, lensav, work, &
4 !*****************************************************************************80
6 !! ZFFTMB: complex double precision backward FFT, 1D, multiple vectors.
10 ! ZFFTMB computes the one-dimensional Fourier transform of multiple
11 ! periodic sequences within a complex array. This transform is referred
12 ! to as the backward transform or Fourier synthesis, transforming the
13 ! sequences from spectral to physical space. This transform is
14 ! normalized since a call to ZFFTMF followed by a call to ZFFTMB (or
15 ! vice-versa) reproduces the original array within roundoff error.
17 ! The parameters INC, JUMP, N and LOT are consistent if equality
18 ! I1*INC + J1*JUMP = I2*INC + J2*JUMP for I1,I2 < N and J1,J2 < LOT
19 ! implies I1=I2 and J1=J2. For multiple FFTs to execute correctly,
20 ! input variables INC, JUMP, N and LOT must be consistent, otherwise
21 ! at least one array element mistakenly is transformed more than once.
31 ! Original complex single precision by Paul Swarztrauber, Richard Valent.
32 ! Complex double precision version by John Burkardt.
37 ! Vectorizing the Fast Fourier Transforms,
38 ! in Parallel Computations,
39 ! edited by G. Rodrigue,
40 ! Academic Press, 1982.
43 ! Fast Fourier Transform Algorithms for Vector Computers,
44 ! Parallel Computing, pages 45-63, 1984.
48 ! Input, integer ( kind = 4 ) LOT, the number of sequences to be transformed
51 ! Input, integer ( kind = 4 ) JUMP, the increment between the locations, in
52 ! array C, of the first elements of two consecutive sequences to
55 ! Input, integer ( kind = 4 ) N, the length of each sequence to be
56 ! transformed. The transform is most efficient when N is a product of
59 ! Input, integer ( kind = 4 ) INC, the increment between the locations, in
60 ! array C, of two consecutive elements within the same sequence to be
63 ! Input/output, complex ( kind = 8 ) C(LENC), an array containing LOT
64 ! sequences, each having length N, to be transformed. C can have any
65 ! number of dimensions, but the total number of locations must be at least
66 ! LENC. On output, C contains the transformed sequences.
68 ! Input, integer ( kind = 4 ) LENC, the dimension of the C array.
69 ! LENC must be at least (LOT-1)*JUMP + INC*(N-1) + 1.
71 ! Input, real ( kind = 8 ) WSAVE(LENSAV). WSAVE's contents must be
72 ! initialized with a call to ZFFTMI before the first call to routine ZFFTMF
73 ! or ZFFTMB for a given transform length N.
75 ! Input, integer ( kind = 4 ) LENSAV, the dimension of the WSAVE array.
76 ! LENSAV must be at least 2*N + INT(LOG(REAL(N))) + 4.
78 ! Workspace, real ( kind = 8 ) WORK(LENWRK).
80 ! Input, integer ( kind = 4 ) LENWRK, the dimension of the WORK array.
81 ! LENWRK must be at least 2*LOT*N.
83 ! Output, integer ( kind = 4 ) IER, error flag.
85 ! 1, input parameter LENC not big enough;
86 ! 2, input parameter LENSAV not big enough;
87 ! 3, input parameter LENWRK not big enough;
88 ! 4, input parameters INC, JUMP, N, LOT are not consistent.
92 integer ( kind = 4 ) lenc
93 integer ( kind = 4 ) lensav
94 integer ( kind = 4 ) lenwrk
96 complex ( kind = 8 ) c(lenc)
97 integer ( kind = 4 ) ier
98 integer ( kind = 4 ) inc
99 integer ( kind = 4 ) iw1
100 integer ( kind = 4 ) jump
101 integer ( kind = 4 ) lot
102 integer ( kind = 4 ) n
103 real ( kind = 8 ) work(lenwrk)
104 real ( kind = 8 ) wsave(lensav)
109 if ( lenc < ( lot - 1 ) * jump + inc * ( n - 1 ) + 1 ) then
111 call xerfft ( 'ZFFTMB', 6 )
115 if ( lensav < 2 * n + int ( log ( real ( n, kind = 8 ) ) ) + 4 ) then
117 call xerfft ( 'ZFFTMB', 8 )
121 if ( lenwrk < 2 * lot * n ) then
123 call xerfft ( 'ZFFTMB', 10 )
127 if ( .not. xercon ( inc, jump, n, lot ) ) then
129 call xerfft ( 'ZFFTMB', -1 )
139 call zmfm1b ( lot, jump, n, inc, c, work, wsave, wsave(iw1), &