1 subroutine mradbg ( m, ido, ip, l1, idl1, cc, c1, c2, im1, in1, &
2 ch, ch2, im2, in2, wa )
4 !*****************************************************************************80
6 !! MRADBG is an FFTPACK5 auxiliary routine.
9 ! Copyright (C) 1995-2004, Scientific Computing Division,
10 ! University Corporation for Atmospheric Research
24 ! Vectorizing the Fast Fourier Transforms,
25 ! in Parallel Computations,
26 ! edited by G. Rodrigue,
27 ! Academic Press, 1982.
30 ! Fast Fourier Transform Algorithms for Vector Computers,
31 ! Parallel Computing, pages 45-63, 1984.
37 integer ( kind = 4 ) idl1
38 integer ( kind = 4 ) ido
39 integer ( kind = 4 ) in1
40 integer ( kind = 4 ) in2
41 integer ( kind = 4 ) ip
42 integer ( kind = 4 ) l1
47 real ( kind = 4 ) ar1h
49 real ( kind = 4 ) ar2h
51 real ( kind = 4 ) c1(in1,ido,l1,ip)
52 real ( kind = 4 ) c2(in1,idl1,ip)
53 real ( kind = 4 ) cc(in1,ido,ip,l1)
54 real ( kind = 4 ) ch(in2,ido,l1,ip)
55 real ( kind = 4 ) ch2(in2,idl1,ip)
60 integer ( kind = 4 ) i
61 integer ( kind = 4 ) ic
62 integer ( kind = 4 ) idij
63 integer ( kind = 4 ) idp2
64 integer ( kind = 4 ) ik
65 integer ( kind = 4 ) im1
66 integer ( kind = 4 ) im2
67 integer ( kind = 4 ) ipp2
68 integer ( kind = 4 ) ipph
69 integer ( kind = 4 ) is
70 integer ( kind = 4 ) j
71 integer ( kind = 4 ) j2
72 integer ( kind = 4 ) jc
73 integer ( kind = 4 ) k
74 integer ( kind = 4 ) l
75 integer ( kind = 4 ) lc
76 integer ( kind = 4 ) m
77 integer ( kind = 4 ) m1
78 integer ( kind = 4 ) m1d
79 integer ( kind = 4 ) m2
80 integer ( kind = 4 ) m2s
81 integer ( kind = 4 ) nbd
83 real ( kind = 4 ) wa(ido)
85 m1d = ( m - 1 ) * im1 + 1
87 tpi = 2.0E+00 * 4.0E+00 * atan ( 1.0E+00 )
88 arg = tpi / real ( ip, kind = 4 )
103 ch(m2,i,k,1) = cc(m1,i,1,k)
115 ch(m2,i,k,1) = cc(m1,i,1,k)
129 ch(m2,1,k,j) = cc(m1,ido,j2-2,k) + cc(m1,ido,j2-2,k)
130 ch(m2,1,k,jc) = cc(m1,1,j2-1,k) + cc(m1,1,j2-1,k)
137 else if ( nbd < l1 ) then
147 ch(m2,i-1,k,j) = cc(m1,i-1,2*j-1,k) + cc(m1,ic-1,2*j-2,k)
148 ch(m2,i-1,k,jc) = cc(m1,i-1,2*j-1,k) - cc(m1,ic-1,2*j-2,k)
149 ch(m2,i,k,j) = cc(m1,i,2*j-1,k) - cc(m1,ic,2*j-2,k)
150 ch(m2,i,k,jc) = cc(m1,i,2*j-1,k) + cc(m1,ic,2*j-2,k)
166 ch(m2,i-1,k,j) = cc(m1,i-1,2*j-1,k) + cc(m1,ic-1,2*j-2,k)
167 ch(m2,i-1,k,jc) = cc(m1,i-1,2*j-1,k) - cc(m1,ic-1,2*j-2,k)
168 ch(m2,i,k,j) = cc(m1,i,2*j-1,k) - cc(m1,ic,2*j-2,k)
169 ch(m2,i,k,jc) = cc(m1,i,2*j-1,k) + cc(m1,ic,2*j-2,k)
183 ar1h = dcp * ar1 - dsp * ai1
184 ai1 = dcp * ai1 + dsp * ar1
191 c2(m1,ik,l) = ch2(m2,ik,1) + ar1 * ch2(m2,ik,2)
192 c2(m1,ik,lc) = ai1 * ch2(m2,ik,ip)
203 ar2h = dc2 * ar2 - ds2 * ai2
204 ai2 = dc2 * ai2 + ds2 * ar2
210 c2(m1,ik,l) = c2(m1,ik,l) + ar2 * ch2(m2,ik,j)
211 c2(m1,ik,lc) = c2(m1,ik,lc) + ai2 * ch2(m2,ik,jc)
223 ch2(m2,ik,1) = ch2(m2,ik,1) + ch2(m2,ik,j)
234 ch(m2,1,k,j) = c1(m1,1,k,j) - c1(m1,1,k,jc)
235 ch(m2,1,k,jc) = c1(m1,1,k,j) + c1(m1,1,k,jc)
242 else if ( nbd < l1 ) then
251 ch(m2,i-1,k,j) = c1(m1,i-1,k,j) - c1(m1,i,k,jc)
252 ch(m2,i-1,k,jc) = c1(m1,i-1,k,j) + c1(m1,i,k,jc)
253 ch(m2,i,k,j) = c1(m1,i,k,j) + c1(m1,i-1,k,jc)
254 ch(m2,i,k,jc) = c1(m1,i,k,j) - c1(m1,i-1,k,jc)
269 ch(m2,i-1,k,j) = c1(m1,i-1,k,j) - c1(m1,i,k,jc)
270 ch(m2,i-1,k,jc) = c1(m1,i-1,k,j) + c1(m1,i,k,jc)
271 ch(m2,i,k,j) = c1(m1,i,k,j) + c1(m1,i-1,k,jc)
272 ch(m2,i,k,jc) = c1(m1,i,k,j) - c1(m1,i-1,k,jc)
288 c2(m1,ik,1) = ch2(m2,ik,1)
297 c1(m1,1,k,j) = ch(m2,1,k,j)
315 c1(m1,i-1,k,j) = wa(idij-1) * ch(m2,i-1,k,j) &
316 - wa(idij) * ch(m2,i,k,j)
317 c1(m1,i,k,j) = wa(idij-1) * ch(m2,i,k,j) &
318 + wa(idij) * ch(m2,i-1,k,j)
337 c1(m1,i-1,k,j) = wa(idij-1) * ch(m2,i-1,k,j) &
338 - wa(idij) * ch(m2,i,k,j)
339 c1(m1,i,k,j) = wa(idij-1) * ch(m2,i,k,j) &
340 + wa(idij) * ch(m2,i-1,k,j)