DiffEq - Modern C++ ODE Integration Library 1.0.0
High-performance C++ library for solving ODEs with async signal processing
|
将积分器包装为协程,支持细粒度控制 More...
Public Member Functions | |
CoroutineIntegrator (std::unique_ptr< diffeq::core::AbstractIntegrator< State > > integrator) | |
IntegrationTask< State > | integrate_coro (State initial_state, typename diffeq::core::AbstractIntegrator< State >::time_type dt, typename diffeq::core::AbstractIntegrator< State >::time_type end_time, size_t yield_interval=10) |
协程化的积分,每步都可以暂停 | |
template<typename ProgressCallback > | |
IntegrationTask< State > | integrate_with_progress (State initial_state, typename diffeq::core::AbstractIntegrator< State >::time_type dt, typename diffeq::core::AbstractIntegrator< State >::time_type end_time, ProgressCallback &&callback) |
带进度回调的协程积分 | |
将积分器包装为协程,支持细粒度控制
Definition at line 172 of file coroutine_integration_demo.cpp.
|
inlineexplicit |
Definition at line 177 of file coroutine_integration_demo.cpp.
|
inline |
协程化的积分,每步都可以暂停
initial_state | 初始状态 |
dt | 时间步长 |
end_time | 结束时间 |
yield_interval | 产生中间结果的步数间隔 |
Definition at line 188 of file coroutine_integration_demo.cpp.
|
inline |
带进度回调的协程积分
Definition at line 221 of file coroutine_integration_demo.cpp.