# TSAdjointReset
Resets a `TS` adjoint context and removes any allocated `Vec`s and `Mat`s. 
## Synopsis
```
#include "petscts.h"  
PetscErrorCode TSAdjointReset(TS ts)
```
Collective on ts


## Input Parameter

- ***ts -*** the `TS` context obtained from `TSCreate()`





## See Also
 [](chapter_ts), `TSCreate()`, `TSAdjointSetUp()`, `TSADestroy()`

## Level
beginner

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ts/interface/sensitivity/tssen.c.html#TSAdjointReset">src/ts/interface/sensitivity/tssen.c</A>

## Examples
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ts/tutorials/ex20opt_ic.c.html">src/ts/tutorials/ex20opt_ic.c.html</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ts/tutorials/ex20opt_p.c.html">src/ts/tutorials/ex20opt_p.c.html</A><BR>

## Implementations

<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ts/impls/explicit/rk/rk.c.html#TSAdjointReset_RK">TSAdjointReset_RK in src/ts/impls/explicit/rk/rk.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ts/impls/implicit/theta/theta.c.html#TSAdjointReset_Theta">TSAdjointReset_Theta in src/ts/impls/implicit/theta/theta.c</A><BR>


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


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