21 template <
size_t STATE_DIM>
25 typedef Eigen::Matrix<double, STATE_DIM, 1>
State_T;
36 bool checkEvent(
const State_T& state,
const double& t)
override {
return killIntegration_; }
43 void handleEvent(
const State_T& state,
const double& t)
override 46 throw std::runtime_error(
"Integration terminated due to external event specified by user.");
56 bool killIntegration_;
void setEvent()
enables killing at next call
Definition: KillIntegrationEventHandler.h:50
virtual void reset() override
resets kill flag to false
Definition: KillIntegrationEventHandler.h:54
virtual bool callOnSubsteps() override
Definition: KillIntegrationEventHandler.h:34
Eigen::Matrix< double, STATE_DIM, 1 > State_T
Definition: KillIntegrationEventHandler.h:25
virtual ~KillIntegrationEventHandler()
default destructor
Definition: KillIntegrationEventHandler.h:33
bool checkEvent(const State_T &state, const double &t) override
checks the kill flag
Definition: KillIntegrationEventHandler.h:36
void resetEvent()
disable killing at next call
Definition: KillIntegrationEventHandler.h:52
void handleEvent(const State_T &state, const double &t) override
interrupts integration
Definition: KillIntegrationEventHandler.h:43
Event handler to kill integration.
Definition: KillIntegrationEventHandler.h:22
KillIntegrationEventHandler()
default constructor
Definition: KillIntegrationEventHandler.h:31
Interface for an event handler for an Integrator.
Definition: EventHandler.h:24