boost::numeric::odeint::extrapolation_stepper — Extrapolation stepper with configurable order, and error estimation.
// In header: <boost/numeric/odeint/stepper/extrapolation_stepper.hpp> template<unsigned short Order, typename State, typename Value = double, typename Deriv = State, typename Time = Value, typename Algebra = typename algebra_dispatcher< State >::algebra_type, typename Operations = typename operations_dispatcher< State >::operations_type, typename Resizer = initially_resizer> class extrapolation_stepper : public explicit_error_stepper_base { public: // types typedef explicit_error_stepper_base< extrapolation_stepper< ... >,... > 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 unsigned short order_type; // construct/copy/destruct extrapolation_stepper(const algebra_type & = algebra_type()); // private member functions BOOST_STATIC_ASSERT_MSG(((Order%2)==0)&&(Order > 2), "extrapolation_stepper requires even Order larger than 2"); template<typename StateIn> bool resize_impl(const StateIn &); template<typename StateIn> bool resize_m_xout(const StateIn &); template<typename StateInOut> void extrapolate(size_t, state_table_type &, const value_matrix &, StateInOut &); // public member functions template<typename System, typename StateIn, typename DerivIn, typename StateOut, typename Err> void do_step_impl(System, const StateIn &, const DerivIn &, time_type, StateOut &, time_type, Err &); template<typename System, typename StateInOut, typename DerivIn, typename Err> void do_step_impl_io(System, StateInOut &, const DerivIn &, time_type, time_type, Err &); template<typename System, typename StateIn, typename DerivIn, typename StateOut> void do_step_impl(System, const StateIn &, const DerivIn &, time_type, StateOut &, time_type); template<typename System, typename StateInOut, typename DerivIn> void do_step_impl_io(System, StateInOut &, const DerivIn &, time_type, time_type); template<typename System, typename StateInOut, typename DerivIn> void do_step_dxdt_impl(System, StateInOut &, const DerivIn &, time_type, time_type); template<typename System, typename StateIn, typename DerivIn, typename StateOut> void do_step_dxdt_impl(System, const StateIn &, const DerivIn &, time_type, StateOut &, time_type); template<typename StateIn> void adjust_size(const StateIn &); // public data members static const order_type order_value; static const order_type stepper_order_value; static const order_type error_order_value; static const size_t m_k_max; };
The extrapolation stepper is a stepper with error estimation and configurable order. The order is given as template parameter and needs to be an odd number. The stepper is based on several executions of the modified midpoint method and a Richardson extrapolation. This is essentially the same technique as for bulirsch_stoer, but without the variable order.
Note | |
---|---|
The Order parameter has to be an even number greater 2. |
extrapolation_stepper
private member functionsBOOST_STATIC_ASSERT_MSG(((Order%2)==0)&&(Order > 2), "extrapolation_stepper requires even Order larger than 2");
template<typename StateIn> bool resize_impl(const StateIn & x);
template<typename StateIn> bool resize_m_xout(const StateIn & x);
template<typename StateInOut> void extrapolate(size_t k, state_table_type & table, const value_matrix & coeff, StateInOut & xest);
extrapolation_stepper
public member functionstemplate<typename System, typename StateIn, typename DerivIn, typename StateOut, typename Err> void do_step_impl(System system, const StateIn & in, const DerivIn & dxdt, time_type t, StateOut & out, time_type dt, Err & xerr);
template<typename System, typename StateInOut, typename DerivIn, typename Err> void do_step_impl_io(System system, StateInOut & inout, const DerivIn & dxdt, time_type t, time_type dt, Err & xerr);
template<typename System, typename StateIn, typename DerivIn, typename StateOut> void do_step_impl(System system, const StateIn & in, const DerivIn & dxdt, time_type t, StateOut & out, time_type dt);
template<typename System, typename StateInOut, typename DerivIn> void do_step_impl_io(System system, StateInOut & inout, const DerivIn & dxdt, time_type t, time_type dt);
template<typename System, typename StateInOut, typename DerivIn> void do_step_dxdt_impl(System system, StateInOut & x, const DerivIn & dxdt, time_type t, time_type dt);
template<typename System, typename StateIn, typename DerivIn, typename StateOut> void do_step_dxdt_impl(System system, const StateIn & in, const DerivIn & dxdt, time_type t, StateOut & out, time_type dt);
template<typename StateIn> void adjust_size(const StateIn & x);