![]() ![]() #LnormInf corresponds to the absolute value of the greatest element of the vector. Print ("The solution vector in iteration", iter1, "is:", x) The Poisson Equation in Any Space Dimensions def sor_method(A, b, omega, initial_guess, tolerance, max_iterations): Though it can be applied to any matrix with non-zero elements on the diagonals. It is named after the German mathematicians Carl Friedrich Gauss and Philipp Ludwig von Seidel, and is similar to the Jacobi method. See section 3 on the paper The Optimal Relaxation Parameter for the SOR Method Applied to Gauss-Seidel Method (via wikipedia): also known as the Liebmann method or the method of successive displacement, is an iterative method used to solve a linear system of equations. Obviously, with higher omega values the number of iterations should decrease.Īs for a working algorithm on SOR this is what I have computed, where best convergence is reached when the optimal omega is used. Phi = sor_solver(A, b, omega, initial_guess, residual_convergence)įor an extended answer on omega and its uses please refer to my other answer SOR method as what is quoted below is not accurate. #An example case that mirrors the one in the Wikipedia article Here I have some python script, which solves the system of linear equations using Gauss-Seidel method: import numpy as np
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |