Package no.uib.cipr.matrix.sparse
Interface IterativeSolver
- All Known Implementing Classes:
AbstractIterativeSolver,BiCG,BiCGstab,CG,CGS,Chebyshev,GMRES,IR,QMR
public interface IterativeSolver
Iterative linear solver. Solves
Ax=b for x,
and it supports preconditioning and convergence monitoring.-
Method Summary
Modifier and TypeMethodDescriptionGets the iteration monitorGets preconditionervoidSets iteration monitorvoidSets preconditionerSolves the given problem, writing result into the vector.
-
Method Details
-
solve
Solves the given problem, writing result into the vector.- Parameters:
A- Matrix of the problemb- Right hand sidex- Solution is stored here. Also used as initial guess- Returns:
- The solution vector x
- Throws:
IterativeSolverNotConvergedException
-
setPreconditioner
Sets preconditioner- Parameters:
M- Preconditioner to use
-
getPreconditioner
Preconditioner getPreconditioner()Gets preconditioner- Returns:
- Current preconditioner
-
setIterationMonitor
Sets iteration monitor- Parameters:
iter- Iteration monitor
-
getIterationMonitor
IterationMonitor getIterationMonitor()Gets the iteration monitor- Returns:
- Current iteration monitor
-