IBM Books

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

SGBS and DGBS--General Band Matrix Solve

These subroutines solve the system Ax = b for x, where A is a general band matrix, and x and b are vectors. They use the results of the factorization of matrix A, produced by a preceding call to SGBF or DGBF, respectively.

Table 106. Data Types

A, b, x Subroutine
Short-precision real SGBS
Long-precision real DGBS
Note:
The input to these solve subroutines must be the output from the factorization subroutines SGBF and DGBF, respectively.

Syntax

Fortran CALL SGBS | DGBS (agb, lda, n, ml, mu, ipvt, bx)
C and C++ sgbs | dgbs (agb, lda, n, ml, mu, ipvt, bx);
PL/I CALL SGBS | DGBS (agb, lda, n, ml, mu, ipvt, bx);

On Entry

agb
is the factorization of general band matrix A, produced by a preceding call to SGBF or DGBF. Specified as: an lda by (at least) n array, containing numbers of the data type indicated in Table 106, where lda >= 2ml+mu+16.

lda
is the leading dimension of the array specified for agb. Specified as: a fullword integer; lda > 0 and lda >= 2ml+mu+16.

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

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

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

ipvt
is the integer vector ipvt of length n, produced by a preceding call to SGBF or DGBF. It contains the pivot information necessary to construct matrix L from the information contained in the array specified for agb.

Specified as: a one-dimensional array of (at least) length n, containing fullword integers.

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 106.

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 106.

Notes
  1. The scalar data specified for input arguments lda, n, ml, and mu for these subroutines must be the same as that specified for SGBF and DGBF, respectively.
  2. The array data specified for input arguments agb and ipvt for these subroutines must be the same as the corresponding output arguments for SGBF and DGBF, respectively.
  3. The entire lda by n array specified for agb must remain unchanged between calls to the factorization and solve subroutines.
  4. The vectors and matrices used in this computation must have no common elements; otherwise, results are unpredictable. See Concepts.
  5. This subroutine can be used for tridiagonal matrices (ml = mu = 1); however, the tridiagonal subroutines, SGTF/DGTF and SGTS/DGTS, are faster.
  6. For a description of how a general band matrix is stored in general-band storage mode in an array, see General Band Matrix.

Function

The real system Ax = b is solved for x, where A is a real general band matrix, stored in general-band 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 SGBF or DGBF, respectively. The transformed matrix A, used by this computation, consists of the upper triangular matrix U and the multipliers necessary to construct L using ipvt, as defined in Function. See reference [38].

Error Conditions

Computational Errors
Note:
If the factorization performed by SGBF or DGBF failed due to a singular matrix argument, the results returned by this subroutine are unpredictable, and there may be a divide-by-zero program exception message.

Input-Argument Errors
  1. lda <= 0
  2. ml < 0
  3. ml >= n
  4. mu < 0
  5. mu >= n
  6. lda < 2ml+mu+16

Example

This example shows how to solve the system Ax = b, where general band matrix A is the same matrix factored in Example for SGBF and DGBF. The input for AGB and IPVT in this example is the same as the output for that example.

Call Statement and Input
           AGB  LDA   N   ML  MU  IPVT   BX
            |    |    |   |   |    |     |
CALL SGBS( AGB , 23 , 9 , 2 , 3 , IPVT , BX )

IPVT = (2, -65534, -131070, -196606, -262142, -327678, -327678,
-327680, -327680)
BX = (4.0000, 5.0000, 9.0000, 10.0000, 11.0000, 12.0000,
12.0000, 12.0000, 33.0000)
AGB = (same as output AGB in
Example)

Output
BX       =  (1.0000, 1.0000, 1.0000, 1.0000, 1.0000, 1.0000, 1.0000,
             0.9999, 1.0001)


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