GET_MATRIX_INFO

Returns information about a dataset MATRIX statement given the statement identifier (C++ or FORTRAN).  

Use

Called By

Any user-written subroutine

Prerequisite

MATRIX statement in the dataset

Calling Sequence

GET_MATRIX_INFO(id, type, nrows, ncols, size, ierr)

Input Arguments

 
id
An integer variable that specifies the ID of the corresponding MATRIX statement.

Output Arguments

 
type
An integer value that indicates the MATRIX type as stored by Adams Solver.  
type=1
Sparse
type=2
Full, row-order
type=3
Full, column-order
nrows
An integer variable that contains the number of rows in the MATRIX.
ncols
An integer variable that contains the number of columns in the MATRIX.
size
An integer value that contains the total number of entries in a sparse MATRIX.  For a full matrix, size is ncols*nrows.
ierr
An integer variable that indicated the success of the call to GET_MATRIX_INFO.
ierr=0
Successful
ierr=1
Failed, no MATRIX having an identifier of id exists in the dataset

Extended Definition

GET_MATRIX_INFO is useful when used with the GET_FULL_MATRIX_DATA and GET_SPARSE_MATRIX_DATA utility subroutines. It returns:
Matrix type needed to determine which utility to call to get the MATRIX data
MATRIX size needed in the call to GET_FULL_MATRIX_DATA or GET_SPARSE_MATRIX_DATA
Number of rows and columns needed to interpret the full matrix data.