[petsc-users] Analytic Jacobian verfication

Jed Brown jed at 59A2.org
Fri Jun 17 05:50:53 CDT 2011


On Fri, Jun 17, 2011 at 12:35, Tian(ICT) <rongtian at ncic.ac.cn> wrote:

> If I test the code with and without -snes_mf_operator and the SNES
> solve gives the "exactly" same solution (can they be the exactly same?


They won't be exactly the same because the finite differenced Jacobian has
more and different rounding errors from an analytic Jacobian. But they
should agree to about sqrt(epsilon) which is about 7 significant digits for
double precision.


> , can I say the analytic Jacobian is correct?


Yes, provided the problem you ran it on exercises all nonlinear terms in
your equations.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20110617/1b10abf5/attachment.htm>


More information about the petsc-users mailing list