Boost C++ Libraries of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

Boost C++ Libraries Home Libraries People FAQ More


Function template integrate_times

boost::numeric::odeint::integrate_times — Integrates the ODE with observer calls at given time points.


// In header: <boost/numeric/odeint/integrate/integrate_times.hpp>

template<typename Stepper, typename System, typename State, 
         typename TimeIterator, typename Time, typename Observer> 
  size_t integrate_times(Stepper stepper, System system, State & start_state, 
                         TimeIterator times_start, TimeIterator times_end, 
                         Time dt, Observer observer);


Integrates the ODE given by system using the given stepper. This function does observer calls at the subsequent time points given by the range times_start, times_end. If the stepper has not step size control, the step size might be reduced occasionally to ensure observer calls exactly at the time points from the given sequence. If the stepper is a ControlledStepper, the step size is adjusted to meet the error bounds, but also might be reduced occasionally to ensure correct observer calls. If a DenseOutputStepper is provided, the dense output functionality is used to call the observer at the given times. The end time of the integration is always *(end_time-1). If a max_step_checker is provided as StepOverflowChecker, a no_progress_error is thrown if too many steps (default: 500) are performed without progress, i.e. in between observer calls. If no checker is provided, no such overflow check is performed.



The time step between observer calls, not necessarily the time step of the integration.


Function/Functor called at equidistant time intervals.


The initial condition x0.


The stepper to be used for numerical integration.


Function/Functor defining the rhs of the ODE.


Iterator to the end time


Iterator to the start time


The number of steps performed.