The IMSL_SP_PDSOL function solves a sparse symmetric positive definite system of linear equations Ax = b.
This routine requires an IDL Advanced Math and Stats license. For more information, contact your sales or technical support representative.
The IMSL_SP_PDSOL function solves a system of linear algebraic equations having a sparse symmetric positive definite coefficient matrix A. In IMSL_SP_PDSOL default usage, a symbolic factorization of a permutation of the coefficient matrix is computed first, then a numerical factorization is performed. The solution of the linear system is then found using the numeric factor.
The symbolic factorization step of the computation consists of determining a minimum degree ordering and then setting up a sparse data structure for the Cholesky factor, L. This step only requires the “pattern” of the sparse coefficient matrix, that is, the locations of the non-zero elements but not any of the elements themselves.
The numerical factorization can be carried out in one of two ways. By default, the standard factorization is performed based on a sparse compressed storage scheme. This is fully described in George and Liu (1981). Optionally, a multifrontal technique can be used. The multifrontal method requires more storage but will be faster in certain cases. The multifrontal factorization is based on the routines in Liu (1987). For a detailed description of this method, see Liu (1990), also Duff and Reid (1983, 1984), Ashcraft (1987), Ashcraft et al. (1987), and Liu (1986, 1989).
If an application requires that several linear systems be solved where the coefficient matrix is the same but the right-hand sides change, the IMSL_SP_PDFAC function can be used to precompute the Cholesky factor. Then the keyword FACTOR can be used in IMSL_SP_PDSOL to efficiently solve all subsequent systems.
Given the numeric factorization, the solution x is obtained by the following calculations:
Ly1 = Pb
LTy2 = y1
x = PTy2
The permutation information, P, is carried in the numeric factor structure.
Example
A = REPLICATE(imsl_f_sp_elem, 10)
a(*).row = [0, 1, 2, 2, 3, 3, 4, 4, 4, 4]
a(*).col = [0, 1, 0, 2, 2, 3, 0, 1, 3, 4]
a(*).val = [10, 20, 1, 30, 4, 40, 2, 3, 5, 50]
b = [55.0d0, 83, 103, 97, 82]
x = IMSL_SP_PDSOL(b, a)
PM, x
5.0000000
4.0000000
3.0000000
2.0000000
Syntax
Result = IMSL_SP_PDSOL(B [, A] [, /CSC_COL] [, /CSC_ROW] [, /CSC_VAL] [, FACTOR=value] [, LG_DIAG=value] [, MULTIFRONTAL=value] [, N_NONZERO=variable] [, SM_DIAG=value])
Return Value
A one-dimensional array containing the solution of the linear system Ax = b.
Arguments
B
One-dimensional matrix containing the right-hand side.
A (optional)
Sparse matrix stored as an array of structures containing non-zeros in lower triangle of the coefficient matrix A(i,j). See “Sparse Matrices: Direct Methods” and its related sections for a description of structures used for sparse matrices.
Keywords
CSC_COL (optional)
Accept the coefficient matrix in compressed sparse column (CSC) format. See “Sparse Coordinate Storage Format” for a discussion of this storage scheme. The keywords CSC_COL, CSC_ROW, and CSC_VAL must be used together.
CSC_ROW (optional)
Accept the coefficient matrix in compressed sparse column (CSC) format. See “Sparse Coordinate Storage Format” for a discussion of this storage scheme. The keywords CSC_COL, CSC_ROW, and CSC_VAL must be used together.
CSC_VAL (optional)
Accept the coefficient matrix in compressed sparse column (CSC) format. See “Sparse Coordinate Storage Format” for a discussion of this storage scheme. The keywords CSC_COL, CSC_ROW, and CSC_VAL must be used together.
FACTOR (optional)
The factorization of A as computed by IMSL_SP_PDFAC. If this keyword is used, then the argument a should not be used. This keyword is useful if solutions to systems involving the same coefficient matrix and multiple right-hand sides will be solved.
LG_DIAG (optional)
The largest diagonal element that occurred during the numeric factorization. This keyword is not valid if the keyword FACTOR is used.
MULTIFRONTAL (optional)
If present and nonzero, perform the numeric factorization using a multifrontal technique. By default a standard factorization is computed based on a sparse compressed storage scheme. The keywords MULTIFRONTAL and FACTOR cannot be used together.
N_NONZERO (optional)
Named variable into which the total number of non-zeros in the factor is stored. This keyword is not valid if the keyword FACTOR is used.
SM_DIAG (optional)
The smallest diagonal element that occurred during the numeric factorization. This keyword is not valid if the keyword FACTOR is used.
Version History
See Also
IMSL_SP_BDPDFAC, IMSL_SP_BDPDSOL, IMSL_SP_BDSOL, IMSL_SP_CG, IMSL_SP_GMRES, IMSL_SP_LUFAC, IMSL_SP_LUSOL, IMSL_SP_MVMUL, IMSL_SP_PDFAC