olzvr.blogg.se

Gauss seidel with relaxation python
Gauss seidel with relaxation python






gauss seidel with relaxation python

Rather, we leave it as Exercise 18 (next page) for the ambitious student or the challenging instructor.

gauss seidel with relaxation python gauss seidel with relaxation python

However, because this is quite a bit more complicated, we do not derive these expressions here. So optimal convergence is achieved by choosing a value of ω that minimizesĪs we did earlier for the Jacobi and Gauss-Seidel Methods, we can find the eigenvalues and eigenvectors for the 2 x 2 SOR Method B matrix. The iteration matrix B that determines convergence of the SOR Method is Notice that the SOR Method is also of the form x = B x +, so the general convergence analysis on page 6 also applies to the SOR Method, as does the more specific analysis on page 7 for the Jacobi and Gauss-Seidel Methods. Then collect the x ( k+1) terms on the left hand side to get We can multiply both sides by matrix D and divide both sides by ω to rewrite this as Notice that if ω = 1 then this is the Gauss-Seidel Method. The idea of the SOR Method is to iterateĪnd where generally 1 < ω < 2. As suggested above, it turns out that convergence x ( k) x of the sequence of approximate solutions to the true solution is often faster if we go beyond the standard Gauss-Seidel correction. Now think of this as the Gauss-Seidel correction ( x ( k+1) − x ( k)) GS. We can subtract x ( k) from both sides to get First, notice that we can write the Gauss-Seidel equation as Here is how we derive the SOR Method from the Gauss-Seidel Method.

gauss seidel with relaxation python

This direction is the vector x ( k+1) − x ( k), since x ( k+1) = x ( k) + ( x ( k+1) − x ( k)). If we assume that the direction from x ( k) to x ( k+1) is taking us closer, but not all the way, to the true solution x, then it would make sense to move in the same direction x ( k+1) − x ( k), but farther along that direction. Here is the idea:įor any iterative method, in finding x ( k+1) from x ( k), we move a certain amount in a particular direction from x ( k) to x ( k+1). A third iterative method, called the Successive Overrelaxation (SOR) Method, is a generalization of and improvement on the Gauss-Seidel Method.








Gauss seidel with relaxation python