Consider the (Laplace) Finite Difference Equation:
-Ui-1,j - Ui,j-1 + 4Ui,j - Ui+1,j - Ui,j+1 = 0 for i,j = 1,2, ... N-2
To begin, take N = 12.
Let xi = 1/(N+1) = yj and set the boundary cells
(i = 0, i = N-1 for j = 0,...,N-1 and
j = 0, j=N-1 for i = 0,...,N-1) to the values consistent with the exact
solution
Eij = (xi)2 - (yj)2
On the interior cells, initialize the numerical solution to be zero.
1. Use the example MPI code as a starting point to construct a four process Jacobi iteration method that terminates when the maximum difference between the numerical solution and the exact solution is less that .0005.
2. Replace N by 144 in your code and use calls to MPI_WTIME()
to determine the megaflop rate of your four processor Jacobi method on
the grid with N = 144.