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_n_steps

boost::numeric::odeint::integrate_n_steps — The same function as above, but without checker.

Synopsis

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


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

Description

Integrates the ODE with constant step size.

This function is similar to integrate_const. The observer is called at equidistant time intervals t0 + n*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. The final integration time is always t0 + num_of_steps*dt. If a max_step_checker is provided as StepOverflowChecker, a no_progress_errror 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.

Parameters:

dt

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

num_of_steps

Number of steps to be performed

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.


PrevUpHomeNext