# TSSetEventTolerances
Set tolerances for event zero crossings when using event handler 
## Synopsis
```
#include "petscts.h" 
PetscErrorCode TSSetEventTolerances(TS ts, PetscReal tol, PetscReal vtol[])
```
Logically Collective


## Input Parameters

- ***ts -*** time integration context
- ***tol -*** scalar tolerance, `PETSC_DECIDE` to leave current value
- ***vtol -*** array of tolerances or NULL, used in preference to tol if present



## Options Database Key

- ***-ts_event_tol <tol> -*** tolerance for event zero crossing





## Notes
Must call `TSSetEventHandler(`) before setting the tolerances.

The size of vtol is equal to the number of events.


## See Also
 [](chapter_ts), `TS`, `TSEvent`, `TSSetEventHandler()`

## Level
beginner

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ts/event/tsevent.c.html#TSSetEventTolerances">src/ts/event/tsevent.c</A>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/ts/event/tsevent.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)  
