cosapp.multimode.discreteStepper¶
Event handling and discrete stepping
Classes
|
|
|
Named tuple associating an event and its occurrence time |
-
class
cosapp.multimode.discreteStepper.DiscreteStepper(driver: Driver)[source]¶ Bases:
object-
discrete_step() → List[cosapp.multimode.event.Event][source]¶ Performs a discrete step other than the first one
-
event_detected() → bool[source]¶ Tests all primitive events and returns a Boolean value indicating whether at least one of these events is to be triggered.
-
events() → Iterator[cosapp.multimode.event.Event][source]¶ Iterator on handled events
-
find_primal_event() → cosapp.multimode.discreteStepper.TimedEvent[source]¶ Returns a TimedEvent named tuple containing the first primitive event triggered, together with its occurrence date ((None, inf) if no primitive event is triggered). The internal state is only updated if an event is triggered. This method should only be called at the first microstep of the first discrete time step.
-
first_discrete_step() → cosapp.multimode.discreteStepper.TimedEvent[source]¶ Performs the first discrete step and returns a TimedEvent indicating which primitive event was triggered and at which date.
-
property
interval¶ time interval
- Type
Tuple[float, float]
-
present_events() → Iterator[cosapp.multimode.event.Event][source]¶ Returns an iterator on all present events
-
set_data(interval, interpol) → None[source]¶ Sets interpolation data used for detecting the first event that occurred in a given time step.
-
set_events() → None[source]¶ Update event list from system of interest, and from stop criterion of owner time driver.
-
property
sysview¶ system interpolator
- Type
-
trigger_time(event: cosapp.multimode.event.Event) → float[source]¶ Returns the date at which a primitive event was triggered. This method may only be called once the list of all triggered events is known and the interpolation data has been set.
-
-
class
cosapp.multimode.discreteStepper.TimedEvent(event: cosapp.multimode.event.Event, time: float)[source]¶ Bases:
NamedTupleNamed tuple associating an event and its occurrence time
-
event: cosapp.multimode.event.Event¶ Alias for field number 0
-
time: float¶ Alias for field number 1
-