:orphan:
# TSGetTimeError
Returns the estimated error vector, if the chosen `TSType` has an error estimation functionality and `TSSetTimeError()` was called 
## Synopsis
```
#include "petscts.h"  
PetscErrorCode TSGetTimeError(TS ts, PetscInt n, Vec *v)
```
Not Collective, but v returned is parallel if ts is parallel


## Parameters 

- ***ts -*** the `TS` context obtained from `TSCreate()` (input parameter).
- ***n -*** current estimate (n=0) or previous one (n=-1)
- ***v -*** the vector containing the error (same size as the solution).





## Note
MUST call after `TSSetUp()`


## See Also
 [](ch_ts), `TSGetSolution()`, `TSSetTimeError()`

## Level
intermediate

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

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

## Implementations

<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ts/impls/glee/glee.c.html#TSGetTimeError_GLEE">TSGetTimeError_GLEE in src/ts/impls/glee/glee.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](/manualpages/index.md)  
[Index of all manual pages](/manualpages/singleindex.md)  
