Class SymmetricSuccessiveOverrelaxationSolver
- java.lang.Object
-
- dev.nm.algebra.linear.matrix.doubles.matrixtype.sparse.solver.iterative.stationary.SymmetricSuccessiveOverrelaxationSolver
-
- All Implemented Interfaces:
IterativeLinearSystemSolver
public class SymmetricSuccessiveOverrelaxationSolver extends Object implements IterativeLinearSystemSolver
The Symmetric Successive Overrelaxation method (SSOR) is like SOR, but it performs in each iteration one forward sweep followed by one backward sweep. With an optimal value of ω, the convergence rate of SSOR is usually slower than that of SOR with an optimal ω. This implementation does not support preconditioning.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface dev.nm.algebra.linear.matrix.doubles.matrixtype.sparse.solver.iterative.IterativeLinearSystemSolver
IterativeLinearSystemSolver.Solution
-
-
Constructor Summary
Constructors Constructor Description SymmetricSuccessiveOverrelaxationSolver(double omega, int maxIteration, Tolerance tolerance)
Construct a SSOR solver with the extrapolation factor ω.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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.
-
-
-
Constructor Detail
-
SymmetricSuccessiveOverrelaxationSolver
public SymmetricSuccessiveOverrelaxationSolver(double omega, int maxIteration, Tolerance tolerance)
Construct a SSOR solver with the extrapolation factor ω.- Parameters:
omega
- the extrapolation factormaxIteration
- the maximum number of iterationstolerance
- the convergence threshold- See Also:
SuccessiveOverrelaxationSolver(double, int, dev.nm.misc.algorithm.iterative.tolerance.Tolerance)
-
-
Method Detail
-
solve
public IterativeLinearSystemSolver.Solution solve(LSProblem problem) throws ConvergenceFailure
- Throws:
ConvergenceFailure
-
solve
public IterativeLinearSystemSolver.Solution solve(LSProblem problem, IterationMonitor<Vector> monitor) throws ConvergenceFailure
Description copied from interface:IterativeLinearSystemSolver
Solves iterativelyAx = b
until the solution converges, i.e., the norm of residual (b - Ax) is less than or equal to the threshold.- Specified by:
solve
in interfaceIterativeLinearSystemSolver
- Parameters:
problem
- a system of linear equationsmonitor
- an iteration monitor- Returns:
- an (approximate) solution to the linear problem
- Throws:
ConvergenceFailure
- if the algorithm fails to converge
-
-