IMSL_SP_PDSOL

Syntax | Return Value | Arguments | Keywords | Discussion | Example | Version History | See Also

The IMSL_SP_PDSOL function solves a sparse symmetric positive definite system of linear equations Ax = b.

Note
This routine requires an IDL Advanced Math and Stats license. For more information, contact your ITT Visual Information Solutions sales or technical support representative.

Syntax

Result = IMSL_SP_PDSOL(b,[, a] [, /CSC_COL] [, /CSC_ROW_IND] [, /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

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_IND, and CSC_VAL must be used together.

CSC_ROW_IND

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_IND, and CSC_VAL must be used together.

CSC_VAL

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_IND, and CSC_VAL must be used together.

FACTOR

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

The largest diagonal element that occurred during the numeric factorization. This keyword is not valid if the keyword FACTOR is used.

MULTIFRONTAL

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

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

The smallest diagonal element that occurred during the numeric factorization. This keyword is not valid if the keyword FACTOR is used.

Discussion

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

As an example consider the 5 x 5 coefficient matrix:

IMSL_SP_PDSOL-32.jpg

Let xT = (5, 4, 3, 2, 1) so that Ax = (55, 83, 103, 97, 82)T. The number of non-zeros in the lower triangle of A is nz = 10. The sparse coordinate form for the lower triangle is given by:

row
0
1
2
2
3
3
4
4
4
4
col
0
1
0
2
2
3
0
1
3
4
val
10
20
1
30
4
40
2
3
5
50

Since this representation is not unique, an equivalent form would be:

row
3
4
4
4
0
1
2
2
3
4
col
3
0
1
3
0
1
0
2
2
4
val
40
2
3
5
10
20
1
30
4
50

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 
   1.0000000 

Version History

6.4

Introduced

See Also

IMSL_SP_PDFAC