The final grades
Yiping Zhan's heatLocal.c
Yiping Zhan's heatFast.c
The statistics page
Good luck and have a good Spring Break.
To simplify the implementation, I decided not to check the first N_STEPS and the last N_STEPS elements of the grid for correctness. This should eliminate some of the problems with the boundary, the start and the end of the grid. I updated the driver file accordingly. You can obtain the new files by typing "get L4" after deleting your L4 directory. Do not forget to save your work before deleting your L4 directory. The command "get L4" will overwrite your work, so copy your work before executing the get command. I did this update on Monday March 26, 11:50am, so if you have not retrieved L4 files by that time you are fine.
Do the first part first, and the second part second. Your algorithm for the second part may do wonders for the first part as well. We divided the problem into two parts so that you can solve the problem progressively.
To test your implementation, you can change the "initGrids" function that fills the grid with random floating point numbers so that it now fills the grid with simpler numbers such as 1's or 2's or 1,2,3... Then you can set the "N_STEPS" in defs.h to a single digit number, for example 2 will work fine, and use print statements to see what is going on. Note that print statements are printed on the screen through a buffer and print statements are not effective to track down a problem such as segmentation fault -- the buffer may not get flushed before your program dies.
Back to CS213 home page.