8 common/slow0/ range,islow(10)
9 common/binary/ cm(4,mmax),xrel(3,mmax),vrel(3,mmax),
10 & hm(mmax),um(4,mmax),umdot(4,mmax),tmdis(mmax),
11 & namem(mmax),nameg(mmax),kstarm(mmax),iflag(mmax)
23 IF (time.LE.tblock.AND.iphase.LT.9)
THEN
26 IF (list(1,i1).EQ.0.OR.t0(i1).EQ.time0) go to 3
29 IF (kslow(ipair).GT.1)
THEN
31 zmod = float(islow(imod))
36 1 dt0 = time0 - t0(i1)
38 IF (dt0.GT.step(i1))
THEN
39 time = t0(i1) + step(i1)
41 z = -0.5d0*h(ipair)*dtau(ipair)**2
45 step(i1) = ((one6*tdot3(ipair)*dtu + 0.5*tdot2(ipair))*dtu
47 step(i1) = zmod*step(i1)
49 IF (h(ipair).GT.100.0.AND.r(ipair).GT.rmin) go to 3
54 dtu = dt0/(r(ipair)*zmod)
55 dtu = min(dtu,dtau(ipair))
57 dtu = max(dtu,1.0d-10)
59 2 y0 = dt0 - zmod*((one6*tdot3(ipair)*dtu +
60 & 0.5*tdot2(ipair))*dtu + r(ipair))*dtu
61 ypr = -((0.5*tdot3(ipair)*dtu + tdot2(ipair))*dtu + r(ipair))
64 dt1 = ((one6*tdot3(ipair)*dtu + 0.5*tdot2(ipair))*dtu +
68 IF (abs(dt0 - dt1).GT.1.0e-10*step(i1).AND.iter.LT.10) go to 2
75 z = -0.5d0*h(ipair)*dtu**2
81 IF (jcomp.GE.ifirst)
THEN
83 IF (gamma(ipair).GT.0.2.AND.jcomp.LE.n)
THEN
88 x0(k,jcomp) = x(k,jcomp)
89 x0dot(k,jcomp) = xdot(k,jcomp)
96 CALL
ksres(ipair,j1,j2,0.0d0)
99 jpert(l) = list(l+1,i1)
103 CALL
nbpot(2,np,pot1)
109 IF (time.LE.tblock.AND.iphase.EQ.6)
THEN
110 hm(nmerge) = h(ipair)
112 um(k,nmerge) = u(k,ipair)
113 umdot(k,nmerge) = udot(k,ipair)
118 IF (kz(8).EQ.0) go to 10
119 IF (list(2,i1+1).NE.0.OR.h(ipair).GT.0.0) go to 10
120 IF (gamma(ipair).GT.0.5.AND.jcomp.GT.0.OR.iphase.EQ.7)
THEN
121 IF (jcomp.EQ.0.OR.iphase.EQ.7) jcomp = i1
127 semi = -0.5*body(icm)/h(ipair)
128 eb = -0.5*body(i1)*body(i2)/semi
129 ri = sqrt((x(1,icm) - rdens(1))**2 +
130 & (x(2,icm) - rdens(2))**2 +
131 & (x(3,icm) - rdens(3))**2)
132 WRITE (8,8) time+toff, name(i1), name(i2), k, name(jcomp),
133 & body(jcomp), eb, semi, r(ipair), gamma(ipair), ri
134 8
FORMAT (
' END BINARY T =',f8.1,
' NAME = ',2i6,i3,i6,
135 &
' M(J) =',f8.4,
' EB =',f10.5,
' A =',f8.5,
136 &
' R =',f8.5,
' G =',f5.2,
' RI =',f5.2)
139 10
IF (kz(10).GT.1)
THEN
140 ri = sqrt((x(1,icm) - rdens(1))**2 +
141 & (x(2,icm) - rdens(2))**2 +
142 & (x(3,icm) - rdens(3))**2)
144 err = u(4,ipair)*udot(1,ipair) - u(3,ipair)*udot(2,ipair) +
145 & u(2,ipair)*udot(3,ipair) - u(1,ipair)*udot(4,ipair)
146 WRITE (6,15) time+toff, body(i1), body(i1+1), dtau(ipair),
147 & r(ipair), ri, h(ipair), ipair, gamma(ipair),
148 & step(i1), list(1,i1), list(1,icm), err
149 15
FORMAT (/,
' END KSREG TIME =',f8.2,1p,2e9.1,0p,f6.3,1p,
150 & e10.1,0p,f7.2,f9.2,i5,f8.3,1p,e10.1,2i5,1p,e10.2)
157 CALL
nbpot(2,np,pot2)
164 nnb = list(1,icm) + 1
166 nbp = min(alpha*sqrt(float(nnb)*rs(icm))/(rs(icm)**2),znbmax)
167 nbp = max(nbp,int(znbmin))
168 a0 = float(nbp)/float(nnb)
170 IF (list(1,icm).EQ.0)
THEN
171 rs0 = 0.1*(abs(x(1,icm)) + abs(x(2,icm)))
173 nnb = list(1,icm) + 1
176 IF (iphase.EQ.6)
THEN
180 IF (rs(icm).GT.-100.0*body(icm)/h(ipair)) a0 = 1.0
182 rs(i1) = rs(icm)*a0**0.3333
190 rij2 = (x(1,icm) - x(1,j))**2 + (x(2,icm) - x(2,j))**2 +
191 & (x(3,icm) - x(3,j))**2
193 IF (rij2.LT.rs2.OR.(nnb1 + nnb - l.LE.nbp.AND.
194 & nnb1.LT.nnbmax-1))
THEN
201 IF (nnb1.GE.nnbmax.AND.iphase.NE.6)
THEN
209 ifirst = 2*npairs + 1
213 jlist(2) = name(i1+1)
214 jlist(3) = list(2,i1+1)
217 IF (ipair.EQ.npairs + 1) go to 60
221 i = 2*ipair - 2 + kcomp
225 save(k+3) = x0dot(k,i)
239 last = 2*npairs - 1 + kcomp
248 x0dot(k,j) = x0dot(k,j1)
252 radius(j) = radius(j1)
258 zlmsty(j) = zlmsty(j1)
267 list(l,j) = list(l,j1)
275 x0dot(k,i) = save(k+3)
276 xdot(k,i) = save(k+3)
292 IF (kstar(icm).GE.10.AND.nchaos.GT.0.AND.iphase.NE.6)
THEN
305 60 icomp = 2*npairs + 1
311 list(l,icomp) = ilist(l)
318 70
IF (list(2,icomp).LT.icomp)
THEN
322 IF (l.LT.nnb1.AND.list(l+1,icomp).LT.j)
THEN
323 list(l,icomp) = list(l+1,icomp)
334 list(l+1,icomp) = list(l,icomp)
335 list(l+1,jcomp) = list(l,icomp)
339 list(2,icomp) = jcomp
340 list(2,jcomp) = icomp
350 x0(k,icomp) = x(k,icomp)
351 x0(k,jcomp) = x(k,jcomp)
352 x0dot(k,icomp) = xdot(k,icomp)
353 x0dot(k,jcomp) = xdot(k,jcomp)
357 IF (iphase.LT.4)
THEN
362 CALL
fpoly1(icomp,jcomp,2)
363 CALL
fpoly2(icomp,jcomp,2)
366 IF (jmin.GE.ifirst)
THEN