[petsc-users] Richardson with multiplicative MG vs. full MG

John Fettig john.fettig at gmail.com
Mon Aug 13 15:41:28 CDT 2012


It appears the documentation for PCMG has this spelled wrong:

-pc_mg_type <additive,multiplicative,full,cascade> - multiplicative is
the default

John

On Mon, Aug 13, 2012 at 4:19 PM, Jed Brown <jedbrown at mcs.anl.gov> wrote:
> Shorthand for this is -pc_mg_type kaskade.
>
>
> On Mon, Aug 13, 2012 at 1:01 PM, John Fettig <john.fettig at gmail.com> wrote:
>>
>> Barry,
>>
>> Thank you for answering my question.  I have another one for you:  it
>> seems the special case of zero pre-smooths is somewhat non-trivial.
>> The best I can do is set the pre-smoother to Richardson with PCNONE
>> and zero as max_its. However, if you aren't careful in setting
>> KSPSetInitialGuessNonzero this can have unexpected results since the
>> generic KSPSolve will clobber your solution before it even tries a
>> convergence criteria (thus ruling out KSPPREONLY).  It also does a
>> couple of unnecessary residual calculations. Would it be reasonable to
>> put a zero-iteration special case in KSPSolve so that if you don't
>> want any iterations it doesn't actually do anything (no setup, no
>> preconditioner, no residual, no scaling, etc.)?
>>
>> Thanks,
>> John
>>
>> On Thu, Aug 9, 2012 at 6:37 PM, Barry Smith <bsmith at mcs.anl.gov> wrote:
>> >
>> >   John,
>> >
>> > On Aug 9, 2012, at 9:50 AM, John Fettig <john.fettig at gmail.com> wrote:
>> >
>> >> I am a little confused about what Richardson means.  If you use
>> >> multiplicative V-cycle multigrid with Richardson KSP (and no
>> >> convergence monitor), it sets the applyrichardson operator to
>> >> PCApplyRichardson_MG, which appears to just run V-cycles until
>> >> convergence.
>> >
>> >      Yes, this is correct.
>> >
>> >>  As far as I can tell, it doesn't ever update according
>> >> to the documented
>> >>
>> >> x^{n+1} = x^{n} + scale*B(b - A x^{n})
>> >>
>> >       In exact arithmetic it is actually "implicitly" doing exactly this
>> > update.  It is difficult to see why this is true generally (because B is
>> > rather complicated for multigrid) but if you consider only two levels with a
>> > direct solver on the coarse grid and SSOR as the pre and post smooth you can
>> > write out the formulas and map back and forth between the two forms.  The
>> > reason for the PCApplyRichardson_ forms is because they are a bit more
>> > efficient than  separating out the action of B and then doing the update as
>> > above.
>> >
>> >
>> >> If on the other hand you use full MG, it does update according to the
>> >> above formula.  This also happens if you set a convergence monitor.
>> >>
>> >> I can see how multiplicative V-cycle with Richardson is simply using
>> >> multigrid as a solver.  What I don't understand is how full MG with
>> >> Richardson is using multigrid as a solver, because it is using the
>> >> update formula above in between cycles..  Shouldn't there be a
>> >> applyrichardson for full multigrid as well?  If not, why?
>> >
>> >     I think there could be a applyRichardson for full multigrid but it
>> > would be kind of complicated and would not benefit much because the amount
>> > of work in a full multigrid step is much higher so the savings would be a
>> > much lower percentage than with V cycle.
>> >
>> >    Barry
>> >
>> >>
>> >> Thanks,
>> >> John
>> >
>
>


More information about the petsc-users mailing list