1 | !CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC |
---|
2 | ! |
---|
3 | ! FFTPACK 5.0 |
---|
4 | ! |
---|
5 | ! Authors: Paul N. Swarztrauber and Richard A. Valent |
---|
6 | ! |
---|
7 | ! $Id: mradb2.f,v 1.2 2004/06/15 21:29:19 rodney Exp $ |
---|
8 | ! |
---|
9 | !CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC |
---|
10 | |
---|
11 | SUBROUTINE MRADB2 (M,IDO,L1,CC,IM1,IN1,CH,IM2,IN2,WA1) |
---|
12 | REAL CC(IN1,IDO,2,L1), CH(IN2,IDO,L1,2), WA1(IDO) |
---|
13 | ! |
---|
14 | M1D = (M-1)*IM1+1 |
---|
15 | M2S = 1-IM2 |
---|
16 | DO 101 K=1,L1 |
---|
17 | M2 = M2S |
---|
18 | DO 1001 M1=1,M1D,IM1 |
---|
19 | M2 = M2+IM2 |
---|
20 | CH(M2,1,K,1) = CC(M1,1,1,K)+CC(M1,IDO,2,K) |
---|
21 | CH(M2,1,K,2) = CC(M1,1,1,K)-CC(M1,IDO,2,K) |
---|
22 | 1001 CONTINUE |
---|
23 | 101 END DO |
---|
24 | IF (IDO-2) 107,105,102 |
---|
25 | 102 IDP2 = IDO+2 |
---|
26 | DO 104 K=1,L1 |
---|
27 | DO 103 I=3,IDO,2 |
---|
28 | IC = IDP2-I |
---|
29 | M2 = M2S |
---|
30 | DO 1002 M1=1,M1D,IM1 |
---|
31 | M2 = M2+IM2 |
---|
32 | CH(M2,I-1,K,1) = CC(M1,I-1,1,K)+CC(M1,IC-1,2,K) |
---|
33 | CH(M2,I,K,1) = CC(M1,I,1,K)-CC(M1,IC,2,K) |
---|
34 | CH(M2,I-1,K,2) = WA1(I-2)*(CC(M1,I-1,1,K)-CC(M1,IC-1,2,K)) & |
---|
35 | & -WA1(I-1)*(CC(M1,I,1,K)+CC(M1,IC,2,K)) |
---|
36 | CH(M2,I,K,2) = WA1(I-2)*(CC(M1,I,1,K)+CC(M1,IC,2,K))+WA1(I-1) & |
---|
37 | & *(CC(M1,I-1,1,K)-CC(M1,IC-1,2,K)) |
---|
38 | 1002 CONTINUE |
---|
39 | 103 CONTINUE |
---|
40 | 104 END DO |
---|
41 | IF (MOD(IDO,2) .EQ. 1) RETURN |
---|
42 | 105 DO 106 K=1,L1 |
---|
43 | M2 = M2S |
---|
44 | DO 1003 M1=1,M1D,IM1 |
---|
45 | M2 = M2+IM2 |
---|
46 | CH(M2,IDO,K,1) = CC(M1,IDO,1,K)+CC(M1,IDO,1,K) |
---|
47 | CH(M2,IDO,K,2) = -(CC(M1,1,2,K)+CC(M1,1,2,K)) |
---|
48 | 1003 CONTINUE |
---|
49 | 106 END DO |
---|
50 | 107 RETURN |
---|
51 | END |
---|