1 subroutine zmfgkf ( lot, ido, ip, l1, lid, na, cc, cc1, im1, in1, &
2 ch, ch1, im2, in2, wa )
4 !*****************************************************************************80
6 !! ZMFGKF is an FFTPACK5 auxiliary routine.
16 ! Original complex single precision by Paul Swarztrauber, Richard Valent.
17 ! Complex double precision version by John Burkardt.
22 ! Vectorizing the Fast Fourier Transforms,
23 ! in Parallel Computations,
24 ! edited by G. Rodrigue,
25 ! Academic Press, 1982.
28 ! Fast Fourier Transform Algorithms for Vector Computers,
29 ! Parallel Computing, pages 45-63, 1984.
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
40 integer ( kind = 4 ) lid
42 real ( kind = 8 ) cc(2,in1,l1,ip,ido)
43 real ( kind = 8 ) cc1(2,in1,lid,ip)
44 real ( kind = 8 ) ch(2,in2,l1,ido,ip)
45 real ( kind = 8 ) ch1(2,in2,lid,ip)
46 real ( kind = 8 ) chold1
47 real ( kind = 8 ) chold2
48 integer ( kind = 4 ) i
49 integer ( kind = 4 ) idlj
50 integer ( kind = 4 ) im1
51 integer ( kind = 4 ) im2
52 integer ( kind = 4 ) ipp2
53 integer ( kind = 4 ) ipph
54 integer ( kind = 4 ) j
55 integer ( kind = 4 ) jc
56 integer ( kind = 4 ) k
57 integer ( kind = 4 ) ki
58 integer ( kind = 4 ) l
59 integer ( kind = 4 ) lc
60 integer ( kind = 4 ) lot
61 integer ( kind = 4 ) m1
62 integer ( kind = 4 ) m1d
63 integer ( kind = 4 ) m2
64 integer ( kind = 4 ) m2s
65 integer ( kind = 4 ) na
67 real ( kind = 8 ) wa(ido,ip-1,2)
71 m1d = ( lot - 1 ) * im1 + 1
80 ch1(1,m2,ki,1) = cc1(1,m1,ki,1)
81 ch1(2,m2,ki,1) = cc1(2,m1,ki,1)
91 ch1(1,m2,ki,j) = cc1(1,m1,ki,j) + cc1(1,m1,ki,jc)
92 ch1(1,m2,ki,jc) = cc1(1,m1,ki,j) - cc1(1,m1,ki,jc)
93 ch1(2,m2,ki,j) = cc1(2,m1,ki,j) + cc1(2,m1,ki,jc)
94 ch1(2,m2,ki,jc) = cc1(2,m1,ki,j) - cc1(2,m1,ki,jc)
104 cc1(1,m1,ki,1) = cc1(1,m1,ki,1) + ch1(1,m2,ki,j)
105 cc1(2,m1,ki,1) = cc1(2,m1,ki,1) + ch1(2,m2,ki,j)
118 cc1(1,m1,ki,l) = ch1(1,m2,ki,1) + wa(1,l-1,1) * ch1(1,m2,ki,2)
119 cc1(1,m1,ki,lc) = - wa(1,l-1,2) * ch1(1,m2,ki,ip)
120 cc1(2,m1,ki,l) = ch1(2,m2,ki,1) + wa(1,l-1,1) * ch1(2,m2,ki,2)
121 cc1(2,m1,ki,lc) = - wa(1,l-1,2) * ch1(2,m2,ki,ip)
127 idlj = mod ( ( l - 1 ) * ( j - 1 ), ip )
134 cc1(1,m1,ki,l) = cc1(1,m1,ki,l) + war * ch1(1,m2,ki,j)
135 cc1(1,m1,ki,lc) = cc1(1,m1,ki,lc) + wai * ch1(1,m2,ki,jc)
136 cc1(2,m1,ki,l) = cc1(2,m1,ki,l) + war * ch1(2,m2,ki,j)
137 cc1(2,m1,ki,lc) = cc1(2,m1,ki,lc) + wai * ch1(2,m2,ki,jc)
150 ch1(1,m2,ki,1) = cc1(1,m1,ki,1)
151 ch1(2,m2,ki,1) = cc1(2,m1,ki,1)
161 ch1(1,m2,ki,j) = cc1(1,m1,ki,j) - cc1(2,m1,ki,jc)
162 ch1(2,m2,ki,j) = cc1(2,m1,ki,j) + cc1(1,m1,ki,jc)
163 ch1(1,m2,ki,jc) = cc1(1,m1,ki,j) + cc1(2,m1,ki,jc)
164 ch1(2,m2,ki,jc) = cc1(2,m1,ki,j) - cc1(1,m1,ki,jc)
174 cc(1,m1,k,1,i) = ch(1,m2,k,i,1)
175 cc(2,m1,k,1,i) = ch(2,m2,k,i,1)
185 cc(1,m1,k,j,1) = ch(1,m2,k,1,j)
186 cc(2,m1,k,j,1) = ch(2,m2,k,1,j)
197 cc(1,m1,k,j,i) = wa(i,j-1,1) * ch(1,m2,k,i,j) &
198 + wa(i,j-1,2) * ch(2,m2,k,i,j)
199 cc(2,m1,k,j,i) = wa(i,j-1,1) * ch(2,m2,k,i,j) &
200 - wa(i,j-1,2) * ch(1,m2,k,i,j)
206 else if ( na == 1 ) then
208 sn = 1.0D+00 / real ( ip * l1, kind = 8 )
214 ch1(1,m2,ki,1) = sn * cc1(1,m1,ki,1)
215 ch1(2,m2,ki,1) = sn * cc1(2,m1,ki,1)
225 ch1(1,m2,ki,j) = sn * ( cc1(1,m1,ki,j) - cc1(2,m1,ki,jc) )
226 ch1(2,m2,ki,j) = sn * ( cc1(2,m1,ki,j) + cc1(1,m1,ki,jc) )
227 ch1(1,m2,ki,jc) = sn * ( cc1(1,m1,ki,j) + cc1(2,m1,ki,jc) )
228 ch1(2,m2,ki,jc) = sn * ( cc1(2,m1,ki,j) - cc1(1,m1,ki,jc) )
235 sn = 1.0D+00 / real ( ip * l1, kind = 8 )
241 cc1(1,m1,ki,1) = sn * cc1(1,m1,ki,1)
242 cc1(2,m1,ki,1) = sn * cc1(2,m1,ki,1)
250 chold1 = sn * ( cc1(1,m1,ki,j) - cc1(2,m1,ki,jc) )
251 chold2 = sn * ( cc1(1,m1,ki,j) + cc1(2,m1,ki,jc) )
252 cc1(1,m1,ki,j) = chold1
253 cc1(2,m1,ki,jc) = sn * ( cc1(2,m1,ki,j) - cc1(1,m1,ki,jc) )
254 cc1(2,m1,ki,j) = sn * ( cc1(2,m1,ki,j) + cc1(1,m1,ki,jc) )
255 cc1(1,m1,ki,jc) = chold2