# TSEvaluateStep
Evaluate the solution at the end of a time step with a given order of accuracy. 
## Synopsis
```
#include "petscts.h"  
PetscErrorCode TSEvaluateStep(TS ts, PetscInt order, Vec U, PetscBool *done)
```
Collective on ts


## Input Parameters

- ***ts -*** time stepping context
- ***order -*** desired order of accuracy
- ***done -*** whether the step was evaluated at this order (pass NULL to generate an error if not available)



## Output Parameter

- ***U -*** state at the end of the current step





## Notes
This function cannot be called until all stages have been evaluated.

It is normally called by adaptive controllers before a step has been accepted and may also be called by the user after `TSStep()` has returned.


## See Also
 [](chapter_ts), `TS`, `TSStep()`, `TSAdapt`

## Level
advanced

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

## Implementations

<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ts/impls/arkimex/arkimex.c.html#TSEvaluateStep_ARKIMEX">TSEvaluateStep_ARKIMEX in src/ts/impls/arkimex/arkimex.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ts/impls/eimex/eimex.c.html#TSEvaluateStep_EIMEX">TSEvaluateStep_EIMEX in src/ts/impls/eimex/eimex.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ts/impls/explicit/rk/rk.c.html#TSEvaluateStep_RK">TSEvaluateStep_RK in src/ts/impls/explicit/rk/rk.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ts/impls/glee/glee.c.html#TSEvaluateStep_GLEE">TSEvaluateStep_GLEE in src/ts/impls/glee/glee.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ts/impls/implicit/irk/irk.c.html#TSEvaluateStep_IRK">TSEvaluateStep_IRK in src/ts/impls/implicit/irk/irk.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ts/impls/multirate/mprk.c.html#TSEvaluateStep_MPRK">TSEvaluateStep_MPRK in src/ts/impls/multirate/mprk.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ts/impls/multirate/mprk.c.html#TSEvaluateStep_MPRKSPLIT">TSEvaluateStep_MPRKSPLIT in src/ts/impls/multirate/mprk.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ts/impls/rosw/rosw.c.html#TSEvaluateStep_RosW">TSEvaluateStep_RosW in src/ts/impls/rosw/rosw.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)  
