|
| bulirsch_stoer (value_type eps_abs=1E-6, value_type eps_rel=1E-6, value_type factor_x=1.0, value_type factor_dxdt=1.0) |
| Constructs the bulirsch_stoer class, including initialization of the error bounds. More...
|
|
template<class System , class StateInOut > |
controlled_step_result | try_step (System system, StateInOut &x, time_type &t, time_type &dt) |
| Tries to perform one step. More...
|
|
template<class System , class StateInOut > |
controlled_step_result | try_step (System system, const StateInOut &x, time_type &t, time_type &dt) |
| Second version to solve the forwarding problem, can be used with Boost.Range as StateInOut. More...
|
|
template<class System , class StateInOut , class DerivIn > |
controlled_step_result | try_step (System system, StateInOut &x, const DerivIn &dxdt, time_type &t, time_type &dt) |
| Tries to perform one step. More...
|
|
template<class System , class StateIn , class StateOut > |
boost::disable_if
< boost::is_same< StateIn,
time_type >
, controlled_step_result >
::type | try_step (System system, const StateIn &in, time_type &t, StateOut &out, time_type &dt) |
| Tries to perform one step. More...
|
|
template<class System , class StateIn , class DerivIn , class StateOut > |
controlled_step_result | try_step (System system, const StateIn &in, const DerivIn &dxdt, time_type &t, StateOut &out, time_type &dt) |
| Tries to perform one step. More...
|
|
void | reset () |
| Resets the internal state of the stepper. More...
|
|
template<class StateIn > |
void | adjust_size (const StateIn &x) |
| Adjust the size of all temporaries in the stepper manually. More...
|
|
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::bulirsch_stoer< State, Value, Deriv, Time, Algebra, Operations, Resizer >
The Bulirsch-Stoer algorithm.
The Bulirsch-Stoer is a controlled stepper that adjusts both step size and order of the method. The algorithm uses the modified midpoint and a polynomial extrapolation compute the solution.
- Template Parameters
-
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. |
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 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 >
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 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 >
Tries to perform one step.
This method tries to do one step with step size dt. If the error estimate is to large, the step is rejected and the method returns fail and the step size dt is reduced. If the error estimate is acceptably small, the step is performed, success is returned and dt might be increased to make the steps as large as possible. This method also updates t if a step is performed. Also, the internal order of the stepper is adjusted if required.
- Parameters
-
system | The system function to solve, hence the r.h.s. of the ODE. It must fulfill the Simple System concept. |
x | The state of the ODE which should be solved. Overwritten if the step is successful. |
t | The value of the time. Updated if the step is successful. |
dt | The step size. Updated. |
- Returns
- success if the step was accepted, fail otherwise.
Referenced by boost::numeric::odeint::bulirsch_stoer< State, Value, Deriv, Time, Algebra, Operations, Resizer >::try_step().
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 StateInOut >
Second version to solve the forwarding problem, can be used with Boost.Range as StateInOut.
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 StateInOut , class DerivIn >
boost::numeric::odeint::bulirsch_stoer< State, Value, Deriv, Time, Algebra, Operations, Resizer >::try_step |
( |
System |
system, |
|
|
StateInOut & |
x, |
|
|
const DerivIn & |
dxdt, |
|
|
time_type & |
t, |
|
|
time_type & |
dt |
|
) |
| |
|
inline |
Tries to perform one step.
This method tries to do one step with step size dt. If the error estimate is to large, the step is rejected and the method returns fail and the step size dt is reduced. If the error estimate is acceptably small, the step is performed, success is returned and dt might be increased to make the steps as large as possible. This method also updates t if a step is performed. Also, the internal order of the stepper is adjusted if required.
- Parameters
-
system | The system function to solve, hence the r.h.s. of the ODE. It must fulfill the Simple System concept. |
x | The state of the ODE which should be solved. Overwritten if the step is successful. |
dxdt | The derivative of state. |
t | The value of the time. Updated if the step is successful. |
dt | The step size. Updated. |
- Returns
- success if the step was accepted, fail otherwise.
References boost::numeric::odeint::detail::_1, boost::bind(), boost::numeric::odeint::copy(), boost::numeric::odeint::state_wrapper< V, Enabler >::m_v, boost::ref(), boost::numeric::odeint::success, template, and boost::numeric::odeint::bulirsch_stoer< State, Value, Deriv, Time, Algebra, Operations, Resizer >::try_step().
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 StateOut >
boost::numeric::odeint::bulirsch_stoer< State, Value, Deriv, Time, Algebra, Operations, Resizer >::try_step |
( |
System |
system, |
|
|
const StateIn & |
in, |
|
|
time_type & |
t, |
|
|
StateOut & |
out, |
|
|
time_type & |
dt |
|
) |
| |
|
inline |
Tries to perform one step.
- Note
- This method is disabled if state_type=time_type to avoid ambiguity.
This method tries to do one step with step size dt. If the error estimate is to large, the step is rejected and the method returns fail and the step size dt is reduced. If the error estimate is acceptably small, the step is performed, success is returned and dt might be increased to make the steps as large as possible. This method also updates t if a step is performed. Also, the internal order of the stepper is adjusted if required.
- 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. |
t | The value of the time. Updated if the step is successful. |
out | Used to store the result of the step. |
dt | The step size. Updated. |
- Returns
- success if the step was accepted, fail otherwise.
References boost::numeric::odeint::detail::_1, boost::bind(), boost::numeric::odeint::state_wrapper< V, Enabler >::m_v, boost::ref(), template, boost::numeric::odeint::bulirsch_stoer< State, Value, Deriv, Time, Algebra, Operations, Resizer >::try_step(), and boost::detail::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>
template<class System , class StateIn , class DerivIn , class StateOut >
boost::numeric::odeint::bulirsch_stoer< State, Value, Deriv, Time, Algebra, Operations, Resizer >::try_step |
( |
System |
system, |
|
|
const StateIn & |
in, |
|
|
const DerivIn & |
dxdt, |
|
|
time_type & |
t, |
|
|
StateOut & |
out, |
|
|
time_type & |
dt |
|
) |
| |
|
inline |
Tries to perform one step.
This method tries to do one step with step size dt. If the error estimate is to large, the step is rejected and the method returns fail and the step size dt is reduced. If the error estimate is acceptably small, the step is performed, success is returned and dt might be increased to make the steps as large as possible. This method also updates t if a step is performed. Also, the internal order of the stepper is adjusted if required.
- 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. |
dxdt | The derivative of state. |
t | The value of the time. Updated if the step is successful. |
out | Used to store the result of the step. |
dt | The step size. Updated. |
- Returns
- success if the step was accepted, fail otherwise.
References boost::numeric::odeint::detail::_1, boost::bind(), boost::numeric::BOOST_PREVENT_MACRO_SUBSTITUTION(), BOOST_USING_STD_MAX, BOOST_USING_STD_MIN, boost::numeric::odeint::explicit_stepper_base< Stepper, Order, State, Value, Deriv, Time, Algebra, Operations, Resizer >::do_step(), boost::sinks::event_log::error, boost::numeric::odeint::default_error_checker< Value, Algebra, Operations >::error(), boost::numeric::odeint::fail, boost::numeric::odeint::state_wrapper< V, Enabler >::m_v, boost::accumulators::extract::max, boost::accumulators::extract::min, boost::ref(), boost::numeric::odeint::bulirsch_stoer< State, Value, Deriv, Time, Algebra, Operations, Resizer >::reset(), boost::numeric::odeint::modified_midpoint< State, Value, Deriv, Time, Algebra, Operations, Resizer >::set_steps(), boost::numeric::odeint::success, template, and boost::detail::type.