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: c1f4kb.f,v 1.2 2004/06/15 21:08:32 rodney Exp $ |
---|
11 | ! |
---|
12 | !CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC |
---|
13 | |
---|
14 | SUBROUTINE C1F4KB (IDO,L1,NA,CC,IN1,CH,IN2,WA) |
---|
15 | REAL CC(IN1,L1,IDO,4),CH(IN2,L1,4,IDO),WA(IDO,3,2) |
---|
16 | ! |
---|
17 | ! FFTPACK 5.0 auxiliary routine |
---|
18 | ! |
---|
19 | IF (IDO.GT.1 .OR. NA.EQ.1) GO TO 102 |
---|
20 | DO 101 K=1,L1 |
---|
21 | TI1 = CC(2,K,1,1)-CC(2,K,1,3) |
---|
22 | TI2 = CC(2,K,1,1)+CC(2,K,1,3) |
---|
23 | TR4 = CC(2,K,1,4)-CC(2,K,1,2) |
---|
24 | TI3 = CC(2,K,1,2)+CC(2,K,1,4) |
---|
25 | TR1 = CC(1,K,1,1)-CC(1,K,1,3) |
---|
26 | TR2 = CC(1,K,1,1)+CC(1,K,1,3) |
---|
27 | TI4 = CC(1,K,1,2)-CC(1,K,1,4) |
---|
28 | TR3 = CC(1,K,1,2)+CC(1,K,1,4) |
---|
29 | CC(1,K,1,1) = TR2+TR3 |
---|
30 | CC(1,K,1,3) = TR2-TR3 |
---|
31 | CC(2,K,1,1) = TI2+TI3 |
---|
32 | CC(2,K,1,3) = TI2-TI3 |
---|
33 | CC(1,K,1,2) = TR1+TR4 |
---|
34 | CC(1,K,1,4) = TR1-TR4 |
---|
35 | CC(2,K,1,2) = TI1+TI4 |
---|
36 | CC(2,K,1,4) = TI1-TI4 |
---|
37 | 101 END DO |
---|
38 | RETURN |
---|
39 | 102 DO 103 K=1,L1 |
---|
40 | TI1 = CC(2,K,1,1)-CC(2,K,1,3) |
---|
41 | TI2 = CC(2,K,1,1)+CC(2,K,1,3) |
---|
42 | TR4 = CC(2,K,1,4)-CC(2,K,1,2) |
---|
43 | TI3 = CC(2,K,1,2)+CC(2,K,1,4) |
---|
44 | TR1 = CC(1,K,1,1)-CC(1,K,1,3) |
---|
45 | TR2 = CC(1,K,1,1)+CC(1,K,1,3) |
---|
46 | TI4 = CC(1,K,1,2)-CC(1,K,1,4) |
---|
47 | TR3 = CC(1,K,1,2)+CC(1,K,1,4) |
---|
48 | CH(1,K,1,1) = TR2+TR3 |
---|
49 | CH(1,K,3,1) = TR2-TR3 |
---|
50 | CH(2,K,1,1) = TI2+TI3 |
---|
51 | CH(2,K,3,1) = TI2-TI3 |
---|
52 | CH(1,K,2,1) = TR1+TR4 |
---|
53 | CH(1,K,4,1) = TR1-TR4 |
---|
54 | CH(2,K,2,1) = TI1+TI4 |
---|
55 | CH(2,K,4,1) = TI1-TI4 |
---|
56 | 103 END DO |
---|
57 | IF(IDO .EQ. 1) RETURN |
---|
58 | DO 105 I=2,IDO |
---|
59 | DO 104 K=1,L1 |
---|
60 | TI1 = CC(2,K,I,1)-CC(2,K,I,3) |
---|
61 | TI2 = CC(2,K,I,1)+CC(2,K,I,3) |
---|
62 | TI3 = CC(2,K,I,2)+CC(2,K,I,4) |
---|
63 | TR4 = CC(2,K,I,4)-CC(2,K,I,2) |
---|
64 | TR1 = CC(1,K,I,1)-CC(1,K,I,3) |
---|
65 | TR2 = CC(1,K,I,1)+CC(1,K,I,3) |
---|
66 | TI4 = CC(1,K,I,2)-CC(1,K,I,4) |
---|
67 | TR3 = CC(1,K,I,2)+CC(1,K,I,4) |
---|
68 | CH(1,K,1,I) = TR2+TR3 |
---|
69 | CR3 = TR2-TR3 |
---|
70 | CH(2,K,1,I) = TI2+TI3 |
---|
71 | CI3 = TI2-TI3 |
---|
72 | CR2 = TR1+TR4 |
---|
73 | CR4 = TR1-TR4 |
---|
74 | CI2 = TI1+TI4 |
---|
75 | CI4 = TI1-TI4 |
---|
76 | CH(1,K,2,I) = WA(I,1,1)*CR2-WA(I,1,2)*CI2 |
---|
77 | CH(2,K,2,I) = WA(I,1,1)*CI2+WA(I,1,2)*CR2 |
---|
78 | CH(1,K,3,I) = WA(I,2,1)*CR3-WA(I,2,2)*CI3 |
---|
79 | CH(2,K,3,I) = WA(I,2,1)*CI3+WA(I,2,2)*CR3 |
---|
80 | CH(1,K,4,I) = WA(I,3,1)*CR4-WA(I,3,2)*CI4 |
---|
81 | CH(2,K,4,I) = WA(I,3,1)*CI4+WA(I,3,2)*CR4 |
---|
82 | 104 CONTINUE |
---|
83 | 105 END DO |
---|
84 | RETURN |
---|
85 | END |
---|