Too many possibilities for trouble with a write-your-own Multigrid homework, so I'm just going to ask you to run some tests on an existing multigrid test program. The Fortran 77 program is described in a simple README file and consists of a main source file and one include file. If you are using a Unix platform, a Makefile is also available. If you are working from a Windows PC, try this executable before going to the trouble to build a code.
The program asks a long list of questions, given below along with the answers that you should give.
GAUSS-SIEDEL/MG - v4.0 - 08/01/97
Problem size (finest grid) = 129 x 129
Which smoother to use? (1=Point, 2=Line)
Use Red/Black? (0=NO, 1=YES)
Save residuals to file? (0=NO, 1=YES)
Which acceleration to use? (0=SOR, 1=MG)
***** USING MG! ******
Information on grid residuals? (0=NO, 1=YES)
How many grids to use? (1- 10)?
2 , 4, and 6
Starting grid? (1=finest, 2=coarsest)
1 and 2
If above answer is 2 then you will be asked:
Initial MG cycle? (direct=1, FMV=2)
Main MG cycle? (V=1,W=2)
1 and 2
This means that you will be making 12 runs, using 2, 4, and 6 grids, with variations to start from the coarsest and finest grids, and to test both V and W cycles. Provide me with plots of the log of residual vs. iteration number for each of the runs, in a format that is clearly labeled and clearly displays the relative behavior of all choices. Look for a file called "resid.txt" after each run. Also construct a table covering all 12 runs that lists the execution time for the run in seconds (last line of the screen output), and the "Equiv. n# of iterations on the finest grid". Based on this table, which selection of number of grids, starting point and Multigrid cycle type appears to be the most efficient for this problem.
If your computer is relatively slow, you may need to cut the number of times that the matrix problem is solved. At the moment mgsor.f loops over the same problem 50 times to provide good timing statistics. You can search on the pattern "50" and try replacing it with "10" in the following lines:
D:\html\ME540\homework\hw6\mgsor.f(91): DO itest = 1,50
D:\html\ME540\homework\hw6\mgsor.f(353): print *,'Timing is an average of 50 Solutions'
If you have some time to kill try replacing "50" with "1" then selecting SOR as your acceleration method, set the SOR factor to 1 and watch it iterate. It finally converges after 30,000+ iterations.
Use resources on www.lias.psu.edu to locate a Journal article
published after June 2003, discussing some use of V cycle
Multigrid. Write a
one paragraph summary of the article including a full reference to the
article, and leave it with the results of Part A in the ANGEL drop
box for this homework.