21 vi2 = x0dot(1,i)**2 + x0dot(2,i)**2 + x0dot(3,i)**2
22 ri2 = (x(1,i) - rdens(1))**2 + (x(2,i) - rdens(2))**2 +
23 & (x(3,i) - rdens(3))**2
25 IF (ri2.GT.9.0*rscale**2.OR.vi2.LT.vmax2/16.0)
THEN
34 WRITE (29,3) time+toff, li, name(li), sqrt(rl2),
36 3
FORMAT (
' HIVEL REMOVE T I NAM R V ',f12.4,2i6,2f6.1)
39 listv(1) = listv(1) - 1
58 ELSE IF (ih.EQ.0.AND.iphase.EQ.-1)
THEN
62 ELSE IF (iphase.EQ.1)
THEN
65 IF (listv(l).LT.ifirst + 3)
THEN
75 fi2 = f(1,i)**2 + f(2,i)**2 + f(3,i)**2
76 vi2 = x0dot(1,i)**2 + x0dot(2,i)**2 + x0dot(3,i)**2
77 ri2 = (x(1,i) - rdens(1))**2 + (x(2,i) - rdens(2))**2 +
78 & (x(3,i) - rdens(3))**2
80 IF (fi2.GT.float(n).OR.step(i).LT.dtmin.OR.
81 & stepr(i).LT.20.0*dtmin)
THEN
82 IF (vi2.GT.vmax2)
THEN
89 rd = x(1,i)*xdot(1,i) + x(2,i)*xdot(2,i) + x(3,i)*xdot(3,i)
90 IF (vi2.GT.vmax2.AND.(ri2.LT.4.0*rscale**2.OR.rd.LT.0.))
THEN
92 IF (i.EQ.listv(l)) go to 10
95 IF (nhi.GE.mlv.OR.step(i).GT.1.0) go to 10
97 listv(1) = listv(1) + 1
100 WRITE (29,9) time+toff, nhi-1, i, name(i), kstar(i),
101 & sqrt(vi2), sqrt(ri2), step(i)
102 9
FORMAT (
' HIVEL ADD T NHI I NM K* VI R DT ',
103 & f12.4,i4,2i6,i4,2f6.2,1p,e10.2)
109 IF ((nhv.EQ.1.OR.nhv.EQ.2).AND.nhi.LE.mlv-nhv)
THEN
113 IF (jlist(k).EQ.listv(l)) go to 30
120 listv(1) = listv(1) + 1
123 ri2 = (x(1,i1) - rdens(1))**2 + (x(2,i1) - rdens(2))**2 +
124 & (x(3,i1) - rdens(3))**2
125 vi2 = x0dot(1,i1)**2 + x0dot(2,i1)**2 + x0dot(3,i1)**2
126 WRITE (29,22) ttot, nhi-1, name(i1), iphase, sqrt(vi2),
127 & sqrt(ri2), step(i1)
128 22
FORMAT (
' HIVEL ADD T NHI NM IPH VI R DT ',
129 & f12.4,i4,i6,i4,2f6.2,1p,e10.2)
138 rij2 = rij2 + (x(k,i1) - x(k,i2))**2
139 vij2 = vij2 + (xdot(k,i1) - xdot(k,i2))**2
140 rdot = rdot + (x(k,i1) - x(k,i2))*(xdot(k,i1)-xdot(k,i2))
143 semi = 2.0/rij - vij2/(body(i1) + body(i2))
145 IF (semi.LT.0.0.AND.rij.LT.10.0*rmin.AND.rdot.GT.0.0)
THEN
150 listv(1) = listv(1) + 2
152 WRITE (29,28) ttot, nhi-1, name(i1), name(i2), iphase, rij
153 28
FORMAT (
' HIVEL ADD T NHI NM IPH RIJ ',
154 & f12.4,i4,2i6,i4,1p,e10.2)