1 SUBROUTINE kscorr(IPAIR,UI,UIDOT,FP,FD,TD2,TDOT4,TDOT5,TDOT6)
8 common/slow0/ range,islow(10)
9 REAL*8 ui(4),uidot(4),fp(6),fd(6),freg(4),frd(4),a1(3,4),a(8),
10 & pr(4),prd(4),u2(4),u3(4),u4(4),u5(4),fd1(3)
25 zmod = float(islow(imod))
38 dh = (((hdot4(ipair)*dt4 + hdot3(ipair))*dt3 +
39 & 0.5d0*hdot2(ipair))*dtu + hdot(ipair))*dtu
52 dh0 = (0.5d0*hdot2(ipair)*dtu + hdot(ipair))*dtu
75 a(k) = a1(1,k)*fp(1) + a1(2,k)*fp(2) + a1(3,k)*fp(3)
76 a(k+4) = a1(1,k)*fd(1) + a1(2,k)*fd(2) + a1(3,k)*fd(3)
78 freg(k) = dh*ui(k) + pr(k)
79 hd = hd + uidot(k)*a(k)
80 td2 = td2 + ui(k)*uidot(k)
89 ak4 = a(k+4) + a1(1,k)*fp(1) + a1(2,k)*fp(2) +
91 hd2 = hd2 + (h(ipair)*ui(k) + freg(k))*a(k) +
93 prd(k) = 0.5d0*ri*ak4 + td2*a(k)
94 frd(k) = hd*ui(k) + 0.5d0*dh*uidot(k) + prd(k)
97 freg(k) = 0.5d0*freg(k)
102 df = fp0(k,ipair) - freg(k)
103 sum = fd0(k,ipair) + frd(k)
104 bt2 = -3.0d0*df - (sum + fd0(k,ipair))*dtu
105 at3 = 2.0d0*df + sum*dtu
107 u2(k) = 0.5d0*h0(ipair)*u0(k,ipair) + fp0(k,ipair)
108 u3(k) = 0.5d0*h0(ipair)*udot(k,ipair) + fd0(k,ipair)
109 u4(k) = 0.5d0*h0(ipair)*u2(k) + bt2*dt2
110 u5(k) = 0.5d0*h0(ipair)*u3(k) + at3*dt6
115 ui(k) = ((((u5(k)*dt5 + u4(k)*z4)*dt4 + u3(k))*dt3 +
116 & 0.5*u2(k))*dtu + udot(k,ipair))*dtu + u0(k,ipair)
117 uidot(k) = (((u5(k)*dtz + u4(k)*z3)*dt3 +
118 & 0.5*u3(k))*dtu + u2(k))*dtu + udot(k,ipair)
122 ri = ui(1)**2 + ui(2)**2 + ui(3)**2 + ui(4)**2
146 dhd = hdot(ipair) - hd
147 sum = hdot2(ipair) + hd2
148 bt2 = -3.0d0*dhd - (sum + hdot2(ipair))*dtu
149 at3 = 2.0d0*dhd + sum*dtu
150 dh = dh0 + (0.25d0*at3 + one3*bt2)*dtu
154 h(ipair) = h(ipair) + dh
158 udot(k,ipair) = uidot(k)
159 fudot2(k,ipair) = u4(k) + u5(k)*dtu
160 fudot3(k,ipair) = u5(k)
161 ak4 = a(k+4) + a1(1,k)*fp(1) + a1(2,k)*fp(2) + a1(3,k)*fp(3)
162 pr(k) = 0.5d0*ri*a(k)
163 prd(k) = 0.5d0*ri*ak4 + td2*a(k) + 0.5d0*hd*ui(k)
165 fd0(k,ipair) = prd(k)
171 hdot3(ipair) = (3.0d0*at3 + bt2)*dt2
172 hdot4(ipair) = at3*dt6
182 u2k = pr(k) + h2*ui(k)
183 u3k = prd(k) + h2*uidot(k)
184 fu(k,ipair) = 0.5d0*u2k
185 fudot(k,ipair) = one6*u3k
186 td2 = td2 + ui(k)*uidot(k)
187 td3 = td3 + uidot(k)**2 + ui(k)*u2k
188 tdot4 = tdot4 + ui(k)*u3k + 3.0d0*uidot(k)*u2k
189 tdot5 = tdot5 + 0.5d0*fudot2(k,ipair)*ui(k) +
190 & 2.0d0*u3k*uidot(k) + 1.5d0*u2k**2
191 tdot6 = tdot6 + u5(k)*ui(k) + 5.0d0*u4(k)*uidot(k) +
198 tdot2(ipair) = 2.0d0*td2
199 tdot3(ipair) = 2.0d0*td3