Skip to main content
`Ctrl`+`K`

# DMSNESSetJacobianLocal

set a local Jacobian evaluation function

## Synopsis

    #include "petscsnes.h"
    PetscErrorCode DMSNESSetJacobianLocal(DM dm, PetscErrorCode (*func)(DM dm, Vec X, Mat J, Mat Jp, void *ctx), void *ctx)

Logically Collective

## Input Parameters

- dm - `DM` to associate callback with

- func - local Jacobian evaluation

- ctx - optional context for local Jacobian evaluation

## Calling sequence of `func`

- dm - the `DM` context

- X - current solution vector (ghosted or not?)

- J - the Jacobian

- Jp - approximate Jacobian used to compute the preconditioner, often `J`

- ctx - a user provided context

## See Also

SNES: Nonlinear Solvers, `DMSNESSetObjectiveLocal()`, `DMSNESSetFunctionLocal()`, `DMSNESSetBoundaryLocal()`

## Level

advanced

## Location

src/snes/utils/dmlocalsnes.c

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