[petsc-dev] sor smoothers
Barry Smith
bsmith at mcs.anl.gov
Mon Sep 9 14:09:46 CDT 2013
On Sep 9, 2013, at 10:43 AM, Jed Brown <jedbrown at mcs.anl.gov> wrote:
> "Mark F. Adams" <mfadams at lbl.gov> writes:
>>> PCMGSetResidual (if we continue to support it) should not modify the Mat
>>
>> I don't see how we can support this if we want to use MatResidual as
>> Barry has described. Certainly without adding a lot more ugly to the
>> code.
>
> PCMGResidualDefault would just call MatResidual instead MatMult, then VecAYPX.
>
> I don't have a deep problem with removing it, but I think it's
> unnecessary to remove it and is convenient if you aren't in control of
> creating the coarse level matrices. I'm thinking of defect correction
> schemes where you want the PCMG to be able to evaluate a high-order
> residual. You could do that by making Amat and Pmat different,
> implementing MatResidual on A, and propagating that through the levels,
> but I think PCMGSetResidual is more convenient for many.
I don't see the advantage of keeping the PCMGSetResidual. It seems to me that using the Amat to properly manage the different operator approximations is the clean right way to do it. Messing with shoving a random residual computer function seems prone to errors and confusion about what operator is what. So is there a particular case where using the hierarchy of Amat and Pmat won't work but PCMGSetResidual will?
More information about the petsc-dev
mailing list