The routine may be called by the names f04asf or nagf_linsys_withdraw_real_posdef_solve_1rhs.
Given a set of real linear equations , where is a symmetric positive definite matrix, f04asf first computes a Cholesky factorization of as where is lower triangular. An approximation to is found by forward and backward substitution. The residual vector is then calculated using additional precision and a correction to is found by solving . is then replaced by , and this iterative refinement of the solution is repeated until machine accuracy is obtained.
Wilkinson J H and Reinsch C (1971) Handbook for Automatic Computation II, Linear Algebra Springer–Verlag
1: – Real (Kind=nag_wp) arrayInput/Output
Note: the second dimension of the array a
must be at least
On entry: the upper triangle of the positive definite symmetric matrix . The elements of the array below the diagonal need not be set.
On exit: the elements of the array below the diagonal are overwritten; the upper triangle of is unchanged.
2: – IntegerInput
On entry: the first dimension of the array a as declared in the (sub)program from which f04asf is called.
3: – Real (Kind=nag_wp) arrayInput
Note: the dimension of the array b
must be at least
On entry: the right-hand side vector .
4: – IntegerInput
On entry: , the order of the matrix .
5: – Real (Kind=nag_wp) arrayOutput
On exit: the solution vector .
6: – Real (Kind=nag_wp) arrayWorkspace
7: – Real (Kind=nag_wp) arrayWorkspace
8: – 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).
Errors or warnings detected by the routine:
Matrix is not positive definite.
Matrix is too ill-conditioned; iterative refinement fails to improve the solution.
On entry, and .
On entry, .
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 computed solutions should be correct to full machine accuracy. For a detailed error analysis see page 39 of Wilkinson and Reinsch (1971).
8Parallelism and Performance
f04asf is threaded by NAG for parallel execution in multithreaded implementations of the NAG Library.
f04asf makes calls to BLAS and/or LAPACK routines, which may be threaded within the vendor library used by this implementation. Consult the documentation for the vendor library for further information.
Please consult the X06 Chapter Introduction for information on how to control and interrogate the OpenMP environment used within this routine. Please also consult the Users' Note for your implementation for any additional implementation-specific information.
The time taken by f04asf is approximately proportional to .
The routine must not be called with the same name for arguments b and c.
This example solves the set of linear equations where