[petsc-users] Is PCMG a generic PC object ?

Dave May dave.mayhem23 at gmail.com
Fri Dec 3 03:44:49 CST 2010


Hey Vijay,
  PCMG is generic. If you provide the operators for each level, along
with the restriction and prolongation,
you can use PCMG. It doesn't need to know about the mesh.

You don't actually need to provide the coarse grid operators.
Given the fine grid operator and R and optionally P, you can use
Galerkin coarsening by calling
PCMGSetGalerkin() or via the command line arg -pc_mg_galerkin
Also, if you don't specify the prolongation, petsc will use P = R^T.


Cheers,
  Dave


On 3 December 2010 06:02, Vijay S. Mahadevan <vijay.m at gmail.com> wrote:
> Hi all,
>
> I was wondering whether the MG preconditioner object is generic enough
> to work out of the box like say ILU or SOR.  To elaborate on this, if
> I can provide the number of levels, restriction and prolongation
> operators for each level and the system operators along with vectors
> allocated for solution and rhs, would it work as a preconditioner for
> my given problem and a prescribed rhs at the finest level of PCMG. Or
> does it need some knowledge of the fine and coarser meshes to perform
> the MG operations correctly ?
>
> All the examples I've seen using MG in petsc involve the DA and DMMG
> objects and since I use my own mesh and corresponding discretization
> code for an elliptic system, I'm curious about this usage. It would
> not be terribly difficult to write my own framework to do a simple
> V-cycle with my existing framework but since petsc already provides
> this functionality along with different types of MG solves (with
> verified code!), I really want to use it for my system. Any help
> and/or pointers are welcome.
>
> Thanks,
> vijay
>


More information about the petsc-users mailing list