|
NAG[f07mhc] NAG[nag_dsyrfs] - Refined solution with error bounds of real symmetric indefinite system of linear equations, multiple right-hand sides
|
|
Calling Sequence
f07mhc(uplo, a, af, ipiv, b, x, ferr, berr, 'n'=n, 'nrhs'=nrhs, 'fail'=fail)
nag_dsyrfs(. . .)
Parameters
|
uplo - String;
|
|
|
On entry: indicates whether the upper or lower triangular part of is stored and how is to be factorized.
|
|
Constraint: "Nag_Upper" or "Nag_Lower". .
|
|
|
a - Matrix(1..dim1, 1..dim2, datatype=float[8], order=order);
|
|
|
Note: this array may be supplied in Fortran_order or C_order , as specified by order. All array parameters must use a consistent order.
|
|
|
af - Matrix(1..dim1, 1..dim2, datatype=float[8], order=order);
|
|
|
Note: this array may be supplied in Fortran_order or C_order , as specified by order. All array parameters must use a consistent order.
|
|
|
ipiv - Vector(1..dim, datatype=integer[kernelopts('wordsize')/8]);
|
|
|
Note: the dimension, dim, of the array ipiv must be at least .
|
|
On entry: details of the interchanges and the block structure of , as returned by f07mdc (nag_dsytrf).
|
|
|
b - Matrix(1..dim1, 1..dim2, datatype=float[8], order=order);
|
|
|
Note: this array may be supplied in Fortran_order or C_order , as specified by order. All array parameters must use a consistent order.
|
|
|
x - Matrix(1..dim1, 1..dim2, datatype=float[8], order=order);
|
|
|
Note: this array may be supplied in Fortran_order or C_order , as specified by order. All array parameters must use a consistent order.
|
|
On exit: the improved solution matrix .
|
|
|
ferr - Vector(1..dim, datatype=float[8]);
|
|
|
Note: the dimension, dim, of the array ferr must be at least .
|
|
|
berr - Vector(1..dim, datatype=float[8]);
|
|
|
Note: the dimension, dim, of the array berr must be at least .
|
|
|
'n'=n - integer; (optional)
|
|
|
Default value: the dimension of the array a.
|
|
On entry: , the order of the matrix .
|
|
Constraint: . .
|
|
|
'nrhs'=nrhs - integer; (optional)
|
|
|
Default value: the second dimension of the arrays b, x.
|
|
On entry: , the number of right-hand sides.
|
|
Constraint: . .
|
|
|
'fail'=fail - table; (optional)
|
|
|
The NAG error argument, see the documentation for NagError.
|
|
|
|
Description
|
|
|
Purpose
|
|
nag_dsyrfs (f07mhc) returns error bounds for the solution of a real symmetric indefinite system of linear equations with multiple right-hand sides, . It improves the solution by iterative refinement, in order to reduce the backward error as much as possible.
|
|
Error Indicators and Warnings
|
|
"NE_ALLOC_FAIL"
Dynamic memory allocation failed.
"NE_BAD_PARAM"
On entry, argument had an illegal value.
"NE_INT"
On entry, . Constraint: .
On entry, . Constraint: .
"NE_INTERNAL_ERROR"
An internal error has occurred in this function. Check the function call and any array sizes. If the call is correct then please consult NAG for assistance.
|
|
Accuracy
|
|
The bounds returned in ferr are not rigorous, because they are estimated, not computed exactly; but in practice they almost always overestimate the actual error.
|
|
Further Comments
|
|
For each right-hand side, computation of the backward error involves a minimum of floating-point operations. Each step of iterative refinement involves an additional operations. At most five steps of iterative refinement are performed, but usually only 1 or 2 steps are required.
Estimating the forward error involves solving a number of systems of linear equations of the form ; the number is usually 4 or 5 and never more than 11. Each solution involves approximately operations.
The complex analogues of this function are f07mvc (nag_zherfs) for Hermitian matrices and f07nvc (nag_zsyrfs) for symmetric matrices.
|
|
|
Examples
|
|
>
|
uplo := "Nag_Lower":
n := 4:
nrhs := 2:
a := Matrix([[2.07, 0, 0, 0], [3.87, -0.21, 0, 0], [4.2, 1.87, 1.15, 0], [-1.15, 0.63, 2.06, -1.81]], datatype=float[8], order='C_order'):
af := Matrix([[1.335954681697555, 0, 0, 0], [-0.6975109160126703, -1.905898246668038, 0, 0], [0.8273386982024001, 0.7403045011146071, 3.494530386740331, 0], [0.6353591160220995, -0.3480662983425414, -1.138121546961326, -1.81]], datatype=float[8], order='C_order'):
ipiv := Vector([1, 2, 3, 4], datatype=integer[kernelopts('wordsize')/8]):
b := Matrix([[-9.5, 27.85], [-8.380000000000001, 9.9], [-6.07, 19.25], [-0.96, 3.93]], datatype=float[8], order='C_order'):
x := Matrix([[-4.000000000000002, 0.999999999999998], [-1, 4], [2.000000000000002, 3.000000000000002], [5.000000000000004, 2.000000000000004]], datatype=float[8], order='C_order'):
ferr := Vector(2, datatype=float[8]):
berr := Vector(2, datatype=float[8]):
NAG:-f07mhc(uplo, a, af, ipiv, b, x, ferr, berr, 'n' = n, 'nrhs' = nrhs):
|
|
|