<html><body><div style="color:#000; background-color:#fff; font-family:verdana, helvetica, sans-serif;font-size:10pt"><span class="yui_3_2_0_19_1331236701186135" style="background-color:rgb(0,0,255);font-family:verdana, helvetica, sans-serif;"><span style="color:rgb(0,0,255);"><span style="background-color:rgb(255,255,255);">Dear, <br><br>I almost got you; and thus I got my preconditoner&nbsp; Prec = \lambda_max*C + (I - AC) .<br>Only question is : how to make S = I. S is my post_smoother in PCMG framwork and post_smoother<br>is a KSP_POST context with PC_POST ? <br>Does following choices make S =I; <br>KSP_POST =&gt; RICHARDSON<br>PC_POST =&gt; PCNONE <br><br>THANKS ALOT. <br><br>Abdul, <br></span></span></span><div>&nbsp;</div><br><div><span style="color:rgb(0, 0, 255);"><span style="font-family:verdana, helvetica, sans-serif;"><span style="font-family:lucida console, sans-serif;"></span></span></span><span style="color:rgb(0, 0, 255);"><span
 style="font-family:verdana, helvetica, sans-serif;"></span></span></div><div><br><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; margin-top: 5px; padding-left: 5px;">  <div style="font-family: verdana, helvetica, sans-serif; font-size: 10pt;"> <div style="font-family: times new roman, new york, times, serif; font-size: 12pt;"> <div dir="ltr"> <font size="2" face="Arial"> <hr size="1">  <b><span style="font-weight:bold;">From:</span></b> Jed Brown &lt;jedbrown@mcs.anl.gov&gt;<br> <b><span style="font-weight: bold;">To:</span></b> Abdul Hanan Sheikh &lt;hanangul12@yahoo.co.uk&gt; <br><b><span style="font-weight: bold;">Cc:</span></b> "petsc-users@mcs.anl.gov" &lt;petsc-users@mcs.anl.gov&gt; <br> <b><span style="font-weight: bold;">Sent:</span></b> Thursday, 8 March 2012, 21:09<br> <b><span style="font-weight: bold;">Subject:</span></b> Re: [petsc-users] Projection preconditioner as PCMG<br> </font> </div> <br><div
 id="yiv1016885289"><div class="yiv1016885289gmail_quote">On Thu, Mar 8, 2012 at 13:59, Abdul Hanan Sheikh <span dir="ltr">&lt;<a rel="nofollow" ymailto="mailto:hanangul12@yahoo.co.uk" target="_blank" href="mailto:hanangul12@yahoo.co.uk">hanangul12@yahoo.co.uk</a>&gt;</span> wrote:<br><blockquote class="yiv1016885289gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<span style="background-color:rgb(0,0,255);font-family:verdana, helvetica, sans-serif;"><span style="color:rgb(0,0,255);"><span style="background-color:rgb(255,255,255);">And last one is more appreciated; <br></span></span></span><span style="color:rgb(0,0,255);">-mg_levels_1_ksp_type cg can this be written in routine ? yes, with KSPSetType() but which ksp-context ? ksp_pre ? <br>
</span></blockquote><div><br></div><div>That is the command line option, see PCMGGetSmoother() or PCMGGetSmootherUp() to get the KSP for a level from code.</div><div>&nbsp;</div><blockquote class="yiv1016885289gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<span style="color:rgb(0,0,255);"><br>My Preconditioner: <br></span><span style="background-color:rgb(0,0,255);font-family:verdana, helvetica, sans-serif;"><span style="color:rgb(0,0,255);"><span style="background-color:rgb(255,255,255);">I&nbsp; need a preconditioner which read as: Prec = \lambda_max*C + (I - AC) , [C = CGC] where </span></span></span><span style="background-color:rgb(0,0,255);font-family:verdana, helvetica, sans-serif;"><span style="color:rgb(0,0,255);"><span style="background-color:rgb(255,255,255);">(I - AC) deflates spectrum to zero, <br>

and this part </span></span></span><span style="background-color:rgb(0,0,255);font-family:verdana, helvetica, sans-serif;"><span style="color:rgb(0,0,255);"><span style="background-color:rgb(255,255,255);">\lambda_max *C then shifts spectrum to \lambda_max (which is always 1 in my case) . <br>
</span></span></span></blockquote><div><br></div><div>You can always multiply preconditioners by a arbitrary constant, so multiply through by S = 1/\lambda_max to get the standard form</div><div><br></div><div>Prec = C + S(I - AC)</div>
<div>&nbsp;</div><blockquote class="yiv1016885289gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><span style="background-color:rgb(0,0,255);font-family:verdana, helvetica, sans-serif;"><span style="color:rgb(0,0,255);"><span style="background-color:rgb(255,255,255);">Dont I get my Prec by multiplicative combination of CGC with post smoother S = Identity&nbsp; using mg_type_</span></span></span><span style="background-color:rgb(0,0,255);font-family:verdana, helvetica, sans-serif;"><span style="color:rgb(0,0,255);"><span style="background-color:rgb(255,255,255);">multiplicative</span></span></span><span style="background-color:rgb(0,0,255);font-family:verdana, helvetica, sans-serif;"><span style="color:rgb(0,0,255);"><span style="background-color:rgb(255,255,255);"> ? </span></span></span></blockquote>
</div><br><div>If we put in S = I, we get my</div><div><br></div><div>Prec = C + I - AC</div><div><br></div><div>which is not equal to your stated</div><div><br></div><div>Prec = I - AC</div><div><br></div><div>unless C = 0 which would make Prec = I.</div>
</div><br><br> </div> </div> </blockquote></div>   </div></body></html>