Class QMRSolver
java.lang.Object
org.ojalgo.matrix.task.iterative.IterativeSolverTask
org.ojalgo.matrix.task.iterative.QMRSolver
- All Implemented Interfaces:
MatrixTask<Double>, SolverTask<Double>
Quasi-Minimal Residual (QMR) solver for general nonsymmetric square systems.
This is a Java port of SciPy's qmr() reference implementation. It is almost a straight line-by-line translation from SciPy. Implemented here with right-preconditioning only (M1 = I, M2 != I), and using ojAlgo's dense MatrixStore operations for matrix–vector products with A and A^T.
Characteristics
- Operates on matrix–vector products with both A and A^T.
- Right-preconditioning is used; both forward and transpose applications of the preconditioner may be invoked.
- Stops when the residual norm is small relative to the RHS norm (or absolutely small when RHS is zero), or when the iteration limit is reached.
- For nonsymmetric or indefinite problems where SPD-specific methods are inapplicable.
- When a robust Krylov method is preferred over simple stationary iterations.
- If A^T is unavailable or too costly, consider alternatives that avoid explicit transpose products.
- Templates for the Solution of Linear Systems, Barrett et al., Figure 2.8.
- Freund invalid input: '&' Nachtigal (1991), QMR: a quasi-minimal residual method for non-Hermitian linear systems.
-
Nested Class Summary
Nested classes/interfaces inherited from class IterativeSolverTask
IterativeSolverTask.ConfiguratorNested classes/interfaces inherited from interface SolverTask
SolverTask.Factory<N> -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate R064Storeprivate R064Storeprivate R064Storeprivate R064Storeprivate R064Storeprivate R064Storeprivate R064Storeprivate R064Storeprivate R064Storeprivate R064StoreFields inherited from class IterativeSolverTask
DEFAULT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static voidprivate static voidaxpy(double alpha, R064Store x, Mutate1D.Modifiable<?> y) private static doubledoubleresolve(List<Equation> equations, PhysicalStore<Double> x) private static voidprivate static voidscaleInPlace(R064Store x, double alpha) Methods inherited from class IterativeSolverTask
configurator, debug, getAccuracyContext, getIterationsLimit, getPreconditioner, getRelaxationFactor, isDebugPrinterSet, preallocate, resolve, setAccuracyContext, setDebugPrinter, setIterationsLimit, setPreconditioner, setRelaxationFactor, solve, solve, toListOfRows, workerMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface SolverTask
preallocate, solve, toSolutionProvider
-
Field Details
-
r
-
vtilde
-
wtilde
-
v
-
z
-
p
-
q
-
ptilde
-
d
-
s
-
-
Constructor Details
-
QMRSolver
public QMRSolver()
-
-
Method Details
-
axpby
-
axpy
-
norm2
-
scaleCopy
-
scaleInPlace
-
resolve
- Specified by:
resolvein classIterativeSolverTask
-