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::explicit_error_stepper_base< Stepper, Order, StepperOrder, ErrorOrder, State, Value, Deriv, Time, Algebra, Operations, Resizer > Class Template Reference

Base class for explicit steppers with error estimation. More...

#include <explicit_error_stepper_base.hpp>

Inheritance diagram for boost::numeric::odeint::explicit_error_stepper_base< Stepper, Order, StepperOrder, ErrorOrder, State, Value, Deriv, Time, Algebra, Operations, Resizer >:
Collaboration diagram for boost::numeric::odeint::explicit_error_stepper_base< Stepper, Order, StepperOrder, ErrorOrder, State, Value, Deriv, Time, Algebra, Operations, Resizer >:

Public Types

typedef algebra_stepper_base
< Algebra, Operations > 
algebra_stepper_base_type
 
typedef
algebra_stepper_base_type::algebra_type 
algebra_type
 
typedef State state_type
 
typedef Value value_type
 
typedef Deriv deriv_type
 
typedef Time time_type
 
typedef Resizer resizer_type
 
typedef Stepper stepper_type
 
typedef explicit_error_stepper_tag stepper_category
 
typedef state_wrapper< state_typewrapped_state_type
 
typedef state_wrapper< deriv_typewrapped_deriv_type
 
typedef
explicit_error_stepper_base
< Stepper, Order, StepperOrder,
ErrorOrder, State, Value,
Deriv, Time, Algebra,
Operations, Resizer > 
internal_stepper_base_type
 
typedef unsigned short order_type
 
typedef Operations operations_type
 

Public Member Functions

 explicit_error_stepper_base (const algebra_type &algebra=algebra_type())
 Constructs a explicit_error_stepper_base class. More...
 
order_type order (void) const
 
order_type stepper_order (void) const
 
order_type error_order (void) const
 
template<class System , class StateInOut >
void do_step (System system, StateInOut &x, time_type t, time_type dt)
 This method performs one step. More...
 
template<class System , class StateInOut >
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...
 
template<class System , class StateInOut , class DerivIn >
boost::disable_if
< boost::is_same< DerivIn,
time_type >, void >::type 
do_step (System system, StateInOut &x, const DerivIn &dxdt, time_type t, time_type dt)
 The method performs one step with the stepper passed by Stepper. More...
 
template<class System , class StateIn , class StateOut >
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...
 
template<class System , class StateIn , class DerivIn , class StateOut >
boost::disable_if
< boost::is_same< DerivIn,
time_type >, void >::type 
do_step (System system, const StateIn &in, const DerivIn &dxdt, time_type t, StateOut &out, time_type dt)
 The method performs one step with the stepper passed by Stepper. More...
 
template<class System , class StateInOut , class Err >
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...
 
template<class System , class StateInOut , class Err >
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...
 
template<class System , class StateInOut , class DerivIn , class Err >
boost::disable_if
< boost::is_same< DerivIn,
time_type >, void >::type 
do_step (System system, StateInOut &x, const DerivIn &dxdt, time_type t, time_type dt, Err &xerr)
 The method performs one step with the stepper passed by Stepper. More...
 
template<class System , class StateIn , class StateOut , class Err >
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...
 
template<class System , class StateIn , class DerivIn , class StateOut , class Err >
void do_step (System system, const StateIn &in, const DerivIn &dxdt, time_type t, StateOut &out, time_type dt, Err &xerr)
 The method performs one step with the stepper passed by Stepper. More...
 
template<class StateIn >
void adjust_size (const StateIn &x)
 Adjust the size of all temporaries in the stepper manually. More...
 
algebra_typealgebra ()
 
const algebra_typealgebra () const
 

Static Public Attributes

static const order_type order_value = Order
 
static const order_type stepper_order_value = StepperOrder
 
static const order_type error_order_value = ErrorOrder
 

Protected Attributes

wrapped_deriv_type m_dxdt
 
algebra_type m_algebra
 

Detailed Description

