Boost  v1.57.0
doxygen for www.boost.org
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
boost::numeric::odeint::runge_kutta_dopri5< State, Value, Deriv, Time, Algebra, Operations, Resizer > Class Template Reference

The Runge-Kutta Dormand-Prince 5 method. More...

#include <runge_kutta_dopri5.hpp>

Inheritance diagram for boost::numeric::odeint::runge_kutta_dopri5< State, Value, Deriv, Time, Algebra, Operations, Resizer >:
Collaboration diagram for boost::numeric::odeint::runge_kutta_dopri5< State, Value, Deriv, Time, Algebra, Operations, Resizer >:

Public Types

typedef
explicit_error_stepper_fsal_base
< runge_kutta_dopri5< State,
Value, Deriv, Time, Algebra,
Operations, Resizer >
, 5, 5, 4, State, Value, Deriv,
Time, Algebra, Operations,
Resizer > 
stepper_base_type
 
typedef
stepper_base_type::state_type 
state_type
 
typedef
stepper_base_type::value_type 
value_type
 
typedef
stepper_base_type::deriv_type 
deriv_type
 
typedef
stepper_base_type::time_type 
time_type
 
typedef
stepper_base_type::algebra_type 
algebra_type
 
typedef
stepper_base_type::operations_type 
operations_type
 
typedef
stepper_base_type::resizer_type 
resizer_type
 
typedef
stepper_base_type::stepper_type 
stepper_type
 
typedef
stepper_base_type::wrapped_state_type 
wrapped_state_type
 
typedef
stepper_base_type::wrapped_deriv_type 
wrapped_deriv_type
 
typedef algebra_stepper_base
< Algebra, Operations > 
algebra_stepper_base_type
 
typedef
explicit_error_stepper_fsal_tag 
stepper_category
 
typedef
explicit_error_stepper_fsal_base
< runge_kutta_dopri5< State,
Value, Deriv, Time, Algebra,
Operations, Resizer >, Order,
StepperOrder, ErrorOrder,
State, Value, Deriv, Time,
Algebra, Operations, Resizer > 
internal_stepper_base_type
 
typedef unsigned short order_type
 

Public Member Functions

 runge_kutta_dopri5 (const algebra_type &algebra=algebra_type())
 Constructs the runge_kutta_dopri5 class. More...
 
template<class System , class StateIn , class DerivIn , class StateOut , class DerivOut >
void do_step_impl (System system, const StateIn &in, const DerivIn &dxdt_in, time_type t, StateOut &out, DerivOut &dxdt_out, time_type dt)
 This method performs one step. More...
 
template<class System , class StateIn , class DerivIn , class StateOut , class DerivOut , class Err >
void do_step_impl (System system, const StateIn &in, const DerivIn &dxdt_in, time_type t, StateOut &out, DerivOut &dxdt_out, time_type dt, Err &xerr)
 This method performs one step. More...
 
template<class StateOut , class StateIn1 , class DerivIn1 , class StateIn2 , class DerivIn2 >
void calc_state (time_type t, StateOut &x, const StateIn1 &x_old, const DerivIn1 &deriv_old, time_type t_old, const StateIn2 &, const DerivIn2 &deriv_new, time_type t_new) const
 This method is used for continuous output and it calculates the state x at a time t from the knowledge of two states old_state and current_state at time points t_old and t_new. More...
 
template<class StateIn >
void adjust_size (const StateIn &x)
 Adjust the size of all temporaries in the stepper manually. More...
 
order_type order (void) const
 
order_type stepper_order (void) const
 
order_type error_order (void) const
 
void do_step (System system, StateInOut &x, time_type t, time_type dt)
 This method performs one step. More...
 
void do_step (System system, const StateInOut &x, time_type t, time_type dt)
 Second version to solve the forwarding problem, can be called with Boost.Range as StateInOut. More...
 
boost::disable_if
< boost::is_same< StateInOut,
time_type >, void >::type 
do_step (System system, StateInOut &x, DerivInOut &dxdt, time_type t, time_type dt)
 The method performs one step with the stepper passed by Stepper. More...
 
boost::disable_if
< boost::is_same< StateIn,
time_type >, void >::type 
do_step (System system, const StateIn &in, time_type t, StateOut &out, time_type dt)
 The method performs one step with the stepper passed by Stepper. More...
 
void do_step (System system, const StateIn &in, const DerivIn &dxdt_in, time_type t, StateOut &out, DerivOut &dxdt_out, time_type dt)
 The method performs one step with the stepper passed by Stepper. More...
 
