Nbody6
 All Files Functions Variables
zero.f
Go to the documentation of this file.
1  SUBROUTINE zero
2 *
3 *
4 * Initialization of global scalars.
5 * ---------------------------------
6 *
7  include 'common6.h'
8 *
9 *
10 * Initialize parameters & counters and set useful constants.
11  time = 0.0d0
12  toff = 0.0d0
13  ttot = 0.0d0
14  tadj = 0.0d0
15  tblist = 0.0d0
16  tplot = 0.0d0
17  dtb = 0.0d0
18  tnext = 0.0d0
19  tmdot = 0.0d0
20  zmdot = 0.0d0
21  tlasts = 0.0d0
22  tlastt = 0.0d0
23  rmax = 0.0
24  epoch0 = 0.0
25  dmin1 = 100.0
26  dmin2 = 100.0
27  dmin3 = 100.0
28  dmin4 = 100.0
29  dminc = 100.0
30  cputot = 0.0
31  wtot = 0.0d0
32  error = 0.0d0
33  errtot = 0.0d0
34  detot = 0.0d0
35  etcorr = 0.0
36  ebin0 = 0.0d0
37  esub = 0.0d0
38  emerge = 0.0d0
39  ediss = 0.0d0
40  ecoll = 0.0d0
41  ecdot = 0.0d0
42  emdot = 0.0d0
43  ekick = 0.0
44  esync = 0.0d0
45  etide = 0.0d0
46  esesc = 0.0d0
47  ebesc = 0.0d0
48  emesc = 0.0d0
49  egrav = 0.0
50  sbcoll = 0.0d0
51  bbcoll = 0.0d0
52  chcoll = 0.0d0
53  npairs = 0
54  nbprev = 0
55  nntb = 0
56  nmerge = 0
57  newhi = 0
58  nsub = 0
59  nch = 0
60  nbin0 = 0
61  nhi0 = 0
62  ifirst = 1
63  iphase = 0
64  icomp = 0
65  jcomp = 0
66  kspair = 0
67  nprint = 0
68  model = 0
69  ndump = 0
70  nsteps = 0
71  ntimer = 0
72  listr(1) = 0
73  listd(1) = 0
74  listv(1) = 0
75  ntail = 0
76  nttot = 0
77  nrsave = 0
78  nnbopt = 0 ! NBODY6++ compatibility.
79 *
80  DO 10 j = 1,kmax
81  kvec(2*j-1) = j
82  kvec(2*j) = j
83  10 CONTINUE
84 *
85  DO 20 j = 1,12
86  e(j) = 0.0d0
87  20 CONTINUE
88 *
89  DO 30 j = 1,9
90  tlastb(j) = 0.0d0
91  30 CONTINUE
92 *
93  DO 40 j = 1,nmax
94  radius(j) = 0.0d0
95  body0(j) = 0.0
96  epoch(j) = 0.0
97  tev(j) = 0.0
98  tev0(j) = 0.0
99  kstar(j) = 0
100  40 CONTINUE
101 *
102  DO 50 k = 1,3
103  rdens(k) = 0.0d0
104  tidal(k) = 0.0
105  50 CONTINUE
106  tidal(4) = 0.0
107 *
108 * Set fractional constants & two PI.
109  one3 = 1.0d0/3.0d0
110  one6 = 1.0d0/6.0d0
111  one9 = 1.0d0/9.0d0
112  one12 = 1.0d0/12.0d0
113  twopi = 8.0d0*atan(1.0d0)
114  tiny = 1.0d-14
115 *
116  RETURN
117 *
118  END