DMTSSetIJacobianLocal — PETSc 3.25.0 documentation

Skip to main content
`Ctrl`+`K`

# DMTSSetIJacobianLocal

set a local Jacobian evaluation function

## Synopsis

    #include "petscts.h"
    PetscErrorCode DMTSSetIJacobianLocal(DM dm, PetscErrorCode (*func)(DM dm, PetscReal t, Vec u, Vec udot, PetscReal shift, Mat J, Mat Jpre, PetscCtx ctx), PetscCtx 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`

- t - the current time

- u - the current solution

- udot - the derivative of `u`

- shift - the shift factoring arising from the implicit time-step

- J - output, the Jacobian

- Jpre - output, matrix from which to compute the preconditioner for `J`, often the same as `J`

- ctx - the application context for the function

## See Also

TS: Scalable ODE and DAE Solvers, `DM`, `DMTSGetIJacobianLocal()`, `DMTSSetIFunctionLocal()`, `DMTSSetIJacobian()`, `DMTSSetIFunction()`

## Level

beginner

## Location

src/ts/utils/dmlocalts.c

## Examples

src/ts/tutorials/ex45.c
src/ts/tutorials/ex53.c
src/ts/tutorials/ex30.c
src/ts/tutorials/ex18.c
src/ts/tutorials/ex47.c
src/ts/tutorials/ex48.c
src/ts/tutorials/ex46.c
src/ts/tutorials/ex76.c
src/ts/tutorials/ex77.c

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