| Home | Libraries | People | FAQ | More

## Function template integrate_adaptive

boost::numeric::odeint::integrate_adaptive — Integrates the ODE with adaptive step size.

## Synopsis

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

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

## Description

This function integrates the ODE given by system with the given stepper. The observer is called after each step. If the stepper has no error control, the step size remains constant and the observer is called at equidistant time points t0+n*dt. If the stepper is a ControlledStepper, the step size is adjusted and the observer is called in non-equidistant intervals.

Parameters: |
`dt` | The time step between observer calls, not necessarily the time step of the integration.
`end_time` | The final integration time tend.
`observer` | Function/Functor called at equidistant time intervals.
`start_state` | The initial condition x0.
`start_time` | The initial time t0.
`stepper` | The stepper to be used for numerical integration.
`system` | Function/Functor defining the rhs of the ODE.
Returns: | The number of steps performed.