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