template<class Stepper, unsigned short Order, unsigned short StepperOrder, unsigned short ErrorOrder, class State, class Value, class Deriv, class Time, class Algebra, class Operations, class Resizer>
class boost::numeric::odeint::explicit_error_stepper_base< Stepper, Order, StepperOrder, ErrorOrder, State, Value, Deriv, Time, Algebra, Operations, Resizer >

Base class for explicit steppers with error estimation.

This class can used with controlled steppers for step size control.

This class serves as the base class for all explicit steppers with algebra and operations. In contrast to explicit_stepper_base it also estimates the error and can be used in a controlled stepper to provide step size control.

Note
This stepper provides do_step methods with and without error estimation. It has therefore three orders, one for the order of a step if the error is not estimated. The other two orders are the orders of the step and the error step if the error estimation is performed.

explicit_error_stepper_base is used as the interface in a CRTP (currently recurring template pattern). In order to work correctly the parent class needs to have a method do_step_impl( system , in , dxdt_in , t , out , dt , xerr ). explicit_error_stepper_base derives from algebra_stepper_base.

explicit_error_stepper_base provides several overloaded do_step methods, see the list below. Only two of them are needed to fulfill the Error Stepper concept. The other ones are for convenience and for performance. Some of them simply update the state out-of-place, while other expect that the first derivative at t is passed to the stepper.

  • do_step( sys , x , t , dt ) - The classical do_step method needed to fulfill the Error Stepper concept. The state is updated in-place. A type modelling a Boost.Range can be used for x.
  • do_step( sys , x , dxdt , t , dt ) - This method updates the state in-place, but the derivative at the point t must be explicitly passed in dxdt.
  • do_step( sys , in , t , out , dt ) - This method updates the state out-of-place, hence the result of the step is stored in out.
  • do_step( sys , in , dxdt , t , out , dt ) - This method update the state out-of-place and expects that the derivative at the point t is explicitly passed in dxdt. It is a combination of the two do_step methods above.
  • do_step( sys , x , t , dt , xerr ) - This do_step method is needed to fulfill the Error Stepper concept. The state is updated in-place and an error estimate is calculated. A type modelling a Boost.Range can be used for x.
  • do_step( sys , x , dxdt , t , dt , xerr ) - This method updates the state in-place, but the derivative at the point t must be passed in dxdt. An error estimate is calculated.
  • do_step( sys , in , t , out , dt , xerr ) - This method updates the state out-of-place and estimates the error during the step.
  • do_step( sys , in , dxdt , t , out , dt , xerr ) - This methods updates the state out-of-place and estimates the error during the step. Furthermore, the derivative at t must be passed in dxdt.
Note
The system is always passed as value, which might result in poor performance if it contains data. In this case it can be used with boost::ref or std::ref, for example stepper.do_step( boost::ref( sys ) , x , t , dt );
The time t is not advanced by the stepper. This has to done manually, or by the appropriate integrate routines or iterators.
Template Parameters
StepperThe stepper on which this class should work. It is used via CRTP, hence explicit_stepper_base provides the interface for the Stepper.
OrderThe order of a stepper if the stepper is used without error estimation.
StepperOrderThe order of a step if the stepper is used with error estimation. Usually Order and StepperOrder have the same value.
ErrorOrderThe order of the error step if the stepper is used with error estimation.
StateThe state type for the stepper.
ValueThe value type for the stepper. This should be a floating point type, like float, double, or a multiprecision type. It must not necessary be the value_type of the State. For example the State can be a vector< complex< double > > in this case the Value must be double. The default value is double.
DerivThe type representing time derivatives of the state type. It is usually the same type as the state type, only if used with Boost.Units both types differ.
TimeThe type representing the time. Usually the same type as the value type. When Boost.Units is used, this type has usually a unit.
AlgebraThe algebra type which must fulfill the Algebra Concept.
OperationsThe type for the operations which must fulfill the Operations Concept.
ResizerThe resizer policy class.

Member Typedef Documentation

