9 INTEGER jd(15),jeb(15),je(10)
14 eb0 = -0.25/float(nzero)
35 npop(3) = n - 2*npairs
42 IF (h(j).GE.0.0.OR.body(i).EQ.0.0d0) go to 50
47 IF (iabs(name(j1) - name(j2)).EQ.1)
THEN
48 IF (name(j1).LE.2*nbin0) jor = jor + 1
50 IF (min(name(j1),name(j2)).LE.2*nbin0) jex = jex + 1
52 ri2 = (x(1,i) - rdens(1))**2 + (x(2,i) - rdens(2))**2 +
53 & (x(3,i) - rdens(3))**2
54 IF (ri2.LT.rc2) jc = jc + 1
57 semi = -0.5d0*body(i)/h(j)
59 k = 2 + log10(a0/semi)/log10(2.0)
68 ecc2 = (1.0 - r(j)/semi)**2 + tdot2(j)**2/(body(i)*semi)
70 IF (ecc2.GT.emax) emax = ecc2
71 k = 1 + 10.0*sqrt(ecc2)
72 IF (k.LE.10) je(k) = je(k) + 1
75 eb = -0.5*body(j1)*body(j2)/semi
77 k = 2 + log10(eb/eb0)/log10(2.0)
88 IF (list(2,j2).EQ.0) ip = 2
89 IF (ip.EQ.2) newb = newb + 1
93 npop(ip) = npop(ip) + 1
96 IF (list(2,j2).NE.-1.AND.list(2,j2).NE.0)
THEN
97 WRITE (6,35) j, list(1,j1), list(1,j2), list(2,j2),
99 35
FORMAT (/,5x,
'WARNING! FLAG PROBLEM PAIR NP NP2 FLAG',
104 IF (ip.EQ.2.AND.h(j).LT.0.0)
THEN
105 vr = ((x(1,i) - rdens(1))*xdot(1,i) +
106 & (x(2,i) - rdens(2))*xdot(2,i) +
107 & (x(3,i) - rdens(3))*xdot(3,i))/sqrt(ri2)
109 IF (name(i).LT.0) k = -1
110 gx = gamma(j)*(semi*(1.0 + sqrt(ecc2))/r(j))**3
111 WRITE (18,40) ttot, name(j1), name(j2), list(2,j2), k,
112 & body(j1), body(j2), eb, semi, sqrt(ecc2),
114 40
FORMAT (
' T =',f7.1,
' NAME = ',2i6,2i3,
' M =',2f9.4,
115 &
' EB =',f10.5,
' A =',f8.5,
' E =',f5.2,
116 &
' GX =',f6.3,
' RI =',f6.2,
' VR =',f4.1)
120 IF (kstar(i).GE.10.AND.ecc2.GT.4.0d-06) kstar(i) = 0
121 IF (kstar(i).GE.10) k10 = k10 + 1
125 IF (time.LE.0.0d0)
THEN
130 db = -4.0*(e(1) + e(2) + e(5) + e(7) + e(9) + ecoll + emdot
135 IF (npairs.EQ.0) go to 70
136 WRITE (6,60) jor, jex, db, sbcoll, bbcoll, chcoll, jc, nchaos,
137 & newb, k10, (jd(j),j=1,jlast)
138 60
FORMAT (/,
' BINARIES',4x,
'OR =',i5,
' EX =',i3,
' DB =',f7.3,
139 &
' SB =',f8.4,
' BB =',f8.4,
' CH =',f8.4,
' NC =',i3,
140 &
' NCH =',i4,
' NEWB =',i4,
' CIRC =',i4,
' N(A) =',10i4)
142 IF (disp.GT.0.0d0) disp = sqrt(disp/float(npairs))
144 WRITE (6,65) disp, emax, (npop(j),j=1,8), (jeb(k),k=1,klast)
145 65
FORMAT (
' <E> =',f5.2,
' EMAX =',f7.4,
' NPOP =',i5,i5,2i6,i4,3i3,
150 e(3) = zkin - pot + etide
156 etot = etot + esub + emerge + emdot + ecdot + ecoll
164 degrav = ebin + esub + ebesc + emesc + emerge + egrav - ebin0
165 WRITE (6,90) (e(j),j=1,10), etot, detot, degrav
166 90
FORMAT (
' ENERGIES ',10f10.5,
' ETOT =',f11.6,
' DETOT =',f10.6,