void do_step (System system, StateInOut &x, time_type t, time_type dt, Err &xerr)
 The method performs one step with the stepper passed by Stepper and estimates the error. More...
 
void do_step (System system, const StateInOut &x, time_type t, time_type dt, Err &xerr)
 Second version to solve the forwarding problem, can be called with Boost.Range as StateInOut. More...
 
boost::disable_if
< boost::is_same< StateInOut,
time_type >, void >::type 
do_step (System system, StateInOut &x, DerivInOut &dxdt, time_type t, time_type dt, Err &xerr)
 The method performs one step with the stepper passed by Stepper. More...
 
void do_step (System system, const StateIn &in, time_type t, StateOut &out, time_type dt, Err &xerr)
 The method performs one step with the stepper passed by Stepper. More...
 
void do_step (System system, const StateIn &in, const DerivIn &dxdt_in, time_type t, StateOut &out, DerivOut &dxdt_out, time_type dt, Err &xerr)
 The method performs one step with the stepper passed by Stepper. More...
 
void reset (void)
 Resets the internal state of this stepper. More...
 
void initialize (const DerivIn &deriv)
 Initializes the internal state of the stepper. More...
 
void initialize (System system, const StateIn &x, time_type t)
 Initializes the internal state of the stepper. More...
 
bool is_initialized (void) const
 Returns if the stepper is already initialized. More...
 
algebra_typealgebra ()
 
const algebra_typealgebra () const
 

Static Public Attributes

static const order_type order_value
 
static const order_type stepper_order_value
 
static const order_type error_order_value
 

Protected Attributes

wrapped_deriv_type m_dxdt
 
algebra_type m_algebra
 

Detailed Description

template<class State, class Value = double, class Deriv = State, class Time = Value, class Algebra = typename algebra_dispatcher< State >::algebra_type, class Operations = typename operations_dispatcher< State >::operations_type, class Resizer = initially_resizer>
class boost::numeric::odeint::runge_kutta_dopri5< State, Value, Deriv, Time, Algebra, Operations, Resizer >

The Runge-Kutta Dormand-Prince 5 method.

The Runge-Kutta Dormand-Prince 5 method is a very popular method for solving ODEs, see . The method is explicit and fulfills the Error Stepper concept. Step size control is provided but continuous output is available which make this method favourable for many applications.

This class derives from explicit_error_stepper_fsal_base and inherits its interface via CRTP (current recurring template pattern). The method possesses the FSAL (first-same-as-last) property. See explicit_error_stepper_fsal_base for more details.

Template Parameters
StateThe state type.
ValueThe value type.
DerivThe type representing the time derivative of the state.
TimeThe time representing the independent variable - the time.
AlgebraThe algebra type.
OperationsThe operations type.
ResizerThe resizer policy type.

Member Typedef Documentation

