1 subroutine z1fgkf ( ido, ip, l1, lid, na, cc, cc1, in1, ch, ch1, in2, wa )
3 !*****************************************************************************80
5 !! Z1FGKF is an FFTPACK5 auxiliary routine.
15 ! Original complex single precision by Paul Swarztrauber, Richard Valent.
16 ! Complex 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 ) ido
35 integer ( kind = 4 ) in1
36 integer ( kind = 4 ) in2
37 integer ( kind = 4 ) ip
38 integer ( kind = 4 ) l1
39 integer ( kind = 4 ) lid
41 real ( kind = 8 ) cc(in1,l1,ip,ido)
42 real ( kind = 8 ) cc1(in1,lid,ip)
43 real ( kind = 8 ) ch(in2,l1,ido,ip)
44 real ( kind = 8 ) ch1(in2,lid,ip)
45 real ( kind = 8 ) chold1
46 real ( kind = 8 ) chold2
47 integer ( kind = 4 ) i
48 integer ( kind = 4 ) idlj
49 integer ( kind = 4 ) ipp2
50 integer ( kind = 4 ) ipph
51 integer ( kind = 4 ) j
52 integer ( kind = 4 ) jc
53 integer ( kind = 4 ) k
54 integer ( kind = 4 ) ki
55 integer ( kind = 4 ) l
56 integer ( kind = 4 ) lc
57 integer ( kind = 4 ) na
59 real ( kind = 8 ) wa(ido,ip-1,2)
67 ch1(1,ki,1) = cc1(1,ki,1)
68 ch1(2,ki,1) = cc1(2,ki,1)
74 ch1(1,ki,j) = cc1(1,ki,j)+cc1(1,ki,jc)
75 ch1(1,ki,jc) = cc1(1,ki,j)-cc1(1,ki,jc)
76 ch1(2,ki,j) = cc1(2,ki,j)+cc1(2,ki,jc)
77 ch1(2,ki,jc) = cc1(2,ki,j)-cc1(2,ki,jc)
83 cc1(1,ki,1) = cc1(1,ki,1) + ch1(1,ki,j)
84 cc1(2,ki,1) = cc1(2,ki,1) + ch1(2,ki,j)
93 cc1(1,ki,l) = ch1(1,ki,1) + wa(1,l-1,1) * ch1(1,ki,2)
94 cc1(1,ki,lc) = - wa(1,l-1,2) * ch1(1,ki,ip)
95 cc1(2,ki,l) = ch1(2,ki,1) + wa(1,l-1,1) * ch1(2,ki,2)
96 cc1(2,ki,lc) = - wa(1,l-1,2) * ch1(2,ki,ip)
102 idlj = mod ( ( l - 1 ) * ( j - 1 ), ip )
107 cc1(1,ki,l) = cc1(1,ki,l)+war*ch1(1,ki,j)
108 cc1(1,ki,lc) = cc1(1,ki,lc)+wai*ch1(1,ki,jc)
109 cc1(2,ki,l) = cc1(2,ki,l)+war*ch1(2,ki,j)
110 cc1(2,ki,lc) = cc1(2,ki,lc)+wai*ch1(2,ki,jc)
120 ch1(1,ki,1) = cc1(1,ki,1)
121 ch1(2,ki,1) = cc1(2,ki,1)
127 ch1(1,ki,j) = cc1(1,ki,j)-cc1(2,ki,jc)
128 ch1(2,ki,j) = cc1(2,ki,j)+cc1(1,ki,jc)
129 ch1(1,ki,jc) = cc1(1,ki,j)+cc1(2,ki,jc)
130 ch1(2,ki,jc) = cc1(2,ki,j)-cc1(1,ki,jc)
136 cc(1,k,1,i) = ch(1,k,i,1)
137 cc(2,k,1,i) = ch(2,k,i,1)
143 cc(1,k,j,1) = ch(1,k,1,j)
144 cc(2,k,j,1) = ch(2,k,1,j)
151 cc(1,k,j,i) = wa(i,j-1,1)*ch(1,k,i,j) + wa(i,j-1,2)*ch(2,k,i,j)
152 cc(2,k,j,i) = wa(i,j-1,1)*ch(2,k,i,j) - wa(i,j-1,2)*ch(1,k,i,j)
157 else if ( na == 1 ) then
159 sn = 1.0D+00 / real ( ip * l1, kind = 8 )
162 ch1(1,ki,1) = sn * cc1(1,ki,1)
163 ch1(2,ki,1) = sn * cc1(2,ki,1)
169 ch1(1,ki,j) = sn*(cc1(1,ki,j)-cc1(2,ki,jc))
170 ch1(2,ki,j) = sn*(cc1(2,ki,j)+cc1(1,ki,jc))
171 ch1(1,ki,jc) = sn*(cc1(1,ki,j)+cc1(2,ki,jc))
172 ch1(2,ki,jc) = sn*(cc1(2,ki,j)-cc1(1,ki,jc))
178 sn = 1.0D+00 / real ( ip * l1, kind = 8 )
181 cc1(1,ki,1) = sn * cc1(1,ki,1)
182 cc1(2,ki,1) = sn * cc1(2,ki,1)
188 chold1 = sn*(cc1(1,ki,j)-cc1(2,ki,jc))
189 chold2 = sn*(cc1(1,ki,j)+cc1(2,ki,jc))
191 cc1(2,ki,jc) = sn*(cc1(2,ki,j)-cc1(1,ki,jc))
192 cc1(2,ki,j) = sn*(cc1(2,ki,j)+cc1(1,ki,jc))
193 cc1(1,ki,jc) = chold2