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