typedef algebra_stepper_base< Algebra , Operations > boost::numeric::odeint::explicit_error_stepper_fsal_base< runge_kutta_dopri5< State, Value, Deriv, Time, Algebra, Operations, Resizer > , Order, StepperOrder, ErrorOrder, State, Value, Deriv, Time, Algebra, Operations, Resizer >::algebra_stepper_base_type
inherited
template<class State , class Value = double, class Deriv = State, class Time = Value, class Algebra = typename algebra_dispatcher< State >::algebra_type, class Operations = typename operations_dispatcher< State >::operations_type, class Resizer = initially_resizer>
typedef stepper_base_type::algebra_type boost::numeric::odeint::runge_kutta_dopri5< State, Value, Deriv, Time, Algebra, Operations, Resizer >::algebra_type
template<class State , class Value = double, class Deriv = State, class Time = Value, class Algebra = typename algebra_dispatcher< State >::algebra_type, class Operations = typename operations_dispatcher< State >::operations_type, class Resizer = initially_resizer>
typedef stepper_base_type::deriv_type boost::numeric::odeint::runge_kutta_dopri5< State, Value, Deriv, Time, Algebra, Operations, Resizer >::deriv_type
typedef explicit_error_stepper_fsal_base< runge_kutta_dopri5< State, Value, Deriv, Time, Algebra, Operations, Resizer > , Order , StepperOrder , ErrorOrder , State , Value , Deriv , Time , Algebra , Operations , Resizer > boost::numeric::odeint::explicit_error_stepper_fsal_base< runge_kutta_dopri5< State, Value, Deriv, Time, Algebra, Operations, Resizer > , Order, StepperOrder, ErrorOrder, State, Value, Deriv, Time, Algebra, Operations, Resizer >::internal_stepper_base_type
inherited
template<class State , class Value = double, class Deriv = State, class Time = Value, class Algebra = typename algebra_dispatcher< State >::algebra_type, class Operations = typename operations_dispatcher< State >::operations_type, class Resizer = initially_resizer>
typedef stepper_base_type::operations_type boost::numeric::odeint::runge_kutta_dopri5< State, Value, Deriv, Time, Algebra, Operations, Resizer >::operations_type
typedef unsigned short boost::numeric::odeint::explicit_error_stepper_fsal_base< runge_kutta_dopri5< State, Value, Deriv, Time, Algebra, Operations, Resizer > , Order, StepperOrder, ErrorOrder, State, Value, Deriv, Time, Algebra, Operations, Resizer >::order_type
inherited
template<class State , class Value = double, class Deriv = State, class Time = Value, class Algebra = typename algebra_dispatcher< State >::algebra_type, class Operations = typename operations_dispatcher< State >::operations_type, class Resizer = initially_resizer>
typedef stepper_base_type::resizer_type boost::numeric::odeint::runge_kutta_dopri5< State, Value, Deriv, Time, Algebra, Operations, Resizer >::resizer_type
template<class State , class Value = double, class Deriv = State, class Time = Value, class Algebra = typename algebra_dispatcher< State >::algebra_type, class Operations = typename operations_dispatcher< State >::operations_type, class Resizer = initially_resizer>
typedef stepper_base_type::state_type boost::numeric::odeint::runge_kutta_dopri5< State, Value, Deriv, Time, Algebra, Operations, Resizer >::state_type
template<class State , class Value = double, class Deriv = State, class Time = Value, class Algebra = typename algebra_dispatcher< State >::algebra_type, class Operations = typename operations_dispatcher< State >::operations_type, class Resizer = initially_resizer>
typedef explicit_error_stepper_fsal_base< runge_kutta_dopri5< State , Value , Deriv , Time , Algebra , Operations , Resizer > , 5 , 5 , 4 , State , Value , Deriv , Time , Algebra , Operations , Resizer > boost::numeric::odeint::runge_kutta_dopri5< State, Value, Deriv, Time, Algebra, Operations, Resizer >::stepper_base_type
typedef explicit_error_stepper_fsal_tag boost::numeric::odeint::explicit_error_stepper_fsal_base< runge_kutta_dopri5< State, Value, Deriv, Time, Algebra, Operations, Resizer > , Order, StepperOrder, ErrorOrder, State, Value, Deriv, Time, Algebra, Operations, Resizer >::stepper_category
inherited
template<class State , class Value = double, class Deriv = State, class Time = Value, class Algebra = typename algebra_dispatcher< State >::algebra_type, class Operations = typename operations_dispatcher< State >::operations_type, class Resizer = initially_resizer>
typedef stepper_base_type::stepper_type boost::numeric::odeint::runge_kutta_dopri5< State, Value, Deriv, Time, Algebra, Operations, Resizer >::stepper_type
template<class State , class Value = double, class Deriv = State, class Time = Value, class Algebra = typename algebra_dispatcher< State >::algebra_type, class Operations = typename operations_dispatcher< State >::operations_type, class Resizer = initially_resizer>
typedef stepper_base_type::time_type boost::numeric::odeint::runge_kutta_dopri5< State, Value, Deriv, Time, Algebra, Operations, Resizer >::time_type
template<class State , class Value = double, class Deriv = State, class Time = Value, class Algebra = typename algebra_dispatcher< State >::algebra_type, class Operations = typename operations_dispatcher< State >::operations_type, class Resizer = initially_resizer>
typedef stepper_base_type::value_type boost::numeric::odeint::runge_kutta_dopri5< State, Value, Deriv, Time, Algebra, Operations, Resizer >::value_type
template<class State , class Value = double, class Deriv = State, class Time = Value, class Algebra = typename algebra_dispatcher< State >::algebra_type, class Operations = typename operations_dispatcher< State >::operations_type, class Resizer = initially_resizer>
typedef stepper_base_type::wrapped_deriv_type boost::numeric::odeint::runge_kutta_dopri5< State, Value, Deriv, Time, Algebra, Operations, Resizer >::wrapped_deriv_type
template<class State , class Value = double, class Deriv = State, class Time = Value, class Algebra = typename algebra_dispatcher< State >::algebra_type, class Operations = typename operations_dispatcher< State >::operations_type, class Resizer = initially_resizer>
typedef stepper_base_type::wrapped_state_type boost::numeric::odeint::runge_kutta_dopri5< State, Value, Deriv, Time, Algebra, Operations, Resizer >::wrapped_state_type

Constructor & Destructor Documentation

