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