Nbody6
 All Files Functions Variables
chdata.f
Go to the documentation of this file.
1  SUBROUTINE chdata(XJ,VJ,BODYJ)
2 *
3 *
4 * Basic data for chain members.
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
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  REAL*4 xj(3,6),vj(3,6),bodyj(6)
18 *
19 *
20 * Save global address of all chain members in common array JLIST.
21  DO 2 l = 1,nch
22  DO 1 j = ifirst,n
23 * Identify each member sequentially from NAMEC (note NAME(ICH) = 0).
24  IF (name(j).EQ.namec(l).OR.name(j).EQ.0) THEN
25  jlist(l) = j
26  END IF
27  1 CONTINUE
28  2 CONTINUE
29 
30 * Obtain global coordinates & velocities from current chain & c.m.
31  lk = 0
32  DO 10 i = 1,nch
33  bodyj(i) = bodyc(i)
34  DO 5 k = 1,3
35  lk = lk + 1
36  xj(k,i) = xch(lk) + x(k,ich)
37  vj(k,i) = vch(lk) + xdot(k,ich)
38  5 CONTINUE
39  10 CONTINUE
40 *
41  RETURN
42 *
43  END