<div dir="ltr">On Thu, Mar 7, 2013 at 10:00 AM, Jed Brown <span dir="ltr"><<a href="mailto:jedbrown@mcs.anl.gov" target="_blank">jedbrown@mcs.anl.gov</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">
<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"><br><div class="gmail_quote"><div class="im">On Thu, Mar 7, 2013 at 8:44 AM, Barry Smith <span dir="ltr"><<a href="mailto:bsmith@mcs.anl.gov" target="_blank">bsmith@mcs.anl.gov</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div> And merged with the SNESUpdateCheckJacobian() which is not as extensive as the "compare" test but far better designed and much prettier code :-) Also could all that code be pulled out of SNESComputeJacobian() and put in a separate private routine called by SNESComputeJacobian()?<br>
</div></blockquote><div><br></div></div><div>I see snes->ops->update in all the solvers, including those that do not compute Jacobians. Can those calls be moved inside SNESComputeJacobian()?</div><div><br></div>
<div>If SNESUpdateCheckJacobian continues to be called before computing the Jacobian, then it should finish by re-evaluating the residual at the original point. Why? Because we allow people to cache part of the Jacobian internally and (especially for non-smooth problems) we need to ask the user for the Jacobian at exactly the same place we evaluated the residual.</div>
<div><br></div><div>Do we need this SNESSetUpdate() system for anything else?</div></div></div></div></blockquote><div><br></div><div style>My memory is that I put this in there to mimic SNESVI type of things a decade before that existed.</div>
<div style>I had to project things back onto the particles at the end of a step, and I think I also used it to splice</div><div style>in a lubrication model.</div><div style><br></div><div style> Matt</div><div> </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"><div> </div></div></div></div></blockquote><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"><div class="im"><div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>
I object to -snes_compare because it sounds like you are comparing SNESes, which you are not. Maybe -snes_jacobian_compare ?</div></blockquote></div></div><br>I'm happy to use -snes_jacobian_check (or -snes_check_jacobian, depending on our endianness).</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
</div></div>