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

Chapter 13 Sparse Linear Equations 919
Matrix structure input by matrix DSLEIM
of order within a column or out of the
lower triangle).
Notes This is the most efficient mechanism for specifying the nonzero structure, but
the entire matrix structure must be input with DSLEIM if it is used. Its use is
not compatible with DSLEI1, DSLEIE, or DSLEIC.
Example 1 Input a small (order 6) symmetric sparse matrix with this structure:
INTEGER*4 COLSTR(7),ROWIND(6),IER
REAL*8 GLOBAL(150)
COLSTR(1) = 1
COLSTR(2) = 3
COLSTR(3) = 5
COLSTR(4) = 6
COLSTR(5) = 7
COLSTR(6) = 7
COLSTR(7) = 7
ROWIND(1) = 3
ROWIND(2) = 4
ROWIND(3) = 3
ROWIND(4) = 5
ROWIND(5) = 5
ROWIND(6) = 5
CALL DSLEIM (COLSTR,ROWIND,GLOBAL,IER)
IF ( IER .NE. 0 ) THEN
handle error condition
ENDIF
Example 2 Input a small (order 6) nonsymmetric symmetric sparse matrix with this
structure:
x0xx00
0xx0x0
xxx0x0
x00xx0
0xxxx0
00000x
x0xx00
0xx0x0
xxx0x0
x00xx0
0xxxx0
00000x