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
1
Choose an Initial Guess x(0) to the solution x.
2
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
3
Check Convergence -- continue loop over k if required (e.g. maximum (over i) change |xi(k) -xi(k-1) | is too large)
4
end
in Table To:
©
on Tue Oct 28 1997