Basic HTML version of Foils prepared
8 November 1995
Foil 25 Pseudo Code for the Jacobi Method
From
CPS615 Module on Iterative PDE Solvers CPS615 Basic Simulation Track for Computational Science --
Fall Semester 95
.
by
Geoffrey C. Fox
Choose an Initial Guess x(0) to the solution x.
for k = 1,2, ......
for i = 1,2,...,n
s = 0
for j = 1,2, ... ,i-1,i+1,...,n
s = s + a i,j x j (k-1)
end
xi(k) = (bi - s)/a i,i
end
Check Convergence -- continue loop over k if required (e.g. maximum (over i) change |xi(k) -xi(k-1) | is too large)
end
©
on Tue Oct 28 1997