Implementation of the symmetric B3A Runge-Kutta Nystroem method of fifth order.
More...
|
typedef
symplectic_nystroem_stepper_base
< 5, 4, Coor, Momentum, Value,
CoorDeriv, MomentumDeriv, Time,
Algebra, Operations, Resizer > | stepper_base_type |
|
typedef
stepper_base_type::algebra_type | algebra_type |
|
typedef
stepper_base_type::value_type | value_type |
|
typedef algebra_stepper_base
< Algebra, Operations > | algebra_stepper_base_type |
|
typedef
algebra_stepper_base_type::operations_type | operations_type |
|
typedef Coor | coor_type |
|
typedef Momentum | momentum_type |
|
typedef std::pair< coor_type,
momentum_type > | state_type |
|
typedef CoorDeriv | coor_deriv_type |
|
typedef state_wrapper
< coor_deriv_type > | wrapped_coor_deriv_type |
|
typedef MomentumDeriv | momentum_deriv_type |
|
typedef state_wrapper
< momentum_deriv_type > | wrapped_momentum_deriv_type |
|
typedef std::pair
< coor_deriv_type,
momentum_deriv_type > | deriv_type |
|
typedef Time | time_type |
|
typedef Resizer | resizer_type |
|
typedef stepper_tag | stepper_category |
|
typedef
symplectic_nystroem_stepper_base
< NumOfStages, Order, Coor,
Momentum, Value, CoorDeriv,
MomentumDeriv, Time, Algebra,
Operations, Resizer > | internal_stepper_base_type |
|
typedef unsigned short | order_type |
|
typedef boost::array
< value_type, num_of_stages > | coef_type |
|
|
| symplectic_rkn_sb3a_m4_mclachlan (const algebra_type &algebra=algebra_type()) |
| Constructs the symplectic_rkn_sb3a_m4_mclachlan. More...
|
|
order_type | order (void) const |
|
void | do_step (System system, const StateInOut &state, time_type t, time_type dt) |
| This method performs one step. More...
|
|
void | do_step (System system, StateInOut &state, time_type t, time_type dt) |
| Same function as above. More...
|
|
void | do_step (System system, CoorInOut &q, MomentumInOut &p, time_type t, time_type dt) |
| This method performs one step. More...
|
|
void | do_step (System system, const CoorInOut &q, const MomentumInOut &p, time_type t, time_type dt) |
| Same function as do_step( system , q , p , t , dt ). More...
|
|
void | do_step (System system, const StateIn &in, time_type t, StateOut &out, time_type dt) |
| This method performs one step. More...
|
|
void | adjust_size (const StateType &x) |
| Adjust the size of all temporaries in the stepper manually. More...
|
|
const coef_type & | coef_a (void) const |
| Returns the coefficients a. More...
|
|
const coef_type & | coef_b (void) const |
| Returns the coefficients b. More...
|
|
algebra_type & | algebra () |
|
const algebra_type & | algebra () const |
|
template<class Coor, class Momentum = Coor, class Value = double, class CoorDeriv = Coor, class MomentumDeriv = Coor, class Time = Value, class Algebra = typename algebra_dispatcher< Coor >::algebra_type, class Operations = typename operations_dispatcher< Coor >::operations_type, class Resizer = initially_resizer>
class boost::numeric::odeint::symplectic_rkn_sb3a_m4_mclachlan< Coor, Momentum, Value, CoorDeriv, MomentumDeriv, Time, Algebra, Operations, Resizer >
Implementation of the symmetric B3A Runge-Kutta Nystroem method of fifth order.
The method is of fourth order and has five stages. It is described HERE. This method can be used with multiprecision types since the coefficients are defined analytically.
ToDo: add reference to paper.
- Template Parameters
-
Order | The order of the stepper. |
Coor | The type representing the coordinates q. |
Momentum | The type representing the coordinates p. |
Value | The basic value type. Should be something like float, double or a high-precision type. |
CoorDeriv | The type representing the time derivative of the coordinate dq/dt. |
MomemtnumDeriv | The type representing the time derivative of the momentum dp/dt. |
Time | The type representing the time t. |
Algebra | The algebra. |
Operations | The operations. |
Resizer | The resizer policy. |
template<class Coor , class Momentum = Coor, class Value = double, class CoorDeriv = Coor, class MomentumDeriv = Coor, class Time = Value, class Algebra = typename algebra_dispatcher< Coor >::algebra_type, class Operations = typename operations_dispatcher< Coor >::operations_type, class Resizer = initially_resizer>
void boost::numeric::odeint::symplectic_nystroem_stepper_base< NumOfStages, Order, Coor, Momentum, Value, CoorDeriv, MomentumDeriv, Time, Algebra, Operations, Resizer >::do_step |
( |
System |
system, |
|
|
CoorInOut & |
q, |
|
|
MomentumInOut & |
p, |
|
|
time_type |
t, |
|
|
time_type |
dt |
|
) |
| |
|
inlineinherited |
This method performs one step.
The system can be either a pair of two function object describing the momentum part and the coordinate part or one function object describing only the momentum part. In this case the coordinate is assumed to be trivial dq/dt = p. The state is updated in-place.
- Note
- boost::ref or std::ref can be used for the system. So, it is correct to write
stepper.do_step( make_pair( std::ref( fq ) , std::ref( fp ) ) , q , p , t , dt )
.
-
This method solves the forwarding problem.
- Parameters
-
system | The system, can be represented as a pair of two function object or one function object. See above. |
q | The coordinate of the ODE. It is updated in-place. Therefore, the new value of the coordinate will be written into this variable. |
p | The momentum of the ODE. It is updated in-place. Therefore, the new value of the momentum will be written info this variable. |
t | The time of the ODE. It is not advanced by this method. |
dt | The time step. |
References boost::numeric::odeint::symplectic_nystroem_stepper_base< NumOfStages, Order, Coor, Momentum, Value, CoorDeriv, MomentumDeriv, Time, Algebra, Operations, Resizer >::do_step(), boost::xpressive::make_pair, and boost::ref().
void boost::numeric::odeint::symplectic_nystroem_stepper_base< NumOfStages, Order, Coor, Momentum, Value, CoorDeriv, MomentumDeriv, Time, Algebra, Operations, Resizer >::do_step |
( |
System |
system, |
|
|
const CoorInOut & |
q, |
|
|
const MomentumInOut & |
p, |
|
|
time_type |
t, |
|
|
time_type |
dt |
|
) |
| |
|
inlineinherited |
Same function as do_step( system , q , p , t , dt ).
It differs only in a different const specifier in order to solve the forwarding problem, can be called with Boost.Range.
References boost::numeric::odeint::symplectic_nystroem_stepper_base< NumOfStages, Order, Coor, Momentum, Value, CoorDeriv, MomentumDeriv, Time, Algebra, Operations, Resizer >::do_step(), boost::xpressive::make_pair, and boost::ref().