8 REAL*8 rlist(lmax),rho,rhos
9 common/work1/ rho(nmax)
14 IF (time.GT.0.0d0) rcore2 = max(9.0d0*rc**2,rcore2)
19 ri2 = (x(1,i) - rdens(1))**2 + (x(2,i) - rdens(2))**2 +
20 & (x(3,i) - rdens(3))**2
21 IF (ri2.LT.rcore2)
THEN
43 d6 = 2.0*(6.0/float(nnb))**0.66*rs(i)**2
51 rij2 = (xi - x(1,j))**2 + (yi - x(2,j))**2 +
63 IF (n6.LT.nnb) go to 20
69 IF (rlist(jj).LT.rlist(ii))
THEN
84 xmass = xmass + body(ilist(lj))
87 rho(i) = xmass/(rlist(i6)*sqrt(rlist(i6)))
91 IF (n6.LT.6) rho(i) = 0.0d0
92 rhos = max(rhos,rho(i))
104 rdens(k) = rdens(k) + rho(i)*x(k,i)
110 rho1 = max(rho1,zmass/rscale**3)
112 rdens(k) = rdens(k)/rho1
114 IF (kz(5).EQ.2.AND.ttot.LT.tcrit)
THEN
124 xid = x(1,i) - rdens(1)
125 yid = x(2,i) - rdens(2)
126 zid = x(3,i) - rdens(3)
127 rid2 = xid**2 + yid**2 + zid**2
128 rc = rc + rho(i)**2*rid2
129 rho2 = rho2 + rho(i)**2
133 IF (rho2.GT.0.0d0) rc = sqrt(rc/rho2)
135 rhod = (3.0/12.566)*rhod
136 rhom = (3.0/12.566)*rhos
138 IF (rc.EQ.0.0d0)
THEN
153 xid = x(1,i) - rdens(1)
154 yid = x(2,i) - rdens(2)
155 zid = x(3,i) - rdens(3)
156 rid2 = xid**2 + yid**2 + zid**2
157 IF (rid2.LT.rc2)
THEN
159 vc = vc + xdot(1,i)**2 + xdot(2,i)**2 + xdot(3,i)**2
166 vc = sqrt(vc/float(nc))