dmmg residuals and AMG

Barry Smith bsmith at mcs.anl.gov
Mon Dec 11 07:53:20 CST 2006



On Mon, 11 Dec 2006, Nicolas Bathfield wrote:

>  Hi,
> 
> I would like to compare PETSc DMMG convergence to some theoretical
> convergence rate given by local Fourier analysis for a simple diffusion
> problem.
> To do so, I need to extract the residuals after each multigrid iteration.
> Unfortunately, I only managed to obtain the residuals at the last iteration.
> Is it possible to get the residual printed out after each multigrid
> iteration without modifying the source code?

  Nicolas,

  -dmmg_ksp_monitor prints the residual after each V/W cycle. -pc_mg_monitor 
prints the residual norm before and after each smoothing step.

  BTW: always run with -ksp_view to see exactly what solver options
are being used. The defaults are non-standard (e.g. we default to having a 
Krylov solver turned on for each smoother and the V/W cycle). 


> 
> Furthermore, I'd like to test the AMG from the PC type from HYPRE
> (boomeramg). I have already ran --download-hypre while compiling petsc. Is
> there any example available somewhere?

  -pc_type hypre -pc_hypre_type boomeramg 

Run with -help to see the boomeramg options; again use -ksp_view we default
to accelerating boomeramg with GMRES which is non-standard. Use -ksp_type richardson
to get the usual V/W cycle.

  Good luck,

   Barry

Why the non-standard defaults? We want to provide a default MG that is as robust
(more likely to converge) as possible. Hence we turn on ILU(0) smoothing with GMRES
acceleration of the smoother and Krylov method. You can turn off these options one
at a time to see the effect on the convergence rate. For model problems the accelerators
only improve convergence a little. For more complex problems, for example src/snes/examples/tutorials/ex19.c 
convergence gets much worse without the accelerators.

> 
> Best regards,
> 
> Nicolas.
>  --
>  Nicolas BATHFIELD
>  Chalmers University of Technology
>  Shipping and Marine Technology
>  phone: +46 (0)31 772 1476
>  fax:   +46 (0)31 772 3699
> 
> 




More information about the petsc-users mailing list