<div class="gmail_quote">On Thu, Mar 8, 2012 at 13:59, Abdul Hanan Sheikh <span dir="ltr">&lt;<a href="mailto:hanangul12@yahoo.co.uk">hanangul12@yahoo.co.uk</a>&gt;</span> wrote:<br><blockquote class="gmail_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> </div><blockquote class="gmail_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  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> </div><blockquote class="gmail_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  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>