template<class Stepper, unsigned short Order, unsigned short StepperOrder, unsigned short ErrorOrder, class State, class Value, class Deriv, class Time, class Algebra, class Operations, class Resizer>
typedef algebra_stepper_base< Algebra , Operations > boost::numeric::odeint::explicit_error_stepper_base< Stepper, Order, StepperOrder, ErrorOrder, State, Value, Deriv, Time, Algebra, Operations, Resizer >::algebra_stepper_base_type
template<class Stepper, unsigned short Order, unsigned short StepperOrder, unsigned short ErrorOrder, class State, class Value, class Deriv, class Time, class Algebra, class Operations, class Resizer>
typedef algebra_stepper_base_type::algebra_type boost::numeric::odeint::explicit_error_stepper_base< Stepper, Order, StepperOrder, ErrorOrder, State, Value, Deriv, Time, Algebra, Operations, Resizer >::algebra_type
template<class Stepper, unsigned short Order, unsigned short StepperOrder, unsigned short ErrorOrder, class State, class Value, class Deriv, class Time, class Algebra, class Operations, class Resizer>
typedef Deriv boost::numeric::odeint::explicit_error_stepper_base< Stepper, Order, StepperOrder, ErrorOrder, State, Value, Deriv, Time, Algebra, Operations, Resizer >::deriv_type
template<class Stepper, unsigned short Order, unsigned short StepperOrder, unsigned short ErrorOrder, class State, class Value, class Deriv, class Time, class Algebra, class Operations, class Resizer>
typedef explicit_error_stepper_base< Stepper , Order , StepperOrder , ErrorOrder , State , Value , Deriv , Time , Algebra , Operations , Resizer > boost::numeric::odeint::explicit_error_stepper_base< Stepper, Order, StepperOrder, ErrorOrder, State, Value, Deriv, Time, Algebra, Operations, Resizer >::internal_stepper_base_type
template<class Algebra, class Operations>
typedef Operations boost::numeric::odeint::algebra_stepper_base< Algebra, Operations >::operations_type
inherited
template<class Stepper, unsigned short Order, unsigned short StepperOrder, unsigned short ErrorOrder, class State, class Value, class Deriv, class Time, class Algebra, class Operations, class Resizer>
typedef unsigned short boost::numeric::odeint::explicit_error_stepper_base< Stepper, Order, StepperOrder, ErrorOrder, State, Value, Deriv, Time, Algebra, Operations, Resizer >::order_type
template<class Stepper, unsigned short Order, unsigned short StepperOrder, unsigned short ErrorOrder, class State, class Value, class Deriv, class Time, class Algebra, class Operations, class Resizer>
typedef Resizer boost::numeric::odeint::explicit_error_stepper_base< Stepper, Order, StepperOrder, ErrorOrder, State, Value, Deriv, Time, Algebra, Operations, Resizer >::resizer_type
template<class Stepper, unsigned short Order, unsigned short StepperOrder, unsigned short ErrorOrder, class State, class Value, class Deriv, class Time, class Algebra, class Operations, class Resizer>
typedef State boost::numeric::odeint::explicit_error_stepper_base< Stepper, Order, StepperOrder, ErrorOrder, State, Value, Deriv, Time, Algebra, Operations, Resizer >::state_type
template<class Stepper, unsigned short Order, unsigned short StepperOrder, unsigned short ErrorOrder, class State, class Value, class Deriv, class Time, class Algebra, class Operations, class Resizer>
typedef explicit_error_stepper_tag boost::numeric::odeint::explicit_error_stepper_base< Stepper, Order, StepperOrder, ErrorOrder, State, Value, Deriv, Time, Algebra, Operations, Resizer >::stepper_category
template<class Stepper, unsigned short Order, unsigned short StepperOrder, unsigned short ErrorOrder, class State, class Value, class Deriv, class Time, class Algebra, class Operations, class Resizer>
typedef Stepper boost::numeric::odeint::explicit_error_stepper_base< Stepper, Order, StepperOrder, ErrorOrder, State, Value, Deriv, Time, Algebra, Operations, Resizer >::stepper_type
template<class Stepper, unsigned short Order, unsigned short StepperOrder, unsigned short ErrorOrder, class State, class Value, class Deriv, class Time, class Algebra, class Operations, class Resizer>
typedef Time boost::numeric::odeint::explicit_error_stepper_base< Stepper, Order, StepperOrder, ErrorOrder, State, Value, Deriv, Time, Algebra, Operations, Resizer >::time_type
template<class Stepper, unsigned short Order, unsigned short StepperOrder, unsigned short ErrorOrder, class State, class Value, class Deriv, class Time, class Algebra, class Operations, class Resizer>
typedef Value boost::numeric::odeint::explicit_error_stepper_base< Stepper, Order, StepperOrder, ErrorOrder, State, Value, Deriv, Time, Algebra, Operations, Resizer >::value_type
template<class Stepper, unsigned short Order, unsigned short StepperOrder, unsigned short ErrorOrder, class State, class Value, class Deriv, class Time, class Algebra, class Operations, class Resizer>
typedef state_wrapper< deriv_type > boost::numeric::odeint::explicit_error_stepper_base< Stepper, Order, StepperOrder, ErrorOrder, State, Value, Deriv, Time, Algebra, Operations, Resizer >::wrapped_deriv_type
template<class Stepper, unsigned short Order, unsigned short StepperOrder, unsigned short ErrorOrder, class State, class Value, class Deriv, class Time, class Algebra, class Operations, class Resizer>
typedef state_wrapper< state_type > boost::numeric::odeint::explicit_error_stepper_base< Stepper, Order, StepperOrder, ErrorOrder, State, Value, Deriv, Time, Algebra, Operations, Resizer >::wrapped_state_type

