[petsc-users] Matrix-free vs finite differenced Jacobian approximation

Alexander Lindsay alexlindsay239 at gmail.com
Tue Dec 12 10:30:44 CST 2017


I'm not using any hand-coded Jacobians.

Case 1 options: -snes_fd -pc_type lu

0 Nonlinear |R| = 2.259203e-02
      0 Linear |R| = 2.259203e-02
      1 Linear |R| = 7.821248e-11
 1 Nonlinear |R| = 2.258733e-02
      0 Linear |R| = 2.258733e-02
      1 Linear |R| = 5.277296e-11
 2 Nonlinear |R| = 2.258733e-02
      0 Linear |R| = 2.258733e-02
      1 Linear |R| = 5.993971e-11
Nonlinear solve did not converge due to DIVERGED_LINE_SEARCH iterations 2

Case 2 options: -snes_fd -snes_mf_operator -pc_type lu

 0 Nonlinear |R| = 2.259203e-02
      0 Linear |R| = 2.259203e-02
      1 Linear |R| = 2.258733e-02
      2 Linear |R| = 3.103342e-06
      3 Linear |R| = 6.779865e-12
 1 Nonlinear |R| = 7.497740e-06
      0 Linear |R| = 7.497740e-06
      1 Linear |R| = 8.265413e-12
 2 Nonlinear |R| = 7.993729e-12
Nonlinear solve converged due to CONVERGED_FNORM_RELATIVE iterations 2

On Tue, Dec 12, 2017 at 9:12 AM, zakaryah . <zakaryah at gmail.com> wrote:

> When you say "Jacobians are bad" and "debugging the Jacobians", do you
> mean that the hand-coded Jacobian is wrong?  In that case, why would you be
> surprised that the finite difference Jacobians, which are "correct" to
> approximation error, perform better?  Otherwise, what does "Jacobians are
> bad" mean - ill-conditioned?  Singular?  Not symmetric?  Not positive
> definite?
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20171212/7fe0694d/attachment.html>


More information about the petsc-users mailing list