NAG CL Interface
f04mcc (real_posdef_vband_solve)
1
Purpose
f04mcc computes the approximate solution of a system of real linear equations with multiple right-hand sides,
, where
is a symmetric positive definite variable-bandwidth matrix, which has previously been factorized by
f01mcc. Related systems may also be solved.
2
Specification
void |
f04mcc (Nag_SolveSystem selct,
Integer n,
Integer nrhs,
const double al[],
Integer lal,
const double d[],
const Integer row[],
const double b[],
Integer tdb,
double x[],
Integer tdx,
NagError *fail) |
|
The function may be called by the names: f04mcc, nag_linsys_real_posdef_vband_solve or nag_real_cholesky_skyline_solve.
3
Description
The normal use of
f04mcc is the solution of the systems
, following a call of
f01mcc to determine the Cholesky factorization
of the symmetric positive definite variable-bandwidth matrix
.
However, the function may be used to solve any one of the following systems of linear algebraic equations:
denotes a unit lower triangular variable-bandwidth matrix of order , a diagonal matrix of order , and a set of right-hand sides.
The matrix
is represented by the elements lying within its
envelope, i.e., between the first nonzero of each row and the diagonal (see
Section 10 for an example). The width
of the
th row is the number of elements between the first nonzero element and the element on the diagonal inclusive.
4
References
Wilkinson J H and Reinsch C (1971) Handbook for Automatic Computation II, Linear Algebra Springer–Verlag
5
Arguments
-
1:
– Nag_SolveSystem
Input
-
On entry:
selct must specify the type of system to be solved, as follows:
- if : solve ;
- if : solve ;
- if : solve ;
- if : solve ;
- if : solve ;
- if : solve .
Constraint:
, , , , or .
-
2:
– Integer
Input
-
On entry: , the order of the matrix .
Constraint:
.
-
3:
– Integer
Input
-
On entry: , the number of right-hand sides.
Constraint:
.
-
4:
– const double
Input
-
On entry: the elements within the envelope of the lower triangular matrix
, taken in row by row order, as returned by
f01mcc. The unit diagonal elements of
must be stored explicitly.
-
5:
– Integer
Input
-
On entry: the dimension of the array
al.
Constraint:
.
-
6:
– const double
Input
-
On entry: the diagonal elements of the diagonal matrix
.
d is not referenced if
,
or
-
7:
– const Integer
Input
-
On entry: must contain the width of row of , i.e., the number of elements between the first (left-most) nonzero element and the element on the diagonal, inclusive.
Constraint:
for .
-
8:
– const double
Input
-
Note: the th element of the matrix is stored in .
On entry: the
by
right-hand side matrix
. See also
Section 9.
-
9:
– Integer
Input
-
On entry: the stride separating matrix column elements in the array
b.
Constraint:
.
-
10:
– double
Output
-
Note: the th element of the matrix is stored in .
On exit: the
by
solution matrix
. See also
Section 9.
-
11:
– Integer
Input
-
On entry: the stride separating matrix column elements in the array
x.
Constraint:
.
-
12:
– NagError *
Input/Output
-
The NAG error argument (see
Section 7 in the Introduction to the NAG Library CL Interface).
6
Error Indicators and Warnings
- NE_2_INT_ARG_GT
-
On entry, while . These arguments must satisfy .
- NE_2_INT_ARG_LT
-
On entry, while . These arguments must satisfy .
On entry, while . These arguments must satisfy .
On entry, while . These arguments must satisfy .
- NE_BAD_PARAM
-
On entry, argument
selct had an illegal value.
- NE_INT_ARG_LT
-
On entry, .
Constraint: .
On entry, .
Constraint: .
On entry, must not be less than 1: .
- NE_NOT_UNIT_DIAG
-
The lower triangular matrix has at least one diagonal element which is not equal to unity. The first non-unit element has been located in the array .
- NE_ZERO_DIAG
-
The diagonal matrix is singular as it has at least one zero element. The first zero element has been located in the array .
7
Accuracy
The usual backward error analysis of the solution of triangular system applies: each computed solution vector is exact for slightly perturbed matrices
and
, as appropriate (see pages 25-27 and 54-55 of
Wilkinson and Reinsch (1971)).
8
Parallelism and Performance
f04mcc is not threaded in any implementation.
The time taken by f04mcc is approximately proportional to , where .
The function may be called with the same actual array supplied for the arguments
b and
x, in which case the solution matrix will overwrite the right-hand side matrix.
10
Example
To solve the system of equations
, where
Here
is symmetric and positive definite and must first be factorized by
f01mcc.
10.1
Program Text
10.2
Program Data
10.3
Program Results