Forgot to load lapack in a few examples
[maxima.git] / share / odepack / fortran / adjlr.f
blobd80929050b33fd58620cdd123f4ae9db622d3aaf
1 *DECK ADJLR
2 SUBROUTINE ADJLR (N, ISP, LDIF)
3 INTEGER N, ISP, LDIF
4 DIMENSION ISP(*)
5 C-----------------------------------------------------------------------
6 C This routine computes an adjustment, LDIF, to the required
7 C integer storage space in IWK (sparse matrix work space).
8 C It is called only if the word length ratio is LRAT = 1.
9 C This is to account for the possibility that the symbolic LU phase
10 C may require more storage than the numerical LU and solution phases.
11 C-----------------------------------------------------------------------
12 INTEGER IP, JLMAX, JUMAX, LNFC, LSFC, NZLU
14 IP = 2*N + 1
15 C Get JLMAX = IJL(N) and JUMAX = IJU(N) (sizes of JL and JU). ----------
16 JLMAX = ISP(IP)
17 JUMAX = ISP(IP+IP)
18 C NZLU = (size of L) + (size of U) = (IL(N+1)-IL(1)) + (IU(N+1)-IU(1)).
19 NZLU = ISP(N+1) - ISP(1) + ISP(IP+N+1) - ISP(IP+1)
20 LSFC = 12*N + 3 + 2*MAX(JLMAX,JUMAX)
21 LNFC = 9*N + 2 + JLMAX + JUMAX + NZLU
22 LDIF = MAX(0, LSFC - LNFC)
23 RETURN
24 C----------------------- End of Subroutine ADJLR -----------------------
25 END