Nbody6
 All Files Functions Variables
input.f
Go to the documentation of this file.
1  SUBROUTINE input
2 *
3 *
4 * Parameter input.
5 * ----------------
6 *
7  include 'common6.h'
8  EXTERNAL verify
9 *
10 *
11 * Make a formal call to define input parameters & counters.
12  CALL define
13 *
14 * Read & print the main input parameters.
15  READ (5,*) n, nfix, ncrit, nrand, nnbmax, nrun
16  READ (5,*) etai, etar, rs0, dtadj, deltat, tcrit, qe, rbar, zmbar
17  READ (5,*) (kz(j),j=1,50)
18  READ (5,*) dtmin, rmin, etau, eclose, gmin, gmax
19 *
20  WRITE (6,10)
21  10 FORMAT (/////,15x,'N NFIX NCRIT NRAND NNBMAX NRUN')
22  WRITE (6,12) n, nfix, ncrit, nrand, nnbmax, nrun
23  12 FORMAT (/,i16,i6,2i7,i8,i6)
24  WRITE (6,15)
25  15 FORMAT (//,12x,'ETAI ETAR RS0 DTADJ DELTAT',
26  & ' TCRIT QE RBAR ZMBAR')
27  WRITE (6,20) etai, etar, rs0, dtadj, deltat, tcrit, qe, rbar,
28  & zmbar
29  20 FORMAT (/,9x,1p,10e10.1)
30  WRITE (6,22)
31  22 FORMAT (//,12x,'OPTIONS')
32  WRITE (6,24) (j,j=1,50)
33  24 FORMAT (/,9x,50i3)
34  WRITE (6,26) (kz(j),j=1,50)
35  26 FORMAT (/,9x,50i3)
36  WRITE (6,28)
37  28 FORMAT (//,12x,'DTMIN RMIN ETAU ECLOSE GMIN',
38  & ' GMAX')
39  WRITE (6,30) dtmin, rmin, etau, eclose, gmin, gmax
40  30 FORMAT (/,9x,1p,6e10.1)
41 *
42 * Perform a simple validation check on main input parameters.
43  CALL verify
44 *
45  gprint(1) = 0.0
46  deltas = 0.0
47  IF (kz(4).GT.0) THEN
48 * Read parameters for binary evolution analysis.
49  k = kz(4)
50  READ (5,*) deltas, orbits(1), (gprint(j),j=1,k)
51  WRITE (6,40) deltas, orbits(1), (gprint(j),j=1,k)
52  40 FORMAT (//,12x,'DELTAS =',f6.2,' ORBITS(1) =',f6.2,
53  & ' GPRINT(J) =',9f7.3)
54 * Modify binary output factor by perturbation at different levels.
55  DO 50 l = 2,k
56  orbits(l) = orbits(1)*(gprint(1)/gprint(l))**0.3333
57  50 CONTINUE
58  END IF
59 *
60 * Set random number skip for routine DATA.
61  idum1 = nrand
62 *
63 * Save square of c.m. approximation parameter (coupled to GMIN).
64  cmsep2 = gmin**(-0.666666667)
65 *
66 * Define total particle number & neighbour membership parameters.
67  ntot = n
68  nzero = n
69  nbzero = nnbmax
70  znbmin = 0.2*float(nnbmax)
71  znbmax = 0.9*float(nnbmax)
72 * Save initial ETAI and RMIN**2 (for PHICOR).
73  eta0 = etai
74  rmin2 = rmin**2
75  rsmin = rs0
76  rc = rs0
77 * Temporary save of initial neighbour sphere for OUTPUT & NBLIST.
78 *
79  RETURN
80 *
81  END