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

Vijay S. Mahadevan vijay.m at gmail.com
Tue Dec 7 13:21:37 CST 2010


Jed, that worked perfectly. I had a hunch this is what's needed but
glad to see all issues resolved. Again, thanks for the help.

Vijay

On Tue, Dec 7, 2010 at 4:07 AM, Jed Brown <jed at 59a2.org> wrote:
> 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


More information about the petsc-users mailing list