# DMTSSetBoundaryLocal
set the function for essential boundary data for a local implicit function evaluation. It should set the essential boundary data for the local portion of the solution X, as well its time derivative X_t (if it is not NULL). Vectors are initialized to zero before this function, so it is only needed for non homogeneous data. 
## Synopsis
```
#include "petscts.h" 
PetscErrorCode DMTSSetBoundaryLocal(DM dm, PetscErrorCode (*func)(DM, PetscReal, Vec, Vec, void *), void *ctx)
```
Note that this function is somewhat optional: boundary data could potentially be inserted by a function passed to
`DMTSSetIFunctionLocal()`.  The use case for this function is for discretizations with constraints (see
`DMGetDefaultConstraints()`): this function inserts boundary values before constraint interpolation.

Logically Collective


## Input Parameters

- ***dm   -*** `DM` to associate callback with
- ***func -*** local function evaluation
- ***ctx  -*** context for function evaluation





## See Also
 [](chapter_ts), `DM`, `TS`, `DMTSSetIFunction()`, `DMTSSetIJacobianLocal()`

## Level
intermediate

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

## Examples
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ts/tutorials/ex11.c.html">src/ts/tutorials/ex11.c.html</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ts/tutorials/ex18.c.html">src/ts/tutorials/ex18.c.html</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ts/tutorials/ex45.c.html">src/ts/tutorials/ex45.c.html</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ts/tutorials/ex46.c.html">src/ts/tutorials/ex46.c.html</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ts/tutorials/ex47.c.html">src/ts/tutorials/ex47.c.html</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ts/tutorials/ex48.c.html">src/ts/tutorials/ex48.c.html</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ts/tutorials/ex53.c.html">src/ts/tutorials/ex53.c.html</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ts/tutorials/ex76.c.html">src/ts/tutorials/ex76.c.html</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ts/tutorials/ex77.c.html">src/ts/tutorials/ex77.c.html</A><BR>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/ts/utils/dmlocalts.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)  
