GS510

Assignment 4 -- Fall 2000


Consider the (Laplace) Finite Difference Equation:

N is a parameter that sets the number of points in the difference grid.

The exact solution to this FDE system is:

In this assignment you will test the following iterative methods to approximate the solution of the above FDE system:

  1. Jacobi's Method
  2. Gauss-Seidel Method
  3. Optimal SOR (optimal SOR parameter given below)
  4. Red Black
  5. Optimal SOR Red Black

Problem 1.

Beginning with the sample codes jacobi.c, and red_black.c, develop codes for

Develop with N = 51 and write your code so that:

a) every 10 iterations, it writes the residual and error of maximum absolute value.

b) there is a hard upper limit on the total number of iterations

c) the iterations terminate when the error of maximum absolute value is less than .005.

When your codes are running,

and use your codes to fill in Table 1. Based on your last assignment, use what you believe to be the best set of compiler flags.
Method CPU Time Megaflops
Jacobi
Gauss-Seidel
Optimal SOR
Red-Black
Optimal Red-Black SOR