Nbody6
 All Files Functions Variables
permit.f
Go to the documentation of this file.
1  SUBROUTINE permit(PERIM,IGO)
2 *
3 *
4 * Check on existing multiple regularization.
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/clump/ bodys(ncmax,5),t0s(5),ts(5),steps(5),rmaxs(5),
11  & names(ncmax,5),isys(5)
12  common/chain1/ xch(nmx3),vch(nmx3),m(nmx),
13  & zz(nmx3),wc(nmx3),mc(nmx),
14  & xi(nmx3),pi(nmx3),mass,rinv(nmxm),rsum,mkk(nmx),
15  & mij(nmx,nmx),tkk(nmx),tk1(nmx),iname(nmx),nn
16 *
17 *
18 * Search any existing subsystem.
19  isub = 0
20  ichsub = 1
21  DO 10 l = 1,nsub
22 * Identify chain pointer for possible reduction of STEPS.
23  IF (isys(l).EQ.3) ichsub = isys(l)
24 * Distinguish between triple & quad case (denoted ISUB = 1 or 2).
25  IF (jcomp.LE.n.AND.names(4,l).EQ.0) THEN
26  isub = 1
27  ELSE IF (jcomp.GT.n.AND.names(4,l).GT.0) THEN
28  isub = 2
29  END IF
30  10 CONTINUE
31 *
32 * Do not allow a second regularization of the same type.
33  IF (isub.GT.0) THEN
34 * See whether the case ISUB = 1 or 2 is used already.
35  DO 20 l = 1,nsub
36  IF (isub.EQ.isys(l)) igo = 1
37  20 CONTINUE
38 * Enforce chain termination at next extension if new system < RSUM/2.
39  IF (perim.LT.0.5*rsum.AND.igo.GT.0) THEN
40  steps(ichsub) = 0.0
41  END IF
42  END IF
43 *
44  RETURN
45 *
46  END