Constructor & Destructor Documentation

template<class Stepper, unsigned short Order, unsigned short StepperOrder, unsigned short ErrorOrder, class State, class Value, class Deriv, class Time, class Algebra, class Operations, class Resizer>
boost::numeric::odeint::explicit_error_stepper_base< Stepper, Order, StepperOrder, ErrorOrder, State, Value, Deriv, Time, Algebra, Operations, Resizer >::explicit_error_stepper_base ( const algebra_type algebra = algebra_type())
inline

Constructs a explicit_error_stepper_base 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 Stepper, unsigned short Order, unsigned short StepperOrder, unsigned short ErrorOrder, class State, class Value, class Deriv, class Time, class Algebra, class Operations, class Resizer>
template<class StateIn >
boost::numeric::odeint::explicit_error_stepper_base< Stepper, Order, StepperOrder, ErrorOrder, 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.
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 Stepper, unsigned short Order, unsigned short StepperOrder, unsigned short ErrorOrder, class State, class Value, class Deriv, class Time, class Algebra, class Operations, class Resizer>
template<class System , class StateInOut >
boost::numeric::odeint::explicit_error_stepper_base< Stepper, Order, StepperOrder, ErrorOrder, State, Value, Deriv, Time, Algebra, Operations, Resizer >::do_step ( System  system,
StateInOut &  x,
time_type  t,
time_type  dt 
)
inline

This method performs one step.

It transforms the result in-place.

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.
template<class Stepper, unsigned short Order, unsigned short StepperOrder, unsigned short ErrorOrder, class State, class Value, class Deriv, class Time, class Algebra, class Operations, class Resizer>
template<class System , class StateInOut >
void boost::numeric::odeint::explicit_error_stepper_base< Stepper, Order, StepperOrder, ErrorOrder, State, Value, Deriv, Time, Algebra, Operations, Resizer >::do_step ( System  system,
const StateInOut &  x,
time_type  t,
time_type  dt 
)
inline

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

template<class Stepper, unsigned short Order, unsigned short StepperOrder, unsigned short ErrorOrder, class State, class Value, class Deriv, class Time, class Algebra, class Operations, class Resizer>
template<class System , class StateInOut , class DerivIn >
boost::numeric::odeint::explicit_error_stepper_base< Stepper, Order, StepperOrder, ErrorOrder, State, Value, Deriv, Time, Algebra, Operations, Resizer >::do_step ( System  system,
StateInOut &  x,
const DerivIn &  dxdt,
time_type  t,
time_type  dt 
)
inline

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. It is supposed to be used in the following way:

