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

960 HP MLIB User’s Guide
DSLEVM Matrix value Input by matrix
Output ier Status response:
ier = 0 Normal return.
ier = 400 Incorrect processing path; DSLEOR
not called.
ier = 401 Error in dynamic storage allocation.
ier = 402 At least one subscript pair was not
specified in structure input. No room
for value.
Example 1 Input the values for the following small (order 6) symmetric sparse matrix
problem.
Use DSLEVM with the same structure used in “Example 1” of the
documentation for DSLEIM, and DSLEV1 to input this matrix.
INTEGER*4 COLSTR(7),ROWIND(6),IER
REAL*8 VALUES(6),DIAGVL,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
VALUES(1) = 1.0D0
VALUES(2) = 1.0D0
VALUES(3) = 1.0D0
VALUES(4) = 1.0D0
VALUES(5) = 1.0D0
VALUES(6) = 1.0D0
CALL DSLEVM (COLSTR,ROWIND,VALUES,GLOBAL,IER)
IF ( IER .NE. 0 ) THEN
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