1 subroutine d1fgkb ( ido, ip, l1, idl1, cc, c1, c2, in1, ch, ch2, in2, wa )
3 !*****************************************************************************80
5 !! D1FGKB is an FFTPACK5 auxiliary routine.
15 ! Original real single precision by Paul Swarztrauber, Richard Valent.
16 ! Real double precision version by John Burkardt.
21 ! Vectorizing the Fast Fourier Transforms,
22 ! in Parallel Computations,
23 ! edited by G. Rodrigue,
24 ! Academic Press, 1982.
27 ! Fast Fourier Transform Algorithms for Vector Computers,
28 ! Parallel Computing, pages 45-63, 1984.
34 integer ( kind = 4 ) idl1
35 integer ( kind = 4 ) ido
36 integer ( kind = 4 ) in1
37 integer ( kind = 4 ) in2
38 integer ( kind = 4 ) ip
39 integer ( kind = 4 ) l1
44 real ( kind = 8 ) ar1h
46 real ( kind = 8 ) ar2h
48 real ( kind = 8 ) c1(in1,ido,l1,ip)
49 real ( kind = 8 ) c2(in1,idl1,ip)
50 real ( kind = 8 ) cc(in1,ido,ip,l1)
51 real ( kind = 8 ) ch(in2,ido,l1,ip)
52 real ( kind = 8 ) ch2(in2,idl1,ip)
57 integer ( kind = 4 ) i
58 integer ( kind = 4 ) ic
59 integer ( kind = 4 ) idij
60 integer ( kind = 4 ) idp2
61 integer ( kind = 4 ) ik
62 integer ( kind = 4 ) ipp2
63 integer ( kind = 4 ) ipph
64 integer ( kind = 4 ) is
65 integer ( kind = 4 ) j
66 integer ( kind = 4 ) j2
67 integer ( kind = 4 ) jc
68 integer ( kind = 4 ) k
69 integer ( kind = 4 ) l
70 integer ( kind = 4 ) lc
71 integer ( kind = 4 ) nbd
73 real ( kind = 8 ) wa(ido)
75 tpi = 2.0D+00 * 4.0D+00 * atan ( 1.0D+00 )
76 arg = tpi / real ( ip, kind = 8 )
87 ch(1,i,k,1) = cc(1,i,1,k)
93 ch(1,i,k,1) = cc(1,i,1,k)
102 ch(1,1,k,j) = cc(1,ido,j2-2,k)+cc(1,ido,j2-2,k)
103 ch(1,1,k,jc) = cc(1,1,j2-1,k)+cc(1,1,j2-1,k)
109 else if ( nbd < l1 ) then
116 ch(1,i-1,k,j) = cc(1,i-1,2*j-1,k)+cc(1,ic-1,2*j-2,k)
117 ch(1,i-1,k,jc) = cc(1,i-1,2*j-1,k)-cc(1,ic-1,2*j-2,k)
118 ch(1,i,k,j) = cc(1,i,2*j-1,k)-cc(1,ic,2*j-2,k)
119 ch(1,i,k,jc) = cc(1,i,2*j-1,k)+cc(1,ic,2*j-2,k)
131 ch(1,i-1,k,j) = cc(1,i-1,2*j-1,k)+cc(1,ic-1,2*j-2,k)
132 ch(1,i-1,k,jc) = cc(1,i-1,2*j-1,k)-cc(1,ic-1,2*j-2,k)
133 ch(1,i,k,j) = cc(1,i,2*j-1,k)-cc(1,ic,2*j-2,k)
134 ch(1,i,k,jc) = cc(1,i,2*j-1,k)+cc(1,ic,2*j-2,k)
147 ar1h = dcp * ar1 - dsp * ai1
148 ai1 = dcp * ai1 + dsp * ar1
152 c2(1,ik,l) = ch2(1,ik,1)+ar1*ch2(1,ik,2)
153 c2(1,ik,lc) = ai1*ch2(1,ik,ip)
164 ar2h = dc2*ar2-ds2*ai2
165 ai2 = dc2*ai2+ds2*ar2
169 c2(1,ik,l) = c2(1,ik,l)+ar2*ch2(1,ik,j)
170 c2(1,ik,lc) = c2(1,ik,lc)+ai2*ch2(1,ik,jc)
179 ch2(1,ik,1) = ch2(1,ik,1)+ch2(1,ik,j)
186 ch(1,1,k,j) = c1(1,1,k,j)-c1(1,1,k,jc)
187 ch(1,1,k,jc) = c1(1,1,k,j)+c1(1,1,k,jc)
193 else if ( nbd < l1 ) then
199 ch(1,i-1,k,j) = c1(1,i-1,k,j) - c1(1,i,k,jc)
200 ch(1,i-1,k,jc) = c1(1,i-1,k,j) + c1(1,i,k,jc)
201 ch(1,i,k,j) = c1(1,i,k,j) + c1(1,i-1,k,jc)
202 ch(1,i,k,jc) = c1(1,i,k,j) - c1(1,i-1,k,jc)
213 ch(1,i-1,k,j) = c1(1,i-1,k,j)-c1(1,i,k,jc)
214 ch(1,i-1,k,jc) = c1(1,i-1,k,j)+c1(1,i,k,jc)
215 ch(1,i,k,j) = c1(1,i,k,j)+c1(1,i-1,k,jc)
216 ch(1,i,k,jc) = c1(1,i,k,j)-c1(1,i-1,k,jc)
228 c2(1,ik,1) = ch2(1,ik,1)
233 c1(1,1,k,j) = ch(1,1,k,j)
246 c1(1,i-1,k,j) = wa(idij-1)*ch(1,i-1,k,j)-wa(idij)* ch(1,i,k,j)
247 c1(1,i,k,j) = wa(idij-1)*ch(1,i,k,j)+wa(idij)* ch(1,i-1,k,j)
262 c1(1,i-1,k,j) = wa(idij-1) * ch(1,i-1,k,j) - wa(idij) * ch(1,i,k,j)
263 c1(1,i,k,j) = wa(idij-1) * ch(1,i,k,j) + wa(idij) * ch(1,i-1,k,j)