sys( x , dxdt , t );
stepper.do_step( sys , x , dxdt , t , dt );

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.

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.
tThe value of the time, at which the step should be performed.
dtThe step size.
template<class Stepper, unsigned short Order, unsigned short StepperOrder, unsigned short ErrorOrder, class State, class Value, class Deriv, class Time, class Algebra, class Operations, class Resizer>
template<class System , class StateIn , class StateOut >
boost::numeric::odeint::explicit_error_stepper_base< Stepper, 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 
)
inline

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 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.
template<class Stepper, unsigned short Order, unsigned short StepperOrder, unsigned short ErrorOrder, class State, class Value, class Deriv, class Time, class Algebra, class Operations, class Resizer>
template<class System , class StateIn , class DerivIn , class StateOut >
boost::numeric::odeint::explicit_error_stepper_base< Stepper, Order, StepperOrder, ErrorOrder, State, Value, Deriv, Time, Algebra, Operations, Resizer >::do_step ( System  system,
const StateIn &  in,
const DerivIn &  dxdt,
time_type  t,
StateOut &  out,
time_type  dt 
)
inline

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. It is supposed to be used in the following way:

sys( in , dxdt , t );
stepper.do_step( sys , in , dxdt , t , out , dt );

This method is disabled if DerivIn and Time are of same type.

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.
inThe state of the ODE which should be solved. in is not modified in this method
dxdtThe 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.
dtThe step size.
template<class Stepper, unsigned short Order, unsigned short StepperOrder, unsigned short ErrorOrder, class State, class Value, class Deriv, class Time, class Algebra, class Operations, class Resizer>
template<class System , class StateInOut , class Err >
boost::numeric::odeint::explicit_error_stepper_base< Stepper, Order, StepperOrder, ErrorOrder, State, Value, Deriv, Time, Algebra, Operations, Resizer >::do_step ( System  system,
StateInOut &  x,
time_type  t,
time_type  dt,
Err &  xerr 
)
inline

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

The state of the ODE is updated in-place.

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.
template<class Stepper, unsigned short Order, unsigned short StepperOrder, unsigned short ErrorOrder, class State, class Value, class Deriv, class Time, class Algebra, class Operations, class Resizer>
template<class System , class StateInOut , class Err >
void boost::numeric::odeint::explicit_error_stepper_base< Stepper, 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 
)
inline

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

template<class Stepper, unsigned short Order, unsigned short StepperOrder, unsigned short ErrorOrder, class State, class Value, class Deriv, class Time, class Algebra, class Operations, class Resizer>
template<class System , class StateInOut , class DerivIn , class Err >
boost::numeric::odeint::explicit_error_stepper_base< Stepper, Order, StepperOrder, ErrorOrder, State, Value, Deriv, Time, Algebra, Operations, Resizer >::do_step ( System  system,
StateInOut &  x,
const DerivIn &  dxdt,
time_type  t,
time_type  dt,
Err &  xerr 
)
inline

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. It is supposed to be used in the following way:

sys( x , dxdt , t );
stepper.do_step( sys , x , dxdt , t , dt , xerr );

The result is updated in place in x. This method is disabled if Time and DerivIn 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.
tThe value of the time, at which the step should be performed.
dtThe step size.
xerrThe error estimate is stored in xerr.
template<class Stepper, unsigned short Order, unsigned short StepperOrder, unsigned short ErrorOrder, class State, class Value, class Deriv, class Time, class Algebra, class Operations, class Resizer>
template<class System , class StateIn , class StateOut , class Err >
boost::numeric::odeint::explicit_error_stepper_base< Stepper, 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 
)
inline

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 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.
template<class Stepper, unsigned short Order, unsigned short StepperOrder, unsigned short ErrorOrder, class State, class Value, class Deriv, class Time, class Algebra, class Operations, class Resizer>
template<class System , class StateIn , class DerivIn , class StateOut , class Err >
boost::numeric::odeint::explicit_error_stepper_base< Stepper, Order, StepperOrder, ErrorOrder, State, Value, Deriv, Time, Algebra, Operations, Resizer >::do_step ( System  system,
const StateIn &  in,
const DerivIn &  dxdt,
time_type  t,
StateOut &  out,
time_type  dt,
Err &  xerr 
)
inline

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. It is supposed to be used in the following way:

