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

Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext

Dense Output Stepper

This concept specifies the interface a dense output stepper has to fulfill to be used within integrate functions.

Description

A dense output stepper following this Dense Output Stepper concept provides the possibility to perform a single step of the solution x(t) of an ODE to obtain x(t+dt). The step-size dt might be adjusted automatically due to error control. Dense output steppers also can interpolate the solution to calculate the state x(t') at any point t <= t' <= t+dt.

Associated types
Notation

Stepper

A type that is a model of Dense Output Stepper

State

A type representing the state x of the ODE

stepper

An object of type Stepper

x0, x

Object of type State

t0, dt0, t

Objects of type Stepper::time_type

sys

An object defining the ODE, should be a model of System, Symplectic System, Simple Symplectic System or Implicit System.

Valid Expressions

Name

Expression

Type

Semantics

Initialize integration

stepper.initialize( x0 , t0 , dt0 )

void

Initializes the stepper with initial values x0, t0 and dt0.

Do step

stepper.do_step( sys )

std::pair< Stepper::time_type , Stepper::time_type >

Performs one step using the ODE defined by sys. The step-size might be changed internally due to error control. This function returns a pair containing t and t+dt representing the interval for which interpolation can be performed.

Do interpolation

stepper.calc_state( t_inter , x )

void

Performs the interpolation to calculate /x(tinter/) where /t <= tinter <= t+dt/.

Get current time

stepper.current_time()

const Stepper::time_type&

Returns the current time t+dt of the stepper, that is the end time of the last step and the starting time for the next call of do_step

Get current state

stepper.current_state()

const Stepper::state_type&

Returns the current state of the stepper, that is x(t+dt), the state at the time returned by stepper.current_time()

Get current time step

stepper.current_time_step()

const Stepper::time_type&

Returns the current step size of the stepper, that is dt

Models

PrevUpHomeNext