Template Function diffeq::core::integrate_with_timeout

Function Documentation

template<typename Integrator, typename State>
bool diffeq::core::integrate_with_timeout(Integrator &integrator, State &state, typename Integrator::time_type dt, typename Integrator::time_type end_time, std::chrono::milliseconds timeout = std::chrono::milliseconds{5000})

Convenience function for simple timeout integration.

Template Parameters:

Integrator – The integrator type

Parameters:
  • integrator – The integrator to use

  • state – State vector to integrate

  • dt – Time step size

  • end_time – Final integration time

  • timeout – Timeout duration

Returns:

true if completed successfully, false if timed out