# TSEvaluateWLTE
Evaluate the weighted local truncation error norm at the end of a time step with a given order of accuracy. 
## Synopsis
```
#include "petscts.h"  
PetscErrorCode TSEvaluateWLTE(TS ts, NormType wnormtype, PetscInt *order, PetscReal *wlte)
```
Collective


## Input Parameters

- ***ts -*** time stepping context
- ***wnormtype -*** norm type, either `NORM_2` or `NORM_INFINITY`



## Input/Output Parameter

- ***order -*** optional, desired order for the error evaluation or `PETSC_DECIDE`;
on output, the actual order of the error evaluation



## Output Parameter

- ***wlte -*** the weighted local truncation error norm





## Note
If the timestepper cannot evaluate the error in a particular step
(eg. in the first step or restart steps after event handling),
this routine returns wlte=-1.0 .


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

## Level
advanced

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

## Implementations

<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ts/impls/bdf/bdf.c.html#TSEvaluateWLTE_BDF">TSEvaluateWLTE_BDF in src/ts/impls/bdf/bdf.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ts/impls/implicit/alpha/alpha1.c.html#TSEvaluateWLTE_Alpha">TSEvaluateWLTE_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#TSEvaluateWLTE_Alpha">TSEvaluateWLTE_Alpha in src/ts/impls/implicit/alpha/alpha2.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ts/impls/implicit/theta/theta.c.html#TSEvaluateWLTE_Theta">TSEvaluateWLTE_Theta in src/ts/impls/implicit/theta/theta.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)  
