1 | !CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC |
---|
2 | ! |
---|
3 | ! FFTPACK 5.0 |
---|
4 | ! |
---|
5 | ! Authors: Paul N. Swarztrauber and Richard A. Valent |
---|
6 | ! |
---|
7 | ! $Id: mradf2.f,v 1.2 2004/06/15 21:29:20 rodney Exp $ |
---|
8 | ! |
---|
9 | !CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC |
---|
10 | |
---|
11 | SUBROUTINE MRADF2 (M,IDO,L1,CC,IM1,IN1,CH,IM2,IN2,WA1) |
---|
12 | REAL CH(IN2,IDO,2,L1) ,CC(IN1,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,1,K) = CC(M1,1,K,1)+CC(M1,1,K,2) |
---|
21 | CH(M2,IDO,2,K) = CC(M1,1,K,1)-CC(M1,1,K,2) |
---|
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 1003 M1=1,M1D,IM1 |
---|
31 | M2 = M2+IM2 |
---|
32 | CH(M2,I,1,K) = CC(M1,I,K,1)+(WA1(I-2)*CC(M1,I,K,2)- & |
---|
33 | & WA1(I-1)*CC(M1,I-1,K,2)) |
---|
34 | CH(M2,IC,2,K) = (WA1(I-2)*CC(M1,I,K,2)-WA1(I-1)* & |
---|
35 | & CC(M1,I-1,K,2))-CC(M1,I,K,1) |
---|
36 | CH(M2,I-1,1,K) = CC(M1,I-1,K,1)+(WA1(I-2)*CC(M1,I-1,K,2)+ & |
---|
37 | & WA1(I-1)*CC(M1,I,K,2)) |
---|
38 | CH(M2,IC-1,2,K) = CC(M1,I-1,K,1)-(WA1(I-2)*CC(M1,I-1,K,2)+ & |
---|
39 | & WA1(I-1)*CC(M1,I,K,2)) |
---|
40 | 1003 CONTINUE |
---|
41 | 103 CONTINUE |
---|
42 | 104 END DO |
---|
43 | IF (MOD(IDO,2) .EQ. 1) RETURN |
---|
44 | 105 DO 106 K=1,L1 |
---|
45 | M2 = M2S |
---|
46 | DO 1006 M1=1,M1D,IM1 |
---|
47 | M2 = M2+IM2 |
---|
48 | CH(M2,1,2,K) = -CC(M1,IDO,K,2) |
---|
49 | CH(M2,IDO,1,K) = CC(M1,IDO,K,1) |
---|
50 | 1006 CONTINUE |
---|
51 | 106 END DO |
---|
52 | 107 RETURN |
---|
53 | END |
---|