Nbody6
 All Files Functions Variables
offset.f
Go to the documentation of this file.
1  SUBROUTINE offset(DTOFF)
2 *
3 *
4 * Offset of global times.
5 * -----------------------
6 *
7  include 'common6.h'
8  common/clump/ bodys(ncmax,5),t0s(5),ts(5),steps(5),rmaxs(5),
9  & names(ncmax,5),isys(5)
10 *
11 *
12 * Update the global offset time.
13  1 toff = toff + dtoff
14 *
15 * Reduce all individual times and epochs by offset interval.
16  DO 10 i = 1,ntot
17  t0(i) = t0(i) - dtoff
18  t0r(i) = t0r(i) - dtoff
19  tev(i) = tev(i) - dtoff
20  tev0(i) = tev0(i) - dtoff
21  epoch(i) = epoch(i) - dtoff*tstar
22  10 CONTINUE
23 *
24 * Set new global times.
25  time = time - dtoff
26  tadj = tadj - dtoff
27  tnext = tnext - dtoff
28  tprev = tprev - dtoff
29  tblist = tblist - dtoff
30  IF (kz(19).GT.2) THEN
31  tplot = tplot - dtoff
32  tmdot = tmdot - dtoff
33  END IF
34  DO 20 i = 1,nsub
35  t0s(i) = t0s(i) - dtoff
36  ts(i) = ts(i) - dtoff
37  20 CONTINUE
38 *
39 * Check tidal tail members (note TNEW also needs doing).
40  IF (ntail.GT.0) THEN
41  DO 30 i = itail0,nttot
42  t0(i) = t0(i) - dtoff
43  tnew(i) = tnew(i) - dtoff
44  30 CONTINUE
45  END IF
46 *
47 * See whether more reductions are needed.
48  IF (time.GE.dtoff) go to 1
49 *
50 * Activate control indicator for new scheduling.
51  iphase = -1
52 *
53  RETURN
54 *
55  END