1 subroutine forlincs
(x
,xp
,ncons
,
2 $ bla1
,bla2
,blnr
,blbnb
,bllen
,blc
,blcc
,blm
,
3 $ nit
,nrec
,invmass
,r
,rhs1
,rhs2
,sol
,wangle
,warn
,
8 real x
(*),xp
(*),bllen
(*),blc
(*),blcc
(*),blm
(*),invmass
(*)
9 real r
(*),rhs1
(*),rhs2
(*),sol
(*),wangle
,lambda
(*)
10 integer*4 ncons
,nit
,nrec
,bla1
(*),bla2
(*),blnr
(*),blbnb
(*)
13 integer*4 b
,i
,j
,k
,n
,b3
,i3
,j3
,it
,rec
14 real tmp0
,tmp1
,tmp2
,im1
,im2
,mvb
,rlen
,len
,wfac
,lam
15 real u0
,u1
,u2
,v0
,v1
,v2
27 rlen
=1.0/sqrt
(tmp0*tmp0
+tmp1*tmp1
+tmp2*tmp2
)
41 do n
=blnr
(b
)+1,blnr
(b
+1)
43 blm
(n
)=blcc
(n
)*(tmp0*r
(k
+1)+tmp1*r
(k
+2)+tmp2*r
(k
+3))
45 mvb
=blc
(b
)*(tmp0*
(xp
(i
+1)-xp
(j
+1))+
46 $ tmp1*
(xp
(i
+2)-xp
(j
+2))+
47 $ tmp2*
(xp
(i
+3)-xp
(j
+3))-len
)
56 do n
=blnr
(b
)+1,blnr
(b
+1)
58 mvb
=mvb
+blm
(n
)*rhs1
(j
)
63 if (rec
.lt
. nrec
) then
66 do n
=blnr
(b
)+1,blnr
(b
+1)
68 mvb
=mvb
+blm
(n
)*rhs2
(j
)
106 c ******** Correction for centripetal effects ********
108 wfac
=cos
(0.01745*wangle
)
121 u0
=2.*u1
-(tmp0*tmp0
+tmp1*tmp1
+tmp2*tmp2
)
122 if (u0
.lt
. wfac*u1
) warn
=b
123 if (u0
.lt
. 0.) u0
=0.
124 mvb
=blc
(b
)*(len
-sqrt
(u0
))
133 do n
=blnr
(b
)+1,blnr
(b
+1)
135 mvb
=mvb
+blm
(n
)*rhs1
(j
)
140 if (rec
.lt
. nrec
) then
143 do n
=blnr
(b
)+1,blnr
(b
+1)
145 mvb
=mvb
+blm
(n
)*rhs2
(j
)