1 subroutine r1fgkb ( ido, ip, l1, idl1, cc, c1, c2, in1, ch, ch2, in2, wa )
3 !*****************************************************************************80
5 !! R1FGKB is an FFTPACK5 auxiliary routine.
8 ! Copyright (C) 1995-2004, Scientific Computing Division,
9 ! University Corporation for Atmospheric Research
23 ! Vectorizing the Fast Fourier Transforms,
24 ! in Parallel Computations,
25 ! edited by G. Rodrigue,
26 ! Academic Press, 1982.
29 ! Fast Fourier Transform Algorithms for Vector Computers,
30 ! Parallel Computing, pages 45-63, 1984.
36 integer ( kind = 4 ) idl1
37 integer ( kind = 4 ) ido
38 integer ( kind = 4 ) in1
39 integer ( kind = 4 ) in2
40 integer ( kind = 4 ) ip
41 integer ( kind = 4 ) l1
46 real ( kind = 4 ) ar1h
48 real ( kind = 4 ) ar2h
50 real ( kind = 4 ) c1(in1,ido,l1,ip)
51 real ( kind = 4 ) c2(in1,idl1,ip)
52 real ( kind = 4 ) cc(in1,ido,ip,l1)
53 real ( kind = 4 ) ch(in2,ido,l1,ip)
54 real ( kind = 4 ) ch2(in2,idl1,ip)
59 integer ( kind = 4 ) i
60 integer ( kind = 4 ) ic
61 integer ( kind = 4 ) idij
62 integer ( kind = 4 ) idp2
63 integer ( kind = 4 ) ik
64 integer ( kind = 4 ) ipp2
65 integer ( kind = 4 ) ipph
66 integer ( kind = 4 ) is
67 integer ( kind = 4 ) j
68 integer ( kind = 4 ) j2
69 integer ( kind = 4 ) jc
70 integer ( kind = 4 ) k
71 integer ( kind = 4 ) l
72 integer ( kind = 4 ) lc
73 integer ( kind = 4 ) nbd
75 real ( kind = 4 ) wa(ido)
77 tpi = 2.0E+00 * 4.0E+00 * atan ( 1.0E+00 )
78 arg = tpi / real ( ip, kind = 4 )
89 ch(1,i,k,1) = cc(1,i,1,k)
95 ch(1,i,k,1) = cc(1,i,1,k)
104 ch(1,1,k,j) = cc(1,ido,j2-2,k)+cc(1,ido,j2-2,k)
105 ch(1,1,k,jc) = cc(1,1,j2-1,k)+cc(1,1,j2-1,k)
111 else if ( nbd < l1 ) then
118 ch(1,i-1,k,j) = cc(1,i-1,2*j-1,k)+cc(1,ic-1,2*j-2,k)
119 ch(1,i-1,k,jc) = cc(1,i-1,2*j-1,k)-cc(1,ic-1,2*j-2,k)
120 ch(1,i,k,j) = cc(1,i,2*j-1,k)-cc(1,ic,2*j-2,k)
121 ch(1,i,k,jc) = cc(1,i,2*j-1,k)+cc(1,ic,2*j-2,k)
133 ch(1,i-1,k,j) = cc(1,i-1,2*j-1,k)+cc(1,ic-1,2*j-2,k)
134 ch(1,i-1,k,jc) = cc(1,i-1,2*j-1,k)-cc(1,ic-1,2*j-2,k)
135 ch(1,i,k,j) = cc(1,i,2*j-1,k)-cc(1,ic,2*j-2,k)
136 ch(1,i,k,jc) = cc(1,i,2*j-1,k)+cc(1,ic,2*j-2,k)
149 ar1h = dcp * ar1 - dsp * ai1
150 ai1 = dcp * ai1 + dsp * ar1
154 c2(1,ik,l) = ch2(1,ik,1)+ar1*ch2(1,ik,2)
155 c2(1,ik,lc) = ai1*ch2(1,ik,ip)
166 ar2h = dc2*ar2-ds2*ai2
167 ai2 = dc2*ai2+ds2*ar2
171 c2(1,ik,l) = c2(1,ik,l)+ar2*ch2(1,ik,j)
172 c2(1,ik,lc) = c2(1,ik,lc)+ai2*ch2(1,ik,jc)
181 ch2(1,ik,1) = ch2(1,ik,1)+ch2(1,ik,j)
188 ch(1,1,k,j) = c1(1,1,k,j)-c1(1,1,k,jc)
189 ch(1,1,k,jc) = c1(1,1,k,j)+c1(1,1,k,jc)
195 else if ( nbd < l1 ) then
201 ch(1,i-1,k,j) = c1(1,i-1,k,j) - c1(1,i,k,jc)
202 ch(1,i-1,k,jc) = c1(1,i-1,k,j) + c1(1,i,k,jc)
203 ch(1,i,k,j) = c1(1,i,k,j) + c1(1,i-1,k,jc)
204 ch(1,i,k,jc) = c1(1,i,k,j) - c1(1,i-1,k,jc)
215 ch(1,i-1,k,j) = c1(1,i-1,k,j)-c1(1,i,k,jc)
216 ch(1,i-1,k,jc) = c1(1,i-1,k,j)+c1(1,i,k,jc)
217 ch(1,i,k,j) = c1(1,i,k,j)+c1(1,i-1,k,jc)
218 ch(1,i,k,jc) = c1(1,i,k,j)-c1(1,i-1,k,jc)
230 c2(1,ik,1) = ch2(1,ik,1)
235 c1(1,1,k,j) = ch(1,1,k,j)
248 c1(1,i-1,k,j) = wa(idij-1)*ch(1,i-1,k,j)-wa(idij)* ch(1,i,k,j)
249 c1(1,i,k,j) = wa(idij-1)*ch(1,i,k,j)+wa(idij)* ch(1,i-1,k,j)
264 c1(1,i-1,k,j) = wa(idij-1) * ch(1,i-1,k,j) - wa(idij) * ch(1,i,k,j)
265 c1(1,i,k,j) = wa(idij-1) * ch(1,i,k,j) + wa(idij) * ch(1,i-1,k,j)