f04mcf 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 f01mcf. Related systems may also be solved.
The routine may be called by the names f04mcf or nagf_linsys_real_posdef_vband_solve.
The normal use of this routine is the solution of the systems , following a call of f01mcf to determine the Cholesky factorization of the symmetric positive definite variable-bandwidth matrix .
However, the routine may be used to solve any one of the following systems of linear algebraic equations:
1. (usual system),
2. (lower triangular system),
3. (upper triangular system),
5. (unit lower triangular system),
6. (unit upper triangular system).
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. The width of the th row is the number of elements between the first nonzero element and the element on the diagonal inclusive.
Wilkinson J H and Reinsch C (1971) Handbook for Automatic Computation II, Linear Algebra Springer–Verlag
1: – IntegerInput
On entry: , the order of the matrix .
2: – Real (Kind=nag_wp) arrayInput
On entry: the elements within the envelope of the lower triangular matrix , taken in row by row order, as returned by f01mcf. The unit diagonal elements of must be stored explicitly.
3: – IntegerInput
On entry: the dimension of the array al as declared in the (sub)program from which f04mcf is called.
4: – Real (Kind=nag_wp) arrayInput
Note: the dimension of the array d
must be at least
if , and at least otherwise.
On entry: the diagonal elements of the diagonal matrix . d is not referenced if .
5: – Integer arrayInput
On entry: must contain the width of row of , i.e., the number of elements between the first (leftmost) nonzero element and the element on the diagonal, inclusive.
6: – IntegerInput
On entry: , the number of right-hand sides.
7: – Real (Kind=nag_wp) arrayInput
On entry: the right-hand side matrix . See also Section 9.
8: – IntegerInput
On entry: the first dimension of the array b as declared in the (sub)program from which f04mcf is called.
9: – IntegerInput
On entry: must specify the type of system to be solved, as follows:
, , , , or .
10: – Real (Kind=nag_wp) arrayOutput
On exit: the solution matrix . See also Section 9.
11: – IntegerInput
On entry: the first dimension of the array x as declared in the (sub)program from which f04mcf is called.
12: – IntegerInput/Output
On entry: ifail must be set to , or to set behaviour on detection of an error; these values have no effect when no error is detected.
A value of causes the printing of an error message and program execution will be halted; otherwise program execution continues. A value of means that an error message is printed while a value of means that it is not.
If halting is not appropriate, the value or is recommended. If message printing is undesirable, then the value is recommended. Otherwise, the value is recommended. When the value or is used it is essential to test the value of ifail on exit.
On exit: unless the routine detects an error or a warning has been flagged (see Section 6).
6Error Indicators and Warnings
If on entry or , explanatory error messages are output on the current error message unit (as defined by x04aaf).
An unexpected error has been triggered by this routine. Please
See Section 7 in the Introduction to the NAG Library FL Interface for further information.
Your licence key may have expired or may not have been installed correctly.
See Section 8 in the Introduction to the NAG Library FL Interface for further information.
Dynamic memory allocation failed.
See Section 9 in the Introduction to the NAG Library FL Interface for further information.
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)).
8Parallelism and Performance
f04mcf is not threaded in any implementation.
The time taken by f04mcf is approximately proportional to , where .
Unless otherwise stated in the Users' Note for your implementation, the routine 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. However this is not standard Fortran and may not work in all implementations.
This example solves the system of equations , where
Here is symmetric and positive definite and must first be factorized by f01mcf.