Nbody6
 All Files Functions Variables
delay.f
Go to the documentation of this file.
1  SUBROUTINE delay(KCH,KS)
2 *
3 *
4 * Delay of multiple regularization.
5 * ---------------------------------
6 *
7  include 'common6.h'
8  common/saveit/ iph0,ks0,kch0,ks20,jc0,jcl0
9 *
10 *
11 * Check for saving KS pointers from IMPACT or termination at TBLOCK.
12  IF (ks.GE.0) THEN
13  iph0 = iphase
14  ks0 = kspair
15  kch0 = kch
16  ks20 = ks
17  jc0 = jcomp
18  jcl0 = jclose
19  ELSE
20 * Copy relevant indices for delayed KS termination.
21  iphase = iph0
22  kspair = ks0
23  kchain = kch0
24  ks2 = ks20
25  jcomp = jc0
26  jclose = jcl0
27 * Preserve contents of KSAVE during chain regularization.
28  IF (nch.EQ.0) THEN
29  ksave(1) = 0
30  ksave(2) = 0
31  END IF
32  kskip = 0
33 *
34 * Exit in case of new merger or merger termination.
35  IF (iphase.EQ.6.OR.iphase.EQ.7) THEN
36  go to 10
37  END IF
38 *
39 * Include the case of two interacting KS pairs.
40  IF (jcomp.GT.n) THEN
41  IF (kchain.GT.0.AND.kstar(n+kspair).NE.0) THEN
42  ksave(1) = kstar(n+kspair)
43  ksave(2) = name(2*kspair-1) + name(2*kspair)
44  kskip = 1
45  END IF
46 * Terminate smallest pair first and copy second pair index.
47  CALL ksterm
48  kspair = ks2
49 * Specify JCOMP < 0 to prevent spurious prediction second KSTERM call.
50  jcomp = -1
51  END IF
52 *
53 * Save KSTAR (> 0) and sum of component names (for chain termination).
54  IF (kchain.GT.0.AND.kstar(n+kspair).NE.0.AND.kskip.EQ.0) THEN
55  ksave(1) = kstar(n+kspair)
56  ksave(2) = name(2*kspair-1) + name(2*kspair)
57  END IF
58 *
59 * Terminate binary in triple or widest binary-binary collision pair.
60  CALL ksterm
61 *
62 * See whether chain regularization indicator should be switched on.
63  IF (kchain.GT.0) THEN
64  iphase = 8
65  END IF
66  END IF
67 *
68  10 RETURN
69 *
70  END