IBM Books

Engineering and Scientific Subroutine Library for AIX Version 3 Release 3: Guide and Reference

SPBS, DPBS, SPBCHS, and DPBCHS--Positive Definite Symmetric Band Matrix Solve

These subroutines solve the system Ax = b for x, where A is a positive definite symmetric band matrix, and x and b are vectors. They use the results of the factorization of matrix A, produced by a preceding call to SPBF, DPBF, SPBCHF, and DPBCHF, respectively, where:


Table 108. Data Types

A, b, x Subroutine
Short-precision real SPBS and SPBCHS
Long-precision real DPBS and DPBCHS

Notes:

  1. The input to these solve subroutines must be the output from the factorization subroutines SPBF, DPBF, SPBCHF, and DPBCHF, respectively.

  2. For performance tradeoffs, see SPBF, DPBF, SPBCHF, and DPBCHF--Positive Definite Symmetric Band Matrix Factorization.

Syntax

Fortran CALL SPBS | DPBS | SPBCHS | DPBCHS (apb, lda, n, m, bx)
C and C++ spbs | dpbs | spbchs | dpbchs (apb, lda, n, m, bx);
PL/I CALL SPBS | DPBS | SPBCHS | DPBCHS (apb, lda, n, m, bx);

On Entry

apb
is the factorization of matrix A, produced by a preceding call to SPBF or DPBF. Specified as: an lda by (at least) n array, containing numbers of the data type indicated in Table 108. See Notes.

lda
is the leading dimension of the array specified for apb. Specified as: a fullword integer; lda > 0 and lda > m.

n
is the order n of matrix A. Specified as: a fullword integer; n > m.

m
is the half band width of the matrix A. Specified as: a fullword integer; 0 <= m < n.

bx
is the vector b of length n, containing the right-hand side of the system. Specified as: a one-dimensional array of (at least) length n, containing numbers of the data type indicated in Table 108.

On Return

bx
is the solution vector x of length n, containing the results of the computation. Returned as: a one-dimensional array, containing numbers of the data type indicated in Table 108.

Notes
  1. The scalar data specified for input arguments lda, n, and m for these subroutines must be the same as that specified for SPBF, DPBF, SPBCHF, and DPBCHF, respectively.
  2. The array data specified for input argument apb for these subroutines must be the same as the corresponding output argument for SPBF, DPBF, SPBCHF, and DPBCHF, respectively.
  3. These subroutines can be used for tridiagonal matrices (m = 1); however, the tridiagonal subroutines, SPTF/DPTF and SPTS/DPTS, are faster.
  4. The vectors and matrices used in this computation must have no common elements; otherwise, results are unpredictable. See Concepts.
  5. For a description of how a positive definite symmetric band matrix is stored in lower-band-packed storage mode in an array, see Positive Definite Symmetric Band Matrix.

Function

The system Ax = b is solved for x, where A is a positive definite symmetric band matrix, stored in lower-band-packed storage mode, and x and b are vectors. These subroutines use the results of the factorization of matrix A, produced by a preceding call to SPBF, DPBF, SPBCHF, or DPBCHF, respectively.

Error Conditions

Computational Errors

None

Note:
If the factorization subroutine resulted in a nonpositive definite matrix, error 2104 for SPBF and DPBF or error 2115 for SPBCHF and DPBCHF, results of these subroutines may be unpredictable.

Input-Argument Errors
  1. lda <= 0
  2. m < 0
  3. m >= n
  4. m >= lda

Example 1

This example shows how to solve the system Ax = b, where matrix A is the same matrix factored in the Example 1 for SPBF and DPBF, using Gaussian elimination.

Call Statement and Input
           APB  LDA  N   M   BX
            |    |   |   |   |
CALL SPBS( APB , 3 , 9 , 2 , BX )

APB = (same as output APB in
Example 1)
BX = (3.0, 6.0, 9.0, 9.0, 9.0, 9.0, 9.0, 8.0, 6.0)

Output
BX       =  (1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0)

This example shows how to solve the system Ax = b, where matrix A is the same matrix factored in the Example 2 for SPBCHF and DPBCHF, using Cholesky factorization.

Call Statement and Input
             APB  LDA  N   M   BX
              |    |   |   |   |
CALL SPBCHS( APB , 3 , 9 , 2 , BX )

APB = (same as output APB in
Example 2)
BX = (3.0, 6.0, 9.0, 9.0, 9.0, 9.0, 9.0, 8.0, 6.0)

Output
BX       =  (1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0)


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]