> Date: Fri, 17 Feb 2012 15:38:55 -0500 > From: Jed Brown <jedbrown at mcs.anl.gov> > Subject: Re: [petsc-users] petsc-users Digest, Vol 38, Issue 41 > To: PETSc users list <petsc-users at mcs.anl.gov> > Message-ID: > <CAM9tzSn+CaFbGRdRyc_bVQ8Wa1ACRn8LTRTg1EWxg0az9=YWEQ at mail.gmail.com> > Content-Type: text/plain; charset="utf-8" > > On Fri, Feb 17, 2012 at 14:09, <coco at dmi.unict.it> wrote: > >> Indeed I would like to solve the whole linear system by a multigrid >> approach and not by a lu factorization. Therefore I would like to use >> -ksp_type richardson -pc_type mg. >> In this case, the preconditioned problem P^(-1) (f-A x^n) is solved >> exactly or it performs just a V-cycle iteration? In both cases, since I am >> using a one-grid multigrid (just for debugging), it should anyway provide >> the exact solution at the first iteration, but it is not so. >> > > -pc_type mg with one level just applies a normal smoother. I've sometimes > thought it should do a coarse-level solve instead, but I haven't messed > with it. Barry, why doesn't it do a direct solve? >
This explains why the residual decreases so slowly: because it applies the smoother instead of the coarse solver. > In general -pc_type mg does one multigrid cycle (usually a V or W cycle). > If you want to use multiple iterations, you can > > -pc_type ksp -ksp_pc_type mg > > which would use the default KSP (GMRES) as an iteration, preconditioned by > multigrid. The "outer" problem will see the result of this converged > iterative solve. I've perfectly understood that. Thank you very much. Armando
