<p>\bar C is up to you to define, so that's just notation.</p>
<p>You can tell PCMG to use your own residual if you want to do some crazy residual. Otherwise just use the matrix and preconditioning matrix to get the algorithm you want. Always look at -ksp_view to see what is going on.</p>
<div class="gmail_quote">On Jun 16, 2012 5:44 AM, "Abdul Hanan Sheikh" <<a href="mailto:hanangul12@yahoo.co.uk" target="_blank">hanangul12@yahoo.co.uk</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><div style="font-size:10pt;font-family:verdana,helvetica,sans-serif"><div>Dear , </div><div><br></div><div>Thanks for simplifiying. I got it well :D </div><div><br></div><div>I am still stuck there to implement <span style="font-size:10pt">Prec1 = \bar C b + (b - \bar A \bar C b). </span></div>
<div><span style="font-size:10pt">My interest is to get this "Prec" implemented in Petsc. </span></div><div><span style="font-size:10pt">I see this as a projection preconditioner. </span></div><div><span style="font-size:10pt"><br>
</span></div><div><span style="font-size:10pt">Starting with; PCMG on system Ax = b with no presmoothing, and Richardson as postmoothing serves </span></div><div><span style="font-size:10pt">as Prec = C + (I - AC) , (right ? ) . Now what should I do to get Prec1 = </span><span style="font-size:10pt">\bar C + (I - \bar
A \bar C ). </span></div><div><span style="font-size:10pt"><br></span></div><div><span style="font-size:10pt">thansk, Abdul</span></div><div><br></div><div><blockquote style="border-left:2px solid rgb(16,16,255);margin-left:5px;margin-top:5px;padding-left:5px">
<div style="font-size:10pt;font-family:verdana,helvetica,sans-serif"> <div style="font-size:12pt;font-family:'times new roman','new york',times,serif"> <div dir="ltr"> <font face="Arial"> <hr size="1"> <b><span style="font-weight:bold">From:</span></b> Jed Brown <<a href="mailto:jedbrown@mcs.anl.gov" target="_blank">jedbrown@mcs.anl.gov</a>><br>
<b><span style="font-weight:bold">To:</span></b> Abdul Hanan Sheikh <<a href="mailto:hanangul12@yahoo.co.uk" target="_blank">hanangul12@yahoo.co.uk</a>> <br><b><span style="font-weight:bold">Cc:</span></b> PETSc users list <<a href="mailto:petsc-users@mcs.anl.gov" target="_blank">petsc-users@mcs.anl.gov</a>> <br>
<b><span style="font-weight:bold">Sent:</span></b> Friday, 15 June 2012, 23:58<br> <b><span style="font-weight:bold">Subject:</span></b> Re:
[petsc-users] How to implement projection preconditioner?<br> </font> </div> <br><div>Let's get even simpler, suppose I start with<div><br></div><div>A x = b</div><div><br></div><div>The left-preconditioned form of this system is *not*</div>
<div><br></div><div>M^{-1} A x = b</div><div><br></div><div>it is</div>
<div><br></div><div>M^{-1} A x = M^{-1} b</div><div><br></div><div><br></div><div>Run that through your analysis and you'll find that what your asking for doesn't make sense. It often helps keep things straight if you consider that the residual and solution do not lie in the same space, in which case "no preconditioning" is the "trivial" map from the residual space back to the state space.<br>
<br><div>On Fri, Jun 15, 2012 at 3:07 PM, Abdul Hanan Sheikh <span dir="ltr"><<a rel="nofollow" href="mailto:hanangul12@yahoo.co.uk" target="_blank">hanangul12@yahoo.co.uk</a>></span> wrote:<br><blockquote style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><div style="font-size:10pt;font-family:verdana,helvetica,sans-serif">Thank you for reply! <br>I didnt get , what does it mean by applying the preconditioner to the right hand side, making it look just like a smoother ?<br>
<br>More simply, how can I implement Prec = \bar C b + (b - \bar A \bar C b)<br>where \bar C = P (M_H^-1 A_H)^-1 R<br>and \bar A = M^-1 A. <br><span style="font-weight:bold">Note: we know how to implement Prec = C b + (b - A C b). </span><br>
<br>Many thanks, Abdul <br><br><div><blockquote style="border-left:2px solid rgb(16,16,255);margin-left:5px;margin-top:5px;padding-left:5px"> <div style="font-size:10pt;font-family:verdana,helvetica,sans-serif"> <div style="font-size:12pt;font-family:'times new roman','new york',times,serif">
<div dir="ltr"> <font face="Arial"><div> <hr size="1"> <b><span style="font-weight:bold">From:</span></b> Jed Brown
<<a rel="nofollow" href="mailto:jedbrown@mcs.anl.gov" target="_blank">jedbrown@mcs.anl.gov</a>><br> <b><span style="font-weight:bold">To:</span></b> Abdul Hanan Sheikh <<a rel="nofollow" href="mailto:hanangul12@yahoo.co.uk" target="_blank">hanangul12@yahoo.co.uk</a>> <br>
</div><div><b><span style="font-weight:bold">Cc:</span></b> PETSc users list <<a rel="nofollow" href="mailto:petsc-users@mcs.anl.gov" target="_blank">petsc-users@mcs.anl.gov</a>> <br> </div><b><span style="font-weight:bold">Sent:</span></b> Friday, 15 June 2012, 21:36<div>
<br> <b><span style="font-weight:bold">Subject:</span></b> Re: [petsc-users] How to implement projection preconditioner?<br> </div></font> </div> <br><div><div><div><div>On Fri, Jun 15, 2012 at 2:23 PM, Abdul Hanan Sheikh <span dir="ltr"><<a rel="nofollow" href="mailto:hanangul12@yahoo.co.uk" target="_blank">hanangul12@yahoo.co.uk</a>></span> wrote:<br>
<blockquote style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="font-family:verdana,helvetica,sans-serif"><span>I recall my previous thread; copy and paste here, and then I try to ask: <br></span></div><div style="font-family:verdana,helvetica,sans-serif"><br></div><div style="font-weight:bold;font-family:verdana,helvetica,sans-serif">
Suppose C = P*A_H^{-1}*R is the coarse grid
solver. Then with a post-smoother S, application of the preconditioner
to the vector "b" would be C b + S (b - A C b). If we drop the
post-smoother by setting S = I, We get Prec = C b + b - A C b. Note that there is no presmoother. <br></div><div style="font-family:verdana,helvetica,sans-serif"><br></div><div style="font-family:verdana,helvetica,sans-serif">
This is the preconditioner I have used before, in PCMG framework, with no pre-smoothing and Richardson(without any preconditioner) as post smoother. </div><div style="font-family:verdana,helvetica,sans-serif"><br></div><div style="font-family:verdana,helvetica,sans-serif">
I need to apply the updated version of above Prec = C b + (b - A C b), where A is replaced by M^-1 A , and A_H by M_H^-1 A_H . <br></div></blockquote><div><br></div><div>With left preconditioning, you also have to apply the preconditioner to the right hand side, thus making it look just like a smoother.</div>
<div> </div><blockquote style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><font face="'courier new', monospace"><br style="font-family:verdana,helvetica,sans-serif">
<span style="font-family:verdana,helvetica,sans-serif">Now does it make sense :<br><br>1) incorporating M as only preconditioner in presmoother will replace A by M^-1 A in Prec = C b + (b - A C b) ?<br></span></font></div>
</blockquote><div><br></div><div>No, it uses the preconditioner the way that preconditioners work, see above.</div><div> </div><blockquote style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><font face="'courier new', monospace"><span style="font-family:verdana,helvetica,sans-serif">2)
incorporating M as preconditioner to CG-solver will replace A_H by (M_H^-1 A_H ) ? <span style="font-weight:bold">I am kinda of sure about this point 2.</span> </span></font></div></blockquote></div><br><div>C already contains A_H^{-1}. Replacing that by M_H^{-1} is an approximate coarse level solve (that's okay and seems to be what you want, just not what you have written, which is not a consistent method).</div>
</div><br><br> </div></div></div> </div> </blockquote></div> </div></div></blockquote></div><br></div>
</div><br><br> </div> </div> </blockquote></div> </div></div></blockquote></div>