Math. 639
This project involves setting up a “variational” multigrid algorithm where the prolongation operators and the fine grid problem are given in CRS files.
What makes the algorithm variational is that we define the coarser matrices in the multigrid algorithm by the formula
(0.1) A i
−
1
= P i
A i
P i t
.
We shall use a v-cycle with one Gauss-Seidel smoothing before correction and one Gauss-Seidel smoothing (in the opposite direction) after correction.
On the coarsest grid (instead of an exact solve), we apply 20 Gauss-Seidel smoothings, alternating between forward and backward sweeps. Note that since we are smoothing on the coarsest grid, you will not need a direct solve in this assignment.
We shall consider 2,3,4,5,6,7 level problems. The corresponding (square) matrices A j
, j = 2 , 3 , . . . , 7 are given in CRS format in the following files:
(2) A
(3)
(4)
(5) A
(6) A
5 f
(7)
A
A
A
4 f
3 f
6 f
7 f
2 f
:= amatrix2 (97 unknowns).
:= amatrix3 (385 unknowns).
:= amatrix4 (1537 unknowns).
:= amatrix5 (6145 unknowns).
:= amatrix6 (6145 unknowns).
:= amatrix7 (98305 unknowns).
For each fine grid, you will need to build the coarser grid problems recursively from the fine grid problem. For example, the level 2 problem involves setting
A
2
= A f
2 and defining A
1
). For the level 3 problem, you set
A
3
= A f
3 and first define A
2
A
1 from
A
2
. For all grid level problems, you need to go down to the coarsest grid problem (25 unknowns) so that a level j problem involves j grids.
The corresponding prolongation operators are given in the CRS files:
(2) P
2
:= pmatrix2 (25 x 97).
(3) P
3
:= pmatrix3 (97 x 385).
(4) P
4
:= pmatrix4 (385 x 1537).
(5) P
5
:= pmatrix5 (1537 x 6145).
(6) P
6
:= pmatrix6 (6145 x 24577).
1
2
(7) P
7
:= pmatrix7 (24577 x 98305).
To help you debug the code, the coarse grid matrix obtained in two level problem is given in prodred . Note however that the indices are in c-convention, i.e., run from 0 to 24. In the FORTRAN or MATLAB convention, the indices run from 1 to 25. If you want MATLAB indexing, you need to add 1 to the row/column indices.
Compute and report the largest and smallest eigenvalue of the preconditioned system. If you use PCG to compute the eigenvalues, then make sure that you report the number of iterations. If you use the power method, then you should run enough iterations so that you are fairly confident that you have a pretty accurate answer (report the number of iterations used). Run PCG on the problem and report the number of iterations used to obtain a reduction of 10
−
6 in the A f j
-norm of the error where k v k
A f j
:= (( A f j v ) · v )
1 / 2
.
As usual, apply to the problem A f j x = 0 so that e l
= − x l
( x l is the l ’th iterate) and use a starting iterate of all one’s. Hand in your numerical results and a copy of your program by 12:00 noon,
Monday, May 5.
The above matrices come from discretizing the Laplace-Beltrami operator on a surface. The coarsest grid is pictured in Figure
and the Level 6 grid is pictured in Figure
An in depth discussion of the problem and the analysis of two multigrid algorithms for its solution can be found in Bonito-Pasciak .
3
−2 −1.5
−1 −0.5
0 0.5
1 1.5
2
Figure 1.
Coarse grid
4
−2 −1.5
−1 −0.5
0 0.5
1 1.5
2
Figure 2.
Level 6 grid