template<class State , class Value = double, class Deriv = State, class Time = Value, class Algebra = typename algebra_dispatcher< State >::algebra_type, class Operations = typename operations_dispatcher< State >::operations_type, class Resizer = initially_resizer>
boost::numeric::odeint::runge_kutta_dopri5< State, Value, Deriv, Time, Algebra, Operations, Resizer >::runge_kutta_dopri5 ( const algebra_type algebra = algebra_type())
inline

Constructs the runge_kutta_dopri5 class.

This constructor can be used as a default constructor if the algebra has a default constructor.

Parameters
algebraA copy of algebra is made and stored inside explicit_stepper_base.

Member Function Documentation

template<class State , class Value = double, class Deriv = State, class Time = Value, class Algebra = typename algebra_dispatcher< State >::algebra_type, class Operations = typename operations_dispatcher< State >::operations_type, class Resizer = initially_resizer>
template<class StateIn >
boost::numeric::odeint::runge_kutta_dopri5< State, Value, Deriv, Time, Algebra, Operations, Resizer >::adjust_size ( const StateIn &  x)
inline

Adjust the size of all temporaries in the stepper manually.

Parameters
xA state from which the size of the temporaries to be resized is deduced.

References boost::numeric::odeint::explicit_error_stepper_fsal_base< runge_kutta_dopri5< State, Value, Deriv, Time, Algebra, Operations, Resizer >, 5, 5, 4, State, Value, Deriv, Time, Algebra, Operations, Resizer >::adjust_size().

template<class Algebra, class Operations>
algebra_type & boost::numeric::odeint::algebra_stepper_base< Algebra, Operations >::algebra ( )
inlineinherited
Returns
A reference to the algebra which is held by this class.
template<class Algebra, class Operations>
const algebra_type & boost::numeric::odeint::algebra_stepper_base< Algebra, Operations >::algebra ( ) const
inlineinherited
Returns
A const reference to the algebra which is held by this class.
template<class State , class Value = double, class Deriv = State, class Time = Value, class Algebra = typename algebra_dispatcher< State >::algebra_type, class Operations = typename operations_dispatcher< State >::operations_type, class Resizer = initially_resizer>
template<class StateOut , class StateIn1 , class DerivIn1 , class StateIn2 , class DerivIn2 >
boost::numeric::odeint::runge_kutta_dopri5< State, Value, Deriv, Time, Algebra, Operations, Resizer >::calc_state ( time_type  t,
StateOut &  x,
const StateIn1 &  x_old,
const DerivIn1 &  deriv_old,
time_type  t_old,
const StateIn2 &  ,
const DerivIn2 &  deriv_new,
time_type  t_new 
) const
inline

This method is used for continuous output and it calculates the state x at a time t from the knowledge of two states old_state and current_state at time points t_old and t_new.

It also uses internal variables to calculate the result. Hence this method must be called after two successful do_step calls.

References boost::numeric::odeint::algebra_stepper_base< Algebra, Operations >::m_algebra, and template.

void boost::numeric::odeint::explicit_error_stepper_fsal_base< runge_kutta_dopri5< State, Value, Deriv, Time, Algebra, Operations, Resizer > , Order, StepperOrder, ErrorOrder, State, Value, Deriv, Time, Algebra, Operations, Resizer >::do_step ( System  system,
StateInOut &  x,
time_type  t,
time_type  dt 
)
inlineinherited

This method performs one step.

It transforms the result in-place.

Note
This method uses the internal state of the stepper.
Parameters
systemThe system function to solve, hence the r.h.s. of the ordinary differential equation. It must fulfill the Simple System concept.
xThe state of the ODE which should be solved. After calling do_step the result is updated in x.
tThe value of the time, at which the step should be performed.
dtThe step size.
void boost::numeric::odeint::explicit_error_stepper_fsal_base< runge_kutta_dopri5< State, Value, Deriv, Time, Algebra, Operations, Resizer > , Order, StepperOrder, ErrorOrder, State, Value, Deriv, Time, Algebra, Operations, Resizer >::do_step ( System  system,
const StateInOut &  x,
time_type  t,
time_type  dt 
)
inlineinherited

Second version to solve the forwarding problem, can be called with Boost.Range as StateInOut.

boost::disable_if< boost::is_same< StateInOut , time_type > , void >::type boost::numeric::odeint::explicit_error_stepper_fsal_base< runge_kutta_dopri5< State, Value, Deriv, Time, Algebra, Operations, Resizer > , Order, StepperOrder, ErrorOrder, State, Value, Deriv, Time, Algebra, Operations, Resizer >::do_step ( System  system,
StateInOut &  x,
DerivInOut &  dxdt,
time_type  t,
time_type  dt 
)
inlineinherited

