GaussSeidel method
From CFDWiki
(Difference between revisions)
(fixed dot product notation) 

Line 1:  Line 1:  
We seek the solution to set of linear equations: <br>  We seek the solution to set of linear equations: <br>  
  :<math> A \  +  :<math> A \cdot X = Q </math> <br> 
For the given matrix '''A''' and vectors '''X''' and '''Q'''. <br>  For the given matrix '''A''' and vectors '''X''' and '''Q'''. <br> 
Revision as of 20:33, 15 December 2005
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 GaussSeidel 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.
The pseudocode for the GaussSeidel 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 i1 do
 end (jloop)
 for j := i+1 step until n do
 end (jloop)

 end (iloop)
 check if convergence is reached
 for i := 1 step until n do
 end (kloop)
Return to Numerical Methods