On Sun, Nov 13, 2011 at 11:13 PM, Barry Smith <span dir="ltr"><<a href="mailto:bsmith@mcs.anl.gov">bsmith@mcs.anl.gov</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="im"><br>
On Nov 13, 2011, at 5:05 PM, Matthew Knepley wrote:<br>
<br>
> On Sun, Nov 13, 2011 at 10:52 PM, Barry Smith <<a href="mailto:bsmith@mcs.anl.gov">bsmith@mcs.anl.gov</a>> wrote:<br>
><br>
> The simplest fix is to only do this null space business if Amat exists.<br>
><br>
> I did this.<br>
><br>
> But keep in mind that KSP and SNES now have two modes of operation, the second uses the DM to provide many of the items they need at setup time. This is different then the classic KSP and SNES where the only way to do things were with KSPSetOperators() and SNESSetFunction/Jacobian. This is why Jed is indicating that it may be too soon at this stage to muck with the null space business.<br>
><br>
> This is bad. Things are becoming unacceptably complicated. I can't trust that obvious arguments are in this function,<br>
> and I can't trust that setup will be called since the logic is convoluted. This needs to be rethought.<br>
<br>
</div> Do you want to go back to the uncomposible DMMG? The logic is not all that convoluted. Basically at setup time for any thing that has not be previously provided KSP and SNES try to use DM to provide them.<br></blockquote>
<div><br></div><div>No. The setup logic for KSP is convoluted.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
The alternative is to remove KSPSetOperators() and SNESSetFunction/Jacobian() and ONLY have them provided with DM. I dislike this because it breaks our 15 year old model and all users (even the least skilled) need to deal with yet another object before they can solve the simplest thing. But I am open to other alternative designs that you might suggest.</blockquote>
<div><br></div><div>I do not want that. I would rather that people using DM do not call KSPSetOperators() at all. The only reason that we would call it</div><div>is to pass the preconditioner. I think this overloading of the interface complicates things. I would prefer adding a call for the</div>
<div>preconditioning matrix, that gets called from KSPSetOeprators() and can be called if you are using DM.</div><div><br></div><div> Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<font color="#888888"><br>
Barry<br>
</font><div><div></div><div class="h5"><br>
><br>
> Matt<br>
><br>
><br>
> Barry<br>
><br>
><br>
> On Nov 13, 2011, at 4:47 PM, Matthew Knepley wrote:<br>
><br>
> > On Sun, Nov 13, 2011 at 10:47 PM, Barry Smith <<a href="mailto:bsmith@mcs.anl.gov">bsmith@mcs.anl.gov</a>> wrote:<br>
> ><br>
> > On Nov 13, 2011, at 4:45 PM, Matthew Knepley wrote:<br>
> ><br>
> > > On Sun, Nov 13, 2011 at 10:44 PM, Jed Brown <<a href="mailto:jedbrown@mcs.anl.gov">jedbrown@mcs.anl.gov</a>> wrote:<br>
> > > On Sun, Nov 13, 2011 at 16:36, Barry Smith <<a href="mailto:bsmith@mcs.anl.gov">bsmith@mcs.anl.gov</a>> wrote:<br>
> > > 1) It is legitimate to call KSPSetOperators with a null Amat so this is a bug that crashes large parts of PETSc<br>
> > ><br>
> > > This logic should be moved much later (like to KSPSetUp()).<br>
> > ><br>
> > > I disagree, since SetOperators() is where we know that the matrix is changing.<br>
> ><br>
> > Yes, but the matrix may not exist.<br>
> ><br>
> > I have no problem fixing this, but what does that mean? I can't fix it until I understand what you are doing here.<br>
> ><br>
> > Matt<br>
> ><br>
> > ><br>
> > > Matt<br>
> > ><br>
> > ><br>
> > ><br>
> > > 2) Do you really want to do this? I am not sure I like it.<br>
> > ><br>
> > > I think that attaching the null space to the Mat should be the preferred way to communicate it, especially in the case of a deeply nested hierarchy.<br>
> > ><br>
> > ><br>
> > ><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>
> ><br>
> ><br>
> ><br>
> ><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>
><br>
><br>
><br>
><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>
<br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <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>