Nbody6
 All Files Functions Variables
ghost.f
Go to the documentation of this file.
1  SUBROUTINE ghost(J)
2 *
3 *
4 * Initialization of ghost particle.
5 * ---------------------------------
6 *
7  include 'common6.h'
8  common/chainc/ xc(3,ncmax),uc(3,ncmax),bodyc(ncmax),ich,
9  & listc(lmax)
10 *
11 *
12 * Form ghost and initialize integration variables for body #J.
13  body(j) = 0.0d0
14  t0(j) = 1.0e+06
15  DO 10 k = 1,3
16  x0dot(k,j) = 0.0d0
17  xdot(k,j) = 0.0d0
18  f(k,j) = 0.0d0
19  fdot(k,j) = 0.0d0
20  d0(k,j) = 0.0d0
21  d1(k,j) = 0.0d0
22  d2(k,j) = 0.0d0
23  d3(k,j) = 0.0d0
24  d0r(k,j) = 0.0d0
25  d1r(k,j) = 0.0d0
26  d2r(k,j) = 0.0d0
27  d3r(k,j) = 0.0d0
28  10 CONTINUE
29 *
30 * Set large X0 & X to avoid perturber selection (no escape).
31  x0(1,j) = 1.0e+06
32  x(1,j) = 1.0e+06
33 *
34 * Copy neighbour list for routine NBREM.
35  nnb = list(1,j)
36  DO 20 l = 2,nnb+1
37  jpert(l-1) = list(l,j)
38  20 CONTINUE
39 *
40 * Remove ghost from lists of neighbours containing body #ICH.
41  jlist(1) = j
42  CALL nbrem(ich,1,nnb)
43 *
44 * Specify zero neighbour membership.
45  list(1,j) = 0
46 *
47  RETURN
48 *
49  END