[2759] | 1 | !CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC |
---|
| 2 | ! |
---|
| 3 | ! FFTPACK 5.0 |
---|
| 4 | ! Copyright (C) 1995-2004, Scientific Computing Division, |
---|
| 5 | ! University Corporation for Atmospheric Research |
---|
| 6 | ! Licensed under the GNU General Public License (GPL) |
---|
| 7 | ! |
---|
| 8 | ! Authors: Paul N. Swarztrauber and Richard A. Valent |
---|
| 9 | ! |
---|
| 10 | ! $Id: r1f4kf.f,v 1.2 2004/06/15 21:29:20 rodney Exp $ |
---|
| 11 | ! |
---|
| 12 | !CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC |
---|
| 13 | |
---|
| 14 | SUBROUTINE R1F4KF (IDO,L1,CC,IN1,CH,IN2,WA1,WA2,WA3) |
---|
| 15 | REAL CC(IN1,IDO,L1,4) ,CH(IN2,IDO,4,L1) , & |
---|
| 16 | & WA1(IDO) ,WA2(IDO) ,WA3(IDO) |
---|
| 17 | ! |
---|
| 18 | HSQT2=SQRT(2.)/2. |
---|
| 19 | DO 101 K=1,L1 |
---|
| 20 | CH(1,1,1,K) = (CC(1,1,K,2)+CC(1,1,K,4)) & |
---|
| 21 | & +(CC(1,1,K,1)+CC(1,1,K,3)) |
---|
| 22 | CH(1,IDO,4,K) = (CC(1,1,K,1)+CC(1,1,K,3)) & |
---|
| 23 | & -(CC(1,1,K,2)+CC(1,1,K,4)) |
---|
| 24 | CH(1,IDO,2,K) = CC(1,1,K,1)-CC(1,1,K,3) |
---|
| 25 | CH(1,1,3,K) = CC(1,1,K,4)-CC(1,1,K,2) |
---|
| 26 | 101 END DO |
---|
| 27 | IF (IDO-2) 107,105,102 |
---|
| 28 | 102 IDP2 = IDO+2 |
---|
| 29 | DO 104 K=1,L1 |
---|
| 30 | DO 103 I=3,IDO,2 |
---|
| 31 | IC = IDP2-I |
---|
| 32 | CH(1,I-1,1,K) = ((WA1(I-2)*CC(1,I-1,K,2)+WA1(I-1)* & |
---|
| 33 | & CC(1,I,K,2))+(WA3(I-2)*CC(1,I-1,K,4)+WA3(I-1)* & |
---|
| 34 | & CC(1,I,K,4)))+(CC(1,I-1,K,1)+(WA2(I-2)*CC(1,I-1,K,3)+ & |
---|
| 35 | & WA2(I-1)*CC(1,I,K,3))) |
---|
| 36 | CH(1,IC-1,4,K) = (CC(1,I-1,K,1)+(WA2(I-2)*CC(1,I-1,K,3)+ & |
---|
| 37 | & WA2(I-1)*CC(1,I,K,3)))-((WA1(I-2)*CC(1,I-1,K,2)+ & |
---|
| 38 | & WA1(I-1)*CC(1,I,K,2))+(WA3(I-2)*CC(1,I-1,K,4)+ & |
---|
| 39 | & WA3(I-1)*CC(1,I,K,4))) |
---|
| 40 | CH(1,I,1,K) = ((WA1(I-2)*CC(1,I,K,2)-WA1(I-1)* & |
---|
| 41 | & CC(1,I-1,K,2))+(WA3(I-2)*CC(1,I,K,4)-WA3(I-1)* & |
---|
| 42 | & CC(1,I-1,K,4)))+(CC(1,I,K,1)+(WA2(I-2)*CC(1,I,K,3)- & |
---|
| 43 | & WA2(I-1)*CC(1,I-1,K,3))) |
---|
| 44 | CH(1,IC,4,K) = ((WA1(I-2)*CC(1,I,K,2)-WA1(I-1)* & |
---|
| 45 | & CC(1,I-1,K,2))+(WA3(I-2)*CC(1,I,K,4)-WA3(I-1)* & |
---|
| 46 | & CC(1,I-1,K,4)))-(CC(1,I,K,1)+(WA2(I-2)*CC(1,I,K,3)- & |
---|
| 47 | & WA2(I-1)*CC(1,I-1,K,3))) |
---|
| 48 | CH(1,I-1,3,K) = ((WA1(I-2)*CC(1,I,K,2)-WA1(I-1)* & |
---|
| 49 | & CC(1,I-1,K,2))-(WA3(I-2)*CC(1,I,K,4)-WA3(I-1)* & |
---|
| 50 | & CC(1,I-1,K,4)))+(CC(1,I-1,K,1)-(WA2(I-2)*CC(1,I-1,K,3)+ & |
---|
| 51 | & WA2(I-1)*CC(1,I,K,3))) |
---|
| 52 | CH(1,IC-1,2,K) = (CC(1,I-1,K,1)-(WA2(I-2)*CC(1,I-1,K,3)+ & |
---|
| 53 | & WA2(I-1)*CC(1,I,K,3)))-((WA1(I-2)*CC(1,I,K,2)-WA1(I-1)* & |
---|
| 54 | & CC(1,I-1,K,2))-(WA3(I-2)*CC(1,I,K,4)-WA3(I-1)* & |
---|
| 55 | & CC(1,I-1,K,4))) |
---|
| 56 | CH(1,I,3,K) = ((WA3(I-2)*CC(1,I-1,K,4)+WA3(I-1)* & |
---|
| 57 | & CC(1,I,K,4))-(WA1(I-2)*CC(1,I-1,K,2)+WA1(I-1)* & |
---|
| 58 | & CC(1,I,K,2)))+(CC(1,I,K,1)-(WA2(I-2)*CC(1,I,K,3)- & |
---|
| 59 | & WA2(I-1)*CC(1,I-1,K,3))) |
---|
| 60 | CH(1,IC,2,K) = ((WA3(I-2)*CC(1,I-1,K,4)+WA3(I-1)* & |
---|
| 61 | & CC(1,I,K,4))-(WA1(I-2)*CC(1,I-1,K,2)+WA1(I-1)* & |
---|
| 62 | & CC(1,I,K,2)))-(CC(1,I,K,1)-(WA2(I-2)*CC(1,I,K,3)- & |
---|
| 63 | & WA2(I-1)*CC(1,I-1,K,3))) |
---|
| 64 | 103 CONTINUE |
---|
| 65 | 104 END DO |
---|
| 66 | IF (MOD(IDO,2) .EQ. 1) RETURN |
---|
| 67 | 105 CONTINUE |
---|
| 68 | DO 106 K=1,L1 |
---|
| 69 | CH(1,IDO,1,K) = (HSQT2*(CC(1,IDO,K,2)-CC(1,IDO,K,4)))+ & |
---|
| 70 | & CC(1,IDO,K,1) |
---|
| 71 | CH(1,IDO,3,K) = CC(1,IDO,K,1)-(HSQT2*(CC(1,IDO,K,2)- & |
---|
| 72 | & CC(1,IDO,K,4))) |
---|
| 73 | CH(1,1,2,K) = (-HSQT2*(CC(1,IDO,K,2)+CC(1,IDO,K,4)))- & |
---|
| 74 | & CC(1,IDO,K,3) |
---|
| 75 | CH(1,1,4,K) = (-HSQT2*(CC(1,IDO,K,2)+CC(1,IDO,K,4)))+ & |
---|
| 76 | & CC(1,IDO,K,3) |
---|
| 77 | 106 END DO |
---|
| 78 | 107 RETURN |
---|
| 79 | END |
---|