# TSRestartStep
Flags the solver to restart the next step 
## Synopsis
```
#include "petscts.h"  
PetscErrorCode TSRestartStep(TS ts)
```
Collective on ts


## Input Parameter

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





## Notes
Multistep methods like `TSBDF` or Runge-Kutta methods with FSAL property require restarting the solver in the event of
discontinuities. These discontinuities may be introduced as a consequence of explicitly modifications to the solution
vector (which PETSc attempts to detect and handle) or problem coefficients (which PETSc is not able to detect). For
the sake of correctness and maximum safety, users are expected to call `TSRestart()` whenever they introduce
discontinuities in callback routines (e.g. prestep and poststep routines, or implicit/rhs function routines with
discontinuous source terms).


## See Also
 [](chapter_ts), `TS`, `TSBDF`, `TSSolve()`, `TSSetPreStep()`, `TSSetPostStep()`

## Level
advanced

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

## Examples
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ts/tutorials/ex40.c.html">src/ts/tutorials/ex40.c.html</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ts/tutorials/ex41.c.html">src/ts/tutorials/ex41.c.html</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)  
