1 | !CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC |
---|
2 | ! |
---|
3 | ! FFTPACK 5.0 |
---|
4 | ! |
---|
5 | ! Authors: Paul N. Swarztrauber and Richard A. Valent |
---|
6 | ! |
---|
7 | ! $Id: cmf5kb.f,v 1.2 2004/06/15 21:08:32 rodney Exp $ |
---|
8 | ! |
---|
9 | !CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC |
---|
10 | |
---|
11 | SUBROUTINE CMF5KB (LOT,IDO,L1,NA,CC,IM1,IN1,CH,IM2,IN2,WA) |
---|
12 | REAL CC(2,IN1,L1,IDO,5),CH(2,IN2,L1,5,IDO),WA(IDO,4,2) |
---|
13 | DATA TR11,TI11,TR12,TI12 /.3090169943749474,.9510565162951536, & |
---|
14 | &-.8090169943749474,.5877852522924731/ |
---|
15 | ! |
---|
16 | ! FFTPACK 5.0 auxiliary routine |
---|
17 | ! |
---|
18 | M1D = (LOT-1)*IM1+1 |
---|
19 | M2S = 1-IM2 |
---|
20 | IF (IDO.GT.1 .OR. NA.EQ.1) GO TO 102 |
---|
21 | DO 101 K=1,L1 |
---|
22 | DO 101 M1=1,M1D,IM1 |
---|
23 | TI5 = CC(2,M1,K,1,2)-CC(2,M1,K,1,5) |
---|
24 | TI2 = CC(2,M1,K,1,2)+CC(2,M1,K,1,5) |
---|
25 | TI4 = CC(2,M1,K,1,3)-CC(2,M1,K,1,4) |
---|
26 | TI3 = CC(2,M1,K,1,3)+CC(2,M1,K,1,4) |
---|
27 | TR5 = CC(1,M1,K,1,2)-CC(1,M1,K,1,5) |
---|
28 | TR2 = CC(1,M1,K,1,2)+CC(1,M1,K,1,5) |
---|
29 | TR4 = CC(1,M1,K,1,3)-CC(1,M1,K,1,4) |
---|
30 | TR3 = CC(1,M1,K,1,3)+CC(1,M1,K,1,4) |
---|
31 | CHOLD1 = CC(1,M1,K,1,1)+TR2+TR3 |
---|
32 | CHOLD2 = CC(2,M1,K,1,1)+TI2+TI3 |
---|
33 | CR2 = CC(1,M1,K,1,1)+TR11*TR2+TR12*TR3 |
---|
34 | CI2 = CC(2,M1,K,1,1)+TR11*TI2+TR12*TI3 |
---|
35 | CR3 = CC(1,M1,K,1,1)+TR12*TR2+TR11*TR3 |
---|
36 | CI3 = CC(2,M1,K,1,1)+TR12*TI2+TR11*TI3 |
---|
37 | CC(1,M1,K,1,1) = CHOLD1 |
---|
38 | CC(2,M1,K,1,1) = CHOLD2 |
---|
39 | CR5 = TI11*TR5+TI12*TR4 |
---|
40 | CI5 = TI11*TI5+TI12*TI4 |
---|
41 | CR4 = TI12*TR5-TI11*TR4 |
---|
42 | CI4 = TI12*TI5-TI11*TI4 |
---|
43 | CC(1,M1,K,1,2) = CR2-CI5 |
---|
44 | CC(1,M1,K,1,5) = CR2+CI5 |
---|
45 | CC(2,M1,K,1,2) = CI2+CR5 |
---|
46 | CC(2,M1,K,1,3) = CI3+CR4 |
---|
47 | CC(1,M1,K,1,3) = CR3-CI4 |
---|
48 | CC(1,M1,K,1,4) = CR3+CI4 |
---|
49 | CC(2,M1,K,1,4) = CI3-CR4 |
---|
50 | CC(2,M1,K,1,5) = CI2-CR5 |
---|
51 | 101 CONTINUE |
---|
52 | RETURN |
---|
53 | 102 DO 103 K=1,L1 |
---|
54 | M2 = M2S |
---|
55 | DO 103 M1=1,M1D,IM1 |
---|
56 | M2 = M2+IM2 |
---|
57 | TI5 = CC(2,M1,K,1,2)-CC(2,M1,K,1,5) |
---|
58 | TI2 = CC(2,M1,K,1,2)+CC(2,M1,K,1,5) |
---|
59 | TI4 = CC(2,M1,K,1,3)-CC(2,M1,K,1,4) |
---|
60 | TI3 = CC(2,M1,K,1,3)+CC(2,M1,K,1,4) |
---|
61 | TR5 = CC(1,M1,K,1,2)-CC(1,M1,K,1,5) |
---|
62 | TR2 = CC(1,M1,K,1,2)+CC(1,M1,K,1,5) |
---|
63 | TR4 = CC(1,M1,K,1,3)-CC(1,M1,K,1,4) |
---|
64 | TR3 = CC(1,M1,K,1,3)+CC(1,M1,K,1,4) |
---|
65 | CH(1,M2,K,1,1) = CC(1,M1,K,1,1)+TR2+TR3 |
---|
66 | CH(2,M2,K,1,1) = CC(2,M1,K,1,1)+TI2+TI3 |
---|
67 | CR2 = CC(1,M1,K,1,1)+TR11*TR2+TR12*TR3 |
---|
68 | CI2 = CC(2,M1,K,1,1)+TR11*TI2+TR12*TI3 |
---|
69 | CR3 = CC(1,M1,K,1,1)+TR12*TR2+TR11*TR3 |
---|
70 | CI3 = CC(2,M1,K,1,1)+TR12*TI2+TR11*TI3 |
---|
71 | CR5 = TI11*TR5+TI12*TR4 |
---|
72 | CI5 = TI11*TI5+TI12*TI4 |
---|
73 | CR4 = TI12*TR5-TI11*TR4 |
---|
74 | CI4 = TI12*TI5-TI11*TI4 |
---|
75 | CH(1,M2,K,2,1) = CR2-CI5 |
---|
76 | CH(1,M2,K,5,1) = CR2+CI5 |
---|
77 | CH(2,M2,K,2,1) = CI2+CR5 |
---|
78 | CH(2,M2,K,3,1) = CI3+CR4 |
---|
79 | CH(1,M2,K,3,1) = CR3-CI4 |
---|
80 | CH(1,M2,K,4,1) = CR3+CI4 |
---|
81 | CH(2,M2,K,4,1) = CI3-CR4 |
---|
82 | CH(2,M2,K,5,1) = CI2-CR5 |
---|
83 | 103 CONTINUE |
---|
84 | IF(IDO .EQ. 1) RETURN |
---|
85 | DO 105 I=2,IDO |
---|
86 | DO 104 K=1,L1 |
---|
87 | M2 = M2S |
---|
88 | DO 104 M1=1,M1D,IM1 |
---|
89 | M2 = M2+IM2 |
---|
90 | TI5 = CC(2,M1,K,I,2)-CC(2,M1,K,I,5) |
---|
91 | TI2 = CC(2,M1,K,I,2)+CC(2,M1,K,I,5) |
---|
92 | TI4 = CC(2,M1,K,I,3)-CC(2,M1,K,I,4) |
---|
93 | TI3 = CC(2,M1,K,I,3)+CC(2,M1,K,I,4) |
---|
94 | TR5 = CC(1,M1,K,I,2)-CC(1,M1,K,I,5) |
---|
95 | TR2 = CC(1,M1,K,I,2)+CC(1,M1,K,I,5) |
---|
96 | TR4 = CC(1,M1,K,I,3)-CC(1,M1,K,I,4) |
---|
97 | TR3 = CC(1,M1,K,I,3)+CC(1,M1,K,I,4) |
---|
98 | CH(1,M2,K,1,I) = CC(1,M1,K,I,1)+TR2+TR3 |
---|
99 | CH(2,M2,K,1,I) = CC(2,M1,K,I,1)+TI2+TI3 |
---|
100 | CR2 = CC(1,M1,K,I,1)+TR11*TR2+TR12*TR3 |
---|
101 | CI2 = CC(2,M1,K,I,1)+TR11*TI2+TR12*TI3 |
---|
102 | CR3 = CC(1,M1,K,I,1)+TR12*TR2+TR11*TR3 |
---|
103 | CI3 = CC(2,M1,K,I,1)+TR12*TI2+TR11*TI3 |
---|
104 | CR5 = TI11*TR5+TI12*TR4 |
---|
105 | CI5 = TI11*TI5+TI12*TI4 |
---|
106 | CR4 = TI12*TR5-TI11*TR4 |
---|
107 | CI4 = TI12*TI5-TI11*TI4 |
---|
108 | DR3 = CR3-CI4 |
---|
109 | DR4 = CR3+CI4 |
---|
110 | DI3 = CI3+CR4 |
---|
111 | DI4 = CI3-CR4 |
---|
112 | DR5 = CR2+CI5 |
---|
113 | DR2 = CR2-CI5 |
---|
114 | DI5 = CI2-CR5 |
---|
115 | DI2 = CI2+CR5 |
---|
116 | CH(1,M2,K,2,I) = WA(I,1,1)*DR2-WA(I,1,2)*DI2 |
---|
117 | CH(2,M2,K,2,I) = WA(I,1,1)*DI2+WA(I,1,2)*DR2 |
---|
118 | CH(1,M2,K,3,I) = WA(I,2,1)*DR3-WA(I,2,2)*DI3 |
---|
119 | CH(2,M2,K,3,I) = WA(I,2,1)*DI3+WA(I,2,2)*DR3 |
---|
120 | CH(1,M2,K,4,I) = WA(I,3,1)*DR4-WA(I,3,2)*DI4 |
---|
121 | CH(2,M2,K,4,I) = WA(I,3,1)*DI4+WA(I,3,2)*DR4 |
---|
122 | CH(1,M2,K,5,I) = WA(I,4,1)*DR5-WA(I,4,2)*DI5 |
---|
123 | CH(2,M2,K,5,I) = WA(I,4,1)*DI5+WA(I,4,2)*DR5 |
---|
124 | 104 CONTINUE |
---|
125 | 105 END DO |
---|
126 | RETURN |
---|
127 | END |
---|