On Mon, Feb 27, 2012 at 11:24 AM, Jed Brown <span dir="ltr"><<a href="mailto:jedbrown@mcs.anl.gov">jedbrown@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="gmail_quote"><div class="im">On Mon, Feb 27, 2012 at 11:21, 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 class="gmail_quote"><div>Having DM hold the callbacks is a problem. But don't we have them in the context arg?</div></div></blockquote><div><br></div></div><div><div>PetscErrorCode SNESDMComputeJacobian(SNES snes,Vec X,Mat *J,Mat *B,MatStructure *flag,void *ptr)</div>

<div>{</div><div>  PetscErrorCode ierr;</div><div>  DM             dm;</div><div><br></div><div>  PetscFunctionBegin;</div><div>  ierr = SNESGetDM(snes,&dm);CHKERRQ(ierr);</div><div>  ierr = DMComputeJacobian(dm,X,*J,*B,flag);CHKERRQ(ierr);</div>

<div>  PetscFunctionReturn(0);</div><div>}</div></div></div></blockquote><div><br></div><div>I thought the idea was for the solver to come in through the context argument of the user callback. Maybe there should be</div>
<div>a structured way to for SNES to modify the DM context which it passes to the user callback.</div><div><br></div><div>   Matt</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">
<div class="gmail_quote"><div>The SNES is not available from the callback.</div><div class="im"><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><div></div></div></div>Aren't they just passed in? Or do you mean auxiliary vectors?</blockquote></div></div><br><div>Auxiliary vectors. In this case, they are used by TS to convert the semi-discrete form provided by the user into the fully discrete form being solved by SNES.</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>