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_const

boost::numeric::odeint::integrate_const — Integrates the ODE with constant step size.


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

template<typename Stepper, typename System, typename State, typename Time, 
         typename Observer, typename StepOverflowChecker> 
  size_t integrate_const(Stepper stepper, System system, State & start_state, 
                         Time start_time, Time end_time, Time dt, 
                         Observer observer, StepOverflowChecker checker);


Integrates the ODE defined by system using the given stepper. This method ensures that the observer is called at constant intervals dt. If the Stepper is a normal stepper without step size control, dt is also used for the numerical scheme. If a ControlledStepper is provided, the algorithm might reduce the step size to meet the error bounds, but it is ensured that the observer is always called at equidistant time points t0 + n*dt. If a DenseOutputStepper is used, the step size also may vary and the dense output is used to call the observer at equidistant time points. 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.



[optional] Functor to check for step count overflows, if no checker is provided, no exception is thrown.


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


The final integration time tend.


[optional] Function/Functor called at equidistant time intervals.


The initial condition x0.


The initial time t0.


The stepper to be used for numerical integration.


Function/Functor defining the rhs of the ODE.


The number of steps performed.