| Home | Libraries | People | FAQ | More

## Class template symplectic_euler

boost::numeric::odeint::symplectic_euler — Implementation of the symplectic Euler method.

## Synopsis

    // In header: <boost/numeric/odeint/stepper/symplectic_euler.hpp>

    template<typename Coor, typename Momentum = Coor, typename Value = double,
             typename CoorDeriv = Coor, typename MomentumDeriv = Coor,
             typename Time = Value,
             typename Algebra = typename algebra_dispatcher< Coor >::algebra_type,
             typename Operations = typename operations_dispatcher< Coor >::operations_type,
             typename Resizer = initially_resizer>
    class symplectic_euler : public symplectic_nystroem_stepper_base {
    public:
      // types
      typedef stepper_base_type::algebra_type algebra_type;
      typedef stepper_base_type::value_type   value_type;

      // public member functions
      symplectic_euler(const algebra_type & = algebra_type());
    };

## Description

The method is of first order and has one stage. It is described HERE.

### Template Parameters

1.     typename Coor

   The type representing the coordinates q.

2.     typename Momentum = Coor

   The type representing the coordinates p.

3.     typename Value = double

   The basic value type. Should be something like float, double or a high-precision type.

4.     typename CoorDeriv = Coor

   The type representing the time derivative of the coordinate dq/dt.

5.     typename MomentumDeriv = Coor

6.     typename Time = Value

   The type representing the time t.

7.     typename Algebra = typename algebra_dispatcher< Coor >::algebra_type

   The algebra.

8.     typename Operations = typename operations_dispatcher< Coor >::operations_type

   The operations.

9.     typename Resizer = initially_resizer

   The resizer policy.

### `symplectic_euler` public member functions

1.     symplectic_euler(const algebra_type & algebra = algebra_type());

   Constructs the symplectic_euler. This constructor can be used as a default constructor if the algebra has a default constructor.

   Parameters: |
   `algebra` | A copy of algebra is made and stored inside explicit_stepper_base.