HP MLIB User's Guide Vol. 2 7th Ed.

Chapter 13 Sparse Linear Equations 961
Matrix value Input by matrix DSLEVM
handle error condition
ENDIF
DIAGVL = 4.0
DO 100 I = 1, NEQNS
CALL DSLEV1 (I,I,DIAGVL,GLOBAL,IER)
IF ( IER .NE. 0 ) THEN
handle error condition
ENDIF
100 CONTINUE
This matrix could also have been input strictly with DSLEVM by expanding
COLSTR, ROWIND, and VALUES to include the diagonal. This action would have
avoided the calls to DSLEV1. Including the diagonal entries in COLSTR and
ROWIND is also acceptable to DSLEIM.
Example 2 Input the values for the following small (order 6) nonsymmetric sparse matrix
problem.
Use DSLEVM with the same structure used in “Example 2” of the
documentation for DSLEIM, and DSLEV1 to input this matrix.
INTEGER*4 COLSTR(7),ROWIND(12),IER
REAL*8 VALUES(12),DIAGVL,GLOBAL(150)
COLSTR(1) = 1
COLSTR(2) = 3
COLSTR(3) = 5
COLSTR(4) = 8
COLSTR(5) = 10
COLSTR(6) = 12
COLSTR(7) = 12
ROWIND(1) = 3
ROWIND(2) = 4
ROWIND(3) = 3
ROWIND(4) = 5
ROWIND(5) = 1
ROWIND(6) = 2
ROWIND(7) = 5
ROWIND(8) = 1
ROWIND(9) = 5
ROWIND(10) = 2
ROWIND(11) = 3
ROWIND(12) = 4
4.0 0.0 1.0 1.0 0.0 0.0
0.0 4.0 1.0 0.0 1.0 0.0
1.0 1.0 4.0 0.0 1.0 0.0
1.0 0.0 0.0 4.0 1.0 0.0
0.0 1.0 1.0 1.0 4.0 0.0
0.0 0.0 0.0 0.0 0.0 4.0