9 LOGICAL kslow,kcoll,kcase
10 REAL*8 ksch,ksnew,vi(nmx3),vc(nmx3),rc1(3),rc2(3)
11 common/slow1/ tk2(0:nmx),ejump,ksch(nmx),kslow,kcoll
12 common/ccoll2/ qk(nmx4),pk(nmx4),rij(nmx,nmx),
SIZE(nmx),vstar1,
13 & ecoll1,rcoll,qperi,istar(nmx),icoll,isync,ndiss1
15 common/slow3/ gcrit,kz26
16 common/chreg/ timec,tmax,rmaxc,cm(10),namec(6),nstep1,kz27,kz30
21 if (gcrit.eq.0.0d0)
then
34 IF (rinv(i).GT.rm)
THEN
58 IF (i.NE.i1.AND.rinv(i).GT.ri2)
THEN
66 CALL
erel(i2,eb,semi2)
68 IF (semi2.GT.0.0)
THEN
69 IF (semi2.LT.semi.OR.semi.LT.0.0)
THEN
75 ELSE IF (semi.LT.0.0)
THEN
83 if (iabs(i-i1).eq.1)
then
85 if (i.gt.i1) j = i + 1
86 sum = sum + mc(j)*rinv(i)**3
94 rc2(k) = xc(k+lj+3) + xc(k+lj)
97 rj = sqrt(rc2(1)**2 + rc2(2)**2 + rc2(3)**2)
99 sum = sum + mc(j)/rj**3
100 else if (i1.ge.3)
then
103 rc2(k) = xc(k+lj-3) + xc(k+lj)
106 rj = sqrt(rc2(1)**2 + rc2(2)**2 + rc2(3)**2)
108 sum = sum + mc(j)/rj**3
112 mb = mc(i1) + mc(i1+1)
113 gamma = 2.0*sum/(mb*rm**3)
114 IF (gamma.GT.gcrit)
THEN
120 IF (kslow.AND.n.GT.3)
THEN
122 IF (ksch(i).GT.1.0d0) i1 = i
129 IF (i.NE.i1.AND.r1.LT.0.5*ri2)
THEN
131 IF (r1.LT.0.1*semi.AND.ri2.LT.0.1*semi)
THEN
135 IF (ri2.LT.0.5*semi.AND.r1.GT.0.5*semi)
THEN
140 vi(l+k+3) = wc(l+k)/mc(n)
145 vi(l+k) = (wc(l+k-3) - wc(l+k))/mc(ii)
149 vc(j) = vi(j+3) - vi(j)
152 r2 = xc(l+1)**2 + xc(l+2)**2 + xc(l+3)**2
153 w2 = vc(l+1)**2 + vc(l+2)**2 + vc(l+3)**2
154 semi = 2.0d0/r1 - w2/(mc(i1) + mc(i1+1))
157 ELSE IF (ri2.LT.min(semi,r1).AND.r1.GT.0.5*semi)
THEN
168 CALL
erel(i2,eb2,semi2)
169 IF (semi2.GT.0.0.AND.semi2.LT.semi)
THEN
195 CALL
erel(i1,eb,semi)
197 IF (semi.LE.0.0d0)
THEN
205 IF (kslow.AND.n.GT.3)
THEN
210 CALL
erel(i2,eb2,semi2)
211 IF (semi2.GT.0.0.AND.semi2.LT.semi)
THEN
225 if ((n.eq.4.and.i1.ne.2).or.n.gt.4)
then
234 rc1(k) = rc1(k) + xc(k+lj)
238 else if (i.gt.i1+1)
then
242 rc1(k) = rc1(k) + xc(k+lj)
251 if (i.gt.i1) j = i + 1
253 if (iabs(i-i1).eq.1)
then
254 sum = sum + mc(j)*rinv(i)**3
255 else if (i.ne.i1)
then
258 rc2(k) = rc1(k) + xc(k+l)
261 rj = sqrt(rc2(1)**2 + rc2(2)**2 + rc2(3)**2)
262 sum = sum + mc(j)/rj**3
269 pert = 2.0*sum*rap**3/(mc(i1) + mc(i1+1))
272 IF (pert.LT.gcrit)
THEN
273 ksnew = sqrt(gcrit/pert)
300 90
if (ksnew.ne.ksch(i1))
then
301 if (ksnew.eq.1.0d0)
then
307 eb = -0.5d0*mc(i1)*mc(i1+1)/semi
308 deb = eb*(1.0/ksnew - 1.0/ksch(i1))
317 IF (.NOT.kslow) ejump = 0.0
324 if (ksch(i).ne.1.0d0)
then
325 tk1(i) = tk1(i)/ksch(i)
326 tk1(i+1) = tk1(i+1)/ksch(i)
330 tkk(i) = 0.5d0*(-tk1(i) - tk1(i+1))
331 mkk(i) = mc(i)*mc(i+1)/ksch(i)
334 m12 = mc(i) + mc(i+1)
335 dt12 = 0.5d0*(1.0d0 - 1.0d0/ksch(i))/m12
336 if (i.gt.1) tkk(i-1) = tkk(i-1) + dt12
337 if (i.lt.n-1) tkk(i+1) = tkk(i+1) + dt12
338 if (i.gt.1.and.i.lt.n-1) tk2(i) = -2.0d0*dt12