Successive over-relaxation method - SOR
From CFD-Wiki
We seek the solution to set of linear equations:
For the given matrix A and vectors X and Q.
In matrix terms, the definition of the SOR method can be expressed as :
Where D,L and U represent the diagonal, lower triangular and upper triangular matrices of coefficient matrix A and k is iteration counter.
is extrapolation factor.
The pseudocode for the SOR algorithm:
Algorithm
- Chose an intital guess to the solution
- for k := 1 step 1 untill convergence do
- for i := 1 step until n do
-
- for j := 1 step until i-1 do
- end (j-loop)
- for j := i+1 step until n do
- end (j-loop)
-
- end (i-loop)
- check if convergence is reached
- for i := 1 step until n do
- end (k-loop)