# DMDATSSetRHSJacobianLocal
set a local residual evaluation function for use with `DMDA` 
## Synopsis
```
#include "petscdmda.h" 
#include "petscts.h" 
PetscErrorCode DMDATSSetRHSJacobianLocal(DM dm, DMDATSRHSJacobianLocal func, void *ctx)
```
Logically Collective


## Input Parameters

- ***dm    -*** `DM` to associate callback with
- ***func  -*** local RHS Jacobian evaluation routine
- ***ctx   -*** optional context for local jacobian evaluation



## Calling sequence for func

```none
func(DMDALocalInfo* info,PetscReal t,void* x,Mat J,Mat B,void *ctx);
```


- ***info -*** `DMDALocalInfo` defining the subdomain to evaluate the residual on
- ***t    -*** time at which to evaluate residual
- ***x    -*** array of local state information
- ***J    -*** Jacobian matrix
- ***B    -*** preconditioner matrix; often same as J
- ***ctx  -*** optional context passed above





## See Also
 [](chapter_ts), `DMDA`, `DMTSSetRHSJacobian()`, `DMDATSSetRHSFunctionLocal()`, `DMDASNESSetJacobianLocal()`

## Level
beginner

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ts/utils/dmdats.c.html#DMDATSSetRHSJacobianLocal">src/ts/utils/dmdats.c</A>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/ts/utils/dmdats.c)


[Index of all TS routines](index.md)  
[Table of Contents for all manual pages](/docs/manualpages/index.md)  
[Index of all manual pages](/docs/manualpages/singleindex.md)  