The method performs one step with the stepper passed by Stepper.

Additionally to the other methods the derivative of x is also passed to this method. Therefore, dxdt must be evaluated initially:

ode( x , dxdt , t );
for( ... )
{
stepper.do_step( ode , x , dxdt , t , dt );
t += dt;
}
Note
This method does NOT use the initial state, since the first derivative is explicitly passed to this method.

The result is updated in place in x as well as the derivative dxdt. This method is disabled if Time and StateInOut are of the same type. In this case the method could not be distinguished from other do_step versions.

Note
This method does not solve the forwarding problem.
Parameters
systemThe system function to solve, hence the r.h.s. of the ODE. It must fulfill the Simple System concept.
xThe state of the ODE which should be solved. After calling do_step the result is updated in x.
dxdtThe derivative of x at t. After calling do_step dxdt is updated to the new value.
tThe value of the time, at which the step should be performed.
dtThe step size.
boost::disable_if< boost::is_same< StateIn , time_type > , void >::type boost::numeric::odeint::explicit_error_stepper_fsal_base< runge_kutta_dopri5< State, Value, Deriv, Time, Algebra, Operations, Resizer > , Order, StepperOrder, ErrorOrder, State, Value, Deriv, Time, Algebra, Operations, Resizer >::do_step ( System  system,
const StateIn &  in,
time_type  t,
StateOut &  out,
time_type  dt 
)
inlineinherited

The method performs one step with the stepper passed by Stepper.

The state of the ODE is updated out-of-place. This method is disabled if StateIn and Time are the same type. In this case the method can not be distinguished from other do_step variants.

Note
This method uses the internal state of the stepper.
This method does not solve the forwarding problem.
Parameters
systemThe system function to solve, hence the r.h.s. of the ODE. It must fulfill the Simple System concept.
inThe state of the ODE which should be solved. in is not modified in this method
tThe value of the time, at which the step should be performed.
outThe result of the step is written in out.
dtThe step size.

References boost::numeric::odeint::detail::_1, boost::bind(), boost::numeric::odeint::explicit_error_stepper_fsal_base< Stepper, Order, StepperOrder, ErrorOrder, State, Value, Deriv, Time, Algebra, Operations, Resizer >::initialize(), boost::numeric::odeint::explicit_error_stepper_fsal_base< Stepper, Order, StepperOrder, ErrorOrder, State, Value, Deriv, Time, Algebra, Operations, Resizer >::m_dxdt, boost::numeric::odeint::state_wrapper< V, Enabler >::m_v, boost::ref(), and template.

void boost::numeric::odeint::explicit_error_stepper_fsal_base< runge_kutta_dopri5< State, Value, Deriv, Time, Algebra, Operations, Resizer > , Order, StepperOrder, ErrorOrder, State, Value, Deriv, Time, Algebra, Operations, Resizer >::do_step ( System  system,
const StateIn &  in,
const DerivIn &  dxdt_in,
time_type  t,
StateOut &  out,
DerivOut &  dxdt_out,
time_type  dt 
)
inlineinherited

The method performs one step with the stepper passed by Stepper.

The state of the ODE is updated out-of-place. Furthermore, the derivative of x at t is passed to the stepper and updated by the stepper to its new value at t+dt.

Note
This method does not solve the forwarding problem.
This method does NOT use the internal state of the stepper.
Parameters
systemThe system function to solve, hence the r.h.s. of the ODE. It must fulfill the Simple System concept.
inThe state of the ODE which should be solved. in is not modified in this method
dxdt_inThe derivative of x at t.
tThe value of the time, at which the step should be performed.
outThe result of the step is written in out.
dxdt_outThe updated derivative of out at t+dt.
dtThe step size.
void boost::numeric::odeint::explicit_error_stepper_fsal_base< runge_kutta_dopri5< State, Value, Deriv, Time, Algebra, Operations, Resizer > , Order, StepperOrder, ErrorOrder, State, Value, Deriv, Time, Algebra, Operations, Resizer >::do_step ( System  system,
StateInOut &  x,
time_type  t,
time_type  dt,
Err &  xerr 
)
inlineinherited

The method performs one step with the stepper passed by Stepper and estimates the error.

The state of the ODE is updated in-place.

