- 3.0.2 core module.
|
Event handler to kill a (variable step) Integrator after doing too many steps. More...
#include <MaxStepsEventHandler.h>
Public Types | |
typedef ct::core::StateVector< STATE_DIM > | State_T |
Public Member Functions | |
MaxStepsEventHandler (const size_t &maxStepsPerSec=std::numeric_limits< size_t >::max()) | |
default constructor More... | |
virtual | ~MaxStepsEventHandler () |
destructor More... | |
virtual bool | callOnSubsteps () override |
virtual void | reset () override |
resets the number of steps taken More... | |
virtual bool | checkEvent (const State_T &state, const double &t) override |
checks if number of steps is exceeded More... | |
virtual void | handleEvent (const State_T &state, const double &t) override |
throws a std::runtime_error to terminate the integration More... | |
void | setMaxNumSteps (size_t maxNumSteps) |
set maximum number of steps 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 a (variable step) Integrator after doing too many steps.
Checks the number of steps that a variable step Integrator has taken and kills it if exceeded
STATE_DIM | state vector size |
typedef ct::core::StateVector<STATE_DIM> ct::core::MaxStepsEventHandler< STATE_DIM >::State_T |
|
inline |
default constructor
maxStepsPerSec | allowed number of steps |
|
inlinevirtual |
destructor
|
inlineoverridevirtual |
Implements ct::core::EventHandler< STATE_DIM >.
|
inlineoverridevirtual |
resets the number of steps taken
Implements ct::core::EventHandler< STATE_DIM >.
|
inlineoverridevirtual |
checks if number of steps is exceeded
state | current state (gets ignored) |
t | current time (gets ignored) |
|
inlineoverridevirtual |
throws a std::runtime_error to terminate the integration
|
inline |
set maximum number of steps
maxNumSteps | maximum number of steps allowed |