SNESJacobianFn — PETSc 3.21.4 documentation

Skip to main content
`Ctrl`+`K`

# SNESJacobianFn

A prototype of a `SNES` Jacobian evaluation function that would be passed to `SNESSetJacobian()`

## Synopsis

    PETSC_EXTERN_TYPEDEF typedef PetscErrorCode(SNESJacobianFn)(SNES snes, Vec u, Mat Amat, Mat Pmat, void *ctx);

## Calling Sequence

- snes - the `SNES` context obtained from `SNESCreate()`

- u - input vector

- Amat - (approximate) Jacobian matrix

- Pmat - matrix used to construct the preconditioner, often the same as `Amat`

- ctx - [optional] user-defined context for matrix evaluation routine

## See Also

SNES: Nonlinear Solvers, `SNES`, `SNESSetJacobian()`, `SNESGetJacobian()`, `SNESFunctionFn`, `SNESNGSFn`

## Level

beginner

## Location

include/petscsnes.h

Index of all SNES routines
Table of Contents for all manual pages
Index of all manual pages