11 REAL*8 c(3),flagr(lx),rlagr(lx)
15 DATA flagr/0.01,0.02,0.05,0.1,0.2,0.3,0.4,0.5,0.625,0.75,0.99/
23 nam2 = n1 + (nzero - n1)/5
28 IF (kstar(i).EQ.14) nblack = nblack + 1
35 IF (name(i).GT.nam1.AND.name(i).LE.nzero) go to 10
36 ELSE IF (kz(5).EQ.2)
THEN
37 IF ((name(i).GT.nam1.AND.name(i).LE.n1).OR.
38 & (name(i).GT.nam2.AND.name(i).LE.nzero)) go to 10
42 r2(np) = (x(1,i) - c(1))**2 + (x(2,i) - c(2))**2 +
50 dm = (zm1 - 0.5*zmass)/zmass
51 IF (abs(dm).GT.0.001.AND.iter.LE.10)
THEN
53 IF (abs(dm).GT.0.05) dm = dm*0.05/abs(dm)
54 nm = dm*float(n-npairs)
58 nam2 = nam2 - nm*(nzero - n1)/(5*nam2)
72 rij2 = rij2 + (x(k,i) - x(k,j))**2
74 pot1 = pot1 + 1.0/sqrt(rij2)
78 rp1 = float(np)*(np - 1)/(2.0*pot1)
81 CALL
sort1(np,r2,jlist)
91 IF (zm.LT.zmh) go to 15
92 rlagr(il) = sqrt(r2(i))
102 IF (zm.LT.zmh) go to 25
107 WRITE (31,30) time+toff, (log10(rlagr(k)),k=1,lx)
108 30
FORMAT (
' ',f8.1,13f7.3)
112 CALL
sort1(np,zmi,ilist)
114 zmx0 = 0.5*(zmx1 + body1)
120 IF (zmi(l).GT.zmx0)
THEN
121 IF (lx0.EQ.0) lx0 = l
127 npcrit = sqrt(float(n - npairs))
128 npcrit = min(npcrit,10)
129 IF (nblack.GT.2) npcrit = nblack
130 IF (np0.LT.npcrit.AND.itry.LT.20)
THEN
134 IF (np0.GT.npcrit.AND.itry.LT.20)
THEN
148 rij2 = rij2 + (x(k,i) - x(k,j))**2
150 pot0 = pot0 + 1.0/sqrt(rij2)
154 IF (np0.LE.1) pot0 = 1.0
155 rp0 = float(np0)*(np0 - 1)/(2.0*pot0)
163 DO 45 i = ifirst,ntot
164 IF (kstar(i).EQ.14.AND.body(i).GT.0.0d0)
THEN
167 zmbh = zmbh + body(i)*smu
168 ELSE IF (i.GT.n)
THEN
171 IF (kstar(j1).EQ.14.AND.kstar(j1+1).EQ.14)
THEN
176 zmbh = zmbh + body(i)*smu
178 semi = -0.5*body(i)/h(ip)
191 rij2 = rij2 + (x(k,i) - x(k,j))**2
193 potbh = potbh + 1.0/sqrt(rij2)
195 IF (i.LT.ifirst) pot12 = pot12 + 1.0/sqrt(rij2)
200 IF (n14.GT.1) rbh = float(n14)*(n14 - 1)/(2.0*potbh)
202 IF (pot12.GT.0.0)
THEN
203 rx = float(n14-1)*(n14 - 2)/(2.0*(potbh-pot12))
214 DO 145 i = ifirst,ntot
215 IF (kstar(i).EQ.13)
THEN
218 zm13 = zm13 + body(i)*smu
219 ELSE IF (i.GT.n)
THEN
221 IF (kstar(j1).EQ.13.AND.kstar(j1+1).EQ.13)
THEN
224 zm13 = zm13 + body(i)*smu
226 semi2 = -0.5*body(i)/h(ip)
238 rij2 = rij2 + (x(k,i) - x(k,j))**2
240 pot13 = pot13 + 1.0/sqrt(rij2)
244 IF (n13.GT.1) r13 = float(n13)*(n13 - 1)/(2.0*pot13)
251 IF (name(i).LE.nam1) go to 50
252 ELSE IF (kz(5).EQ.2)
THEN
253 IF (name(i).LE.nam1.OR.
254 & (name(i).GT.n1.AND.name(i).LE.nam2)) go to 50
258 r2(np) = (x(1,i) - c(1))**2 + (x(2,i) - c(2))**2 +
271 rij2 = rij2 + (x(k,i) - x(k,j))**2
273 pot2 = pot2 + 1.0/sqrt(rij2)
276 rp2 = float(np)*(np - 1)/(2.0*pot2)
279 CALL
sort1(np,r2,jlist)
288 IF (zm.LT.zmh) go to 55
289 rlagr(il) = sqrt(r2(i))
299 IF (zm.LT.zmh) go to 65
304 WRITE (32,30) time+toff, (log10(rlagr(k)),k=1,lx)
307 WRITE (6,70) time+toff, np0, np1, np2, rh1, rh2, rp0, rp1, rp2
308 70
FORMAT(/,
' MASS GROUPS: T NP0 NP1 NP2 RM1 RM2 RP0 RP1 RP2 ',
309 & f7.1,i5,i6,i7,1x,5f7.3)
311 IF (n14.GT.1.OR.n13.GT.1)
THEN
313 WRITE (6,80) time+toff, tphys, n14, zmbh/float(n14), rbh,
315 80
FORMAT (/,
' BH/NS SUBSYSTEM: T TPHYS NBH <MBH> RBH A ',
317 & 2f7.1,i4,f6.1,f7.3,1p,e10.2,0p,i5,2f7.3)