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