IBM Books

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

DBSTRS--Symmetric Indefinite Matrix Multiple Right-Hand Side Solve

The DBSTRS subroutine solves a system of linear equations AX = B for X, where A is a real symmetric indefinite matrix, and X and B are real general matrices. This subroutine uses the results of the factorization of matrix A, produced by a preceding call to DBSTRF.

Table 99. Data Types

A, B ipvt Subroutine
Long-precision real Integer DBSTRS
Note:
The input to this solve subroutine must be the output from the factorization subroutine DBSTRF.

Syntax

Fortran CALL DBSTRS (uplo, n, nrhs, ap, ipvt, b, ldb, info)
C and C++ dbstrs (uplo, n, nrhs, ap, ipvt, b, ldb, info);
PL/I CALL DBSTRS (uplo, n, nrhs, ap, ipvt, b, ldb, info);

On Entry

uplo
indicates whether original matrix A is stored in upper- or lower-packed storage mode, where:

If uplo = 'U', A is stored in upper-packed storage mode.

If uplo = 'L', A is stored in lower-packed storage mode.

Specified as: a single character. It must be 'U' or 'L'.

n
is the order n of factored matrix A and the number of rows of matrix B.

Specified as: a fullword integer; n >= 0.

nrhs
is the number of right-hand sides; i.e., the number of columns of matrix B.

Specified as: a fullword integer; nrhs >= 0.

ap
is the factored matrix A produced by a preceding call to DBSTRF.

Specified as: a one-dimensional array of length nsinfo, containing numbers of the data type indicated in Table 99. See Notes and DBSTRF--Symmetric Indefinite Matrix Factorization.

ipvt
is an integer vector of length n, containing the pivot information necessary to construct the factored form of A, produced by a preceding call to DBSTRF..

Specified as: a one-dimensional array of (at least) length n, containing numbers of the data type indicated in Table 99. See Notes.

b
is the matrix B, containing the nrhs right-hand sides of the system. The right-hand sides, each of length n, reside in the columns of matrix B.

Specified as: an ldb by (at least) nrhs array, containing numbers of the data type indicated in Table 99.

ldb
is the leading dimension of the array specified for B.

Specified as: a fullword integer; ldb > 0 and ldb >= n.

info
See On Return.

On Return

b
is the matrix B, containing the nrhs solutions to the system in the columns of B.

Returned as: an ldb by (at least) nrhs array, containing numbers of the data type indicated in Table 99.

info
indicates the result of the computation.

Returned as: a fullword integer.

Notes
  1. This subroutine accepts lowercase letters for the uplo argument.
  2. In your C program, argument info must be passed by reference.
  3. The array data specified for input arguments ap and ipvt for this subroutine must be the same as the corresponding output arguments for DBSTRF.
  4. The scalar data specified for input arguments uplo and n must be the same as that specified for DBSTRF.
  5. The vectors and matrices used in this computation must have no common elements; otherwise, results are unpredictable. See Concepts.
  6. For a description of how a symmetric matrix is stored in upper- or lower-packed storage mode in an array, see Symmetric Matrix.
  7. To solve AX = B for X, where B and X are n by nrhs matrices, precede the call to DBSTRS with a call to DBSTRF.

Function

The system AX = B is solved for X, where A is a real symmetric indefinite matrix, and X and B are real general matrices. This subroutine uses the results of the factorization of matrix A, produced by a preceding call to DBSTRF.

If n or nrhs is 0, no computation is performed and the subroutine returns after doing some parameter checking.

See references [8] and [65].

Error Conditions

Resource Errors

None.

Computational Errors

None.

Note:
If the factorization performed by DBSTRF failed because matrix A is singular, the results returned by this subroutine are unpredictable, and there may be a divide-by-zero program exception message.

Input-Argument Errors
  1. uplo <> 'U' or 'L'
  2. n < 0
  3. nrhs < 0
  4. n > ldb
  5. ldb <= 0

Example 1

This example shows how to solve the system AX = B, for three right-hand sides, where matrix A is the same matrix factored in the Example 1 for DBSTRF.

Call Statement and Input
              UPLO  N   NRHS  AP  IPVT  B  LDB  INFO
               |    |    |     |   |    |   |     |
CALL DBSTRS ( 'L',  8,   3,   AP, IPVT, B,  8,  INFO )

AP = (for this subroutine must be the same
as the corresponding output argument for DBSTRF.
See Example 1 for DBSTRF.)
IPVT = (for this subroutine must be the same
as the corresponding output argument for DBSTRF.
See Example 1 for DBSTRF.)

        *                     *
        |   1.0  -38.0   47.0 |
        |   7.0  -10.0   73.0 |
        |   6.0   52.0    2.0 |
B    =  | -30.0 -228.0  -42.0 |
        |  32.0  183.0  105.0 |
        |  34.0  297.0    9.0 |
        |  32.0  244.0   44.0 |
        |  62.0  497.0   61.0 |
        *                     *

Output
        *                     *
        |   1.0    1.0    8.0 |
        |   1.0    2.0    7.0 |
        |   1.0    3.0    6.0 |
B    =  |   1.0    4.0    5.0 |
        |   1.0    5.0    4.0 |
        |   1.0    6.0    3.0 |
        |   1.0    7.0    2.0 |
        |   1.0    8.0    1.0 |
        *                     *

INFO = 0

Example 2

This example shows how to solve the system AX = B, for three right-hand sides, where matrix A is the same matrix factored in the Example 2 for DBSTRF.

Call Statement and Input
              UPLO  N   NRHS  AP  IPVT  B  LDB  INFO
               |    |    |     |   |    |   |     |
CALL DBSTRS ( 'U',  8,   3,   AP, IPVT, B,  8,  INFO )

AP =(for this subroutine must be the same
as the corresponding output argument for DBSTRF.
See Example 2 for DBSTRF.)
IPVT =(for this subroutine must be the same
as the corresponding output argument for DBSTRF.
See Example 2 for DBSTRF.)

        *                     *
        |  59.0   52.0  479.0 |
        |  30.0   38.0  232.0 |
        |  33.0   50.0  247.0 |
B    =  |  35.0  114.0  201.0 |
        | -28.0  -36.0 -216.0 |
        |   4.0   -4.0   40.0 |
        |  12.0   88.0   20.0 |
        |   4.0   56.0  -20.0 |
        *                     *

Output
        *                     *
        |   1.0    1.0    8.0 |
        |   1.0    2.0    7.0 |
        |   1.0    3.0    6.0 |
B    =  |   1.0    4.0    5.0 |
        |   1.0    5.0    4.0 |
        |   1.0    6.0    3.0 |
        |   1.0    7.0    2.0 |
        |   1.0    8.0    1.0 |
        *                     *

INFO = 0


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