sys( in , dxdt , t );
stepper.do_step( sys , in , dxdt , t , out , dt );

This method is disabled if DerivIn and Time are of same type.

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.
inThe state of the ODE which should be solved. in is not modified in this method
dxdtThe 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.
dtThe step size.
xerrThe error estimate.
template<class Stepper, unsigned short Order, unsigned short StepperOrder, unsigned short ErrorOrder, class State, class Value, class Deriv, class Time, class Algebra, class Operations, class Resizer>
boost::numeric::odeint::explicit_error_stepper_base< Stepper, Order, StepperOrder, ErrorOrder, State, Value, Deriv, Time, Algebra, Operations, Resizer >::error_order ( void  ) const
inline
Returns
Returns the order of an error step if the stepper is used without error estimation.
template<class Stepper, unsigned short Order, unsigned short StepperOrder, unsigned short ErrorOrder, class State, class Value, class Deriv, class Time, class Algebra, class Operations, class Resizer>
boost::numeric::odeint::explicit_error_stepper_base< Stepper, Order, StepperOrder, ErrorOrder, State, Value, Deriv, Time, Algebra, Operations, Resizer >::order ( void  ) const
inline
Returns
Returns the order of the stepper if it used without error estimation.
template<class Stepper, unsigned short Order, unsigned short StepperOrder, unsigned short ErrorOrder, class State, class Value, class Deriv, class Time, class Algebra, class Operations, class Resizer>
boost::numeric::odeint::explicit_error_stepper_base< Stepper, Order, StepperOrder, ErrorOrder, State, Value, Deriv, Time, Algebra, Operations, Resizer >::stepper_order ( void  ) const
inline
Returns
Returns the order of a step if the stepper is used without error estimation.

Member Data Documentation

template<class Stepper, unsigned short Order, unsigned short StepperOrder, unsigned short ErrorOrder, class State, class Value, class Deriv, class Time, class Algebra, class Operations, class Resizer>
const order_type boost::numeric::odeint::explicit_error_stepper_base< Stepper, Order, StepperOrder, ErrorOrder, State, Value, Deriv, Time, Algebra, Operations, Resizer >::error_order_value = ErrorOrder
static
template<class Algebra, class Operations>
algebra_type boost::numeric::odeint::algebra_stepper_base< Algebra, Operations >::m_algebra
protectedinherited
template<class Stepper, unsigned short Order, unsigned short StepperOrder, unsigned short ErrorOrder, class State, class Value, class Deriv, class Time, class Algebra, class Operations, class Resizer>
wrapped_deriv_type boost::numeric::odeint::explicit_error_stepper_base< Stepper, Order, StepperOrder, ErrorOrder, State, Value, Deriv, Time, Algebra, Operations, Resizer >::m_dxdt
protected
template<class Stepper, unsigned short Order, unsigned short StepperOrder, unsigned short ErrorOrder, class State, class Value, class Deriv, class Time, class Algebra, class Operations, class Resizer>
const order_type boost::numeric::odeint::explicit_error_stepper_base< Stepper, Order, StepperOrder, ErrorOrder, State, Value, Deriv, Time, Algebra, Operations, Resizer >::order_value = Order
static
template<class Stepper, unsigned short Order, unsigned short StepperOrder, unsigned short ErrorOrder, class State, class Value, class Deriv, class Time, class Algebra, class Operations, class Resizer>
const order_type boost::numeric::odeint::explicit_error_stepper_base< Stepper, Order, StepperOrder, ErrorOrder, State, Value, Deriv, Time, Algebra, Operations, Resizer >::stepper_order_value = StepperOrder
static

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