public class GeneralizedMinimalResidualSolver extends Object implements IterativeLinearSystemSolver
IterativeLinearSystemSolver.Solution
Constructor and Description |
---|
GeneralizedMinimalResidualSolver(int m,
int maxIteration,
Tolerance tolerance)
Construct a GMRES solver with restarts.
|
GeneralizedMinimalResidualSolver(int maxIteration,
Tolerance tolerance)
Construct a full GMRES solver.
|
GeneralizedMinimalResidualSolver(PreconditionerFactory leftPreconditionerFactory,
int m,
int maxIteration,
Tolerance tolerance)
Construct a GMRES solver with restarts.
|
Modifier and Type | Method and Description |
---|---|
IterativeLinearSystemSolver.Solution |
solve(LSProblem problem) |
IterativeLinearSystemSolver.Solution |
solve(LSProblem problem,
IterationMonitor<Vector> monitor)
Solves iteratively
Ax = b
until the solution converges, i.e., the norm of residual
(b - Ax) is less than or equal to the threshold.
|
public GeneralizedMinimalResidualSolver(PreconditionerFactory leftPreconditionerFactory, int m, int maxIteration, Tolerance tolerance)
leftPreconditionerFactory
- constructs a new left preconditionerm
- the solver restarts every m
iterations;
Practically, as m
increases, the computational
cost increases at least by O(m2)n because of the
Gram-Schmidt orthogonalization. The memory cost increases by O(mn).maxIteration
- the maximum number of iterationstolerance
- the convergence thresholdpublic GeneralizedMinimalResidualSolver(int m, int maxIteration, Tolerance tolerance)
m
- the solver restarts every m
iterations;
Practically, as m
increases, the computational
cost increases at least by O(m2)n because of the
Gram-Schmidt orthogonalization. The memory cost increases by O(mn).maxIteration
- the maximum number of iterationstolerance
- the convergence thresholdpublic GeneralizedMinimalResidualSolver(int maxIteration, Tolerance tolerance)
maxIteration
- the maximum number of iterationstolerance
- the convergence thresholdpublic IterativeLinearSystemSolver.Solution solve(LSProblem problem) throws ConvergenceFailure
ConvergenceFailure
public IterativeLinearSystemSolver.Solution solve(LSProblem problem, IterationMonitor<Vector> monitor) throws ConvergenceFailure
IterativeLinearSystemSolver
Ax = buntil the solution converges, i.e., the norm of residual (b - Ax) is less than or equal to the threshold.
solve
in interface IterativeLinearSystemSolver
problem
- a system of linear equationsmonitor
- an iteration monitorConvergenceFailure
- if the algorithm fails to convergeCopyright © 2010-2020 NM FinTech Ltd.. All Rights Reserved.