Note
This method uses the internal state of the stepper.
Parameters
systemThe system function to solve, hence the r.h.s. of the ODE. It must fulfill the Simple System concept.
xThe state of the ODE which should be solved. x is updated by this method.
tThe value of the time, at which the step should be performed.
dtThe step size.
xerrThe estimation of the error is stored in xerr.
void boost::numeric::odeint::explicit_error_stepper_fsal_base< runge_kutta_dopri5< State, Value, Deriv, Time, Algebra, Operations, Resizer > , Order, StepperOrder, ErrorOrder, State, Value, Deriv, Time, Algebra, Operations, Resizer >::do_step ( System  system,
const StateInOut &  x,
time_type  t,
time_type  dt,
Err &  xerr 
)
inlineinherited

Second version to solve the forwarding problem, can be called with Boost.Range as StateInOut.

boost::disable_if< boost::is_same< StateInOut , time_type > , void >::type boost::numeric::odeint::explicit_error_stepper_fsal_base< runge_kutta_dopri5< State, Value, Deriv, Time, Algebra, Operations, Resizer > , Order, StepperOrder, ErrorOrder, State, Value, Deriv, Time, Algebra, Operations, Resizer >::do_step ( System  system,
StateInOut &  x,
DerivInOut &  dxdt,
time_type  t,
time_type  dt,
Err &  xerr 
)
inlineinherited

The method performs one step with the stepper passed by Stepper.

Additionally to the other method the derivative of x is also passed to this method and updated by this method.

Note
This method does NOT use the internal state of the stepper.

The result is updated in place in x. This method is disabled if Time and Deriv are of the same type. In this case the method could not be distinguished from other do_step versions. This method is disabled if StateInOut and Time are of the same type.

Note
This method does NOT use the internal state of the stepper.
This method does not solve the forwarding problem.
Parameters
systemThe system function to solve, hence the r.h.s. of the ODE. It must fulfill the Simple System concept.
xThe state of the ODE which should be solved. After calling do_step the result is updated in x.
dxdtThe derivative of x at t. After calling do_step this value is updated to the new value at t+dt.
tThe value of the time, at which the step should be performed.
dtThe step size.
xerrThe error estimate is stored in xerr.
void boost::numeric::odeint::explicit_error_stepper_fsal_base< runge_kutta_dopri5< State, Value, Deriv, Time, Algebra, Operations, Resizer > , Order, StepperOrder, ErrorOrder, State, Value, Deriv, Time, Algebra, Operations, Resizer >::do_step ( System  system,
const StateIn &  in,
time_type  t,
StateOut &  out,
time_type  dt,
Err &  xerr 
)
inlineinherited

The method performs one step with the stepper passed by Stepper.

The state of the ODE is updated out-of-place. Furthermore, the error is estimated.

Note
This method uses the internal state of the stepper.
This method does not solve the forwarding problem.
Parameters
systemThe system function to solve, hence the r.h.s. of the ODE. It must fulfill the Simple System concept.
inThe state of the ODE which should be solved. in is not modified in this method
tThe value of the time, at which the step should be performed.
outThe result of the step is written in out.
dtThe step size.
xerrThe error estimate.

References boost::numeric::odeint::detail::_1, boost::bind(), boost::numeric::odeint::explicit_error_stepper_fsal_base< Stepper, Order, StepperOrder, ErrorOrder, State, Value, Deriv, Time, Algebra, Operations, Resizer >::initialize(), boost::numeric::odeint::explicit_error_stepper_fsal_base< Stepper, Order, StepperOrder, ErrorOrder, State, Value, Deriv, Time, Algebra, Operations, Resizer >::m_dxdt, boost::numeric::odeint::state_wrapper< V, Enabler >::m_v, boost::ref(), and template.

void boost::numeric::odeint::explicit_error_stepper_fsal_base< runge_kutta_dopri5< State, Value, Deriv, Time, Algebra, Operations, Resizer > , Order, StepperOrder, ErrorOrder, State, Value, Deriv, Time, Algebra, Operations, Resizer >::do_step ( System  system,
const StateIn &  in,
const DerivIn &  dxdt_in,
time_type  t,
StateOut &  out,
DerivOut &  dxdt_out,
time_type  dt,
Err &  xerr 
)
inlineinherited

The method performs one step with the stepper passed by Stepper.

The state of the ODE is updated out-of-place. Furthermore, the derivative of x at t is passed to the stepper and the error is estimated.

