1 subroutine c1fgkf ( ido, ip, l1, lid, na, cc, cc1, in1, ch, ch1, in2, wa )
3 !*****************************************************************************80
5 !! C1FGKF 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 ) ido
37 integer ( kind = 4 ) in1
38 integer ( kind = 4 ) in2
39 integer ( kind = 4 ) ip
40 integer ( kind = 4 ) l1
41 integer ( kind = 4 ) lid
43 real ( kind = 4 ) cc(in1,l1,ip,ido)
44 real ( kind = 4 ) cc1(in1,lid,ip)
45 real ( kind = 4 ) ch(in2,l1,ido,ip)
46 real ( kind = 4 ) ch1(in2,lid,ip)
47 real ( kind = 4 ) chold1
48 real ( kind = 4 ) chold2
49 integer ( kind = 4 ) i
50 integer ( kind = 4 ) idlj
51 integer ( kind = 4 ) ipp2
52 integer ( kind = 4 ) ipph
53 integer ( kind = 4 ) j
54 integer ( kind = 4 ) jc
55 integer ( kind = 4 ) k
56 integer ( kind = 4 ) ki
57 integer ( kind = 4 ) l
58 integer ( kind = 4 ) lc
59 integer ( kind = 4 ) na
61 real ( kind = 4 ) wa(ido,ip-1,2)
69 ch1(1,ki,1) = cc1(1,ki,1)
70 ch1(2,ki,1) = cc1(2,ki,1)
76 ch1(1,ki,j) = cc1(1,ki,j)+cc1(1,ki,jc)
77 ch1(1,ki,jc) = cc1(1,ki,j)-cc1(1,ki,jc)
78 ch1(2,ki,j) = cc1(2,ki,j)+cc1(2,ki,jc)
79 ch1(2,ki,jc) = cc1(2,ki,j)-cc1(2,ki,jc)
85 cc1(1,ki,1) = cc1(1,ki,1) + ch1(1,ki,j)
86 cc1(2,ki,1) = cc1(2,ki,1) + ch1(2,ki,j)
95 cc1(1,ki,l) = ch1(1,ki,1) + wa(1,l-1,1) * ch1(1,ki,2)
96 cc1(1,ki,lc) = - wa(1,l-1,2) * ch1(1,ki,ip)
97 cc1(2,ki,l) = ch1(2,ki,1) + wa(1,l-1,1) * ch1(2,ki,2)
98 cc1(2,ki,lc) = - wa(1,l-1,2) * ch1(2,ki,ip)
104 idlj = mod ( ( l - 1 ) * ( j - 1 ), ip )
109 cc1(1,ki,l) = cc1(1,ki,l)+war*ch1(1,ki,j)
110 cc1(1,ki,lc) = cc1(1,ki,lc)+wai*ch1(1,ki,jc)
111 cc1(2,ki,l) = cc1(2,ki,l)+war*ch1(2,ki,j)
112 cc1(2,ki,lc) = cc1(2,ki,lc)+wai*ch1(2,ki,jc)
122 ch1(1,ki,1) = cc1(1,ki,1)
123 ch1(2,ki,1) = cc1(2,ki,1)
129 ch1(1,ki,j) = cc1(1,ki,j)-cc1(2,ki,jc)
130 ch1(2,ki,j) = cc1(2,ki,j)+cc1(1,ki,jc)
131 ch1(1,ki,jc) = cc1(1,ki,j)+cc1(2,ki,jc)
132 ch1(2,ki,jc) = cc1(2,ki,j)-cc1(1,ki,jc)
138 cc(1,k,1,i) = ch(1,k,i,1)
139 cc(2,k,1,i) = ch(2,k,i,1)
145 cc(1,k,j,1) = ch(1,k,1,j)
146 cc(2,k,j,1) = ch(2,k,1,j)
153 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)
154 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)
159 else if ( na == 1 ) then
161 sn = 1.0E+00 / real ( ip * l1, kind = 4 )
164 ch1(1,ki,1) = sn * cc1(1,ki,1)
165 ch1(2,ki,1) = sn * cc1(2,ki,1)
171 ch1(1,ki,j) = sn * ( cc1(1,ki,j) - cc1(2,ki,jc) )
172 ch1(2,ki,j) = sn * ( cc1(2,ki,j) + cc1(1,ki,jc) )
173 ch1(1,ki,jc) = sn * ( cc1(1,ki,j) + cc1(2,ki,jc) )
174 ch1(2,ki,jc) = sn * ( cc1(2,ki,j) - cc1(1,ki,jc) )
180 sn = 1.0E+00 / real ( ip * l1, kind = 4 )
183 cc1(1,ki,1) = sn * cc1(1,ki,1)
184 cc1(2,ki,1) = sn * cc1(2,ki,1)
190 chold1 = sn*(cc1(1,ki,j)-cc1(2,ki,jc))
191 chold2 = sn*(cc1(1,ki,j)+cc1(2,ki,jc))
193 cc1(2,ki,jc) = sn*(cc1(2,ki,j)-cc1(1,ki,jc))
194 cc1(2,ki,j) = sn*(cc1(2,ki,j)+cc1(1,ki,jc))
195 cc1(1,ki,jc) = chold2