1 subroutine mcstf1 ( lot, jump, n, inc, x, wsave, dsum, work, ier )
3 !*****************************************************************************80
5 !! MCSTF1 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 ) inc
38 real ( kind = 8 ) dsum(*)
39 integer ( kind = 4 ) i
40 integer ( kind = 4 ) ier
41 integer ( kind = 4 ) ier1
42 integer ( kind = 4 ) jump
43 integer ( kind = 4 ) k
44 integer ( kind = 4 ) kc
45 integer ( kind = 4 ) lenx
46 integer ( kind = 4 ) lj
47 integer ( kind = 4 ) lnsv
48 integer ( kind = 4 ) lnwk
49 integer ( kind = 4 ) lot
50 integer ( kind = 4 ) m
51 integer ( kind = 4 ) m1
52 integer ( kind = 4 ) modn
53 integer ( kind = 4 ) n
54 integer ( kind = 4 ) nm1
55 integer ( kind = 4 ) np1
56 integer ( kind = 4 ) ns2
57 real ( kind = 4 ) snm1
61 real ( kind = 4 ) work(*)
62 real ( kind = 4 ) wsave(*)
63 real ( kind = 4 ) x(inc,*)
65 real ( kind = 4 ) x1p3
72 lj = ( lot - 1 ) * jump + 1
82 x(m,2) = 0.5E+00 * ( x(m,1) - x(m,2) )
83 x(m,1) = 0.5E+00 * x1h
93 x1p3 = x(m,1) + x(m,3)
95 x(m,2) = 0.5E+00 * ( x(m,1) - x(m,3) )
96 x(m,1) = 0.25E+00 * ( x1p3 + tx2 )
97 x(m,3) = 0.25E+00 * ( x1p3 - tx2 )
106 dsum(m1) = x(m,1) - x(m,n)
107 x(m,1) = x(m,1) + x(m,n)
115 t1 = x(m,k) + x(m,kc)
116 t2 = x(m,k) - x(m,kc)
117 dsum(m1) = dsum(m1) + wsave(kc) * t2
126 if ( modn /= 0 ) then
128 x(m,ns2+1) = x(m,ns2+1) + x(m,ns2+1)
132 lenx = ( lot - 1 ) * jump + inc * ( nm1 - 1 ) + 1
133 lnsv = nm1 + int ( log ( real ( nm1, kind = 4 ) ) ) + 4
136 call rfftmf ( lot, jump, nm1, inc, x, lenx, wsave(n+1), lnsv, work, &
139 if ( ier1 /= 0 ) then
141 call xerfft ( 'mcstf1', -5 )
145 snm1 = 1.0E+00 / real ( nm1, kind = 4 )
147 dsum(m) = snm1 * dsum(m)
150 if ( mod ( nm1, 2 ) == 0 ) then
152 x(m,nm1) = x(m,nm1) + x(m,nm1)
160 xi = 0.5E+00 * x(m,i)
161 x(m,i) = 0.5E+00 * x(m,i-1)
163 dsum(m1) = dsum(m1) + xi
167 if ( modn == 0 ) then
178 x(m,1) = 0.5E+00 * x(m,1)
179 x(m,n) = 0.5E+00 * x(m,n)