!Written in Fall96 as an assignment solution for CPS615. !Author: Mike McMahon !------------------------------------------------------- !This program uses MPI to solve the heat equation over a rectangular !grid. The grid simulates a rectangular block of size 1 in. by 2 in. !The boundary conditions are found using the heat equation !supplied in an earlier homework, and the interior points set to -1. !The alogrithm used is the Gauss - Seidel SOR using the !red-black method. The overall structure of the program consists of ! 1) Update red sites ! 2) Communicate edge values (stored in EDGE array) ! 3) Update black sites using just calcutated reds ! 4) Communicate edge values again ! 5) Check tolerance (3.0e-6) ! 6) If tolerance is reached output # of iterations !The distribution used below is similar to a block by rows in HPF !This is easier to code than a checkerboard arrangement. Don't !worry, however, the code is almost 300 lines long. I did my !fair share. The number of iterations varies as omega (W) !is changed in the range of 1