Nbody6
 All Files Functions Variables
levels.f
Go to the documentation of this file.
1  SUBROUTINE levels
2 *
3 *
4 * Histograms of block time-step levels.
5 * -------------------------------------
6 *
7  include 'common6.h'
8  INTEGER ihist(32),ihistr(32)
9 *
10 *
11 * Initialize histogram counters.
12  DO 10 j = 1,32
13  ihist(j) = 0
14  ihistr(j) = 0
15  10 CONTINUE
16 *
17 * Loop over all single particles & c.m.
18  jmax = 0
19  jmaxr = 0
20  fac = 1.0/log(1.9999999)
21  DO 20 i = ifirst,ntot
22  IF (body(i).EQ.0.0d0) go to 20
23  j = 1 - log(step(i))*fac
24  ihist(j) = ihist(j) + 1
25  jmax = max(j,jmax)
26  j = 1 - log(stepr(i))*fac
27  ihistr(j) = ihistr(j) + 1
28  jmaxr = max(j,jmaxr)
29  20 CONTINUE
30 *
31 * Print histograms of block-steps (STEPR with KZ(33) > 1).
32  jmax = min(jmax,27)
33  WRITE (6,30) (ihist(j),j=1,jmax)
34  30 FORMAT (' #6 STEP ',12i6,5i5,10i4)
35 *
36  IF (kz(33).GT.1) THEN
37  jmaxr = min(jmaxr,27)
38  WRITE (6,35) (ihistr(j),j=1,jmaxr)
39  35 FORMAT (' #7 STEPR ',10i6,5i5,10i4)
40  END IF
41 *
42  RETURN
43 *
44  END