Nbody6
 All Files Functions Variables
fnuc.f
Go to the documentation of this file.
1  SUBROUTINE fnuc(XI,XIDOT,FM,FD)
2 *
3 *
4 * Galaxy point-mass force.
5 * ------------------------
6 *
7  IMPLICIT REAL*8 (a-h,o-z)
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),fm(3),fd(3)
11 *
12 *
13 * Evaluate force and first derivative from global variables.
14  r2 = xi(1)**2 + xi(2)**2 + xi(3)**2
15  rrd = 3.0*(xi(1)*xidot(1) + xi(2)*xidot(2) + xi(3)*xidot(3))/r2
16  h3 = gmg/(r2*sqrt(r2))
17 *
18  DO 10 k = 1,3
19  fm(k) = -h3*xi(k)
20  fd(k) = -h3*(xidot(k) - rrd*xi(k))
21  10 CONTINUE
22 *
23  RETURN
24 *
25  END