54 real(kind=8) :: a(*),alu(*),w(n+1),droptol
55 integer(kind=4) :: ja(*),ia(n+1),jlu(*),ju(n),jw(2*n),lfil,iwk,ierr
57 integer(kind=4) :: izero
165 integer(kind=4) :: ju0,k,j1,j2,j,ii,i,lenl,lenu,jj,jrow,jpos,ilen
166 real(kind=8) :: tnorm, t, abs, s, fact
167 real(kind=8) :: dropsum, diag, sign_check, diag_working
169 character(len=*),
parameter :: fmterr =
"(//,1x,a)"
171 if (lfil .lt. 0)
goto 998
193 tnorm = tnorm+abs(a(k))
195 if (tnorm .eq. 0.0d0)
goto 999
196 tnorm = tnorm/real(j2-j1+1)
214 else if (k .eq. ii)
then
230 if (jj .gt. lenl)
goto 160
241 if (jw(j) .lt. jrow)
then
267 fact = w(jj)*alu(jrow)
268 if (abs(fact) .le. droptol)
then
269 dropsum = dropsum + w(jj)
275 do k = ju(jrow), jlu(jrow+1)-1
283 if (jpos .eq. 0)
then
288 if (lenu .gt. n)
goto 995
297 w(jpos) = w(jpos) - s
304 if (jpos .eq. 0)
then
309 if (lenl .gt. n)
goto 995
317 w(jpos) = w(jpos) - s
340 ilen = min0(lenl,lfil)
344 call qsplit(lenl, w, jw, ilen)
349 if (ju0 .gt. iwk)
goto 996
363 if (abs(w(ii+k)) .gt. droptol*tnorm)
then
366 jw(ii+ilen) = jw(ii+k)
368 dropsum = dropsum + w(ii+k)
372 ilen = min0(lenu,lfil)
374 call qsplit(lenu-1, w(ii+1), jw(ii+1), ilen)
379 if (ilen + ju0 .gt. iwk)
goto 997
380 do k = ii+1, ii+ilen-1
390 diag_working = ( 1.0d0 + delta ) * diag + ( relax * dropsum )
394 sign_check = sign(diag, diag_working)
395 if (sign_check .ne. diag)
then
399 diag_working = sign(1.0d0, diag) * (1.0d-4 + droptol) * tnorm
409 IF (abs(diag_working) == 0.0d0)
THEN
413 diag_working = sign(1.0d0, diag) * (1.0d-4 + droptol) * tnorm
424 alu(ii) = 1.0d0 / w(ii)
subroutine qsplit(n, a, ind, ncut)