# TSDestroy
Destroys the timestepper context that was created with `TSCreate()`. 
## Synopsis
```
#include "petscts.h"  
PetscErrorCode TSDestroy(TS *ts)
```
Collective on ts


## Input Parameter

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





## See Also
 [](chapter_ts), `TS`, `TSCreate()`, `TSSetUp()`, `TSSolve()`

## Level
beginner

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

## Examples
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ts/tutorials/ex1.c.html">src/ts/tutorials/ex1.c.html</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ts/tutorials/ex10.c.html">src/ts/tutorials/ex10.c.html</A><BR>
<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/ex11_sa.c.html">src/ts/tutorials/ex11_sa.c.html</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ts/tutorials/ex12.c.html">src/ts/tutorials/ex12.c.html</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ts/tutorials/ex13.c.html">src/ts/tutorials/ex13.c.html</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ts/tutorials/ex14.c.html">src/ts/tutorials/ex14.c.html</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ts/tutorials/ex15.c.html">src/ts/tutorials/ex15.c.html</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ts/tutorials/ex16.c.html">src/ts/tutorials/ex16.c.html</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ts/tutorials/ex16fwd.c.html">src/ts/tutorials/ex16fwd.c.html</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ts/tutorials/ex17.c.html">src/ts/tutorials/ex17.c.html</A><BR>

## Implementations

<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ts/impls/arkimex/arkimex.c.html#TSDestroy_ARKIMEX">TSDestroy_ARKIMEX in src/ts/impls/arkimex/arkimex.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ts/impls/bdf/bdf.c.html#TSDestroy_BDF">TSDestroy_BDF in src/ts/impls/bdf/bdf.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ts/impls/eimex/eimex.c.html#TSDestroy_EIMEX">TSDestroy_EIMEX in src/ts/impls/eimex/eimex.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ts/impls/explicit/euler/euler.c.html#TSDestroy_Euler">TSDestroy_Euler in src/ts/impls/explicit/euler/euler.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ts/impls/explicit/rk/rk.c.html#TSDestroy_RK">TSDestroy_RK in src/ts/impls/explicit/rk/rk.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ts/impls/explicit/ssp/ssp.c.html#TSDestroy_SSP">TSDestroy_SSP in src/ts/impls/explicit/ssp/ssp.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ts/impls/glee/glee.c.html#TSDestroy_GLEE">TSDestroy_GLEE in src/ts/impls/glee/glee.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ts/impls/implicit/alpha/alpha1.c.html#TSDestroy_Alpha">TSDestroy_Alpha in src/ts/impls/implicit/alpha/alpha1.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ts/impls/implicit/alpha/alpha2.c.html#TSDestroy_Alpha">TSDestroy_Alpha in src/ts/impls/implicit/alpha/alpha2.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ts/impls/implicit/discgrad/tsdiscgrad.c.html#TSDestroy_DiscGrad">TSDestroy_DiscGrad in src/ts/impls/implicit/discgrad/tsdiscgrad.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ts/impls/implicit/glle/glle.c.html#TSDestroy_GLLE">TSDestroy_GLLE in src/ts/impls/implicit/glle/glle.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ts/impls/implicit/irk/irk.c.html#TSDestroy_IRK">TSDestroy_IRK in src/ts/impls/implicit/irk/irk.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ts/impls/implicit/radau5/radau5.c.html#TSDestroy_Radau5">TSDestroy_Radau5 in src/ts/impls/implicit/radau5/radau5.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ts/impls/implicit/sundials/sundials.c.html#TSDestroy_Sundials">TSDestroy_Sundials in src/ts/impls/implicit/sundials/sundials.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ts/impls/implicit/theta/theta.c.html#TSDestroy_Theta">TSDestroy_Theta in src/ts/impls/implicit/theta/theta.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ts/impls/mimex/mimex.c.html#TSDestroy_Mimex">TSDestroy_Mimex in src/ts/impls/mimex/mimex.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ts/impls/multirate/mprk.c.html#TSDestroy_MPRK">TSDestroy_MPRK in src/ts/impls/multirate/mprk.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ts/impls/pseudo/posindep.c.html#TSDestroy_Pseudo">TSDestroy_Pseudo in src/ts/impls/pseudo/posindep.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ts/impls/rosw/rosw.c.html#TSDestroy_RosW">TSDestroy_RosW in src/ts/impls/rosw/rosw.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ts/impls/symplectic/basicsymplectic/basicsymplectic.c.html#TSDestroy_BasicSymplectic">TSDestroy_BasicSymplectic in src/ts/impls/symplectic/basicsymplectic/basicsymplectic.c</A><BR>


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