- 3.0.2 core module.
ct::core::KillIntegrationEventHandler< STATE_DIM > Class Template Reference

Event handler to kill integration. More...

#include <KillIntegrationEventHandler.h>

Inheritance diagram for ct::core::KillIntegrationEventHandler< STATE_DIM >:
ct::core::EventHandler< STATE_DIM >

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...
 

Detailed Description

template<size_t STATE_DIM>
class ct::core::KillIntegrationEventHandler< STATE_DIM >

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

Template Parameters
STATE_DIMsize of the state vector

Member Typedef Documentation

◆ State_T

template<size_t STATE_DIM>
typedef Eigen::Matrix<double, STATE_DIM, 1> ct::core::KillIntegrationEventHandler< STATE_DIM >::State_T

Constructor & Destructor Documentation

◆ KillIntegrationEventHandler()

template<size_t STATE_DIM>
ct::core::KillIntegrationEventHandler< STATE_DIM >::KillIntegrationEventHandler ( )
inline

default constructor

sets kill event to false

◆ ~KillIntegrationEventHandler()

template<size_t STATE_DIM>
virtual ct::core::KillIntegrationEventHandler< STATE_DIM >::~KillIntegrationEventHandler ( )
inlinevirtual

default destructor

Member Function Documentation

◆ callOnSubsteps()

template<size_t STATE_DIM>
virtual bool ct::core::KillIntegrationEventHandler< STATE_DIM >::callOnSubsteps ( )
inlineoverridevirtual

◆ checkEvent()

template<size_t STATE_DIM>
bool ct::core::KillIntegrationEventHandler< STATE_DIM >::checkEvent ( const State_T state,
const double &  t 
)
inlineoverride

checks the kill flag

◆ handleEvent()

template<size_t STATE_DIM>
void ct::core::KillIntegrationEventHandler< STATE_DIM >::handleEvent ( const State_T state,
const double &  t 
)
inlineoverride

interrupts integration

interrupts the integration by throwing a std::runtime_error

Parameters
statecurrent state (ignored)
tcurrent time (ignored)

◆ setEvent()

template<size_t STATE_DIM>
void ct::core::KillIntegrationEventHandler< STATE_DIM >::setEvent ( )
inline

enables killing at next call

◆ resetEvent()

template<size_t STATE_DIM>
void ct::core::KillIntegrationEventHandler< STATE_DIM >::resetEvent ( )
inline

disable killing at next call

Referenced by ct::core::KillIntegrationEventHandler< STATE_DIM >::reset().

◆ reset()

template<size_t STATE_DIM>
virtual void ct::core::KillIntegrationEventHandler< STATE_DIM >::reset ( )
inlineoverridevirtual

The documentation for this class was generated from the following file: