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

Vijay S. Mahadevan vijay.m at gmail.com
Fri Dec 3 13:20:54 CST 2010


> PETSc cannot magically create intermediate-level shell operators.  If you
> want to do everything matrix-free, then you have to provide everything that
> needs to be "smart": restriction/interpolation, smoothers, and residuals.

This is fine and I am more than happy to hand these to Petsc. I do
have the restriction/prolongation matrices explicitly but only the
operators are matrix-free for now. So if I start off with a
matrix-free PC operator, how exactly do I provide the shell matrix
operators for all the other levels ?

I do not see any routine to enable this and my conclusion is that
petsc does find it using the fine grid operator at hand using R^T*A*R
transformation. If this is the case for all levels, then it avalanches
into a lot of fine-grid matrix vector products. I hope this is not the
way it is done.

My other line of thinking is to directly manipulate the KSP/PC
operators at every level and replace them with the correct shell
matrices.

But I am not sure what is the recommended procedure here. All
comments/suggestions welcome.

Vijay

On Fri, Dec 3, 2010 at 12:34 PM, Jed Brown <jed at 59a2.org> wrote:
> On Fri, Dec 3, 2010 at 19:29, Vijay S. Mahadevan <vijay.m at gmail.com> wrote:
>>
>> Jed and Dave, thanks for the explanation. Now I do understand that the
>> MG PC is generic if I have restriction/prolongation operators for
>> every level. But I do not have the fine grid operator on hand
>> explicitly (only a shell matrix with MatMult) and technically all my
>> coarser grid operators will also be matrix-free. I was originally
>> planning to hand these shell matrices to petsc as the coarse
>> operators but can petsc do this by itself with only access to the fine
>> grid operator ?
>
> PETSc cannot magically create intermediate-level shell operators.  If you
> want to do everything matrix-free, then you have to provide everything that
> needs to be "smart": restriction/interpolation, smoothers, and residuals.
> Jed


More information about the petsc-users mailing list