AMG TEST IV: Three Dimensional Problem
We consider the linear finite element discretization of Poisson equation in three dimensions with Dirichlet boundary conditions and compare geometric multigrid and algebraic multigrid.
Contents
Conclusion
The algebraic multigrid is robust to the size of the matrix. The iteration steps increases slightly. The preformance is better on structure grids than unstructure grids. The sparsity of the coarse grid is increased.
Uniform Mesh: Geometric Multigrid
clear all option.solver = 'mg'; cubePoisson;
Time to assemble matrix equation 0.2 s Direct solver #dof: 729, #nnz: 2493, iter: , err = 3.6427e-16, time = 0.46 s No coarsening of the grid. Time to compute the error 0.17 s H1 err 2.6 L2err 0.21 Time to assemble matrix equation 0.4 s Multigrid V-cycle Preconditioner with Conjugate Gradient Method #dof: 4913, #nnz: 23813, iter: 10, err = 1.9593e-09, time = 0.84 s Time to compute the error 0.31 s H1 err 1.4 L2err 0.061 Time to assemble matrix equation 4.8 s Multigrid V-cycle Preconditioner with Conjugate Gradient Method #dof: 35937, #nnz: 208917, iter: 10, err = 5.1707e-09, time = 1.1 s Time to compute the error 2.5 s H1 err 0.69 L2err 0.016
Uniform Mesh: Algebraic Multigrid
clear all option.solver = 'amg'; cubePoisson;
Time to assemble matrix equation 0.22 s Multigrid W-cycle Preconditioner with Conjugate Gradient Method nnz/N: 6.14, level: 2, coarse grid 141, nnz/Nc 11.71 #dof: 343, iter: 9, err = 3.1527e-09, time = 0.122 s Time to compute the error 0.053 s H1 err 2.6 L2err 0.21 Time to assemble matrix equation 0.33 s Multigrid W-cycle Preconditioner with Conjugate Gradient Method nnz/N: 6.60, level: 2, coarse grid 1151, nnz/Nc 14.37 #dof: 3375, iter: 11, err = 2.4172e-09, time = 0.43 s Time to compute the error 0.19 s H1 err 1.4 L2err 0.061 Time to assemble matrix equation 3.9 s Multigrid W-cycle Preconditioner with Conjugate Gradient Method nnz/N: 6.81, level: 3, coarse grid 1752, nnz/Nc 26.91 #dof: 29791, iter: 12, err = 8.7948e-09, time = 8.33 s Time to compute the error 2.1 s H1 err 0.69 L2err 0.016
Unstructured Mesh
clear all; load oilpump; showboundary3(node,elem); option.solver = 'amg'; cubePoisson;
Time to assemble matrix equation 1.1 s Multigrid W-cycle Preconditioner with Conjugate Gradient Method nnz/N: 7.96, level: 2, coarse grid 877, nnz/Nc 9.81 #dof: 3392, iter: 12, err = 2.7210e-09, time = 0.94 s Time to compute the error 0.35 s H1 err 0.035 L2err 0.00034 Time to assemble matrix equation 6.2 s Multigrid W-cycle Preconditioner with Conjugate Gradient Method nnz/N: 12.35, level: 3, coarse grid 1875, nnz/Nc 19.39 #dof: 40121, iter: 16, err = 4.2506e-09, time = 6.5 s Time to compute the error 3.6 s H1 err 0.019 L2err 0.00014 Time to assemble matrix equation 93 s Multigrid W-cycle Preconditioner with Conjugate Gradient Method nnz/N: 13.85, level: 5, coarse grid 653, nnz/Nc 22.68 #dof: 373751, iter: 20, err = 6.9171e-09, time = 42.5 s Time to compute the error 47 s H1 err 0.01 L2err 4.6e-05