public class GMRES extends AbstractIterativeSolver
Ax = b
using the Generalized Minimum Residual method. The GMRES iteration is
restarted after a given number of iterations. By default it is restarted
after 30 iterations.iter, M
Constructor and Description |
---|
GMRES(Vector template)
Constructor for GMRES.
|
GMRES(Vector template,
int restart)
Constructor for GMRES.
|
Modifier and Type | Method and Description |
---|---|
void |
setRestart(int restart)
Sets the restart parameter
|
Vector |
solve(Matrix A,
Vector b,
Vector x)
Solves the given problem, writing result into the vector.
|
checkSizes, getIterationMonitor, getPreconditioner, setIterationMonitor, setPreconditioner
public GMRES(Vector template)
template
- Vector to use as template for the work vectors needed in the
solution processpublic GMRES(Vector template, int restart)
template
- Vector to use as template for the work vectors needed in the
solution processrestart
- GMRES iteration is restarted after this number of iterationspublic void setRestart(int restart)
restart
- GMRES iteration is restarted after this number of iterationspublic 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