1 | !CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC |
---|
2 | ! |
---|
3 | ! FFTPACK 5.0 |
---|
4 | ! |
---|
5 | ! Authors: Paul N. Swarztrauber and Richard A. Valent |
---|
6 | ! |
---|
7 | ! $Id: c1f2kf.f,v 1.2 2004/06/15 21:08:32 rodney Exp $ |
---|
8 | ! |
---|
9 | !CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC |
---|
10 | |
---|
11 | SUBROUTINE C1F2KF (IDO,L1,NA,CC,IN1,CH,IN2,WA) |
---|
12 | REAL CC(IN1,L1,IDO,2),CH(IN2,L1,2,IDO),WA(IDO,1,2) |
---|
13 | ! |
---|
14 | IF (IDO .GT. 1) GO TO 102 |
---|
15 | SN = 1./REAL(2*L1) |
---|
16 | IF (NA .EQ. 1) GO TO 106 |
---|
17 | DO 101 K=1,L1 |
---|
18 | CHOLD1 = SN*(CC(1,K,1,1)+CC(1,K,1,2)) |
---|
19 | CC(1,K,1,2) = SN*(CC(1,K,1,1)-CC(1,K,1,2)) |
---|
20 | CC(1,K,1,1) = CHOLD1 |
---|
21 | CHOLD2 = SN*(CC(2,K,1,1)+CC(2,K,1,2)) |
---|
22 | CC(2,K,1,2) = SN*(CC(2,K,1,1)-CC(2,K,1,2)) |
---|
23 | CC(2,K,1,1) = CHOLD2 |
---|
24 | 101 END DO |
---|
25 | RETURN |
---|
26 | 106 DO 107 K=1,L1 |
---|
27 | CH(1,K,1,1) = SN*(CC(1,K,1,1)+CC(1,K,1,2)) |
---|
28 | CH(1,K,2,1) = SN*(CC(1,K,1,1)-CC(1,K,1,2)) |
---|
29 | CH(2,K,1,1) = SN*(CC(2,K,1,1)+CC(2,K,1,2)) |
---|
30 | CH(2,K,2,1) = SN*(CC(2,K,1,1)-CC(2,K,1,2)) |
---|
31 | 107 END DO |
---|
32 | RETURN |
---|
33 | 102 DO 103 K=1,L1 |
---|
34 | CH(1,K,1,1) = CC(1,K,1,1)+CC(1,K,1,2) |
---|
35 | CH(1,K,2,1) = CC(1,K,1,1)-CC(1,K,1,2) |
---|
36 | CH(2,K,1,1) = CC(2,K,1,1)+CC(2,K,1,2) |
---|
37 | CH(2,K,2,1) = CC(2,K,1,1)-CC(2,K,1,2) |
---|
38 | 103 END DO |
---|
39 | DO 105 I=2,IDO |
---|
40 | DO 104 K=1,L1 |
---|
41 | CH(1,K,1,I) = CC(1,K,I,1)+CC(1,K,I,2) |
---|
42 | TR2 = CC(1,K,I,1)-CC(1,K,I,2) |
---|
43 | CH(2,K,1,I) = CC(2,K,I,1)+CC(2,K,I,2) |
---|
44 | TI2 = CC(2,K,I,1)-CC(2,K,I,2) |
---|
45 | CH(2,K,2,I) = WA(I,1,1)*TI2-WA(I,1,2)*TR2 |
---|
46 | CH(1,K,2,I) = WA(I,1,1)*TR2+WA(I,1,2)*TI2 |
---|
47 | 104 CONTINUE |
---|
48 | 105 END DO |
---|
49 | RETURN |
---|
50 | END |
---|