8 REAL*8 q(3),rdot(3),ui(4),vi(4),a1(3,4)
17 IF (icase.GT.1) go to 50
21 body(icm) = body(icomp) + body(jcomp)
22 name(icm) = nzero + name(icomp)
27 epoch(icm) = time*tstar
32 q(k) = x(k,icomp) - x(k,jcomp)
33 rdot(k) = x0dot(k,icomp) - x0dot(k,jcomp)
37 r(ipair) = sqrt(q(1)**2 + q(2)**2 + q(3)**2)
40 IF (q(1).LE.0.0d0)
THEN
42 ui(2) = sqrt(0.5d0*(r(ipair) - q(1)))
43 ui(1) = 0.5d0*q(2)/ui(2)
44 ui(4) = 0.5d0*q(3)/ui(2)
47 ui(1) = sqrt(0.5d0*(r(ipair) + q(1)))
48 ui(2) = 0.5d0*q(2)/ui(1)
49 ui(3) = 0.5d0*q(3)/ui(1)
58 udot(k,ipair) = 0.50d0*(a1(1,k)*rdot(1) + a1(2,k)*rdot(2) +
62 u0(k,ipair) = u(k,ipair)
63 tdot2(ipair) = tdot2(ipair) + 2.0d0*ui(k)*udot(k,ipair)
67 h(ipair) = (2.0d0*(udot(1,ipair)**2 + udot(2,ipair)**2 +
68 & udot(3,ipair)**2 + udot(4,ipair)**2) -
73 body(2*ipair-1) = bodyi
77 x(k,icm) = (bodyi*x(k,icomp) + body(jcomp)*x(k,jcomp))/
79 x0dot(k,icm) = (bodyi*x0dot(k,icomp) + body(jcomp)*
80 & x0dot(k,jcomp))/body(icm)
81 xdot(k,icm) = x0dot(k,icm)
90 IF (sqrt(cmsep2)*rmax.GT.2.0*rs(icm))
THEN
91 fac = float(nnbmax)/float(nnb)
92 rsi = fac**0.3333*rs(icm)
93 IF (rsi.GT.rs(icm))
THEN
107 eb = h(ipair)*body(icomp)*body(jcomp)/body(icm)
109 IF (list(1,icomp).LT.0.AND.eb.LT.ebh)
THEN
110 semi = -0.5*body(icm)/h(ipair)
111 tk = twopi*abs(semi)*sqrt(abs(semi)/body(icm))
112 IF (iphase.NE.7)
THEN
115 vi(k) = udot(k,ipair)
118 CALL
tperi(semi,ui,vi,body(icm),tp)
119 step(icomp) = 0.5*min(tk,step(icm)) - tp
121 IF (abs(tdot2(ipair)).GT.1.0e-12.OR.r(ipair).LT.semi)
THEN
124 ELSE IF (tdot2(ipair).GT.0.0)
THEN
125 tdot2(ipair) = -1.0e-20
129 IF (kz(26).GT.0.AND.step(icm).GT.tk)
THEN
130 imod = 1 + log(step(icm)/tk)/0.69
137 step(jcomp) = 1.0e+06
138 stepr(jcomp) = 1.0e+06
146 IF (kz(10).GT.0.AND.icase.GE.2)
THEN
147 ri = sqrt((x(1,icm) - rdens(1))**2 +
148 & (x(2,icm) - rdens(2))**2 +
149 & (x(3,icm) - rdens(3))**2)
151 IF (icase.EQ.3) which1 =
' RESET2 '
152 WRITE (6,60) which1, time+toff, name(icomp), name(jcomp),
153 & dtau(ipair), r(ipair), ri, h(ipair), ipair,
154 & gamma(ipair), step(icm), list(1,icomp)
155 60
FORMAT (/,
' NEW',a8,
' T =',f8.2,2i6,f12.3,1p,e10.1,0p,
156 & f8.2,f9.2,i5,f8.3,1p,e10.1,0p,i5)
163 IF (iabs(name(icomp) - name(jcomp)).EQ.1) k = -1
165 IF (name(icomp).EQ.listd(l).OR.name(jcomp).EQ.listd(l)) k = -1
169 IF (iphase.EQ.6) k = 0
175 IF (kz(8).GT.0.AND.k.EQ.0)
THEN
176 IF (eb.GT.ebh) go to 100
177 semi = -0.5*body(icm)/h(ipair)
178 ri = sqrt((x(1,icm) - rdens(1))**2 +
179 & (x(2,icm) - rdens(2))**2 +
180 & (x(3,icm) - rdens(3))**2)
181 WRITE (8,90) time+toff, name(icomp), name(jcomp), k,
182 & body(icomp), body(jcomp), eb, semi, r(ipair),
184 90
FORMAT (
' NEW BINARY T =',f7.1,
' NAME = ',2i6,i3,
185 &
' M =',2f8.4,
' EB =',f9.4,
' A =',f8.5,
186 &
' R =',f8.5,
' G =',f6.3,
' RI =',f5.2)