naginterfaces.library.sparse.direct_​real_​gen_​lu

naginterfaces.library.sparse.direct_real_gen_lu(irowix, a, iprm, thresh, nzlmx, nzlumx, nzumx)[source]

direct_real_gen_lu computes the factorization of a real sparse matrix in compressed column (Harwell–Boeing), column-permuted format.

For full information please refer to the NAG Library document for f11me

https://support.nag.com/numeric/nl/nagdoc_30/flhtml/f11/f11mef.html

Parameters
irowixint, array-like, shape

The row index array of sparse matrix . See the F11 Introduction.

afloat, array-like, shape

The array of nonzero values in the sparse matrix .

iprmint, array-like, shape

Contains the column permutation which defines the permutation and associated data structures as computed by function direct_real_gen_setup().

threshfloat

The diagonal pivoting threshold, . At step of the Gaussian elimination, if , use as a pivot, otherwise use . A value of corresponds to partial pivoting, a value of corresponds to always choosing the pivot on the diagonal (unless it is zero).

Suggested value: . Smaller values may result in a faster factorization, but the benefits are likely to be small in most cases. It might be possible to use if you are confident about the stability of the factorization, for example, if is diagonally dominant.

nzlmxint

Indicates the available size of array . The dimension of should be at least . A good range for that works for many problems is to , where is the number of nonzeros in the sparse matrix . If, on exit, = 2, the given was too small and you should attempt to provide more storage and call the function again.

nzlumxint

Indicates the available size of array . The dimension of should be at least .

nzumxint

Indicates the available sizes of arrays and . The dimension of should be at least and the dimension of should be at least . A good range for that works for many problems is to , where is the number of nonzeros in the sparse matrix . If, on exit, = 3, the given was too small and you should attempt to provide more storage and call the function again.

Returns
iprmint, ndarray, shape

Part of the array is modified to record the row permutation determined by pivoting.

nzlumxint

If = 4, the given was too small and is reset to a value that will be sufficient. You should then provide the indicated storage and call the function again.

ilint, ndarray, shape

Encapsulates the sparsity pattern of matrix .

lvalfloat, ndarray, shape

Records the nonzero values of matrix and some of the nonzero values of matrix .

iuint, ndarray, shape

Encapsulates the sparsity pattern of matrix .

uvalfloat, ndarray, shape

Records some of the nonzero values of matrix .

nnzlint

The number of nonzero values in the matrix .

nnzuint

The number of nonzero values in the matrix .

flopfloat

The number of floating-point operations performed.

Raises
NagValueError
(errno )

On entry, .

Constraint: .

(errno )

On entry, .

Constraint: .

(errno )

On entry, .

Constraint: .

(errno )

On entry, .

Constraint: .

(errno )

On entry, .

Constraint: .

(errno )

Insufficient .

(errno )

Insufficient .

(errno )

Insufficient .

(errno )

The matrix is singular – no factorization possible.

Notes

Given a real sparse matrix , direct_real_gen_lu computes an factorization of with partial pivoting, , where is a row permutation matrix (computed by direct_real_gen_lu), is a (supplied) column permutation matrix, is unit lower triangular and is upper triangular. The column permutation matrix, , must be computed by a prior call to direct_real_gen_setup(). The matrix must be presented in the column permuted, compressed column (Harwell–Boeing) format.

The factorization is output in the form of four one-dimensional arrays: integer arrays and and real-valued arrays and . These describe the sparsity pattern and numerical values in the and matrices. The minimum required dimensions of these arrays cannot be given as a simple function of the size arguments (order and number of nonzero values) of the matrix . This is due to unpredictable fill-in created by partial pivoting. direct_real_gen_lu will, on return, indicate which dimensions of these arrays were not adequate for the computation or (in the case of one of them) give a firm bound. You should then allocate more storage and try again.

References

Demmel, J W, Eisenstat, S C, Gilbert, J R, Li, X S and Li, J W H, 1999, A supernodal approach to sparse partial pivoting, SIAM J. Matrix Anal. Appl. (20), 720–755

Demmel, J W, Gilbert, J R and Li, X S, 1999, An asynchronous parallel supernodal algorithm for sparse gaussian elimination, SIAM J. Matrix Anal. Appl. (20), 915–952