Note
This method does NOT use the internal state of the stepper.
This method does not solve the forwarding problem.
Parameters
systemThe system function to solve, hence the r.h.s. of the ODE. It must fulfill the Simple System concept.
inThe state of the ODE which should be solved. in is not modified in this method
dxdt_inThe derivative of x at t.
tThe value of the time, at which the step should be performed.
outThe result of the step is written in out.
dxdt_outThe new derivative at t+dt is written into this variable.
dtThe step size.
xerrThe error estimate.
template<class State , class Value = double, class Deriv = State, class Time = Value, class Algebra = typename algebra_dispatcher< State >::algebra_type, class Operations = typename operations_dispatcher< State >::operations_type, class Resizer = initially_resizer>
template<class System , class StateIn , class DerivIn , class StateOut , class DerivOut >
boost::numeric::odeint::runge_kutta_dopri5< State, Value, Deriv, Time, Algebra, Operations, Resizer >::do_step_impl ( System  system,
const StateIn &  in,
const DerivIn &  dxdt_in,
time_type  t,
StateOut &  out,
DerivOut &  dxdt_out,
time_type  dt 
)
inline

This method performs one step.

The derivative dxdt_in of in at the time t is passed to the method. The result is updated out-of-place, hence the input is in in and the output in out. Furthermore, the derivative is update out-of-place, hence the input is assumed to be in dxdt_in and the output in dxdt_out. Access to this step functionality is provided by explicit_error_stepper_fsal_base and do_step_impl should not be called directly.

Parameters
systemThe system function to solve, hence the r.h.s. of the ODE. It must fulfill the Simple System concept.
inThe state of the ODE which should be solved. in is not modified in this method
dxdt_inThe derivative of x at t. dxdt_in is not modified by this method
tThe value of the time, at which the step should be performed.
outThe result of the step is written in out.
dxdt_outThe result of the new derivative at time t+dt.
dtThe step size.

References boost::numeric::odeint::detail::_1, boost::xpressive::a2, boost::xpressive::a3, boost::xpressive::a4, boost::xpressive::a5, boost::bind(), boost::numeric::odeint::algebra_stepper_base< Algebra, Operations >::m_algebra, boost::ref(), template, and boost::detail::type.

Referenced by boost::numeric::odeint::runge_kutta_dopri5< State, Value, Deriv, Time, Algebra, Operations, Resizer >::do_step_impl().

template<class State , class Value = double, class Deriv = State, class Time = Value, class Algebra = typename algebra_dispatcher< State >::algebra_type, class Operations = typename operations_dispatcher< State >::operations_type, class Resizer = initially_resizer>
template<class System , class StateIn , class DerivIn , class StateOut , class DerivOut , class Err >
boost::numeric::odeint::runge_kutta_dopri5< State, Value, Deriv, Time, Algebra, Operations, Resizer >::do_step_impl ( System  system,
const StateIn &  in,
const DerivIn &  dxdt_in,
time_type  t,
StateOut &  out,
DerivOut &  dxdt_out,
time_type  dt,
Err &  xerr 
)
inline

This method performs one step.

The derivative dxdt_in of in at the time t is passed to the method. The result is updated out-of-place, hence the input is in in and the output in out. Furthermore, the derivative is update out-of-place, hence the input is assumed to be in dxdt_in and the output in dxdt_out. Access to this step functionality is provided by explicit_error_stepper_fsal_base and do_step_impl should not be called directly. An estimation of the error is calculated.

Parameters
systemThe system function to solve, hence the r.h.s. of the ODE. It must fulfill the Simple System concept.
inThe state of the ODE which should be solved. in is not modified in this method
dxdt_inThe derivative of x at t. dxdt_in is not modified by this method
tThe value of the time, at which the step should be performed.
outThe result of the step is written in out.
dxdt_outThe result of the new derivative at time t+dt.
dtThe step size.
xerrAn estimation of the error.

References boost::numeric::odeint::detail::_1, boost::bind(), boost::numeric::odeint::copy(), boost::numeric::odeint::runge_kutta_dopri5< State, Value, Deriv, Time, Algebra, Operations, Resizer >::do_step_impl(), boost::numeric::odeint::algebra_stepper_base< Algebra, Operations >::m_algebra, boost::ref(), boost::numeric::odeint::same_instance(), and template.

order_type boost::numeric::odeint::explicit_error_stepper_fsal_base< runge_kutta_dopri5< State, Value, Deriv, Time, Algebra, Operations, Resizer > , Order, StepperOrder, ErrorOrder, State, Value, Deriv, Time, Algebra, Operations, Resizer >::error_order ( void  ) const
inlineinherited
void boost::numeric::odeint::explicit_error_stepper_fsal_base< runge_kutta_dopri5< State, Value, Deriv, Time, Algebra, Operations, Resizer > , Order, StepperOrder, ErrorOrder, State, Value, Deriv, Time, Algebra, Operations, Resizer >::initialize ( const DerivIn &  deriv)
inlineinherited

Initializes the internal state of the stepper.

