Implementation of the symplectic Euler method. More...
#include <symplectic_euler.hpp>
Public Member Functions | |
symplectic_euler (const algebra_type &algebra=algebra_type()) | |
Constructs the symplectic_euler. 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 |
Static Public Attributes | |
static const size_t | num_of_stages |
static const order_type | order_value |
Protected Attributes | |
algebra_type | m_algebra |
Implementation of the symplectic Euler method.
The method is of first order and has one stage. It is described HERE.
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. |
|
inherited |
typedef stepper_base_type::algebra_type boost::numeric::odeint::symplectic_euler< Coor, Momentum, Value, CoorDeriv, MomentumDeriv, Time, Algebra, Operations, Resizer >::algebra_type |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
typedef symplectic_nystroem_stepper_base< 1 , 1 , Coor , Momentum , Value , CoorDeriv , MomentumDeriv , Time , Algebra , Operations , Resizer > boost::numeric::odeint::symplectic_euler< Coor, Momentum, Value, CoorDeriv, MomentumDeriv, Time, Algebra, Operations, Resizer >::stepper_base_type |
|
inherited |
|
inherited |
typedef stepper_base_type::value_type boost::numeric::odeint::symplectic_euler< Coor, Momentum, Value, CoorDeriv, MomentumDeriv, Time, Algebra, Operations, Resizer >::value_type |
|
inherited |
|
inherited |
|
inline |
Constructs the symplectic_euler.
This constructor can be used as a default constructor if the algebra has a default constructor.
algebra | A copy of algebra is made and stored inside explicit_stepper_base. |
|
inlineinherited |
Adjust the size of all temporaries in the stepper manually.
x | A state from which the size of the temporaries to be resized is deduced. |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
Returns the coefficients a.
|
inlineinherited |
Returns the coefficients b.
|
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.
stepper.do_step( make_pair( std::ref( fq ) , std::ref( fp ) ) , make_pair( std::ref( q ) , std::ref( p ) ) , t , dt )
.system | The system, can be represented as a pair of two function object or one function object. See above. |
state | The state of the ODE. It is a pair of Coor and Momentum. The state is updated in-place, therefore, the new value of the state will be written into this variable. |
t | The time of the ODE. It is not advanced by this method. |
dt | The time step. |
|
inlineinherited |
Same function as above.
It differs only in a different const specifier in order to solve the forwarding problem, can be used with Boost.Range.
|
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.
stepper.do_step( make_pair( std::ref( fq ) , std::ref( fp ) ) , q , p , t , dt )
.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. |
|
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.
|
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 out-of-place.
stepper.do_step( make_pair( std::ref( fq ) , std::ref( fp ) ) , x_in , t , x_out , dt )
.system | The system, can be represented as a pair of two function object or one function object. See above. |
in | The state of the ODE, which is a pair of coordinate and momentum. The state is updated out-of-place, therefore the new value is written into out |
t | The time of the ODE. It is not advanced by this method. |
out | The new state of the ODE. |
dt | The time step. |
|
inlineinherited |
|
protectedinherited |
Referenced by boost::numeric::odeint::algebra_stepper_base< algebra_type, operations_type >::algebra(), boost::numeric::odeint::euler< State, Value, Deriv, Time, Algebra, Operations, Resizer >::calc_state(), boost::numeric::odeint::runge_kutta_dopri5< State, Value, Deriv, Time, Algebra, Operations, Resizer >::calc_state(), boost::numeric::odeint::velocity_verlet< Coor, Velocity, Value, Acceleration, Time, TimeSq, Algebra, Operations, Resizer >::do_step(), boost::numeric::odeint::euler< State, Value, Deriv, Time, Algebra, Operations, Resizer >::do_step_impl(), boost::numeric::odeint::modified_midpoint< state_type, value_type, deriv_type, time_type, algebra_type, operations_type, resizer_type >::do_step_impl(), boost::numeric::odeint::runge_kutta4_classic< State, Value, Deriv, Time, Algebra, Operations, Resizer >::do_step_impl(), boost::numeric::odeint::runge_kutta_dopri5< State, Value, Deriv, Time, Algebra, Operations, Resizer >::do_step_impl(), boost::numeric::odeint::runge_kutta_cash_karp54_classic< State, Value, Deriv, Time, Algebra, Operations, Resizer >::do_step_impl(), boost::numeric::odeint::explicit_error_generic_rk< 6, 5, 5, 4, State, Value, Deriv, Time, Algebra, Operations, Resizer >::do_step_impl(), and boost::numeric::odeint::explicit_generic_rk< 4, 4, State, Value, Deriv, Time, Algebra, Operations, Resizer >::do_step_impl().
|
staticinherited |
|
staticinherited |