# TSStep
Steps one time step 
## Synopsis
```
#include "petscts.h"  
PetscErrorCode TSStep(TS ts)
```
Collective on ts


## Input Parameter

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





## Notes
The public interface for the ODE/DAE solvers is `TSSolve()`, you should almost for sure be using that routine and not this routine.

The hook set using `TSSetPreStep()` is called before each attempt to take the step. In general, the time step size may
be changed due to adaptive error controller or solve failures. Note that steps may contain multiple stages.

This may over-step the final time provided in `TSSetMaxTime()` depending on the time-step used. `TSSolve()` interpolates to exactly the
time provided in `TSSetMaxTime()`. One can use `TSInterpolate()` to determine an interpolated solution within the final timestep.


## See Also
 [](chapter_ts), `TS`, `TSCreate()`, `TSSetUp()`, `TSDestroy()`, `TSSolve()`, `TSSetPreStep()`, `TSSetPreStage()`, `TSSetPostStage()`, `TSInterpolate()`

## Level
developer

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

## Implementations

<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ts/impls/arkimex/arkimex.c.html#TSStep_ARKIMEX">TSStep_ARKIMEX in src/ts/impls/arkimex/arkimex.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ts/impls/bdf/bdf.c.html#TSStep_BDF">TSStep_BDF in src/ts/impls/bdf/bdf.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ts/impls/eimex/eimex.c.html#TSStep_EIMEX">TSStep_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#TSStep_Euler">TSStep_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#TSStep_RK">TSStep_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#TSStep_SSP">TSStep_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#TSStep_GLEE">TSStep_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#TSStep_Alpha">TSStep_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#TSStep_Alpha">TSStep_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#TSStep_DiscGrad">TSStep_DiscGrad in src/ts/impls/implicit/discgrad/tsdiscgrad.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ts/impls/implicit/irk/irk.c.html#TSStep_IRK">TSStep_IRK in src/ts/impls/implicit/irk/irk.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ts/impls/implicit/sundials/sundials.c.html#TSStep_Sundials">TSStep_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#TSStep_Theta">TSStep_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#TSStep_Mimex">TSStep_Mimex in src/ts/impls/mimex/mimex.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ts/impls/multirate/mprk.c.html#TSStep_MPRK">TSStep_MPRK in src/ts/impls/multirate/mprk.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ts/impls/multirate/mprk.c.html#TSStep_MPRKSPLIT">TSStep_MPRKSPLIT in src/ts/impls/multirate/mprk.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ts/impls/pseudo/posindep.c.html#TSStep_Pseudo">TSStep_Pseudo in src/ts/impls/pseudo/posindep.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ts/impls/rosw/rosw.c.html#TSStep_RosW">TSStep_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#TSStep_BasicSymplectic">TSStep_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)  
