<div dir="ltr">Thank you Matt,<br><br><div>I'll read through the paper and see what I can map onto my problem.</div><div>The CPR method is also about isolating the pressure equation, so SIMPLE looks relevant.</div><div><br></div><div>Ozzy</div></div><br><div class="gmail_quote"><div dir="ltr">On Fri, 12 Jun 2015 at 04:54 Matthew Knepley <<a href="mailto:knepley@gmail.com">knepley@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, Jun 10, 2015 at 7:23 PM, Asbjørn Nilsen Riseth <span dir="ltr"><<a href="mailto:riseth@maths.ox.ac.uk" target="_blank">riseth@maths.ox.ac.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Hi Matt,</div><div><br></div>1) <span style="line-height:1.5;font-size:13.1999998092651px">K = </span><div><span style="line-height:1.5;font-size:13.1999998092651px">[               I                   0 ; </span></div><div><span style="line-height:1.5;font-size:13.1999998092651px">-A10*inv(diag(A00))     I  ]</span></div></div></blockquote><div><br></div></div></div></div><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div>Okay, it looks like this is some sort of weird approximate Schur complement. The right thing to</div><div>do I think is to get everything written out in linear algebra language, since I think you can just</div><div>use FieldSplit+PCComposite to do this from the command line. This one looks similar to SIMPLE.</div><div>The paper by Shuttleworth, Elman, Shadid, etc. does a nice job of this kind of classification. It</div><div>might help in the process.</div></div></div></div><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>There is a typo in my first email: S = Atilde11 = A11 - A10*inv(diag(A00))*A01<br><div><br></div></div><div>2) I'd like to have the linear solver close to what these people currently use. <span style="line-height:1.5;font-size:13.1999998092651px">My ultimate goal is to look at nonlinear solver strategies, not improve their linear solver. I already have a PC that seems to work fine for my purposes, but was hoping I could implement this version of CPR to get even closer to their current systems.</span></div></div></blockquote><div><br></div></div></div></div><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div>Okay.</div><div><br></div><div>   Matt</div></div></div></div><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><span style="line-height:1.5;font-size:13.1999998092651px">Ozzy</span></div></div><div><div><br><div class="gmail_quote"><div dir="ltr">On Thu, 11 Jun 2015 at 00:54 Matthew Knepley <<a href="mailto:knepley@gmail.com" target="_blank">knepley@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, Jun 10, 2015 at 6:30 PM, Asbjørn Nilsen Riseth <span dir="ltr"><<a href="mailto:riseth@maths.ox.ac.uk" target="_blank">riseth@maths.ox.ac.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Dear PETSc community,<div><br></div><div>I'm trying to implement a preconditioner used in reservoir modelling, called Constrained Pressure Residual. </div><div>They apply a transformation to the linearised system we get from each Newton step, before solving it. Then a 2-stage multiplicative preconditioner on the transformed system.</div></div></blockquote><div><br></div></div></div></div><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div>1) What is K?</div><div><br></div><div>2) Do you care about the 2-stage thing, or would any Stokes solver do?</div><div><br></div><div>  Thanks,</div><div><br></div><div>    Matt</div></div></div></div><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>The main problem is implementing step 1 below.</div><div><br></div><div>Let A be the Jacobian, b the residual and K my transformation. <br></div><div>A = [A00 A01; A10 A11].</div><div>The process is roughly like this:</div><div>1) Set Atilde = KA,  btilde = Kb. </div><div> - We want to solve Atilde x =  btilde</div><div><br></div><div>2) Create a 2-stage multiplicative preconditioner using Atilde, btilde</div><div>pc0: This is only applied to the "fieldsplit 1" block of my system.</div><div>B_1 = [0 0; 0 S^-1]</div><div>Where S is a selfp Schur approximation from Atilde</div><div>S =  Atilde11 - Atilde10 * inv(diag(Atilde00))* Atilde01</div><div>pc1: This is a standard ILU on the whole system Atilde</div><div><br></div><div>Currently I'm doing something like this</div><div>Step 1:</div><div>-ksp_type richardson -ksp_max_it 1</div><div>-pc_type python</div><div>Then I create Atilde from KA in PCSetup, and a FGMRES ksp to take care of step 2 with PCApply</div><div><br></div><div><div>Step 2:</div></div><div>pc_type composite </div><div>pc_composite_type multiplicative</div><div>pc_composite_pcs python,ilu,</div><div><br></div><div>Are there better ways of dealing with this transformation?</div><div>To me it looks similar to a 2-step right preconditioner on top of a left preconditioner. </div><div><br></div><div>Regards,</div><div>Ozzy</div></div>
</blockquote></div></div></div><div dir="ltr"><div class="gmail_extra"><br><br clear="all"><div><br></div>-- <br><div>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener</div>
</div></div></blockquote></div>
</div></div></blockquote></div></div></div><div dir="ltr"><div class="gmail_extra"><br><br clear="all"><div><br></div>-- <br><div>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener</div>
</div></div></blockquote></div>