On Tue, Mar 15, 2011 at 3:57 PM, Jed Brown <span dir="ltr"><<a href="mailto:jed@59a2.org">jed@59a2.org</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="gmail_quote"><div class="im">On Tue, Mar 15, 2011 at 21:51, Matthew Knepley <span dir="ltr"><<a href="mailto:knepley@gmail.com" target="_blank">knepley@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div>Really? That seems perverse. I have to build some global PC matrix, with pieces I do not even have. How is that going to happen? Is<div>this really how we want to handle it?</div></div></blockquote><div><br>
</div></div><div>The alternatives don't compose properly, we'd need a whole new interface for disassembling solvers. Currently MatGetSubMatrix() is our way of taking things apart. If each "physics" is maintained separately, then you can use MatGetLocalSubMatrix(), see snes ex28.c, to decompose the global problem so that each physics module is stand-alone and has no global knowledge. It will also remain modular if you do splits inside of multigrid or multigrid inside of splits.</div>
</div></blockquote><div><br></div><div>I guess I have no problem with MatGetSubMatrix() being the interface for this, since all solvers get the Mat object. However, my point was</div><div>really that the interface for creating such things is horrible. There is no easy way for me to do what I want, and the hard way is too hard for</div>
<div>me (a developer) without looking at a lot of code, trying things and seeing where they break, and probably some crying. This will have to</div><div>change or no one will use this.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="gmail_quote"><div class="im"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div> Also, I really need this to work now.</div></div></blockquote><div>
<br></div></div><div>It should work now.</div><div class="im">
<div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div> So baring some other idea, I am going to put something in</div>
<div>PETSc that lets me set this operator during the SNES loop.</div></div></blockquote></div></div><br><div>On the first SNES iteration, the KSP has not been set up yet.</div>
</blockquote></div><br>I set it up.<div><br></div><div>  Matt<br clear="all"><br>-- <br>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<br>
</div>