[petsc-users] Example for GAMG

Matthew Knepley knepley at gmail.com
Wed Jul 3 10:03:44 CDT 2013


On Wed, Jul 3, 2013 at 9:57 AM, Tabrez Ali <stali at geology.wisc.edu> wrote:

> Hello
>
> Is there a PETSc example that really demonstrates the advantage of using a
> multigrid solver (in that that the number of iterations are relatively
> constant as the problem size increases)?
>
> The command line options used to run it would also be helpful.
>

You can run both GMG and GAMG on any structured example to compare. For
example,

  ./ex5 -da_grid_x 21 -da_grid_y 21 -da_refine 6 -ksp_rtol 1.0e-9 -pc_type
mg -pc_mg_levels 4 -snes_monitor -snes_view

or

  ./ex5 -da_grid_x 21 -da_grid_y 21 -da_refine 6 -ksp_rtol 1.0e-9 -pc_type
gamg -snes_monitor -snes_view

and just adjust the da_refine to see the constant number of iterates. Same
thing in 3D

  ./ex48 -M 5 -N 5 -da_refine 5 -ksp_rtol 1.0e-9 -thi_mat_type baij
-pc_type mg -pc_mg_levels 4 -snes_monitor -snes_view -log_summary

I use these examples in my latest tutorial, which I will put up today.

   Matt


> Thanks in advance.
>
> Tabrez
>



-- 
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which their
experiments lead.
-- Norbert Wiener
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20130703/1d5ecdca/attachment-0001.html>


More information about the petsc-users mailing list