Nbody6
 All Files Functions Variables
reinit.f
Go to the documentation of this file.
1  SUBROUTINE reinit(ISUB)
2 *
3 *
4 * Re-initialization of chain system.
5 * ----------------------------------
6 *
7  include 'common6.h'
8  parameter(nmx=10,nmx3=3*nmx,nmxm=nmx*(nmx-1)/2)
9  REAL*8 m,mass,mc,mij,mkk,ang(3),firr(3),fd(3)
10  common/chain1/ xch(nmx3),vch(nmx3),m(nmx),
11  & zz(nmx3),wc(nmx3),mc(nmx),
12  & xi(nmx3),pi(nmx3),mass,rinv(nmxm),rsum,mkk(nmx),
13  & mij(nmx,nmx),tkk(nmx),tk1(nmx),iname(nmx),nn
14  common/chainc/ xc(3,ncmax),uc(3,ncmax),bodyc(ncmax),ich,
15  & listc(lmax)
16  common/chreg/ timec,tmax,rmaxc,cm(10),namec(6),nstep1,kz27,kz30
17  common/clump/ bodys(ncmax,5),t0s(5),ts(5),steps(5),rmaxs(5),
18  & names(ncmax,5),isys(5)
19  common/echain/ ech
20 *
21 *
22 * Set phase indicator for step reduction (routine STEPS).
23  iphase = 8
24 *
25 * Obtain current coordinates & velocities of neighbours (for FPOLY).
26  nnb = list(1,ich)
27  CALL xvpred(ich,nnb)
28 *
29 * Initialize force polynomials (include differential force correction).
30  CALL fpoly1(ich,ich,0)
31  DO 5 k = 1,3
32  firr(k) = 0.0
33  fd(k) = 0.0
34  5 CONTINUE
35  CALL chfirr(ich,0,x(1,ich),xdot(1,ich),firr,fd)
36  DO 10 k = 1,3
37  f(k,ich) = f(k,ich) + firr(k)
38  fdot(k,ich) = fdot(k,ich) + fd(k)
39  10 CONTINUE
40  CALL fpoly2(ich,ich,0)
41 *
42 * Obtain maximum unperturbed separation based on dominant neighbour.
43  CALL extend(isub)
44 *
45 * Ensure new global coordinates are available in chpert.f.
46  CALL xcpred(0)
47 *
48 * Update decision-making variables for chain regularization.
49  ts(isub) = time
50  steps(isub) = 0.01*step(ich)
51 *
52 * Initialize perturber list for chain (use modified value of RSUM).
53  CALL chlist(ich)
54 *
55 * Re-calculate new energy of chain system (just in case).
56  CALL const(xch,vch,m,nn,ech,ang,alag)
57 *
58 * Set phase indicator < 0 to ensure new time-step list in INTGRT.
59  iphase = -1
60 *
61  RETURN
62 *
63  END