1 subroutine cmfgkb ( lot, ido, ip, l1, lid, na, cc, cc1, im1, in1, &
2 ch, ch1, im2, in2, wa )
4 !*****************************************************************************80
6 !! CMFGKB 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 ) ido
38 integer ( kind = 4 ) in1
39 integer ( kind = 4 ) in2
40 integer ( kind = 4 ) ip
41 integer ( kind = 4 ) l1
42 integer ( kind = 4 ) lid
44 real ( kind = 4 ) cc(2,in1,l1,ip,ido)
45 real ( kind = 4 ) cc1(2,in1,lid,ip)
46 real ( kind = 4 ) ch(2,in2,l1,ido,ip)
47 real ( kind = 4 ) ch1(2,in2,lid,ip)
48 real ( kind = 4 ) chold1
49 real ( kind = 4 ) chold2
50 integer ( kind = 4 ) i
51 integer ( kind = 4 ) idlj
52 integer ( kind = 4 ) im1
53 integer ( kind = 4 ) im2
54 integer ( kind = 4 ) ipp2
55 integer ( kind = 4 ) ipph
56 integer ( kind = 4 ) j
57 integer ( kind = 4 ) jc
58 integer ( kind = 4 ) k
59 integer ( kind = 4 ) ki
60 integer ( kind = 4 ) l
61 integer ( kind = 4 ) lc
62 integer ( kind = 4 ) lot
63 integer ( kind = 4 ) m1
64 integer ( kind = 4 ) m1d
65 integer ( kind = 4 ) m2
66 integer ( kind = 4 ) m2s
67 integer ( kind = 4 ) na
68 real ( kind = 4 ) wa(ido,ip-1,2)
72 m1d = ( lot - 1 ) * im1 + 1
81 ch1(1,m2,ki,1) = cc1(1,m1,ki,1)
82 ch1(2,m2,ki,1) = cc1(2,m1,ki,1)
92 ch1(1,m2,ki,j) = cc1(1,m1,ki,j) + cc1(1,m1,ki,jc)
93 ch1(1,m2,ki,jc) = cc1(1,m1,ki,j) - cc1(1,m1,ki,jc)
94 ch1(2,m2,ki,j) = cc1(2,m1,ki,j) + cc1(2,m1,ki,jc)
95 ch1(2,m2,ki,jc) = cc1(2,m1,ki,j) - cc1(2,m1,ki,jc)
105 cc1(1,m1,ki,1) = cc1(1,m1,ki,1) + ch1(1,m2,ki,j)
106 cc1(2,m1,ki,1) = cc1(2,m1,ki,1) + ch1(2,m2,ki,j)
119 cc1(1,m1,ki,l) = ch1(1,m2,ki,1) + wa(1,l-1,1) * ch1(1,m2,ki,2)
120 cc1(1,m1,ki,lc) = wa(1,l-1,2) * ch1(1,m2,ki,ip)
121 cc1(2,m1,ki,l) = ch1(2,m2,ki,1) + wa(1,l-1,1) * ch1(2,m2,ki,2)
122 cc1(2,m1,ki,lc) = wa(1,l-1,2) * ch1(2,m2,ki,ip)
129 idlj = mod ( ( l - 1 ) * ( j - 1 ), ip )
136 cc1(1,m1,ki,l) = cc1(1,m1,ki,l) + war * ch1(1,m2,ki,j)
137 cc1(1,m1,ki,lc) = cc1(1,m1,ki,lc) + wai * ch1(1,m2,ki,jc)
138 cc1(2,m1,ki,l) = cc1(2,m1,ki,l) + war * ch1(2,m2,ki,j)
139 cc1(2,m1,ki,lc) = cc1(2,m1,ki,lc) + wai * ch1(2,m2,ki,jc)
146 if( 1 < ido .or. na == 1 ) then
152 ch1(1,m2,ki,1) = cc1(1,m1,ki,1)
153 ch1(2,m2,ki,1) = cc1(2,m1,ki,1)
163 ch1(1,m2,ki,j) = cc1(1,m1,ki,j) - cc1(2,m1,ki,jc)
164 ch1(1,m2,ki,jc) = cc1(1,m1,ki,j) + cc1(2,m1,ki,jc)
165 ch1(2,m2,ki,jc) = cc1(2,m1,ki,j) - cc1(1,m1,ki,jc)
166 ch1(2,m2,ki,j) = cc1(2,m1,ki,j) + cc1(1,m1,ki,jc)
180 cc(1,m1,k,1,i) = ch(1,m2,k,i,1)
181 cc(2,m1,k,1,i) = ch(2,m2,k,i,1)
191 cc(1,m1,k,j,1) = ch(1,m2,k,1,j)
192 cc(2,m1,k,j,1) = ch(2,m2,k,1,j)
203 cc(1,m1,k,j,i) = wa(i,j-1,1) * ch(1,m2,k,i,j) &
204 - wa(i,j-1,2) * ch(2,m2,k,i,j)
205 cc(2,m1,k,j,i) = wa(i,j-1,1) * ch(2,m2,k,i,j) &
206 + wa(i,j-1,2) * ch(1,m2,k,i,j)
219 chold1 = cc1(1,m1,ki,j) - cc1(2,m1,ki,jc)
220 chold2 = cc1(1,m1,ki,j) + cc1(2,m1,ki,jc)
221 cc1(1,m1,ki,j) = chold1
223 cc1(2,m1,ki,jc) = cc1(2,m1,ki,j) - cc1(1,m1,ki,jc)
224 cc1(2,m1,ki,j) = cc1(2,m1,ki,j) + cc1(1,m1,ki,jc)
225 cc1(1,m1,ki,jc) = chold2