IntegrationEvent#
- class IntegrationEvent(event_finder: Callable[[float, list], float], find_increasing: bool, find_decreasing: bool, is_terminal: bool = False)#
Bases:
objectDefines an event based off time, state, or both.
After each accepted
IAS15step, with \(g_{k-1}\) and \(g_k\) the values ofevent_finderat the previous and the current step, the event triggers on\[g_{k-1} < 0 \le g_k \quad \text{(increasing)}, \qquad g_{k-1} > 0 \ge g_k \quad \text{(decreasing)},\]as selected by
find_increasingandfind_decreasing. The crossing time is not refined inside the step, so it is resolved to the step size.- Parameters:
- event_finderCallable[[float, list], float]
Event function \(g(t, \mathbf{y})\); the event is a zero crossing.
- find_increasingbool
Flag to detect the event when it crosses from negative to positive.
- find_decreasingbool
Flag to detect the even when it crosses from positive to negative.
- is_terminalbool, optional
Flag to decide if integration should stop when the event is detected. Defaults to
False.