The routine may be called by the names f11mff or nagf_sparse_direct_real_gen_solve.
3Description
f11mff solves a real system of linear equations with multiple right-hand sides or , according to the value of the argument trans, where the matrix factorization corresponds to an
decomposition of a sparse matrix stored in compressed column (Harwell–Boeing) format, as computed by f11mef.
In the above decomposition is a lower triangular sparse matrix with unit diagonal elements and is an upper triangular sparse matrix; and are permutation matrices.
4References
None.
5Arguments
1: – Character(1)Input
On entry: specifies whether or is solved.
is solved.
is solved.
Constraint:
or .
2: – IntegerInput
On entry: , the order of the matrix .
Constraint:
.
3: – Integer arrayInput
On entry: the column permutation which defines , the row permutation which defines , plus associated data structures as computed by f11mef.
4: – Integer arrayInput
Note: the dimension of the array il
must be at least
as large as the dimension of the array of the same name in f11mef.
On entry: records the sparsity pattern of matrix as computed by f11mef.
5: – Real (Kind=nag_wp) arrayInput
Note: the dimension of the array lval
must be at least
as large as the dimension of the array of the same name in f11mef.
On entry: records the nonzero values of matrix and some nonzero values of matrix as computed by f11mef.
6: – Integer arrayInput
Note: the dimension of the array iu
must be at least
as large as the dimension of the array of the same name in f11mef.
On entry: records the sparsity pattern of matrix as computed by f11mef.
7: – Real (Kind=nag_wp) arrayInput
Note: the dimension of the array uval
must be at least
as large as the dimension of the array of the same name in f11mef.
On entry: records some nonzero values of matrix as computed by f11mef.
8: – IntegerInput
On entry: , the number of right-hand sides in .
Constraint:
.
9: – Real (Kind=nag_wp) arrayInput/Output
Note: the second dimension of the array b
must be at least
.
On entry: the right-hand side matrix .
On exit: the solution matrix .
10: – IntegerInput
On entry: the first dimension of the array b as declared in the (sub)program from which f11mff is called.
Constraint:
.
11: – 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
contact NAG.
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.
7Accuracy
For each right-hand side vector , the computed solution is the exact solution of a perturbed system of equations , where
is a modest linear function of , and is the machine precision, when partial pivoting is used.
If is the true solution, then the computed solution satisfies a forward error bound of the form
where
.
Note that can be much smaller than , and can be much larger (or smaller) than .
Forward and backward error bounds can be computed by calling f11mhf, and an estimate for can be obtained by calling f11mgf.
8Parallelism and Performance
Background information to multithreading can be found in the Multithreading documentation.
f11mff is threaded by NAG for parallel execution in multithreaded implementations of the NAG Library.
f11mff 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.
9Further Comments
f11mff may be followed by a call to f11mhf to refine the solution and return an error estimate.
10Example
This example solves the system of equations , where
Here is nonsymmetric and must first be factorized by f11mef.