- 3.0.2 core module.
|
Event handler to kill integration. More...
#include <KillIntegrationEventHandler.h>
Public Types | |
typedef Eigen::Matrix< double, STATE_DIM, 1 > | State_T |
Public Member Functions | |
KillIntegrationEventHandler () | |
default constructor More... | |
virtual | ~KillIntegrationEventHandler () |
default destructor More... | |
virtual bool | callOnSubsteps () override |
bool | checkEvent (const State_T &state, const double &t) override |
checks the kill flag More... | |
void | handleEvent (const State_T &state, const double &t) override |
interrupts integration More... | |
void | setEvent () |
enables killing at next call More... | |
void | resetEvent () |
disable killing at next call More... | |
virtual void | reset () override |
resets kill flag to false More... | |
Public Member Functions inherited from ct::core::EventHandler< STATE_DIM > | |
EventHandler () | |
Default constructor. More... | |
virtual | ~EventHandler () |
destructor More... | |
virtual bool | checkEvent (const StateVector< STATE_DIM, double > &state, const double &t)=0 |
check if an event has happened More... | |
virtual void | handleEvent (const StateVector< STATE_DIM, double > &state, const double &t)=0 |
handle the event More... | |
Event handler to kill integration.
This event handler kills the integration if the kill flag is set. This is useful for multi-threaded applications where an external kill signal needs to interrupt an ongoing integration
STATE_DIM | size of the state vector |
typedef Eigen::Matrix<double, STATE_DIM, 1> ct::core::KillIntegrationEventHandler< STATE_DIM >::State_T |
|
inline |
default constructor
sets kill event to false
|
inlinevirtual |
default destructor
|
inlineoverridevirtual |
Implements ct::core::EventHandler< STATE_DIM >.
|
inlineoverride |
checks the kill flag
|
inlineoverride |
interrupts integration
interrupts the integration by throwing a std::runtime_error
state | current state (ignored) |
t | current time (ignored) |
|
inline |
enables killing at next call
|
inline |
disable killing at next call
Referenced by ct::core::KillIntegrationEventHandler< STATE_DIM >::reset().
|
inlineoverridevirtual |
resets kill flag to false
Implements ct::core::EventHandler< STATE_DIM >.
References ct::core::KillIntegrationEventHandler< STATE_DIM >::resetEvent().