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