# TSErrorWeightedENorm
compute a weighted error norm based on supplied absolute and relative tolerances 
## Synopsis
```
#include "petscts.h"  
PetscErrorCode TSErrorWeightedENorm(TS ts, Vec E, Vec U, Vec Y, NormType wnormtype, PetscReal *norm, PetscReal *norma, PetscReal *normr)
```
Collective on TS


## Input Parameters

- ***ts -*** time stepping context
- ***E -*** error vector
- ***U -*** state vector, usually ts->vec_sol
- ***Y -*** state vector, previous time step
- ***wnormtype -*** norm type, either NORM_2 or NORM_INFINITY



## Output Parameters

- ***norm  -*** weighted norm, a value of 1.0 achieves a balance between absolute and relative tolerances
- ***norma -*** weighted norm, a value of 1.0 means that the error meets the absolute tolerance set by the user
- ***normr -*** weighted norm, a value of 1.0 means that the error meets the relative tolerance set by the user



## Options Database Keys

- ***-ts_adapt_wnormtype <wnormtype> -*** 2, INFINITY





## See Also
 `TSErrorWeightedENormInfinity()`, `TSErrorWeightedENorm2()`, `TSErrorWeightedNormInfinity()`, `TSErrorWeightedNorm2()`

## Level
developer

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


---
[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)  
