16 semi = -0.5d0*body(icm)/h(ipair)
19 zeta = 1.0 - r(ipair)/semi
20 psi = tdot2(ipair)/sqrt(body(icm))
21 ecc = sqrt(zeta**2 + psi**2/semi)
24 IF (ecc.GE.1.0) go to 100
27 theta = atan2(abs(psi)/sqrt(semi),zeta)
30 dt = 2.0d0*semi*sqrt(semi/body(icm))*(theta - abs(psi)/sqrt(semi))
33 dtu = -2.0d0*(h(ipair)*dt + tdot2(ipair))/body(icm)
36 IF (dtu.LT.4.0*dtau(ipair)) go to 100
43 ys = 2.0d0*psi/(ecc*sqrt(body(icm)))
44 zz = body(icm)/(4.0*semi)
49 u(k,ipair) = u0(k,ipair)*xc - udot(k,ipair)*ys
50 udot(k,ipair) = u0(k,ipair)*ys*zz + udot(k,ipair)*xc
51 u0(k,ipair) = u(k,ipair)
52 r(ipair) = r(ipair) + u(k,ipair)**2
57 corr = 2.0 + 2.0*(semi - r(ipair))/(semi*(1.0 + ecc))
58 rcrit2 = cmsep2*(corr*r(ipair))**2
63 rij2 = (x(1,icm) - x(1,j))**2 + (x(2,icm) - x(2,j))**2 +
64 & (x(3,icm) - x(3,j))**2
65 IF (rij2.LT.rcrit2)
THEN
74 jpert(np) = list(2,i1)
78 tdot2(ipair) = -tdot2(ipair)
86 dmin2 = min(dmin2,semi*(1.0d0 - ecc))
94 CALL
ksres(ipair,j1,j2,rij2)
98 vi2 = x0dot(1,icm)**2 + x0dot(2,icm)**2 + x0dot(3,icm)**2
99 corr = 1.0 + 2.0*(pot2 - pot1)/(body(icm)*vi2)
100 etcorr = etcorr + (pot2 - pot1)
101 IF (corr.GT.0.0d0)
THEN
109 x0dot(k,icm) = corr*x0dot(k,icm)