• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<html>
2<head>
3<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
4<title>Stepper</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="implicit_system.html" title="Implicit System">
10<link rel="next" href="error_stepper.html" title="Error Stepper">
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="implicit_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="error_stepper.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.stepper"></a><a class="link" href="stepper.html" title="Stepper">Stepper</a>
28</h3></div></div></div>
29<p>
30        This concepts specifies the interface a simple stepper has to fulfill to
31        be used within the <a class="link" href="../odeint_in_detail/integrate_functions.html" title="Integrate functions">integrate
32        functions</a>.
33      </p>
34<h5>
35<a name="boost_numeric_odeint.concepts.stepper.h0"></a>
36        <span class="phrase"><a name="boost_numeric_odeint.concepts.stepper.description"></a></span><a class="link" href="stepper.html#boost_numeric_odeint.concepts.stepper.description">Description</a>
37      </h5>
38<p>
39        The basic stepper concept. A basic stepper following this Stepper concept
40        is able to perform a single step of the solution <span class="emphasis"><em>x(t)</em></span>
41        of an ODE to obtain <span class="emphasis"><em>x(t+dt)</em></span> using a given step size
42        <span class="emphasis"><em>dt</em></span>. Basic steppers can be Runge-Kutta steppers, symplectic
43        steppers as well as implicit steppers. Depending on the actual stepper, the
44        ODE is defined as <a class="link" href="system.html" title="System">System</a>,
45        <a class="link" href="symplectic_system.html" title="Symplectic System">Symplectic
46        System</a>, <a class="link" href="simple_symplectic_system.html" title="Simple Symplectic System">Simple
47        Symplectic System</a> or <a class="link" href="implicit_system.html" title="Implicit System">Implicit
48        System</a>. Note that all error steppers are also basic steppers.
49      </p>
50<h5>
51<a name="boost_numeric_odeint.concepts.stepper.h1"></a>
52        <span class="phrase"><a name="boost_numeric_odeint.concepts.stepper.refinement_of"></a></span><a class="link" href="stepper.html#boost_numeric_odeint.concepts.stepper.refinement_of">Refinement
53        of</a>
54      </h5>
55<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
56<li class="listitem">
57            DefaultConstructable
58          </li>
59<li class="listitem">
60            CopyConstructable
61          </li>
62</ul></div>
63<h5>
64<a name="boost_numeric_odeint.concepts.stepper.h2"></a>
65        <span class="phrase"><a name="boost_numeric_odeint.concepts.stepper.associated_types"></a></span><a class="link" href="stepper.html#boost_numeric_odeint.concepts.stepper.associated_types">Associated
66        types</a>
67      </h5>
68<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
69<li class="listitem">
70            <p><span class="bold"><strong>state_type</strong></span></p>
71<p><code class="computeroutput"><span class="identifier">Stepper</span><span class="special">::</span><span class="identifier">state_type</span></code></p>
72<p>The
73            type characterizing the state of the ODE, hence <span class="emphasis"><em>x</em></span>.</p>
74          </li>
75<li class="listitem">
76            <p><span class="bold"><strong>deriv_type</strong></span></p>
77<p><code class="computeroutput"><span class="identifier">Stepper</span><span class="special">::</span><span class="identifier">deriv_type</span></code></p>
78<p>The
79            type characterizing the derivative of the ODE, hence <span class="emphasis"><em>d x/dt</em></span>.</p>
80          </li>
81<li class="listitem">
82            <p><span class="bold"><strong>time_type</strong></span></p>
83<p><code class="computeroutput"><span class="identifier">Stepper</span><span class="special">::</span><span class="identifier">time_type</span></code></p>
84<p>The
85            type characterizing the dependent variable of the ODE, hence the time
86            <span class="emphasis"><em>t</em></span>.</p>
87          </li>
88<li class="listitem">
89            <p><span class="bold"><strong>value_type</strong></span></p>
90<p><code class="computeroutput"><span class="identifier">Stepper</span><span class="special">::</span><span class="identifier">value_type</span></code></p>
91<p>The
92            numerical data type which is used within the stepper, something like
93            <code class="computeroutput"><span class="keyword">float</span></code>, <code class="computeroutput"><span class="keyword">double</span></code>,
94            <code class="computeroutput"><span class="identifier">complex</span><span class="special">&amp;</span><span class="identifier">lt</span><span class="special">;</span> <span class="keyword">double</span> <span class="special">&amp;</span><span class="identifier">gt</span><span class="special">;</span></code>.</p>
95          </li>
96<li class="listitem">
97            <p><span class="bold"><strong>order_type</strong></span></p>
98<p><code class="computeroutput"><span class="identifier">Stepper</span><span class="special">::</span><span class="identifier">order_type</span></code></p>
99<p>The
100            type characterizing the order of the ODE, typically <code class="computeroutput"><span class="keyword">unsigned</span>
101            <span class="keyword">short</span></code>.</p>
102          </li>
103<li class="listitem">
104            <p><span class="bold"><strong>stepper_category</strong></span></p>
105<p><code class="computeroutput"><span class="identifier">Stepper</span><span class="special">::</span><span class="identifier">stepper_category</span></code></p>
106<p>A
107            tag type characterizing the category of the stepper. This type must be
108            convertible to <code class="computeroutput"><span class="identifier">stepper_tag</span></code>.</p>
109          </li>
110</ul></div>
111<h5>
112<a name="boost_numeric_odeint.concepts.stepper.h3"></a>
113        <span class="phrase"><a name="boost_numeric_odeint.concepts.stepper.notation"></a></span><a class="link" href="stepper.html#boost_numeric_odeint.concepts.stepper.notation">Notation</a>
114      </h5>
115<div class="variablelist">
116<p class="title"><b></b></p>
117<dl class="variablelist">
118<dt><span class="term"><code class="computeroutput"><span class="identifier">Stepper</span></code></span></dt>
119<dd><p>
120              A type that is a model of Stepper
121            </p></dd>
122<dt><span class="term"><code class="computeroutput"><span class="identifier">State</span></code></span></dt>
123<dd><p>
124              A type representing the state <span class="emphasis"><em>x</em></span> of the ODE
125            </p></dd>
126<dt><span class="term"><code class="computeroutput"><span class="identifier">Time</span></code></span></dt>
127<dd><p>
128              A type representing the time <span class="emphasis"><em>t</em></span> of the ODE
129            </p></dd>
130<dt><span class="term"><code class="computeroutput"><span class="identifier">stepper</span></code></span></dt>
131<dd><p>
132              An object of type <code class="computeroutput"><span class="identifier">Stepper</span></code>
133            </p></dd>
134<dt><span class="term"><code class="computeroutput"><span class="identifier">x</span></code></span></dt>
135<dd><p>
136              Object of type <code class="computeroutput"><span class="identifier">State</span></code>
137            </p></dd>
138<dt><span class="term"><code class="computeroutput"><span class="identifier">t</span></code>, <code class="computeroutput"><span class="identifier">dt</span></code></span></dt>
139<dd><p>
140              Objects of type <code class="computeroutput"><span class="identifier">Time</span></code>
141            </p></dd>
142<dt><span class="term"><code class="computeroutput"><span class="identifier">sys</span></code></span></dt>
143<dd><p>
144              An object defining the ODE. Depending on the Stepper this might be
145              a model of <a class="link" href="system.html" title="System">System</a>,
146              <a class="link" href="symplectic_system.html" title="Symplectic System">Symplectic
147              System</a>, <a class="link" href="simple_symplectic_system.html" title="Simple Symplectic System">Simple
148              Symplectic System</a> or <a class="link" href="implicit_system.html" title="Implicit System">Implicit
149              System</a>
150            </p></dd>
151</dl>
152</div>
153<h5>
154<a name="boost_numeric_odeint.concepts.stepper.h4"></a>
155        <span class="phrase"><a name="boost_numeric_odeint.concepts.stepper.valid_expressions"></a></span><a class="link" href="stepper.html#boost_numeric_odeint.concepts.stepper.valid_expressions">Valid Expressions</a>
156      </h5>
157<div class="informaltable"><table class="table">
158<colgroup>
159<col>
160<col>
161<col>
162<col>
163</colgroup>
164<thead><tr>
165<th>
166                <p>
167                  Name
168                </p>
169              </th>
170<th>
171                <p>
172                  Expression
173                </p>
174              </th>
175<th>
176                <p>
177                  Type
178                </p>
179              </th>
180<th>
181                <p>
182                  Semantics
183                </p>
184              </th>
185</tr></thead>
186<tbody>
187<tr>
188<td>
189                <p>
190                  Get the order
191                </p>
192              </td>
193<td>
194                <p>
195                  <code class="computeroutput"><span class="identifier">stepper</span><span class="special">.</span><span class="identifier">order</span><span class="special">()</span></code>
196                </p>
197              </td>
198<td>
199                <p>
200                  <code class="computeroutput"><span class="identifier">order_type</span></code>
201                </p>
202              </td>
203<td>
204                <p>
205                  Returns the order of the stepper.
206                </p>
207              </td>
208</tr>
209<tr>
210<td>
211                <p>
212                  Do step
213                </p>
214              </td>
215<td>
216                <p>
217                  <code class="computeroutput"><span class="identifier">stepper</span><span class="special">.</span><span class="identifier">do_step</span><span class="special">(</span>
218                  <span class="identifier">sys</span> <span class="special">,</span>
219                  <span class="identifier">x</span> <span class="special">,</span>
220                  <span class="identifier">t</span> <span class="special">,</span>
221                  <span class="identifier">dt</span> <span class="special">)</span></code>
222                </p>
223              </td>
224<td>
225                <p>
226                  <code class="computeroutput"><span class="keyword">void</span></code>
227                </p>
228              </td>
229<td>
230                <p>
231                  Performs one step of step size <code class="computeroutput"><span class="identifier">dt</span></code>.
232                  The newly obtained state is written in place in <code class="computeroutput"><span class="identifier">x</span></code>.
233                </p>
234              </td>
235</tr>
236</tbody>
237</table></div>
238<h5>
239<a name="boost_numeric_odeint.concepts.stepper.h5"></a>
240        <span class="phrase"><a name="boost_numeric_odeint.concepts.stepper.models"></a></span><a class="link" href="stepper.html#boost_numeric_odeint.concepts.stepper.models">Models</a>
241      </h5>
242<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
243<li class="listitem">
244            <code class="computeroutput"><span class="identifier">runge_kutta4</span></code>
245          </li>
246<li class="listitem">
247            <code class="computeroutput"><span class="identifier">euler</span></code>
248          </li>
249<li class="listitem">
250            <code class="computeroutput"><span class="identifier">runge_kutta_cash_karp54</span></code>
251          </li>
252<li class="listitem">
253            <code class="computeroutput"><span class="identifier">runge_kutta_dopri5</span></code>
254          </li>
255<li class="listitem">
256            <code class="computeroutput"><span class="identifier">runge_kutta_fehlberg78</span></code>
257          </li>
258<li class="listitem">
259            <code class="computeroutput"><span class="identifier">modified_midpoint</span></code>
260          </li>
261<li class="listitem">
262            <code class="computeroutput"><span class="identifier">rosenbrock4</span></code>
263          </li>
264</ul></div>
265</div>
266<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
267<td align="left"></td>
268<td align="right"><div class="copyright-footer">Copyright © 2009-2015 Karsten Ahnert and Mario Mulansky<p>
269        Distributed under the Boost Software License, Version 1.0. (See accompanying
270        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>)
271      </p>
272</div></td>
273</tr></table>
274<hr>
275<div class="spirit-nav">
276<a accesskey="p" href="implicit_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="error_stepper.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a>
277</div>
278</body>
279</html>
280