
Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!

Implement in double precision the Gauss-Seidel, SOR, Chebyshev and CG methods for coding the two dimensional Poisson’s Problem with known solution to uxx(x, y) + uyy(x, y) = f (x, y) on the unit square [0, 1]^2 equal to u(x, y) = 128 · x(1 − x)y(1 − y).
First, determine function f (x, y) that corresponds to the above solution. Next, test your code for n = 10, 100 , 1000 (or possibly higher if you dare!). Then compare computed solution ˜u to the exact solution u. You should terminate when u and ˜u satisfy ||u˜ − u||∞ ≤ ǫ for small ǫ > 0 appropriately chosen, as discussed in class.
We recall that optimal ω for SOR equals
1 + sin (^) n+1π
Successful submissions will
max i,j=1,...,n |˜u(xi, yj ) − u(xi, yj )|
where xi = i · h, yi = j · h, h = 1/(n + 1).
Method #-Iter (10) CPU-T (10) #-Iter (100) CPU-T (100) #-Iter (1000) CPU-T (1000) G-S SOR Chebyshev CG