Parameters
derivThe derivative of x. The next call of do_step expects that the derivative of x passed to do_step has the value of deriv.

References boost::numeric::odeint::copy(), boost::numeric::odeint::explicit_error_stepper_fsal_base< Stepper, Order, StepperOrder, ErrorOrder, State, Value, Deriv, Time, Algebra, Operations, Resizer >::m_dxdt, and boost::numeric::odeint::state_wrapper< V, Enabler >::m_v.

void boost::numeric::odeint::explicit_error_stepper_fsal_base< runge_kutta_dopri5< State, Value, Deriv, Time, Algebra, Operations, Resizer > , Order, StepperOrder, ErrorOrder, State, Value, Deriv, Time, Algebra, Operations, Resizer >::initialize ( System  system,
const StateIn &  x,
time_type  t 
)
inlineinherited

Initializes the internal state of the stepper.

This method is equivalent to

Deriv dxdt;
system( x , dxdt , t );
stepper.initialize( dxdt );
Parameters
systemThe system function for the next calls of do_step.
xThe current state of the ODE.
tThe current time of the ODE.

References boost::numeric::odeint::explicit_error_stepper_fsal_base< Stepper, Order, StepperOrder, ErrorOrder, State, Value, Deriv, Time, Algebra, Operations, Resizer >::m_dxdt, boost::numeric::odeint::state_wrapper< V, Enabler >::m_v, and boost::detail::type.

bool boost::numeric::odeint::explicit_error_stepper_fsal_base< runge_kutta_dopri5< State, Value, Deriv, Time, Algebra, Operations, Resizer > , Order, StepperOrder, ErrorOrder, State, Value, Deriv, Time, Algebra, Operations, Resizer >::is_initialized ( void  ) const
inlineinherited

Returns if the stepper is already initialized.

If the stepper is not initialized, the first call of do_step will initialize the state of the stepper. If the stepper is already initialized the system function can not be safely exchanged between consecutive do_step calls.

order_type boost::numeric::odeint::explicit_error_stepper_fsal_base< runge_kutta_dopri5< State, Value, Deriv, Time, Algebra, Operations, Resizer > , Order, StepperOrder, ErrorOrder, State, Value, Deriv, Time, Algebra, Operations, Resizer >::order ( void  ) const
inlineinherited
void boost::numeric::odeint::explicit_error_stepper_fsal_base< runge_kutta_dopri5< State, Value, Deriv, Time, Algebra, Operations, Resizer > , Order, StepperOrder, ErrorOrder, State, Value, Deriv, Time, Algebra, Operations, Resizer >::reset ( void  )
inlineinherited

Resets the internal state of this stepper.

After calling this method it is safe to use all do_step method without explicitly initializing the stepper.

order_type boost::numeric::odeint::explicit_error_stepper_fsal_base< runge_kutta_dopri5< State, Value, Deriv, Time, Algebra, Operations, Resizer > , Order, StepperOrder, ErrorOrder, State, Value, Deriv, Time, Algebra, Operations, Resizer >::stepper_order ( void  ) const
inlineinherited

Member Data Documentation

const order_type boost::numeric::odeint::explicit_error_stepper_fsal_base< runge_kutta_dopri5< State, Value, Deriv, Time, Algebra, Operations, Resizer > , Order, StepperOrder, ErrorOrder, State, Value, Deriv, Time, Algebra, Operations, Resizer >::error_order_value
staticinherited
template<class Algebra, class Operations>
algebra_type boost::numeric::odeint::algebra_stepper_base< Algebra, Operations >::m_algebra
protectedinherited
wrapped_deriv_type boost::numeric::odeint::explicit_error_stepper_fsal_base< runge_kutta_dopri5< State, Value, Deriv, Time, Algebra, Operations, Resizer > , Order, StepperOrder, ErrorOrder, State, Value, Deriv, Time, Algebra, Operations, Resizer >::m_dxdt
protectedinherited
const order_type boost::numeric::odeint::explicit_error_stepper_fsal_base< runge_kutta_dopri5< State, Value, Deriv, Time, Algebra, Operations, Resizer > , Order, StepperOrder, ErrorOrder, State, Value, Deriv, Time, Algebra, Operations, Resizer >::order_value
staticinherited
const order_type boost::numeric::odeint::explicit_error_stepper_fsal_base< runge_kutta_dopri5< State, Value, Deriv, Time, Algebra, Operations, Resizer > , Order, StepperOrder, ErrorOrder, State, Value, Deriv, Time, Algebra, Operations, Resizer >::stepper_order_value
staticinherited

The documentation for this class was generated from the following file: