• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<html>
2<head>
3<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
4<title>Simple Symplectic System</title>
5<link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css">
6<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
7<link rel="home" href="../../index.html" title="Chapter 1. Boost.Numeric.Odeint">
8<link rel="up" href="../concepts.html" title="Concepts">
9<link rel="prev" href="symplectic_system.html" title="Symplectic System">
10<link rel="next" href="implicit_system.html" title="Implicit System">
11</head>
12<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
13<table cellpadding="2" width="100%"><tr>
14<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../logo.jpg"></td>
15<td align="center"><a href="../../../../../../../index.html">Home</a></td>
16<td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td>
17<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
18<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
19<td align="center"><a href="../../../../../../../more/index.htm">More</a></td>
20</tr></table>
21<hr>
22<div class="spirit-nav">
23<a accesskey="p" href="symplectic_system.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../concepts.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="implicit_system.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a>
24</div>
25<div class="section">
26<div class="titlepage"><div><div><h3 class="title">
27<a name="boost_numeric_odeint.concepts.simple_symplectic_system"></a><a class="link" href="simple_symplectic_system.html" title="Simple Symplectic System">Simple
28      Symplectic System</a>
29</h3></div></div></div>
30<h5>
31<a name="boost_numeric_odeint.concepts.simple_symplectic_system.h0"></a>
32        <span class="phrase"><a name="boost_numeric_odeint.concepts.simple_symplectic_system.description"></a></span><a class="link" href="simple_symplectic_system.html#boost_numeric_odeint.concepts.simple_symplectic_system.description">Description</a>
33      </h5>
34<p>
35        In most Hamiltonian systems the kinetic term is a quadratic term in the momentum
36        <span class="emphasis"><em>H<sub>kin</sub> = p^2 / 2m</em></span> and in many cases it is possible to rescale
37        coordinates and set <span class="emphasis"><em>m=1</em></span> which leads to a trivial equation
38        of motion:
39      </p>
40<p>
41        <span class="emphasis"><em>q'(t) = f(p) = p. </em></span>
42      </p>
43<p>
44        while for <span class="emphasis"><em>p'</em></span> we still have the general form
45      </p>
46<p>
47        <span class="emphasis"><em>p'(t) = g(q) </em></span>
48      </p>
49<p>
50        As this case is very frequent we introduced a concept where only the nontrivial
51        equation for <span class="emphasis"><em>p'</em></span> has to be provided to the symplectic
52        stepper. We call this concept <span class="emphasis"><em>SimpleSymplecticSystem</em></span>
53      </p>
54<h5>
55<a name="boost_numeric_odeint.concepts.simple_symplectic_system.h1"></a>
56        <span class="phrase"><a name="boost_numeric_odeint.concepts.simple_symplectic_system.notation"></a></span><a class="link" href="simple_symplectic_system.html#boost_numeric_odeint.concepts.simple_symplectic_system.notation">Notation</a>
57      </h5>
58<div class="variablelist">
59<p class="title"><b></b></p>
60<dl class="variablelist">
61<dt><span class="term">System</span></dt>
62<dd><p>
63              A type that is a model of SimpleSymplecticSystem
64            </p></dd>
65<dt><span class="term">Coor</span></dt>
66<dd><p>
67              The type of the coordinate <span class="emphasis"><em>q</em></span>
68            </p></dd>
69<dt><span class="term">MomentumDeriv</span></dt>
70<dd><p>
71              The type of the derivative of momentum <span class="emphasis"><em>p'</em></span>
72            </p></dd>
73<dt><span class="term">sys</span></dt>
74<dd><p>
75              An object that models System
76            </p></dd>
77<dt><span class="term">q</span></dt>
78<dd><p>
79              Object of type Coor
80            </p></dd>
81<dt><span class="term">dpdt</span></dt>
82<dd><p>
83              Object of type MomentumDeriv
84            </p></dd>
85</dl>
86</div>
87<h5>
88<a name="boost_numeric_odeint.concepts.simple_symplectic_system.h2"></a>
89        <span class="phrase"><a name="boost_numeric_odeint.concepts.simple_symplectic_system.valid_expressions"></a></span><a class="link" href="simple_symplectic_system.html#boost_numeric_odeint.concepts.simple_symplectic_system.valid_expressions">Valid
90        Expressions</a>
91      </h5>
92<div class="informaltable"><table class="table">
93<colgroup>
94<col>
95<col>
96<col>
97<col>
98</colgroup>
99<thead><tr>
100<th>
101                <p>
102                  Name
103                </p>
104              </th>
105<th>
106                <p>
107                  Expression
108                </p>
109              </th>
110<th>
111                <p>
112                  Type
113                </p>
114              </th>
115<th>
116                <p>
117                  Semantics
118                </p>
119              </th>
120</tr></thead>
121<tbody>
122<tr>
123<td>
124                <p>
125                  Check for pair
126                </p>
127              </td>
128<td>
129                <p>
130                  <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">is_pair</span><span class="special">&lt;</span>
131                  <span class="identifier">System</span> <span class="special">&gt;::</span><span class="identifier">type</span></code>
132                </p>
133              </td>
134<td>
135                <p>
136                  <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">false_</span></code>
137                </p>
138              </td>
139<td>
140                <p>
141                  Check if System is a pair, should be evaluated to false in this
142                  case.
143                </p>
144              </td>
145</tr>
146<tr>
147<td>
148                <p>
149                  Calculate <span class="emphasis"><em>dp/dt = g(q)</em></span>
150                </p>
151              </td>
152<td>
153                <p>
154                  <code class="computeroutput"><span class="identifier">sys</span><span class="special">(</span>
155                  <span class="identifier">q</span> <span class="special">,</span>
156                  <span class="identifier">dpdt</span> <span class="special">)</span></code>
157                </p>
158              </td>
159<td>
160                <p>
161                  <code class="computeroutput"><span class="keyword">void</span></code>
162                </p>
163              </td>
164<td>
165                <p>
166                  Calculates <span class="emphasis"><em>g(q)</em></span>, the result is stored into
167                  <code class="computeroutput"><span class="identifier">dpdt</span></code>
168                </p>
169              </td>
170</tr>
171</tbody>
172</table></div>
173</div>
174<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
175<td align="left"></td>
176<td align="right"><div class="copyright-footer">Copyright © 2009-2015 Karsten Ahnert and Mario Mulansky<p>
177        Distributed under the Boost Software License, Version 1.0. (See accompanying
178        file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
179      </p>
180</div></td>
181</tr></table>
182<hr>
183<div class="spirit-nav">
184<a accesskey="p" href="symplectic_system.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../concepts.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="implicit_system.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a>
185</div>
186</body>
187</html>
188