Jacobi method
From CFDWiki
(Difference between revisions)
(towards a uniform notation for linear systems : A*Phi = B) 

Line 11:  Line 11:  
=== Algorithm ===  === Algorithm ===  
    
  : Chose an intital guess <math>  +  : Chose an intital guess <math>\Phi^{0}</math> to the solution <br> 
: for k := 1 step 1 untill convergence do <br>  : for k := 1 step 1 untill convergence do <br>  
:: for i := 1 step until n do <br>  :: for i := 1 step until n do <br> 
Revision as of 20:48, 15 December 2005
We seek the solution to set of linear equations:
In matrix terms, the definition of the Jacobi 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.
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 n do
 if j != i then
 end if
 if j != i then
 end (jloop)

 end (iloop)
 check if convergence is reached
 for i := 1 step until n do
 end (kloop)
Note: The major difference between the GaussSeidel method and Jacobi method lies in the fact that for Jacobi method the values of solution of previous iteration (here k) are used, where as in GaussSeidel method the latest available values of solution vector are used.
Return to Numerical Methods