|
| adams_bashforth_moulton (void) |
| Constructs the adams_bashforth class. More...
|
|
| adams_bashforth_moulton (const algebra_type &algebra) |
| Constructs the adams_bashforth class. More...
|
|
order_type | order (void) const |
| Returns the order of the algorithm, which is equal to the number of steps+1. More...
|
|
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 StateIn , class StateOut > |
void | do_step (System system, const StateIn &in, time_type t, const StateOut &out, time_type dt) |
| The method performs one step with the stepper passed by Stepper. More...
|
|
template<class System , class StateIn , class StateOut > |
void | do_step (System system, const StateIn &in, time_type t, StateOut &out, time_type dt) |
| Second version to solve the forwarding problem, can be called with Boost.Range as StateOut. More...
|
|
template<class StateType > |
void | adjust_size (const StateType &x) |
| Adjust the size of all temporaries in the stepper manually. More...
|
|
template<class ExplicitStepper , class System , class StateIn > |
void | initialize (ExplicitStepper explicit_stepper, System system, StateIn &x, time_type &t, time_type dt) |
| Initialized the stepper. More...
|
|
template<class System , class StateIn > |
void | initialize (System system, StateIn &x, time_type &t, time_type dt) |
| Initialized the stepper. More...
|
|
template<size_t Steps, 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::adams_bashforth_moulton< Steps, State, Value, Deriv, Time, Algebra, Operations, Resizer >
The Adams-Bashforth-Moulton multistep algorithm.
The Adams-Bashforth method is a multi-step predictor-corrector algorithm with configurable step number. The step number is specified as template parameter Steps and it then uses the result from the previous Steps steps. See also en.wikipedia.org/wiki/Linear_multistep_method. Currently, a maximum of Steps=8 is supported. The method is explicit and fulfills the Stepper concept. Step size control or continuous output are not provided.
This class derives from algebra_base and inherits its interface via CRTP (current recurring template pattern). For more details see algebra_stepper_base.
- Template Parameters
-
Steps | The number of steps (maximal 8). |
State | The state type. |
Value | The value type. |
Deriv | The type representing the time derivative of the state. |
Time | The time representing the independent variable - the time. |
Algebra | The algebra type. |
Operations | The operations type. |
Resizer | The resizer policy type. |
InitializingStepper | The stepper for the first two steps. |
template<size_t Steps, 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>
Constructs the adams_bashforth class.
This constructor can be used as a default constructor if the algebra has a default constructor.
- Parameters
-
algebra | A copy of algebra is made and stored. |
template<size_t Steps, 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 StateType >
Adjust the size of all temporaries in the stepper manually.
- Parameters
-
x | A state from which the size of the temporaries to be resized is deduced. |
References boost::numeric::odeint::adams_moulton< Steps, State, Value, Deriv, Time, Algebra, Operations, Resizer >::adjust_size(), and boost::numeric::odeint::adams_bashforth< Steps, State, Value, Deriv, Time, Algebra, Operations, Resizer, InitializingStepper >::adjust_size().
template<size_t Steps, 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 StateInOut >
boost::numeric::odeint::adams_bashforth_moulton< Steps, 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
-
system | The system function to solve, hence the r.h.s. of the ordinary differential equation. It must fulfill the Simple System concept. |
x | The state of the ODE which should be solved. After calling do_step the result is updated in x. |
t | The value of the time, at which the step should be performed. |
dt | The step size. |
template<size_t Steps, 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 StateInOut >
void boost::numeric::odeint::adams_bashforth_moulton< Steps, 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<size_t Steps, 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 StateOut >
boost::numeric::odeint::adams_bashforth_moulton< Steps, State, Value, Deriv, Time, Algebra, Operations, Resizer >::do_step |
( |
System |
system, |
|
|
const StateIn & |
in, |
|
|
time_type |
t, |
|
|
const 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.
- Parameters
-
system | The system function to solve, hence the r.h.s. of the ODE. It must fulfill the Simple System concept. |
in | The state of the ODE which should be solved. in is not modified in this method |
t | The value of the time, at which the step should be performed. |
out | The result of the step is written in out. |
dt | The step size. |
template<size_t Steps, 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 StateOut >
void boost::numeric::odeint::adams_bashforth_moulton< Steps, State, Value, Deriv, Time, Algebra, Operations, Resizer >::do_step |
( |
System |
system, |
|
|
const StateIn & |
in, |
|
|
time_type |
t, |
|
|
StateOut & |
out, |
|
|
time_type |
dt |
|
) |
| |
|
inline |
Second version to solve the forwarding problem, can be called with Boost.Range as StateOut.
template<size_t Steps, 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 ExplicitStepper , class System , class StateIn >
boost::numeric::odeint::adams_bashforth_moulton< Steps, State, Value, Deriv, Time, Algebra, Operations, Resizer >::initialize |
( |
ExplicitStepper |
explicit_stepper, |
|
|
System |
system, |
|
|
StateIn & |
x, |
|
|
time_type & |
t, |
|
|
time_type |
dt |
|
) |
| |
|
inline |
Initialized the stepper.
Does Steps-1 steps with the explicit_stepper to fill the buffer.
- Note
- The state x and time t are updated to the values after Steps-1 initial steps.
- Parameters
-
explicit_stepper | the stepper used to fill the buffer of previous step results |
system | The system function to solve, hence the r.h.s. of the ordinary differential equation. It must fulfill the Simple System concept. |
x | The initial state of the ODE which should be solved, updated after in this method. |
t | The initial time, updated in this method. |
dt | The step size. |
References boost::numeric::odeint::adams_bashforth< Steps, State, Value, Deriv, Time, Algebra, Operations, Resizer, InitializingStepper >::initialize().
template<size_t Steps, 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 >
boost::numeric::odeint::adams_bashforth_moulton< Steps, State, Value, Deriv, Time, Algebra, Operations, Resizer >::initialize |
( |
System |
system, |
|
|
StateIn & |
x, |
|
|
time_type & |
t, |
|
|
time_type |
dt |
|
) |
| |
|
inline |
Initialized the stepper.
Does Steps-1 steps using the standard initializing stepper of the underlying adams_bashforth stepper.
- Parameters
-
system | The system function to solve, hence the r.h.s. of the ordinary differential equation. It must fulfill the Simple System concept. |
x | The state of the ODE which should be solved. After calling do_step the result is updated in x. |
t | The value of the time, at which the step should be performed. |
dt | The step size. |
References boost::numeric::odeint::adams_bashforth< Steps, State, Value, Deriv, Time, Algebra, Operations, Resizer, InitializingStepper >::initialize().
template<size_t Steps, 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<size_t Steps, 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>