1 | !CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC |
---|
2 | ! |
---|
3 | ! FFTPACK 5.0 |
---|
4 | ! |
---|
5 | ! Authors: Paul N. Swarztrauber and Richard A. Valent |
---|
6 | ! |
---|
7 | ! $Id: mradf5.f,v 1.2 2004/06/15 21:29:20 rodney Exp $ |
---|
8 | ! |
---|
9 | !CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC |
---|
10 | |
---|
11 | SUBROUTINE MRADF5 (M,IDO,L1,CC,IM1,IN1,CH,IM2,IN2, & |
---|
12 | & WA1,WA2,WA3,WA4) |
---|
13 | REAL CC(IN1,IDO,L1,5) ,CH(IN2,IDO,5,L1) , & |
---|
14 | & WA1(IDO) ,WA2(IDO) ,WA3(IDO) ,WA4(IDO) |
---|
15 | ! |
---|
16 | M1D = (M-1)*IM1+1 |
---|
17 | M2S = 1-IM2 |
---|
18 | ARG=2.*4.*ATAN(1.0)/5. |
---|
19 | TR11=COS(ARG) |
---|
20 | TI11=SIN(ARG) |
---|
21 | TR12=COS(2.*ARG) |
---|
22 | TI12=SIN(2.*ARG) |
---|
23 | DO 101 K=1,L1 |
---|
24 | M2 = M2S |
---|
25 | DO 1001 M1=1,M1D,IM1 |
---|
26 | M2 = M2+IM2 |
---|
27 | CH(M2,1,1,K) = CC(M1,1,K,1)+(CC(M1,1,K,5)+CC(M1,1,K,2))+ & |
---|
28 | & (CC(M1,1,K,4)+CC(M1,1,K,3)) |
---|
29 | CH(M2,IDO,2,K) = CC(M1,1,K,1)+TR11*(CC(M1,1,K,5)+CC(M1,1,K,2))+& |
---|
30 | & TR12*(CC(M1,1,K,4)+CC(M1,1,K,3)) |
---|
31 | CH(M2,1,3,K) = TI11*(CC(M1,1,K,5)-CC(M1,1,K,2))+TI12* & |
---|
32 | & (CC(M1,1,K,4)-CC(M1,1,K,3)) |
---|
33 | CH(M2,IDO,4,K) = CC(M1,1,K,1)+TR12*(CC(M1,1,K,5)+CC(M1,1,K,2))+& |
---|
34 | & TR11*(CC(M1,1,K,4)+CC(M1,1,K,3)) |
---|
35 | CH(M2,1,5,K) = TI12*(CC(M1,1,K,5)-CC(M1,1,K,2))-TI11* & |
---|
36 | & (CC(M1,1,K,4)-CC(M1,1,K,3)) |
---|
37 | 1001 CONTINUE |
---|
38 | 101 END DO |
---|
39 | IF (IDO .EQ. 1) RETURN |
---|
40 | IDP2 = IDO+2 |
---|
41 | DO 103 K=1,L1 |
---|
42 | DO 102 I=3,IDO,2 |
---|
43 | IC = IDP2-I |
---|
44 | M2 = M2S |
---|
45 | DO 1002 M1=1,M1D,IM1 |
---|
46 | M2 = M2+IM2 |
---|
47 | CH(M2,I-1,1,K) = CC(M1,I-1,K,1)+((WA1(I-2)*CC(M1,I-1,K,2)+ & |
---|
48 | & WA1(I-1)*CC(M1,I,K,2))+(WA4(I-2)*CC(M1,I-1,K,5)+WA4(I-1)* & |
---|
49 | & CC(M1,I,K,5)))+((WA2(I-2)*CC(M1,I-1,K,3)+WA2(I-1)* & |
---|
50 | & CC(M1,I,K,3))+(WA3(I-2)*CC(M1,I-1,K,4)+ & |
---|
51 | & WA3(I-1)*CC(M1,I,K,4))) |
---|
52 | CH(M2,I,1,K) = CC(M1,I,K,1)+((WA1(I-2)*CC(M1,I,K,2)- & |
---|
53 | & WA1(I-1)*CC(M1,I-1,K,2))+(WA4(I-2)*CC(M1,I,K,5)-WA4(I-1)* & |
---|
54 | & CC(M1,I-1,K,5)))+((WA2(I-2)*CC(M1,I,K,3)-WA2(I-1)* & |
---|
55 | & CC(M1,I-1,K,3))+(WA3(I-2)*CC(M1,I,K,4)-WA3(I-1)* & |
---|
56 | & CC(M1,I-1,K,4))) |
---|
57 | CH(M2,I-1,3,K) = CC(M1,I-1,K,1)+TR11* & |
---|
58 | & ( WA1(I-2)*CC(M1,I-1,K,2)+WA1(I-1)*CC(M1,I,K,2) & |
---|
59 | & +WA4(I-2)*CC(M1,I-1,K,5)+WA4(I-1)*CC(M1,I,K,5))+TR12* & |
---|
60 | & ( WA2(I-2)*CC(M1,I-1,K,3)+WA2(I-1)*CC(M1,I,K,3) & |
---|
61 | & +WA3(I-2)*CC(M1,I-1,K,4)+WA3(I-1)*CC(M1,I,K,4))+TI11* & |
---|
62 | & ( WA1(I-2)*CC(M1,I,K,2)-WA1(I-1)*CC(M1,I-1,K,2) & |
---|
63 | & -(WA4(I-2)*CC(M1,I,K,5)-WA4(I-1)*CC(M1,I-1,K,5)))+TI12* & |
---|
64 | & ( WA2(I-2)*CC(M1,I,K,3)-WA2(I-1)*CC(M1,I-1,K,3) & |
---|
65 | & -(WA3(I-2)*CC(M1,I,K,4)-WA3(I-1)*CC(M1,I-1,K,4))) |
---|
66 | CH(M2,IC-1,2,K) = CC(M1,I-1,K,1)+TR11* & |
---|
67 | & ( WA1(I-2)*CC(M1,I-1,K,2)+WA1(I-1)*CC(M1,I,K,2) & |
---|
68 | & +WA4(I-2)*CC(M1,I-1,K,5)+WA4(I-1)*CC(M1,I,K,5))+TR12* & |
---|
69 | & ( WA2(I-2)*CC(M1,I-1,K,3)+WA2(I-1)*CC(M1,I,K,3) & |
---|
70 | & +WA3(I-2)*CC(M1,I-1,K,4)+WA3(I-1)*CC(M1,I,K,4))-(TI11* & |
---|
71 | & ( WA1(I-2)*CC(M1,I,K,2)-WA1(I-1)*CC(M1,I-1,K,2) & |
---|
72 | & -(WA4(I-2)*CC(M1,I,K,5)-WA4(I-1)*CC(M1,I-1,K,5)))+TI12* & |
---|
73 | & ( WA2(I-2)*CC(M1,I,K,3)-WA2(I-1)*CC(M1,I-1,K,3) & |
---|
74 | & -(WA3(I-2)*CC(M1,I,K,4)-WA3(I-1)*CC(M1,I-1,K,4)))) |
---|
75 | CH(M2,I,3,K) = (CC(M1,I,K,1)+TR11*((WA1(I-2)*CC(M1,I,K,2)- & |
---|
76 | & WA1(I-1)*CC(M1,I-1,K,2))+(WA4(I-2)*CC(M1,I,K,5)-WA4(I-1)* & |
---|
77 | & CC(M1,I-1,K,5)))+TR12*((WA2(I-2)*CC(M1,I,K,3)-WA2(I-1)* & |
---|
78 | & CC(M1,I-1,K,3))+(WA3(I-2)*CC(M1,I,K,4)-WA3(I-1)* & |
---|
79 | & CC(M1,I-1,K,4))))+(TI11*((WA4(I-2)*CC(M1,I-1,K,5)+ & |
---|
80 | & WA4(I-1)*CC(M1,I,K,5))-(WA1(I-2)*CC(M1,I-1,K,2)+WA1(I-1)* & |
---|
81 | & CC(M1,I,K,2)))+TI12*((WA3(I-2)*CC(M1,I-1,K,4)+WA3(I-1)* & |
---|
82 | & CC(M1,I,K,4))-(WA2(I-2)*CC(M1,I-1,K,3)+WA2(I-1)* & |
---|
83 | & CC(M1,I,K,3)))) |
---|
84 | CH(M2,IC,2,K) = (TI11*((WA4(I-2)*CC(M1,I-1,K,5)+WA4(I-1)* & |
---|
85 | & CC(M1,I,K,5))-(WA1(I-2)*CC(M1,I-1,K,2)+WA1(I-1)* & |
---|
86 | & CC(M1,I,K,2)))+TI12*((WA3(I-2)*CC(M1,I-1,K,4)+WA3(I-1)* & |
---|
87 | & CC(M1,I,K,4))-(WA2(I-2)*CC(M1,I-1,K,3)+WA2(I-1)* & |
---|
88 | & CC(M1,I,K,3))))-(CC(M1,I,K,1)+TR11*((WA1(I-2)*CC(M1,I,K,2)-& |
---|
89 | & WA1(I-1)*CC(M1,I-1,K,2))+(WA4(I-2)*CC(M1,I,K,5)-WA4(I-1)* & |
---|
90 | & CC(M1,I-1,K,5)))+TR12*((WA2(I-2)*CC(M1,I,K,3)-WA2(I-1)* & |
---|
91 | & CC(M1,I-1,K,3))+(WA3(I-2)*CC(M1,I,K,4)-WA3(I-1)* & |
---|
92 | & CC(M1,I-1,K,4)))) |
---|
93 | CH(M2,I-1,5,K) = (CC(M1,I-1,K,1)+TR12*((WA1(I-2)* & |
---|
94 | & CC(M1,I-1,K,2)+WA1(I-1)*CC(M1,I,K,2))+(WA4(I-2)* & |
---|
95 | & CC(M1,I-1,K,5)+WA4(I-1)*CC(M1,I,K,5)))+TR11*((WA2(I-2)* & |
---|
96 | & CC(M1,I-1,K,3)+WA2(I-1)*CC(M1,I,K,3))+(WA3(I-2)* & |
---|
97 | & CC(M1,I-1,K,4)+WA3(I-1)*CC(M1,I,K,4))))+(TI12*((WA1(I-2)* & |
---|
98 | & CC(M1,I,K,2)-WA1(I-1)*CC(M1,I-1,K,2))-(WA4(I-2)* & |
---|
99 | & CC(M1,I,K,5)-WA4(I-1)*CC(M1,I-1,K,5)))-TI11*((WA2(I-2)* & |
---|
100 | & CC(M1,I,K,3)-WA2(I-1)*CC(M1,I-1,K,3))-(WA3(I-2)* & |
---|
101 | & CC(M1,I,K,4)-WA3(I-1)*CC(M1,I-1,K,4)))) |
---|
102 | CH(M2,IC-1,4,K) = (CC(M1,I-1,K,1)+TR12*((WA1(I-2)* & |
---|
103 | & CC(M1,I-1,K,2)+WA1(I-1)*CC(M1,I,K,2))+(WA4(I-2)* & |
---|
104 | & CC(M1,I-1,K,5)+WA4(I-1)*CC(M1,I,K,5)))+TR11*((WA2(I-2)* & |
---|
105 | & CC(M1,I-1,K,3)+WA2(I-1)*CC(M1,I,K,3))+(WA3(I-2)* & |
---|
106 | & CC(M1,I-1,K,4)+WA3(I-1)*CC(M1,I,K,4))))-(TI12*((WA1(I-2)* & |
---|
107 | & CC(M1,I,K,2)-WA1(I-1)*CC(M1,I-1,K,2))-(WA4(I-2)* & |
---|
108 | & CC(M1,I,K,5)-WA4(I-1)*CC(M1,I-1,K,5)))-TI11*((WA2(I-2)* & |
---|
109 | & CC(M1,I,K,3)-WA2(I-1)*CC(M1,I-1,K,3))-(WA3(I-2)* & |
---|
110 | & CC(M1,I,K,4)-WA3(I-1)*CC(M1,I-1,K,4)))) |
---|
111 | CH(M2,I,5,K) = (CC(M1,I,K,1)+TR12*((WA1(I-2)*CC(M1,I,K,2)- & |
---|
112 | & WA1(I-1)*CC(M1,I-1,K,2))+(WA4(I-2)*CC(M1,I,K,5)-WA4(I-1)* & |
---|
113 | & CC(M1,I-1,K,5)))+TR11*((WA2(I-2)*CC(M1,I,K,3)-WA2(I-1)* & |
---|
114 | & CC(M1,I-1,K,3))+(WA3(I-2)*CC(M1,I,K,4)-WA3(I-1)* & |
---|
115 | & CC(M1,I-1,K,4))))+(TI12*((WA4(I-2)*CC(M1,I-1,K,5)+ & |
---|
116 | & WA4(I-1)*CC(M1,I,K,5))-(WA1(I-2)*CC(M1,I-1,K,2)+WA1(I-1)* & |
---|
117 | & CC(M1,I,K,2)))-TI11*((WA3(I-2)*CC(M1,I-1,K,4)+WA3(I-1)* & |
---|
118 | & CC(M1,I,K,4))-(WA2(I-2)*CC(M1,I-1,K,3)+WA2(I-1)* & |
---|
119 | & CC(M1,I,K,3)))) |
---|
120 | CH(M2,IC,4,K) = (TI12*((WA4(I-2)*CC(M1,I-1,K,5)+WA4(I-1)* & |
---|
121 | & CC(M1,I,K,5))-(WA1(I-2)*CC(M1,I-1,K,2)+WA1(I-1)* & |
---|
122 | & CC(M1,I,K,2)))-TI11*((WA3(I-2)*CC(M1,I-1,K,4)+WA3(I-1)* & |
---|
123 | & CC(M1,I,K,4))-(WA2(I-2)*CC(M1,I-1,K,3)+WA2(I-1)* & |
---|
124 | & CC(M1,I,K,3))))-(CC(M1,I,K,1)+TR12*((WA1(I-2)*CC(M1,I,K,2)-& |
---|
125 | & WA1(I-1)*CC(M1,I-1,K,2))+(WA4(I-2)*CC(M1,I,K,5)-WA4(I-1)* & |
---|
126 | & CC(M1,I-1,K,5)))+TR11*((WA2(I-2)*CC(M1,I,K,3)-WA2(I-1)* & |
---|
127 | & CC(M1,I-1,K,3))+(WA3(I-2)*CC(M1,I,K,4)-WA3(I-1)* & |
---|
128 | & CC(M1,I-1,K,4)))) |
---|
129 | 1002 CONTINUE |
---|
130 | 102 CONTINUE |
---|
131 | 103 END DO |
---|
132 | RETURN |
---|
133 | END |
---|