- All Implemented Interfaces:
public class SuccessiveOverrelaxationSolver
- extends java.lang.Object
- implements IterativeLinearSystemSolver
The Successive Overrelaxation method (SOR), is devised by applying
extrapolation to the Gauss-Seidel method.
This extrapolation takes the form of a weighted average between the previous
iterate and the computed Gauss-Seidel iterate successively for each component.
If the weight ω is chosen optimally, SOR may converge faster than
the Gauss-Seidel method by an order of magnitude.
If the coefficient matrix A is symmetric positive definite, SOR is
guaranteed to converge for any value of ω between 0 and 2,
though the choice of ω can significantly affect the rate of
In principle, given the spectral radius ρ of the Jacobi iteration
matrix, one can determine a priori the theoretically optimal value of
ω for SOR:
ωopt = 2 / (1 + sqrt(1 - ρ2))
This is seldom done, since calculating the spectral radius of the Jacobi
matrix requires an impractical amount of computation. However, relatively
inexpensive rough estimates of ρ can yield reasonable estimates for
the optimal value of ω.
This implementation does not support preconditioning.
- See Also:
- Wikipedia: Successive over-relaxation method
|Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public SuccessiveOverrelaxationSolver(double omega,
- Construct a SOR solver with the extrapolation factor ω.
Usually, ω is chosen inside the interval (0, 2).
It is shown that SOR fails to converge if
ω is outside the interval (0, 2).
Technically, if ω is within (0, 1), the method becomes
If ω equals to 1, SOR simplifies to the
omega - the extrapolation factor
maxIteration - the maximum number of iterations
tolerance - the convergence threshold
public IterativeLinearSystemSolver.Solution solve(LSProblem problem)
public IterativeLinearSystemSolver.Solution solve(LSProblem problem,
- Description copied from interface:
- Solves iteratively
Ax = 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 interface
problem - a system of linear equations
monitor - an iteration monitor
- an (approximate) solution to the linear problem
ConvergenceFailure - if the algorithm fails to converge
Copyright © 2012 Numerical Method Inc. Ltd. All Rights Reserved.