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

Jed Brown jed at 59A2.org
Tue Dec 7 04:07:30 CST 2010


On Tue, Dec 7, 2010 at 07:42, Vijay S. Mahadevan <vijay.m at gmail.com> wrote:

> When I use PCMG as a preconditioner to solve a fine grid system using
> a linear solver, how do I set the interpolation to the linear system
> being solved. i.e., my preconditioner starts at max_levels and
> hierarchy proceeds to 0 (coarsest) and my linear system is technically
> at max_levels+1.
>

Set nlevels to whatever you want with PCMGSetLevels, then level=nlevels-1 is
the fine-level problem, you can set the pre-smoother on that level to PCNONE
if you want the "down" part of your cycle to skip it.


> I have a vector length incompatibility since I cannot
> seem to set the prolongation to go from max_levels to max_levels+1,
> where the linear solver subspace resides.
>

The finest level in PCMG should be the space that your KSP works in.  The
interpolation operator on that level maps from the next coarsest level, i.e.
MatInterpolate(level[n].restrict,level[n-1].x,level[n].x);


> I thought of adding the original fine grid problem to the PCMG levels
> (now max_levels=max_levels+1) but this by philosophy uses PCMG itself
> as a solver. Does it not ?
>

No, it's still a preconditioner.  "Multigrid as a solver" just means
"Richardson preconditioned by multigrid".

Jed
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20101207/0b025430/attachment.htm>


More information about the petsc-users mailing list