Карта сайта Kansoftware
НОВОСТИУСЛУГИРЕШЕНИЯКОНТАКТЫ
Разработка программного обеспечения

Class template explicit_error_generic_rk

Boost , Chapter 1. Boost.Numeric.Odeint , Header <boost/numeric/odeint/stepper/explicit_error_generic_rk.hpp>

Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

Boost C++ LibrariesHomeLibrariesPeopleFAQMore

PrevUpHomeNext

Class template explicit_error_generic_rk

boost::numeric::odeint::explicit_error_generic_rk — A generic implementation of explicit Runge-Kutta algorithms with error estimation. This class is as a base class for all explicit Runge-Kutta steppers with error estimation.

Synopsis

// In header: <boost/numeric/odeint/stepper/explicit_error_generic_rk.hpp>
template<size_t StageCount, size_t Order, size_t StepperOrder,
         size_t ErrorOrder, 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 explicit_error_generic_rk : public explicit_error_stepper_base {
public:
  // types
  typedef explicit_stepper_base< ... >          stepper_base_type;
  typedef stepper_base_type::state_type         state_type;
  typedef stepper_base_type::wrapped_state_type wrapped_state_type;
  typedef stepper_base_type::value_type         value_type;
  typedef stepper_base_type::deriv_type         deriv_type;
  typedef stepper_base_type::wrapped_deriv_type wrapped_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 unspecified                           rk_algorithm_type;
  typedef rk_algorithm_type::coef_a_type        coef_a_type;
  typedef rk_algorithm_type::coef_b_type        coef_b_type;
  typedef rk_algorithm_type::coef_c_type        coef_c_type;
  // construct/copy/destruct
  explicit_error_generic_rk(const coef_a_type &, const coef_b_type &,
                            const coef_b_type &, const coef_c_type &,
                            const algebra_type & = algebra_type());
  // 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 StateIn, typename DerivIn,
           typename StateOut>
    void do_step_impl(System, const StateIn &, const DerivIn &, time_type,
                      StateOut &, time_type);
  template<typename StateIn> void adjust_size(const StateIn &);
  // private member functions
  template<typename StateIn> bool resize_impl(const StateIn &);
  // public data members
  static const size_t stage_count;
};

Description

Этот класс реализует явные алгоритмы Рунге-Кутта с оценкой ошибок общим способом. Таблица Мясника передается степперу, который строит степперную схему с помощью алгоритма шаблонного метапрограммирования. ToDo: Добавьте пример!

Этот класс получает эксплицитную_error_stepper_base, которая обеспечивает интерфейс Stepper.

Template Parameters

  1. Число этапов алгоритма Runge-Kutta.

    The number of stages of the Runge-Kutta algorithm.

    [ORIG_END] -->
  2. size_t Order

    The order of a stepper if the stepper is used without error estimation.

  3. size_t StepperOrder

    The order of a step if the stepper is used with error estimation. Usually Order and StepperOrder have the same value.

  4. size_t ErrorOrder

    The order of the error step if the stepper is used with error estimation.

  5. Тип, представляющий состояние ODE.

    The type representing the state of the ODE.

    [ORIG_END] -->
  6. typename Value = double

    The floating point type which is used in the computations.

  7. typename Deriv =  State
  8. Тип, представляющий независимую переменную - время - ODE.

    The type representing the independent variable - the time - of the ODE.

    [ORIG_END] -->
  9. typename Algebra = typename algebra_dispatcher< State >::algebra_type

    The algebra type.

  10. Тип операций.

    The operations type.

    [ORIG_END] -->
  11. typename Resizer = initially_resizer

    The resizer policy type.

explicit_error_generic_rk public construct/copy/destruct

  1. Параметры:

    a

    Триугольная матрица параметров b в таблице Мясника.

    algebra

    b

    Последний ряд мясника.

    b2

    Параметры для оценки более низкого порядка для оценки ошибки.

    c

    Параметры для расчета точек времени в таблице Мясника.

    Parameters:

    a

    Triangular matrix of parameters b in the Butcher tableau.

    algebra

    A copy of algebra is made and stored inside explicit_stepper_base.

    b

    Last row of the butcher tableau.

    b2

    Parameters for lower-order evaluation to estimate the error.

    c

    Parameters to calculate the time points in the Butcher tableau.

    [ORIG_END] -->

explicit_error_generic_rk public member functions

  1. template<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);
    This method performs one step. The derivative dxdt 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. Futhermore, an estimation of the error is stored in xerr. do_step_impl is used by explicit_error_stepper_base.

    Parameters:

    dt

    The step size.

    dxdt

    The derivative of x at t.

    in

    The state of the ODE which should be solved. in is not modified in this method

    out

    The result of the step is written in out.

    system

    The system function to solve, hence the r.h.s. of the ODE. It must fulfill the Simple System concept.

    t

    The value of the time, at which the step should be performed.

    xerr

    The result of the error estimation is written in xerr.

  2. 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);
    This method performs one step. The derivative dxdt 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. Access to this step functionality is provided by explicit_stepper_base and do_step_impl should not be called directly.

    Parameters:

    dt

    The step size.

    dxdt

    The derivative of x at t.

    in

    The state of the ODE which should be solved. in is not modified in this method

    out

    The result of the step is written in out.

    system

    The system function to solve, hence the r.h.s. of the ODE. It must fulfill the Simple System concept.

    t

    The value of the time, at which the step should be performed.

  3. template<typename StateIn> void adjust_size(const StateIn & x);
    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.

explicit_error_generic_rk private member functions

  1. template<typename StateIn> boolresize_impl(constStateIn & x;

PrevUpHomeNext

Статья Class template explicit_error_generic_rk раздела Chapter 1. Boost.Numeric.Odeint Header <boost/numeric/odeint/stepper/explicit_error_generic_rk.hpp> может быть полезна для разработчиков на c++ и boost.




Материалы статей собраны из открытых источников, владелец сайта не претендует на авторство. Там где авторство установить не удалось, материал подаётся без имени автора. В случае если Вы считаете, что Ваши права нарушены, пожалуйста, свяжитесь с владельцем сайта.



:: Главная :: Header <boost/numeric/odeint/stepper/explicit_error_generic_rk.hpp> ::


реклама


©KANSoftWare (разработка программного обеспечения, создание программ, создание интерактивных сайтов), 2007
Top.Mail.Ru

Время компиляции файла: 2024-08-30 11:47:00
2025-07-04 22:52:02/0.0072629451751709/0