public class QMR extends AbstractIterativeSolver
Ax = b
using the Quasi-Minimal Residual method. QMR uses two
preconditioners, and by default these are the same preconditioner.iter, M
Constructor and Description |
---|
QMR(Vector template)
Constructor for QMR.
|
QMR(Vector template,
Preconditioner M1,
Preconditioner M2)
Constructor for QMR.
|
Modifier and Type | Method and Description |
---|---|
void |
setPreconditioner(Preconditioner M)
Sets preconditioner
|
Vector |
solve(Matrix A,
Vector b,
Vector x)
Solves the given problem, writing result into the vector.
|
checkSizes, getIterationMonitor, getPreconditioner, setIterationMonitor
public QMR(Vector template)
template
- Vector to use as template for the work vectors needed in the
solution processpublic QMR(Vector template, Preconditioner M1, Preconditioner M2)
template
- Vector to use as template for the work vectors needed in the
solution processM1
- Left preconditionerM2
- Right preconditionerpublic Vector solve(Matrix A, Vector b, Vector x) throws IterativeSolverNotConvergedException
IterativeSolver
A
- Matrix of the problemb
- Right hand sidex
- Solution is stored here. Also used as initial guessIterativeSolverNotConvergedException
public void setPreconditioner(Preconditioner M)
IterativeSolver
setPreconditioner
in interface IterativeSolver
setPreconditioner
in class AbstractIterativeSolver
M
- Preconditioner to use