:orphan: # TSSetEventTolerances Set tolerances for event zero crossings ## 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 -*** tolerance for event zero crossing ## Notes Must call `TSSetEventHandler(`) before setting the tolerances. The size of `vtol` is equal to the number of events. The tolerance is some measure of how close the event function is to zero for the event detector to stop and declare the time of the event has been detected. ## See Also [](ch_ts), `TS`, `TSEvent`, `TSSetEventHandler()` ## Level beginner ## Location src/ts/event/tsevent.c --- [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](/manualpages/index.md) [Index of all manual pages](/manualpages/singleindex.md)