|
NAG[f07bhc] NAG[nag_dgbrfs] - Refined solution with error bounds of real band system of linear equations, multiple right-hand sides
|
|
Calling Sequence
f07bhc(trans, kl, ku, nrhs, ab, afb, ipiv, b, x, ferr, berr, 'n'=n, 'fail'=fail)
nag_dgbrfs(. . .)
Parameters
|
trans - String;
|
|
|
On entry: indicates the form of the linear equations for which is the computed solution.
|
|
The linear equations are of the form .
|
|
Constraint: "Nag_NoTrans", "Nag_Trans" or "Nag_ConjTrans". .
|
|
|
kl - integer;
|
|
|
On entry: , the number of subdiagonals within the band of the matrix .
|
|
Constraint: . .
|
|
|
ku - integer;
|
|
|
On entry: , the number of superdiagonals within the band of the matrix .
|
|
Constraint: . .
|
|
|
nrhs - integer;
|
|
|
On entry: , the number of right-hand sides.
|
|
Constraint: . .
|
|
|
ab - 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.
|
|
|
afb - 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 .
|
|
|
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 second dimension of the array ab.
|
|
On entry: , the order of the matrix .
|
|
Constraint: . .
|
|
|
'fail'=fail - table; (optional)
|
|
|
The NAG error argument, see the documentation for NagError.
|
|
|
|
Description
|
|
|
Purpose
|
|
nag_dgbrfs (f07bhc) returns error bounds for the solution of a real band system of linear equations with multiple right-hand sides, or . 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: .
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.
|
|
|
Examples
|
|
>
|
trans := "Nag_NoTrans":
n := 4:
kl := 1:
ku := 2:
nrhs := 2:
ab := Matrix([[0, -0.23, 2.54, -3.66], [-6.98, 2.46, -2.73, -2.13], [2.56, 2.46, 4.07, 0], [-4.78, -3.82, 0, 0]], datatype=float[8], order='C_order'):
afb := Matrix([[0, -6.98, 2.46, -2.73, -2.13], [0.0329512893982808, 2.56, 2.46, 4.07, 0], [0.9605233703438396, -5.932930470988539, -3.839143870881089, 0, 0], [0.8056726812110376, -0.7269066639923109, 0, 0, 0]], datatype=float[8], order='C_order'):
ipiv := Vector([2, 3, 3, 4], datatype=integer[kernelopts('wordsize')/8]):
b := Matrix([[4.42, -36.01], [27.13, -31.67], [-6.14, -1.16], [10.5, -25.82]], datatype=float[8], order='C_order'):
x := Matrix([[-1.999999999999998, 1.000000000000002], [3.000000000000004, -3.999999999999994], [1.000000000000003, 7.000000000000005], [-4.000000000000004, -2.000000000000006]], datatype=float[8], order='C_order'):
ferr := Vector(2, datatype=float[8]):
berr := Vector(2, datatype=float[8]):
NAG:-f07bhc(trans, kl, ku, nrhs, ab, afb, ipiv, b, x, ferr, berr, 'n' = n):
|
|
|