Boost C++ Libraries

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

This is the documentation for an old version of boost. Click here for the latest Boost documentation.
Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext

Function template integrate

boost::numeric::odeint::integrate — Integrates the ODE.

Synopsis

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


template<typename System, typename State, typename Time, typename Observer> 
  boost::enable_if< typename has_value_type< State >::type, size_t >::type 
  integrate(System system, State & start_state, Time start_time, 
            Time end_time, Time dt, Observer observer);

Description

Integrates the ODE given by system from start_time to end_time starting with start_state as initial condition and dt as initial time step. This function uses a dense output dopri5 stepper and performs an adaptive integration with step size control, thus dt changes during the integration. This method uses standard error bounds of 1E-6. After each step, the observer is called.

[Note] Note

A second version of this function template exists which explicitly expects the value type as template parameter, i.e. integrate< double >( sys , x , t0 , t1 , dt , obs );

Parameters:

dt

Initial step size, will be adjusted during the integration.

end_time

End time of the integration.

observer

Observer that will be called after each time step.

start_state

The initial state.

start_time

Start time of the integration.

system

The system function to solve, hence the r.h.s. of the ordinary differential equation.

Returns:

The number of steps performed.


PrevUpHomeNext