22 rij2 = (x(1,i) - x(1,j))**2 + (x(2,i) - x(2,j))**2 +
23 & (x(3,i) - x(3,j))**2
24 IF (rij2.LT.rjmin2)
THEN
31 IF (name(i).LE.0.OR.name(jcomp).LE.0) go to 20
33 rdot = (x(1,i) - x(1,jcomp))*(xdot(1,i) - xdot(1,jcomp)) +
34 & (x(2,i) - x(2,jcomp))*(xdot(2,i) - xdot(2,jcomp)) +
35 & (x(3,i) - x(3,jcomp))*(xdot(3,i) - xdot(3,jcomp))
37 vrel2 = (xdot(1,i) - xdot(1,jcomp))**2 +
38 & (xdot(2,i) - xdot(2,jcomp))**2 +
39 & (xdot(3,i) - xdot(3,jcomp))**2
43 semi1 = 2.0/rij - vrel2/(body(i) + body(jcomp))
45 ecc1 = sqrt((1.0d0 - rij/semi1)**2 +
46 & rdot**2/(semi1*(body(i) + body(jcomp))))
47 pmin = semi1*(1.0d0 - ecc1)
50 semi = -0.5d0*body(i)/h(ipair)
51 ecc2 = (1.0d0 - r(ipair)/semi)**2 + tdot2(ipair)**2/(body(i)*semi)
55 rji1 = (x(1,jcomp) - x(1,i1))**2 + (x(2,jcomp) - x(2,i1))**2 +
56 & (x(3,jcomp) - x(3,i1))**2
57 rji2 = (x(1,jcomp) - x(1,i2))**2 + (x(2,jcomp) - x(2,i2))**2 +
58 & (x(3,jcomp) - x(3,i2))**2
61 fji1 = (body(i1) + body(jcomp))/rji1
62 fji2 = (body(i2) + body(jcomp))/rji2
64 IF (fji1.GT.fji2)
THEN
80 rd = rd + (x(k,jcomp) - x(k,j))*(xdot(k,jcomp) - xdot(k,j))
81 rjj = rjj + (x(k,jcomp) - x(k,j))**2
82 vjj = vjj + (xdot(k,jcomp) - xdot(k,j))**2
86 CALL
fpert(jcomp,j,nnb,pert)
87 gj = pert*rj2/(body(jcomp) + body(j))
94 apo = abs(semi)*(1.0 + ecc)
95 rsum = r(ipair) + sqrt(rj2)
98 IF (tdot2(ipair)/r(ipair).LT.rd/rj) xf = 1.0
102 semi2 = -0.5*body(jcomp)/h(jcomp-n)
103 apo = apo + abs(semi2)
106 semij = 2.0/rj - vjj/(body(jcomp) + body(j))
109 IF (pmin.LT.apo.AND.rsum.LT.xf*rmin.AND.rdot.LT.0.0)
THEN
110 IF (semi.LT.0.0.AND.gamma(ipair).LT.0.5)
THEN
115 ELSE IF (gj.LT.0.7*gamma(ipair).AND.rd.LE.0.0)
THEN