[petsc-dev] can we get rid of SNESCreate_Test() now?

Barry Smith bsmith at mcs.anl.gov
Thu Mar 7 10:14:47 CST 2013


On Mar 7, 2013, at 9:00 AM, Jed Brown <jedbrown at mcs.anl.gov> wrote:

> 
> On Thu, Mar 7, 2013 at 8:44 AM, Barry Smith <bsmith at mcs.anl.gov> wrote:
>    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()?
> 
> I see snes->ops->update in all the solvers, including those that do not compute Jacobians. Can those calls be moved inside SNESComputeJacobian()?

   Ok
> 
> If SNESUpdateCheckJacobian continues to be called before computing the Jacobian, then it should finish by re-evaluating the residual at the original point.

   It is to be merged with your compare stuff and all called from SNESComputeJacobian() as I indicated in my last email. It will not be called by the Update stuff, I was wrong to put it there.

> 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.

   
> 
> Do we need this SNESSetUpdate() system for anything else?

   Maybe not.

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

   I like -snes_jacobian_check options   rather than a million -snes_jacobian_check_xyz






More information about the petsc-dev mailing list