#include "petscts.h" PetscErrorCode TSSetEventHandler(TS ts,PetscInt nevents,PetscInt direction[],PetscBool terminate[],PetscErrorCode (*eventhandler)(TS,PetscReal,Vec,PetscScalar[],void*),PetscErrorCode (*postevent)(TS,PetscInt,PetscInt[],PetscReal,Vec,PetscBool,void*),void *ctx)Logically Collective on TS Many br
ts | - the TS context obtained from TSCreate() Many br | |
nevents | - number of local events Many br | |
direction | - direction of zero crossing to be detected. -1 => Zero crossing in negative direction, Many br+1 => Zero crossing in positive direction, 0 => both ways (one for each event) Many br | |
terminate | - flag to indicate whether time stepping should be terminated after Many brevent is detected (one for each event) Many br | |
eventhandler | - event monitoring routine Many br | |
postevent | - [optional] post-event function Many br | |
ctx | - [optional] user-defined context for private data for the Many brevent monitor and post event routine (use NULL if no Many brcontext is desired) Many br |
ts | - the TS context Many br | |
t | - current time Many br | |
U | - current iterate Many br | |
ctx | - [optional] context passed with eventhandler Many br |
ts | - the TS context Many br | |
nevents_zero | - number of local events whose event function is zero Many br | |
events_zero | - indices of local events which have reached zero Many br | |
t | - current time Many br | |
U | - current solution Many br | |
forwardsolve | - Flag to indicate whether TS is doing a forward solve (1) or adjoint solve (0) Many br | |
ctx | - the context passed with eventhandler Many br |
Many br
Level:intermediate
Location:src/ts/event/tsevent.c
Index of all TS routines
Table of Contents for all manual pages
Index of all manual pages