8 common/galaxy/ gmg,rg(3),vg(3),fg(3),fgd(3),tg,
9 & omega,disk,a,b,v02,rl2,gmb,ar,gam,zdum(7)
10 REAL*8 xi(3),xidot(3),firr(3),freg(3),fd(3),fdr(3)
18 IF (first.AND.time.EQ.0.0d0)
THEN
22 ELSE IF (kz(14).LE.4.AND.i2.NE.i1)
THEN
35 CALL
xtrnlf(xi,xidot,firr,freg,fd,fdr,1)
38 vir = vir + body(i)*xi(k)*(firr(k) + freg(k))
42 IF (kz(14).EQ.3) go to 40
49 et = et - 0.5d0*body(i)*(tidal(1)*x(1,i)**2 +
52 ELSE IF (kz(14).EQ.3)
THEN
60 ri2 = ri2 + (rg(k) + xi(k))**2
64 IF (gmg.GT.0.0d0)
THEN
65 et = et + gmg*(1.0/sqrt(ri2) - 1.0/sqrt(rg2))
69 IF (gmb.GT.0.0d0)
THEN
70 IF (gam.NE.2.0d0)
THEN
71 rrg = 1.0 - (1.0 + ar/sqrt(rg2))**(gam-2.0)
72 rri = 1.0 - (1.0 + ar/sqrt(ri2))**(gam-2.0)
73 et = et + gmb/(ar*(2.0-gam))*(rri-rrg)
75 rrg = 1.0 + ar/sqrt(rg2)
76 rri = 1.0 + ar/sqrt(ri2)
77 et = et + gmb/ar*log(rrg/rri)
82 IF (disk.GT.0.0d0)
THEN
83 r2 = (rg(1) + xi(1))**2 + (rg(2) + xi(2))**2
84 bz = sqrt(b**2 + (rg(3) + xi(3))**2)
85 az = sqrt(r2 + (a + bz)**2)
86 r20 = rg(1)**2 + rg(2)**2
87 bz0 = sqrt(b**2 + rg(3)**2)
88 az0 = sqrt(r20 + (a + bz0)**2)
89 et = et + disk*(1.0/az - 1.0/az0)
93 IF (v02.GT.0.0d0)
THEN
94 et = et + 0.5*v02*(log(ri2) - log(rg2))
101 30
IF (i2.GT.i1)
THEN