Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world.

This is the documentation for an old version of Boost. Click here to view this page for the latest version.
 Home Libraries People FAQ More

Symplectic System

Description

This concept describes how to define a symplectic system written with generalized coordinate `q` and generalized momentum `p`:

q'(t) = f(p)

p'(t) = g(q)

Such a situation is typically found for Hamiltonian systems with a separable Hamiltonian:

H(p,q) = Hkin(p) + V(q)

which gives the equations of motion:

q'(t) = dHkin / dp = f(p)

p'(t) = dV / dq = g(q)

The algorithmic implementation of this situation is described by a pair of callable objects for f and g with a specific parameter signature. Such a system should be implemented as a std::pair of functions or a functors. Symplectic systems are used in symplectic steppers like `symplectic_rkn_sb3a_mclachlan`.

Notation

`System`

A type that is a model of SymplecticSystem

`Coor`

The type of the coordinate q

`Momentum`

The type of the momentum p

`CoorDeriv`

The type of the derivative of coordinate q'

`MomentumDeriv`

The type of the derivative of momentum p'

`sys`

An object of the type `System`

`q`

Object of type Coor

`p`

Object of type Momentum

`dqdt`

Object of type CoorDeriv

`dpdt`

Object of type MomentumDeriv

Valid expressions

Name

Expression

Type

Semantics

Check for pair

```boost::is_pair< System >::type```

`boost::mpl::true_`

Check if System is a pair

Calculate dq/dt = f(p)

```sys.first( p , dqdt )```

`void`

Calculates f(p), the result is stored into `dqdt`

Calculate dp/dt = g(q)

```sys.second( q , dpdt )```

`void`

Calculates g(q), the result is stored into `dpdt`

 Copyright © 2009-2012 Karsten Ahnert and Mario Mulansky Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)