<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">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 id=":3t9">   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 style>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 style><br></div>
<div style>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 style><br></div><div style>Do we need this SNESSetUpdate() system for anything else?</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div id=":3t9">

   I object to -snes_compare because it sounds like you are comparing SNESes, which you are not. Maybe -snes_jacobian_compare ?</div></blockquote></div><br>I'm happy to use -snes_jacobian_check (or -snes_check_jacobian, depending on our endianness).</div>
</div>