<div dir="ltr"><div dir="ltr">On Sun, Jun 25, 2023 at 9:21 AM Edoardo alinovi <<a href="mailto:edoardo.alinovi@gmail.com">edoardo.alinovi@gmail.com</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hello petsc's friends<div><br></div><div>I have a curiosity about a sentence in the user guide about CPR preconditioner:</div><div><i><br></i></div><div><i>"</i><i><span style="color:rgb(50,50,50);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Helvetica Neue",Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";font-size:15px">The Constrained Pressure Preconditioner (CPR) can be implemented using </span><code style="box-sizing:border-box;font-size:13.125px;border-radius:0.25rem;padding:0.1rem 0.25rem"><span style="box-sizing:border-box"><a href="https://petsc.org/release/manualpages/PC/PCCOMPOSITE/" style="box-sizing:border-box;background-color:transparent;text-decoration-line:none" target="_blank">PCCOMPOSITE</a></span></code><span style="color:rgb(50,50,50);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Helvetica Neue",Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";font-size:15px"> with </span><code style="box-sizing:border-box;font-size:13.125px;border-radius:0.25rem;padding:0.1rem 0.25rem"><span style="box-sizing:border-box"><a href="https://petsc.org/release/manualpages/PC/PCGALERKIN/" style="box-sizing:border-box;background-color:transparent;text-decoration-line:none" target="_blank">PCGALERKIN</a></span></code><span style="color:rgb(50,50,50);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Helvetica Neue",Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";font-size:15px">. CPR first solves an </span></i></div><div><i><span style="box-sizing:border-box;display:inline-flex;max-width:100%;overflow:hidden;color:rgb(50,50,50);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Helvetica Neue",Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";font-size:15px"><span style="box-sizing:border-box"><span style="box-sizing:border-box;font-variant-numeric:normal;font-variant-east-asian:normal;font-variant-alternates:normal;font-kerning:auto;font-feature-settings:normal;font-stretch:normal;font-size:1.21em;line-height:1.2;font-family:KaTeX_Main,"Times New Roman",serif"><span style="box-sizing:border-box;border:0px;height:1px;overflow:hidden;padding:0px;width:1px"></span><span aria-hidden="true" style="box-sizing:border-box;border-color:currentcolor"><span style="box-sizing:border-box;border-color:currentcolor;width:min-content;display:inline-block"><span style="box-sizing:border-box;border-color:currentcolor;display:inline-block;height:0.6833em"></span><span style="box-sizing:border-box;border-color:currentcolor;font-family:KaTeX_Math;margin-right:0.0077em">R</span><span style="box-sizing:border-box;border-color:currentcolor;font-family:KaTeX_Math">A</span><span style="box-sizing:border-box;border-color:currentcolor;font-family:KaTeX_Math;margin-right:0.1389em">P</span></span></span></span></span></span><span style="color:rgb(50,50,50);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Helvetica Neue",Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";font-size:15px"> subsystem, updates the residual on all variables (</span><code style="box-sizing:border-box;font-size:13.125px;border-radius:0.25rem;padding:0.1rem 0.25rem"><span style="box-sizing:border-box"><a href="https://petsc.org/release/manualpages/PC/PCCompositeSetType/" style="box-sizing:border-box;background-color:transparent;text-decoration-line:none" target="_blank">PCCompositeSetType</a>(pc,<a href="https://petsc.org/release/manualpages/PC/PCCompositeType/" style="box-sizing:border-box;background-color:transparent;text-decoration-line:none" target="_blank">PC_COMPOSITE_MULTIPLICATIVE</a>)</span></code><span style="color:rgb(50,50,50);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Helvetica Neue",Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";font-size:15px">), and then applies a simple ILU like preconditioner on all the variables.</span></i><i style="color:rgb(50,50,50);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Helvetica Neue",Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";font-size:15px">"</i></div><div><br></div><div>I am certainly lacking some background here, would you be able to explain me a bit better how this is working?</div></div></blockquote><div><br></div><div>First, you select out some (linear combination of a) subset of the unknowns, this is the action of R. Then you solve that system and projection the results back to the full space (solve RAP). After that, you use</div><div>a simple ILU on the whole system, presumably because after that a diagonal-like PC is good.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Do you have a minimal working example in the tutorials? </div></div></blockquote><div><br></div><div>I do not know. I think Barry implemented this.</div><div><br></div><div> Thanks,</div><div><br></div><div> Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Many thanks as always! :) </div></div>
</blockquote></div><br clear="all"><div><br></div><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><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><br></div><div><a href="http://www.cse.buffalo.edu/~knepley/" target="_blank">https://www.cse.buffalo.edu/~knepley/</a><br></div></div></div></div></div></div></div></div>