petsc-3.7.1 2016-05-15
Report Typos and Errors

SNESUpdateCheckJacobian

Checks each Jacobian computed by the nonlinear solver comparing the users function with a finite difference computation.

Synopsis

PetscErrorCode SNESUpdateCheckJacobian(SNES snes,PetscInt it)

Options Database

-snes_check_jacobian - use this every time SNESSolve() is called Many br
-snes_check_jacobian_view - Display difference between Jacobian approximated by finite-differencing and the hand-coded Jacobian Many br

Output

difference - ||J - Jd||, the norm of the difference of the hand-coded Jacobian J and the approximate Jacobian Jd obtained by finite-differencing Many brthe residual, Many br
ratio - ||J - Jd||/||J||, the ratio of the norms of the above difference and the hand-coded Jacobian. Many br

Notes

Frobenius norm is used in the above throughout. This check is carried out every SNES iteration. Many br

Many br

See Also

SNESTEST, SNESCreate(), SNES, SNESSetType(), SNESNEWTONLS, SNESNEWTONTR, SNESSolve()

Level:intermediate
Location:
src/snes/impls/test/snestest.c
Index of all SNES routines
Table of Contents for all manual pages
Index of all manual pages