-
Notifications
You must be signed in to change notification settings - Fork 3
Events
See Discrete Sampling example.
The event method is used similarly to the sample() method. However, it is for single events rather than sampling.
Example: The event time will be exactly stepped to, even if it is not in sync with the sampling rate.
if (event(1.2))
{
// Do stuff...
}
The time step can be dynamically changed in Ascent on two levels. The variable dt represents the length of time for the current time step. The dt variable will often change from step to step if there are multiple sampling rates and events triggered in the simulation.
The variable dt_base is the base time step for the simulation and usually remains a constant unless adaptive time stepping is implemented or the program explicitly changes the base time step. The base time step is not affected by sampling rates and events.