1<html> 2<head> 3<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> 4<title>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="second_order_system.html" title="Second Order System"> 10<link rel="next" href="simple_symplectic_system.html" title="Simple Symplectic 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="second_order_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="simple_symplectic_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.symplectic_system"></a><a class="link" href="symplectic_system.html" title="Symplectic System">Symplectic 28 System</a> 29</h3></div></div></div> 30<h5> 31<a name="boost_numeric_odeint.concepts.symplectic_system.h0"></a> 32 <span class="phrase"><a name="boost_numeric_odeint.concepts.symplectic_system.description"></a></span><a class="link" href="symplectic_system.html#boost_numeric_odeint.concepts.symplectic_system.description">Description</a> 33 </h5> 34<p> 35 This concept describes how to define a symplectic system written with generalized 36 coordinate <code class="computeroutput"><span class="identifier">q</span></code> and generalized 37 momentum <code class="computeroutput"><span class="identifier">p</span></code>: 38 </p> 39<p> 40 <span class="emphasis"><em>q'(t) = f(p) </em></span> 41 </p> 42<p> 43 <span class="emphasis"><em>p'(t) = g(q) </em></span> 44 </p> 45<p> 46 Such a situation is typically found for Hamiltonian systems with a separable 47 Hamiltonian: 48 </p> 49<p> 50 <span class="emphasis"><em>H(p,q) = H<sub>kin</sub>(p) + V(q) </em></span> 51 </p> 52<p> 53 which gives the equations of motion: 54 </p> 55<p> 56 <span class="emphasis"><em>q'(t) = dH<sub>kin</sub> / dp = f(p) </em></span> 57 </p> 58<p> 59 <span class="emphasis"><em>p'(t) = dV / dq = g(q) </em></span> 60 </p> 61<p> 62 The algorithmic implementation of this situation is described by a pair of 63 callable objects for <span class="emphasis"><em>f</em></span> and <span class="emphasis"><em>g</em></span> with 64 a specific parameter signature. Such a system should be implemented as a 65 std::pair of functions or a functors. Symplectic systems are used in symplectic 66 steppers like <code class="computeroutput"><span class="identifier">symplectic_rkn_sb3a_mclachlan</span></code>. 67 </p> 68<h5> 69<a name="boost_numeric_odeint.concepts.symplectic_system.h1"></a> 70 <span class="phrase"><a name="boost_numeric_odeint.concepts.symplectic_system.notation"></a></span><a class="link" href="symplectic_system.html#boost_numeric_odeint.concepts.symplectic_system.notation">Notation</a> 71 </h5> 72<div class="variablelist"> 73<p class="title"><b></b></p> 74<dl class="variablelist"> 75<dt><span class="term"><code class="computeroutput"><span class="identifier">System</span></code></span></dt> 76<dd><p> 77 A type that is a model of SymplecticSystem 78 </p></dd> 79<dt><span class="term"><code class="computeroutput"><span class="identifier">Coor</span></code></span></dt> 80<dd><p> 81 The type of the coordinate <span class="emphasis"><em>q</em></span> 82 </p></dd> 83<dt><span class="term"><code class="computeroutput"><span class="identifier">Momentum</span></code></span></dt> 84<dd><p> 85 The type of the momentum <span class="emphasis"><em>p</em></span> 86 </p></dd> 87<dt><span class="term"><code class="computeroutput"><span class="identifier">CoorDeriv</span></code></span></dt> 88<dd><p> 89 The type of the derivative of coordinate <span class="emphasis"><em>q'</em></span> 90 </p></dd> 91<dt><span class="term"><code class="computeroutput"><span class="identifier">MomentumDeriv</span></code></span></dt> 92<dd><p> 93 The type of the derivative of momentum <span class="emphasis"><em>p'</em></span> 94 </p></dd> 95<dt><span class="term"><code class="computeroutput"><span class="identifier">sys</span></code></span></dt> 96<dd><p> 97 An object of the type <code class="computeroutput"><span class="identifier">System</span></code> 98 </p></dd> 99<dt><span class="term"><code class="computeroutput"><span class="identifier">q</span></code></span></dt> 100<dd><p> 101 Object of type Coor 102 </p></dd> 103<dt><span class="term"><code class="computeroutput"><span class="identifier">p</span></code></span></dt> 104<dd><p> 105 Object of type Momentum 106 </p></dd> 107<dt><span class="term"><code class="computeroutput"><span class="identifier">dqdt</span></code></span></dt> 108<dd><p> 109 Object of type CoorDeriv 110 </p></dd> 111<dt><span class="term"><code class="computeroutput"><span class="identifier">dpdt</span></code></span></dt> 112<dd><p> 113 Object of type MomentumDeriv 114 </p></dd> 115</dl> 116</div> 117<h5> 118<a name="boost_numeric_odeint.concepts.symplectic_system.h2"></a> 119 <span class="phrase"><a name="boost_numeric_odeint.concepts.symplectic_system.valid_expressions"></a></span><a class="link" href="symplectic_system.html#boost_numeric_odeint.concepts.symplectic_system.valid_expressions">Valid 120 expressions</a> 121 </h5> 122<div class="informaltable"><table class="table"> 123<colgroup> 124<col> 125<col> 126<col> 127<col> 128</colgroup> 129<thead><tr> 130<th> 131 <p> 132 Name 133 </p> 134 </th> 135<th> 136 <p> 137 Expression 138 </p> 139 </th> 140<th> 141 <p> 142 Type 143 </p> 144 </th> 145<th> 146 <p> 147 Semantics 148 </p> 149 </th> 150</tr></thead> 151<tbody> 152<tr> 153<td> 154 <p> 155 Check for pair 156 </p> 157 </td> 158<td> 159 <p> 160 <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">is_pair</span><span class="special"><</span> 161 <span class="identifier">System</span> <span class="special">>::</span><span class="identifier">type</span></code> 162 </p> 163 </td> 164<td> 165 <p> 166 <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">true_</span></code> 167 </p> 168 </td> 169<td> 170 <p> 171 Check if System is a pair 172 </p> 173 </td> 174</tr> 175<tr> 176<td> 177 <p> 178 Calculate <span class="emphasis"><em>dq/dt = f(p)</em></span> 179 </p> 180 </td> 181<td> 182 <p> 183 <code class="computeroutput"><span class="identifier">sys</span><span class="special">.</span><span class="identifier">first</span><span class="special">(</span> 184 <span class="identifier">p</span> <span class="special">,</span> 185 <span class="identifier">dqdt</span> <span class="special">)</span></code> 186 </p> 187 </td> 188<td> 189 <p> 190 <code class="computeroutput"><span class="keyword">void</span></code> 191 </p> 192 </td> 193<td> 194 <p> 195 Calculates <span class="emphasis"><em>f(p)</em></span>, the result is stored into 196 <code class="computeroutput"><span class="identifier">dqdt</span></code> 197 </p> 198 </td> 199</tr> 200<tr> 201<td> 202 <p> 203 Calculate <span class="emphasis"><em>dp/dt = g(q)</em></span> 204 </p> 205 </td> 206<td> 207 <p> 208 <code class="computeroutput"><span class="identifier">sys</span><span class="special">.</span><span class="identifier">second</span><span class="special">(</span> 209 <span class="identifier">q</span> <span class="special">,</span> 210 <span class="identifier">dpdt</span> <span class="special">)</span></code> 211 </p> 212 </td> 213<td> 214 <p> 215 <code class="computeroutput"><span class="keyword">void</span></code> 216 </p> 217 </td> 218<td> 219 <p> 220 Calculates <span class="emphasis"><em>g(q)</em></span>, the result is stored into 221 <code class="computeroutput"><span class="identifier">dpdt</span></code> 222 </p> 223 </td> 224</tr> 225</tbody> 226</table></div> 227</div> 228<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> 229<td align="left"></td> 230<td align="right"><div class="copyright-footer">Copyright © 2009-2015 Karsten Ahnert and Mario Mulansky<p> 231 Distributed under the Boost Software License, Version 1.0. (See accompanying 232 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>) 233 </p> 234</div></td> 235</tr></table> 236<hr> 237<div class="spirit-nav"> 238<a accesskey="p" href="second_order_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="simple_symplectic_system.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a> 239</div> 240</body> 241</html> 242