DiffEq - Modern C++ ODE Integration Library 1.0.0
High-performance C++ library for solving ODEs with async signal processing
|
Timeout-enabled integration wrapper. More...
#include <timeout_integrator.hpp>
Public Types | |
using | integrator_type = Integrator |
using | state_type = typename Integrator::state_type |
using | time_type = typename Integrator::time_type |
Public Member Functions | |
TimeoutIntegrator (Integrator integrator, TimeoutConfig config={}) | |
Construct timeout integrator with an existing integrator. | |
template<typename... Args> | |
TimeoutIntegrator (TimeoutConfig config, Args &&... args) | |
Construct timeout integrator with integrator parameters. | |
IntegrationResult | integrate_with_timeout (state_type &state, time_type dt, time_type end_time) |
Perform timeout-protected integration. | |
bool | integrate_with_timeout_simple (state_type &state, time_type dt, time_type end_time, std::chrono::milliseconds timeout=std::chrono::milliseconds{0}) |
Simple timeout integration (backwards compatibility) | |
Integrator & | integrator () |
Access the underlying integrator. | |
const Integrator & | integrator () const |
TimeoutConfig & | config () |
Access timeout configuration. | |
const TimeoutConfig & | config () const |
Timeout-enabled integration wrapper.
This class provides timeout protection for any integrator by wrapping the integration call in an async operation with configurable timeout.
Features:
Integrator | The integrator type to wrap |
Definition at line 70 of file timeout_integrator.hpp.
using diffeq::core::TimeoutIntegrator< Integrator >::integrator_type = Integrator |
Definition at line 72 of file timeout_integrator.hpp.
using diffeq::core::TimeoutIntegrator< Integrator >::state_type = typename Integrator::state_type |
Definition at line 73 of file timeout_integrator.hpp.
using diffeq::core::TimeoutIntegrator< Integrator >::time_type = typename Integrator::time_type |
Definition at line 74 of file timeout_integrator.hpp.
|
inlineexplicit |
Construct timeout integrator with an existing integrator.
integrator | The integrator to wrap (moved) |
config | Timeout configuration |
Definition at line 81 of file timeout_integrator.hpp.
|
inlineexplicit |
Construct timeout integrator with integrator parameters.
config | Timeout configuration |
args | Arguments forwarded to integrator constructor |
Definition at line 90 of file timeout_integrator.hpp.
|
inline |
Access timeout configuration.
Definition at line 180 of file timeout_integrator.hpp.
|
inline |
Definition at line 181 of file timeout_integrator.hpp.
|
inline |
Perform timeout-protected integration.
state | State vector to integrate (modified in-place) |
dt | Time step size |
end_time | Final integration time |
Definition at line 100 of file timeout_integrator.hpp.
|
inline |
Simple timeout integration (backwards compatibility)
state | State vector to integrate |
dt | Time step size |
end_time | Final integration time |
timeout | Optional timeout override |
Definition at line 155 of file timeout_integrator.hpp.
|
inline |
Access the underlying integrator.
Definition at line 173 of file timeout_integrator.hpp.
|
inline |
Definition at line 174 of file timeout_integrator.hpp.