deleted odeint/doc

This commit is contained in:
Mario Mulansky 2012-09-18 16:46:29 +02:00
parent 3a6ecbdb85
commit 16a987fcbb
113 changed files with 3 additions and 15276 deletions

View File

@ -1,54 +0,0 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Concepts</title>
<link rel="stylesheet" href="../boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
<link rel="home" href="../index.html" title="Chapter&#160;1.&#160;Boost.Numeric.Odeint">
<link rel="up" href="../index.html" title="Chapter&#160;1.&#160;Boost.Numeric.Odeint">
<link rel="prev" href="odeint_in_detail/using_boost__range.html" title="Using boost::range">
<link rel="next" href="concepts/system.html" title="System">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<div class="spirit-nav">
<a accesskey="p" href="odeint_in_detail/using_boost__range.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="concepts/system.html"><img src="../images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="boost_numeric_odeint.concepts"></a><a class="link" href="concepts.html" title="Concepts">Concepts</a>
</h2></div></div></div>
<div class="toc"><dl>
<dt><span class="section"><a href="concepts/system.html">System</a></span></dt>
<dt><span class="section"><a href="concepts/symplectic_system.html">Symplectic
System</a></span></dt>
<dt><span class="section"><a href="concepts/simple_symplectic_system.html">Simple
Symplectic System</a></span></dt>
<dt><span class="section"><a href="concepts/implicit_system.html">Implicit
System</a></span></dt>
<dt><span class="section"><a href="concepts/stepper.html">Stepper</a></span></dt>
<dt><span class="section"><a href="concepts/error_stepper.html">Error Stepper</a></span></dt>
<dt><span class="section"><a href="concepts/controlled_stepper.html">Controlled
Stepper</a></span></dt>
<dt><span class="section"><a href="concepts/dense_output_stepper.html">Dense
Output Stepper</a></span></dt>
<dt><span class="section"><a href="concepts/state_algebra_operations.html">State
Algebra Operations</a></span></dt>
<dt><span class="section"><a href="concepts/state_wrapper.html">State Wrapper</a></span></dt>
</dl></div>
<a name="odeint.concepts"></a>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright &#169; 2009-2011 Karsten Ahnert
and Mario Mulansky<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
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>)
</p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="odeint_in_detail/using_boost__range.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="concepts/system.html"><img src="../images/next.png" alt="Next"></a>
</div>
</body>
</html>

View File

@ -1,227 +0,0 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Controlled Stepper</title>
<link rel="stylesheet" href="../../boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
<link rel="home" href="../../index.html" title="Chapter&#160;1.&#160;Boost.Numeric.Odeint">
<link rel="up" href="../concepts.html" title="Concepts">
<link rel="prev" href="error_stepper.html" title="Error Stepper">
<link rel="next" href="dense_output_stepper.html" title="Dense Output Stepper">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<div class="spirit-nav">
<a accesskey="p" href="error_stepper.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../concepts.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="dense_output_stepper.html"><img src="../../images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h3 class="title">
<a name="boost_numeric_odeint.concepts.controlled_stepper"></a><a class="link" href="controlled_stepper.html" title="Controlled Stepper">Controlled
Stepper</a>
</h3></div></div></div>
<p>
This concept specifies the interface a controlled stepper has to fulfill
to be used within <a class="link" href="../odeint_in_detail/integrate_functions.html" title="Integrate functions">integrate
functions</a>.
</p>
<h5>
<a name="boost_numeric_odeint.concepts.controlled_stepper.h0"></a>
<span><a name="boost_numeric_odeint.concepts.controlled_stepper.description"></a></span><a class="link" href="controlled_stepper.html#boost_numeric_odeint.concepts.controlled_stepper.description">Description</a>
</h5>
<p>
A controlled stepper following this Controlled Stepper concept provides the
possibility to perform one step of the solution <span class="emphasis"><em>x(t)</em></span>
of an ODE with step-size <span class="emphasis"><em>dt</em></span> to obtain <span class="emphasis"><em>x(t+dt)</em></span>
with a given step-size <span class="emphasis"><em>dt</em></span>. Depending on an error estimate
of the solution the step might be rejected and a smaller step-size is suggested.
</p>
<h5>
<a name="boost_numeric_odeint.concepts.controlled_stepper.h1"></a>
<span><a name="boost_numeric_odeint.concepts.controlled_stepper.associated_types"></a></span><a class="link" href="controlled_stepper.html#boost_numeric_odeint.concepts.controlled_stepper.associated_types">Associated
types</a>
</h5>
<div class="itemizedlist"><ul class="itemizedlist" type="disc">
<li class="listitem">
<p><span class="bold"><strong>state_type</strong></span></p>
<p><code class="computeroutput"><span class="identifier">Stepper</span><span class="special">::</span><span class="identifier">state_type</span></code></p>
<p>The
type characterizing the state of the ODE, hence <span class="emphasis"><em>x</em></span>.</p>
</li>
<li class="listitem">
<p><span class="bold"><strong>deriv_type</strong></span></p>
<p><code class="computeroutput"><span class="identifier">Stepper</span><span class="special">::</span><span class="identifier">deriv_type</span></code></p>
<p>The
type characterizing the derivative of the ODE, hence <span class="emphasis"><em>d x/dt</em></span>.</p>
</li>
<li class="listitem">
<p><span class="bold"><strong>time_type</strong></span></p>
<p><code class="computeroutput"><span class="identifier">Stepper</span><span class="special">::</span><span class="identifier">time_type</span></code></p>
<p>The
type characterizing the dependent variable of the ODE, hence the time
<span class="emphasis"><em>t</em></span>.</p>
</li>
<li class="listitem">
<p><span class="bold"><strong>value_type</strong></span></p>
<p><code class="computeroutput"><span class="identifier">Stepper</span><span class="special">::</span><span class="identifier">value_type</span></code></p>
<p>The
numerical data type which is used within the stepper, something like
<code class="computeroutput"><span class="keyword">float</span></code>, <code class="computeroutput"><span class="keyword">double</span></code>,
<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>
</li>
<li class="listitem">
<p><span class="bold"><strong>stepper_category</strong></span></p>
<p><code class="computeroutput"><span class="identifier">Stepper</span><span class="special">::</span><span class="identifier">stepper_category</span></code></p>
<p>A
tag type characterizing the category of the stepper. This type must be
convertible to <code class="computeroutput"><span class="identifier">controlled_stepper_tag</span></code>.</p>
</li>
</ul></div>
<h5>
<a name="boost_numeric_odeint.concepts.controlled_stepper.h2"></a>
<span><a name="boost_numeric_odeint.concepts.controlled_stepper.notation"></a></span><a class="link" href="controlled_stepper.html#boost_numeric_odeint.concepts.controlled_stepper.notation">Notation</a>
</h5>
<div class="variablelist">
<p class="title"><b></b></p>
<dl>
<dt><span class="term"><code class="computeroutput"><span class="identifier">ControlledStepper</span></code></span></dt>
<dd><p>
A type that is a model of Controlled Stepper
</p></dd>
<dt><span class="term"><code class="computeroutput"><span class="identifier">State</span></code></span></dt>
<dd><p>
A type representing the state <span class="emphasis"><em>x</em></span> of the ODE
</p></dd>
<dt><span class="term"><code class="computeroutput"><span class="identifier">Time</span></code></span></dt>
<dd><p>
A type representing the time <span class="emphasis"><em>t</em></span> of the ODE
</p></dd>
<dt><span class="term"><code class="computeroutput"><span class="identifier">stepper</span></code></span></dt>
<dd><p>
An object of type <code class="computeroutput"><span class="identifier">ControlledStepper</span></code>
</p></dd>
<dt><span class="term"><code class="computeroutput"><span class="identifier">x</span></code></span></dt>
<dd><p>
Object of type <code class="computeroutput"><span class="identifier">State</span></code>
</p></dd>
<dt><span class="term"><code class="computeroutput"><span class="identifier">t</span></code>, <code class="computeroutput"><span class="identifier">dt</span></code></span></dt>
<dd><p>
Objects of type <code class="computeroutput"><span class="identifier">Time</span></code>
</p></dd>
<dt><span class="term"><code class="computeroutput"><span class="identifier">sys</span></code></span></dt>
<dd><p>
An object defining the ODE, should be a model of <a class="link" href="system.html" title="System">System</a>,
<a class="link" href="symplectic_system.html" title="Symplectic System">Symplectic
System</a>, <a class="link" href="simple_symplectic_system.html" title="Simple Symplectic System">Simple
Symplectic System</a> or <a class="link" href="implicit_system.html" title="Implicit System">Implicit
System</a>.
</p></dd>
</dl>
</div>
<h5>
<a name="boost_numeric_odeint.concepts.controlled_stepper.h3"></a>
<span><a name="boost_numeric_odeint.concepts.controlled_stepper.valid_expressions"></a></span><a class="link" href="controlled_stepper.html#boost_numeric_odeint.concepts.controlled_stepper.valid_expressions">Valid
Expressions</a>
</h5>
<div class="informaltable"><table class="table">
<colgroup>
<col>
<col>
<col>
<col>
</colgroup>
<thead><tr>
<th>
<p>
Name
</p>
</th>
<th>
<p>
Expression
</p>
</th>
<th>
<p>
Type
</p>
</th>
<th>
<p>
Semantics
</p>
</th>
</tr></thead>
<tbody><tr>
<td>
<p>
Do step
</p>
</td>
<td>
<p>
</p>
<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="identifier">stepper</span><span class="special">.</span><span class="identifier">try_step</span><span class="special">(</span> <span class="identifier">sys</span> <span class="special">,</span> <span class="identifier">x</span> <span class="special">,</span> <span class="identifier">t</span> <span class="special">,</span> <span class="identifier">dt</span> <span class="special">)</span></pre>
<p>
</p>
</td>
<td>
<p>
<code class="computeroutput"><span class="identifier">controlled_step_result</span></code>
</p>
</td>
<td>
<p>
Tries one step of step size <code class="computeroutput"><span class="identifier">dt</span></code>.
If the step was successful, <code class="computeroutput"><span class="identifier">success</span></code>
is returned, the resulting state is written to <code class="computeroutput"><span class="identifier">x</span></code>,
the new time is stored in <code class="computeroutput"><span class="identifier">t</span></code>
and <code class="computeroutput"><span class="identifier">dt</span></code> now contains
a new (possibly larger) step-size for the next step. If the error
was too big, <code class="computeroutput"><span class="identifier">rejected</span></code>
is returned and the results are neglected - <code class="computeroutput"><span class="identifier">x</span></code>
and <code class="computeroutput"><span class="identifier">t</span></code> are unchanged
and <code class="computeroutput"><span class="identifier">dt</span></code> now contains
a reduced step-size to be used for the next try.
</p>
</td>
</tr></tbody>
</table></div>
<h5>
<a name="boost_numeric_odeint.concepts.controlled_stepper.h4"></a>
<span><a name="boost_numeric_odeint.concepts.controlled_stepper.models"></a></span><a class="link" href="controlled_stepper.html#boost_numeric_odeint.concepts.controlled_stepper.models">Models</a>
</h5>
<div class="itemizedlist"><ul class="itemizedlist" type="disc">
<li class="listitem">
<code class="computeroutput"><span class="identifier">controlled_error_stepper</span><span class="special">&lt;</span> <span class="identifier">runge_kutta_cash_karp54</span>
<span class="special">&gt;</span></code>
</li>
<li class="listitem">
<code class="computeroutput"><span class="identifier">controlled_error_stepper_fsal</span><span class="special">&lt;</span> <span class="identifier">runge_kutta_dopri5</span>
<span class="special">&gt;</span></code>
</li>
<li class="listitem">
<code class="computeroutput"><span class="identifier">controlled_error_stepper</span><span class="special">&lt;</span> <span class="identifier">runge_kutta_fehlberg78</span>
<span class="special">&gt;</span></code>
</li>
<li class="listitem">
<code class="computeroutput"><span class="identifier">rosenbrock4_controller</span></code>
</li>
<li class="listitem">
<code class="computeroutput"><span class="identifier">bulirsch_stoer</span></code>
</li>
</ul></div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright &#169; 2009-2011 Karsten Ahnert
and Mario Mulansky<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
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>)
</p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="error_stepper.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../concepts.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="dense_output_stepper.html"><img src="../../images/next.png" alt="Next"></a>
</div>
</body>
</html>

View File

@ -1,311 +0,0 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Dense Output Stepper</title>
<link rel="stylesheet" href="../../boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
<link rel="home" href="../../index.html" title="Chapter&#160;1.&#160;Boost.Numeric.Odeint">
<link rel="up" href="../concepts.html" title="Concepts">
<link rel="prev" href="controlled_stepper.html" title="Controlled Stepper">
<link rel="next" href="state_algebra_operations.html" title="State Algebra Operations">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<div class="spirit-nav">
<a accesskey="p" href="controlled_stepper.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../concepts.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="state_algebra_operations.html"><img src="../../images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h3 class="title">
<a name="boost_numeric_odeint.concepts.dense_output_stepper"></a><a class="link" href="dense_output_stepper.html" title="Dense Output Stepper">Dense
Output Stepper</a>
</h3></div></div></div>
<p>
This concept specifies the interface a dense output stepper has to fulfill
to be used within <a class="link" href="../odeint_in_detail/integrate_functions.html" title="Integrate functions">integrate
functions</a>.
</p>
<h5>
<a name="boost_numeric_odeint.concepts.dense_output_stepper.h0"></a>
<span><a name="boost_numeric_odeint.concepts.dense_output_stepper.description"></a></span><a class="link" href="dense_output_stepper.html#boost_numeric_odeint.concepts.dense_output_stepper.description">Description</a>
</h5>
<p>
A dense output stepper following this Dense Output Stepper concept provides
the possibility to perform a single step of the solution <span class="emphasis"><em>x(t)</em></span>
of an ODE to obtain <span class="emphasis"><em>x(t+dt)</em></span>. The step-size <code class="computeroutput"><span class="identifier">dt</span></code> might be adjusted automatically due
to error control. Dense output steppers also can interpolate the solution
to calculate the state <span class="emphasis"><em>x(t')</em></span> at any point <span class="emphasis"><em>t
&lt;= t' &lt;= t+dt</em></span>.
</p>
<h5>
<a name="boost_numeric_odeint.concepts.dense_output_stepper.h1"></a>
<span><a name="boost_numeric_odeint.concepts.dense_output_stepper.associated_types"></a></span><a class="link" href="dense_output_stepper.html#boost_numeric_odeint.concepts.dense_output_stepper.associated_types">Associated
types</a>
</h5>
<div class="itemizedlist"><ul class="itemizedlist" type="disc">
<li class="listitem">
<p><span class="bold"><strong>state_type</strong></span></p>
<p><code class="computeroutput"><span class="identifier">Stepper</span><span class="special">::</span><span class="identifier">state_type</span></code></p>
<p>The
type characterizing the state of the ODE, hence <span class="emphasis"><em>x</em></span>.</p>
</li>
<li class="listitem">
<p><span class="bold"><strong>deriv_type</strong></span></p>
<p><code class="computeroutput"><span class="identifier">Stepper</span><span class="special">::</span><span class="identifier">deriv_type</span></code></p>
<p>The
type characterizing the derivative of the ODE, hence <span class="emphasis"><em>d x/dt</em></span>.</p>
</li>
<li class="listitem">
<p><span class="bold"><strong>time_type</strong></span></p>
<p><code class="computeroutput"><span class="identifier">Stepper</span><span class="special">::</span><span class="identifier">time_type</span></code></p>
<p>The
type characterizing the dependent variable of the ODE, hence the time
<span class="emphasis"><em>t</em></span>.</p>
</li>
<li class="listitem">
<p><span class="bold"><strong>value_type</strong></span></p>
<p><code class="computeroutput"><span class="identifier">Stepper</span><span class="special">::</span><span class="identifier">value_type</span></code></p>
<p>The
numerical data type which is used within the stepper, something like
<code class="computeroutput"><span class="keyword">float</span></code>, <code class="computeroutput"><span class="keyword">double</span></code>,
<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>
</li>
<li class="listitem">
<p><span class="bold"><strong>stepper_category</strong></span></p>
<p><code class="computeroutput"><span class="identifier">Stepper</span><span class="special">::</span><span class="identifier">stepper_category</span></code></p>
<p>A
tag type characterizing the category of the stepper. This type must be
convertible to <code class="computeroutput"><span class="identifier">dense_output_stepper_tag</span></code>.</p>
</li>
</ul></div>
<h5>
<a name="boost_numeric_odeint.concepts.dense_output_stepper.h2"></a>
<span><a name="boost_numeric_odeint.concepts.dense_output_stepper.notation"></a></span><a class="link" href="dense_output_stepper.html#boost_numeric_odeint.concepts.dense_output_stepper.notation">Notation</a>
</h5>
<div class="variablelist">
<p class="title"><b></b></p>
<dl>
<dt><span class="term"><code class="computeroutput"><span class="identifier">Stepper</span></code></span></dt>
<dd><p>
A type that is a model of Dense Output Stepper
</p></dd>
<dt><span class="term"><code class="computeroutput"><span class="identifier">State</span></code></span></dt>
<dd><p>
A type representing the state <span class="emphasis"><em>x</em></span> of the ODE
</p></dd>
<dt><span class="term"><code class="computeroutput"><span class="identifier">stepper</span></code></span></dt>
<dd><p>
An object of type <code class="computeroutput"><span class="identifier">Stepper</span></code>
</p></dd>
<dt><span class="term"><code class="computeroutput"><span class="identifier">x0</span></code>, <code class="computeroutput"><span class="identifier">x</span></code></span></dt>
<dd><p>
Object of type <code class="computeroutput"><span class="identifier">State</span></code>
</p></dd>
<dt><span class="term"><code class="computeroutput"><span class="identifier">t0</span></code>, <code class="computeroutput"><span class="identifier">dt0</span></code>, <code class="computeroutput"><span class="identifier">t</span></code></span></dt>
<dd><p>
Objects of type <code class="computeroutput"><span class="identifier">Stepper</span><span class="special">::</span><span class="identifier">time_type</span></code>
</p></dd>
<dt><span class="term"><code class="computeroutput"><span class="identifier">sys</span></code></span></dt>
<dd><p>
An object defining the ODE, should be a model of <a class="link" href="system.html" title="System">System</a>,
<a class="link" href="symplectic_system.html" title="Symplectic System">Symplectic
System</a>, <a class="link" href="simple_symplectic_system.html" title="Simple Symplectic System">Simple
Symplectic System</a> or <a class="link" href="implicit_system.html" title="Implicit System">Implicit
System</a>.
</p></dd>
</dl>
</div>
<h5>
<a name="boost_numeric_odeint.concepts.dense_output_stepper.h3"></a>
<span><a name="boost_numeric_odeint.concepts.dense_output_stepper.valid_expressions"></a></span><a class="link" href="dense_output_stepper.html#boost_numeric_odeint.concepts.dense_output_stepper.valid_expressions">Valid
Expressions</a>
</h5>
<div class="informaltable"><table class="table">
<colgroup>
<col>
<col>
<col>
<col>
</colgroup>
<thead><tr>
<th>
<p>
Name
</p>
</th>
<th>
<p>
Expression
</p>
</th>
<th>
<p>
Type
</p>
</th>
<th>
<p>
Semantics
</p>
</th>
</tr></thead>
<tbody>
<tr>
<td>
<p>
Initialize integration
</p>
</td>
<td>
<p>
<code class="computeroutput"><span class="identifier">stepper</span><span class="special">.</span><span class="identifier">initialize</span><span class="special">(</span>
<span class="identifier">x0</span> <span class="special">,</span>
<span class="identifier">t0</span> <span class="special">,</span>
<span class="identifier">dt0</span> <span class="special">)</span></code>
</p>
</td>
<td>
<p>
void
</p>
</td>
<td>
<p>
Initializes the stepper with initial values <code class="computeroutput"><span class="identifier">x0</span></code>,
<code class="computeroutput"><span class="identifier">t0</span></code> and <code class="computeroutput"><span class="identifier">dt0</span></code>.
</p>
</td>
</tr>
<tr>
<td>
<p>
Do step
</p>
</td>
<td>
<p>
<code class="computeroutput"><span class="identifier">stepper</span><span class="special">.</span><span class="identifier">do_step</span><span class="special">(</span>
<span class="identifier">sys</span> <span class="special">)</span></code>
</p>
</td>
<td>
<p>
<code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special">&lt;</span>
<span class="identifier">Stepper</span><span class="special">::</span><span class="identifier">time_type</span> <span class="special">,</span>
<span class="identifier">Stepper</span><span class="special">::</span><span class="identifier">time_type</span> <span class="special">&gt;</span></code>
</p>
</td>
<td>
<p>
Performs one step using the ODE defined by <code class="computeroutput"><span class="identifier">sys</span></code>.
The step-size might be changed internally due to error control.
This function returns a pair containing <code class="computeroutput"><span class="identifier">t</span></code>
and <code class="computeroutput"><span class="identifier">t</span><span class="special">+</span><span class="identifier">dt</span></code> representing the interval
for which interpolation can be performed.
</p>
</td>
</tr>
<tr>
<td>
<p>
Do interpolation
</p>
</td>
<td>
<p>
<code class="computeroutput"><span class="identifier">stepper</span><span class="special">.</span><span class="identifier">calc_state</span><span class="special">(</span>
<span class="identifier">t_inter</span> <span class="special">,</span>
<span class="identifier">x</span> <span class="special">)</span></code>
</p>
</td>
<td>
<p>
<code class="computeroutput"><span class="keyword">void</span></code>
</p>
</td>
<td>
<p>
Performs the interpolation to calculate /x(t<sub>inter</sub>/) where /t &lt;=
t<sub>inter</sub> &lt;= t+dt/.
</p>
</td>
</tr>
<tr>
<td>
<p>
Get current time
</p>
</td>
<td>
<p>
<code class="computeroutput"><span class="identifier">stepper</span><span class="special">.</span><span class="identifier">current_time</span><span class="special">()</span></code>
</p>
</td>
<td>
<p>
<code class="computeroutput"><span class="keyword">const</span> <span class="identifier">Stepper</span><span class="special">::</span><span class="identifier">time_type</span><span class="special">&amp;</span></code>
</p>
</td>
<td>
<p>
Returns the current time <span class="emphasis"><em>t+dt</em></span> of the stepper,
that is the end time of the last step and the starting time for
the next call of <code class="computeroutput"><span class="identifier">do_step</span></code>
</p>
</td>
</tr>
<tr>
<td>
<p>
Get current state
</p>
</td>
<td>
<p>
<code class="computeroutput"><span class="identifier">stepper</span><span class="special">.</span><span class="identifier">current_state</span><span class="special">()</span></code>
</p>
</td>
<td>
<p>
<code class="computeroutput"><span class="keyword">const</span> <span class="identifier">Stepper</span><span class="special">::</span><span class="identifier">state_type</span><span class="special">&amp;</span></code>
</p>
</td>
<td>
<p>
Returns the current state of the stepper, that is <span class="emphasis"><em>x(t+dt)</em></span>,
the state at the time returned by <code class="computeroutput"><span class="identifier">stepper</span><span class="special">.</span><span class="identifier">current_time</span><span class="special">()</span></code>
</p>
</td>
</tr>
</tbody>
</table></div>
<h5>
<a name="boost_numeric_odeint.concepts.dense_output_stepper.h4"></a>
<span><a name="boost_numeric_odeint.concepts.dense_output_stepper.models"></a></span><a class="link" href="dense_output_stepper.html#boost_numeric_odeint.concepts.dense_output_stepper.models">Models</a>
</h5>
<div class="itemizedlist"><ul class="itemizedlist" type="disc">
<li class="listitem">
<code class="computeroutput"><span class="identifier">dense_output_controlled_explicit_fsal</span><span class="special">&lt;</span> <span class="identifier">controlled_error_stepper_fsal</span><span class="special">&lt;</span> <span class="identifier">runge_kutta_dopri5</span>
<span class="special">&gt;</span></code>
</li>
<li class="listitem">
<code class="computeroutput"><span class="identifier">bulirsch_stoer_dense_out</span></code>
</li>
<li class="listitem">
<code class="computeroutput"><span class="identifier">rosenbrock4_dense_output</span></code>
</li>
</ul></div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright &#169; 2009-2011 Karsten Ahnert
and Mario Mulansky<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
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>)
</p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="controlled_stepper.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../concepts.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="state_algebra_operations.html"><img src="../../images/next.png" alt="Next"></a>
</div>
</body>
</html>

View File

@ -1,361 +0,0 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Error Stepper</title>
<link rel="stylesheet" href="../../boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
<link rel="home" href="../../index.html" title="Chapter&#160;1.&#160;Boost.Numeric.Odeint">
<link rel="up" href="../concepts.html" title="Concepts">
<link rel="prev" href="stepper.html" title="Stepper">
<link rel="next" href="controlled_stepper.html" title="Controlled Stepper">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<div class="spirit-nav">
<a accesskey="p" href="stepper.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../concepts.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="controlled_stepper.html"><img src="../../images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h3 class="title">
<a name="boost_numeric_odeint.concepts.error_stepper"></a><a class="link" href="error_stepper.html" title="Error Stepper">Error Stepper</a>
</h3></div></div></div>
<p>
This concepts specifies the interface an error stepper has to fulfill to
be used within a ControlledErrorStepper. An error stepper must always fullfil
the stepper concept. This can trivially implemented by
</p>
<p>
</p>
<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">class</span> <span class="identifier">System</span> <span class="special">&gt;</span>
<span class="identifier">error_stepper</span><span class="special">::</span><span class="identifier">do_step</span><span class="special">(</span> <span class="identifier">System</span> <span class="identifier">sys</span> <span class="special">,</span> <span class="identifier">state_type</span> <span class="special">&amp;</span><span class="identifier">x</span> <span class="special">,</span> <span class="identifier">time_type</span> <span class="identifier">t</span> <span class="special">,</span> <span class="identifier">time_type</span> <span class="identifier">dt</span> <span class="special">)</span>
<span class="special">{</span>
<span class="identifier">state_type</span> <span class="identifier">xerr</span><span class="special">;</span>
<span class="comment">// allocate xerr</span>
<span class="identifier">do_step</span><span class="special">(</span> <span class="identifier">sys</span> <span class="special">,</span> <span class="identifier">x</span> <span class="special">,</span> <span class="identifier">t</span> <span class="special">,</span> <span class="identifier">dt</span> <span class="special">,</span> <span class="identifier">xerr</span> <span class="special">);</span>
<span class="special">}</span>
</pre>
<p>
</p>
<h5>
<a name="boost_numeric_odeint.concepts.error_stepper.h0"></a>
<span><a name="boost_numeric_odeint.concepts.error_stepper.description"></a></span><a class="link" href="error_stepper.html#boost_numeric_odeint.concepts.error_stepper.description">Description</a>
</h5>
<p>
An error stepper following this Error Stepper concept is capable of doing
one step of the solution <span class="emphasis"><em>x(t)</em></span> of an ODE with step-size
<span class="emphasis"><em>dt</em></span> to obtain <span class="emphasis"><em>x(t+dt)</em></span> and also computing
an error estimate <span class="emphasis"><em>x<sub>err</sub></em></span> of the result. Error Steppers
can be Runge Kutta steppers, symplectic steppers as well as implicit steppers.
Based on the stepper type, the ODE is defined as <a class="link" href="system.html" title="System">System</a>,
<a class="link" href="symplectic_system.html" title="Symplectic System">Symplectic
System</a>, <a class="link" href="simple_symplectic_system.html" title="Simple Symplectic System">Simple
Symplectic System</a> or <a class="link" href="implicit_system.html" title="Implicit System">Implicit
System</a>.
</p>
<h5>
<a name="boost_numeric_odeint.concepts.error_stepper.h1"></a>
<span><a name="boost_numeric_odeint.concepts.error_stepper.refinement_of"></a></span><a class="link" href="error_stepper.html#boost_numeric_odeint.concepts.error_stepper.refinement_of">Refinement
of</a>
</h5>
<div class="itemizedlist"><ul class="itemizedlist" type="disc">
<li class="listitem">
DefaultConstructable
</li>
<li class="listitem">
CopyConstructable
</li>
<li class="listitem">
Stepper
</li>
</ul></div>
<h5>
<a name="boost_numeric_odeint.concepts.error_stepper.h2"></a>
<span><a name="boost_numeric_odeint.concepts.error_stepper.associated_types"></a></span><a class="link" href="error_stepper.html#boost_numeric_odeint.concepts.error_stepper.associated_types">Associated
types</a>
</h5>
<div class="itemizedlist"><ul class="itemizedlist" type="disc">
<li class="listitem">
<p><span class="bold"><strong>state_type</strong></span></p>
<p><code class="computeroutput"><span class="identifier">Stepper</span><span class="special">::</span><span class="identifier">state_type</span></code></p>
<p>The
type characterizing the state of the ODE, hence <span class="emphasis"><em>x</em></span>.</p>
</li>
<li class="listitem">
<p><span class="bold"><strong>deriv_type</strong></span></p>
<p><code class="computeroutput"><span class="identifier">Stepper</span><span class="special">::</span><span class="identifier">deriv_type</span></code></p>
<p>The
type characterizing the derivative of the ODE, hence <span class="emphasis"><em>d x/dt</em></span>.</p>
</li>
<li class="listitem">
<p><span class="bold"><strong>time_type</strong></span></p>
<p><code class="computeroutput"><span class="identifier">Stepper</span><span class="special">::</span><span class="identifier">time_type</span></code></p>
<p>The
type characterizing the dependent variable of the ODE, hence the time
<span class="emphasis"><em>t</em></span>.</p>
</li>
<li class="listitem">
<p><span class="bold"><strong>value_type</strong></span></p>
<p><code class="computeroutput"><span class="identifier">Stepper</span><span class="special">::</span><span class="identifier">value_type</span></code></p>
<p>The
numerical data type which is used within the stepper, something like
<code class="computeroutput"><span class="keyword">float</span></code>, <code class="computeroutput"><span class="keyword">double</span></code>,
<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>
</li>
<li class="listitem">
<p><span class="bold"><strong>order_type</strong></span></p>
<p><code class="computeroutput"><span class="identifier">Stepper</span><span class="special">::</span><span class="identifier">order_type</span></code></p>
<p>The
type characterizing the order of the ODE, typically <code class="computeroutput"><span class="keyword">unsigned</span>
<span class="keyword">short</span></code>.</p>
</li>
<li class="listitem">
<p><span class="bold"><strong>stepper_category</strong></span></p>
<p><code class="computeroutput"><span class="identifier">Stepper</span><span class="special">::</span><span class="identifier">stepper_category</span></code></p>
<p>A
tag type characterizing the category of the stepper. This type must be
convertible to <code class="computeroutput"><span class="identifier">error_stepper_tag</span></code>.</p>
</li>
</ul></div>
<h5>
<a name="boost_numeric_odeint.concepts.error_stepper.h3"></a>
<span><a name="boost_numeric_odeint.concepts.error_stepper.notation"></a></span><a class="link" href="error_stepper.html#boost_numeric_odeint.concepts.error_stepper.notation">Notation</a>
</h5>
<div class="variablelist">
<p class="title"><b></b></p>
<dl>
<dt><span class="term"><code class="computeroutput"><span class="identifier">ErrorStepper</span></code></span></dt>
<dd><p>
A type that is a model of Error Stepper
</p></dd>
<dt><span class="term"><code class="computeroutput"><span class="identifier">State</span></code></span></dt>
<dd><p>
A type representing the state <span class="emphasis"><em>x</em></span> of the ODE
</p></dd>
<dt><span class="term"><code class="computeroutput"><span class="identifier">Error</span></code></span></dt>
<dd><p>
A type representing the error calculated by the stepper, usually same
as <code class="computeroutput"><span class="identifier">State</span></code>
</p></dd>
<dt><span class="term"><code class="computeroutput"><span class="identifier">Time</span></code></span></dt>
<dd><p>
A type representing the time <span class="emphasis"><em>t</em></span> of the ODE
</p></dd>
<dt><span class="term"><code class="computeroutput"><span class="identifier">stepper</span></code></span></dt>
<dd><p>
An object of type <code class="computeroutput"><span class="identifier">ErrorStepper</span></code>
</p></dd>
<dt><span class="term"><code class="computeroutput"><span class="identifier">x</span></code></span></dt>
<dd><p>
Object of type <code class="computeroutput"><span class="identifier">State</span></code>
</p></dd>
<dt><span class="term"><code class="computeroutput"><span class="identifier">xerr</span></code></span></dt>
<dd><p>
Object of type <code class="computeroutput"><span class="identifier">Error</span></code>
</p></dd>
<dt><span class="term"><code class="computeroutput"><span class="identifier">t</span></code>, <code class="computeroutput"><span class="identifier">dt</span></code></span></dt>
<dd><p>
Objects of type <code class="computeroutput"><span class="identifier">Time</span></code>
</p></dd>
<dt><span class="term"><code class="computeroutput"><span class="identifier">sys</span></code></span></dt>
<dd><p>
An object defining the ODE, should be a model of either <a class="link" href="system.html" title="System">System</a>,
<a class="link" href="symplectic_system.html" title="Symplectic System">Symplectic
System</a>, <a class="link" href="simple_symplectic_system.html" title="Simple Symplectic System">Simple
Symplectic System</a> or <a class="link" href="implicit_system.html" title="Implicit System">Implicit
System</a>.
</p></dd>
</dl>
</div>
<h5>
<a name="boost_numeric_odeint.concepts.error_stepper.h4"></a>
<span><a name="boost_numeric_odeint.concepts.error_stepper.valid_expressions"></a></span><a class="link" href="error_stepper.html#boost_numeric_odeint.concepts.error_stepper.valid_expressions">Valid
Expressions</a>
</h5>
<div class="informaltable"><table class="table">
<colgroup>
<col>
<col>
<col>
<col>
</colgroup>
<thead><tr>
<th>
<p>
Name
</p>
</th>
<th>
<p>
Expression
</p>
</th>
<th>
<p>
Type
</p>
</th>
<th>
<p>
Semantics
</p>
</th>
</tr></thead>
<tbody>
<tr>
<td>
<p>
Get the stepper order
</p>
</td>
<td>
<p>
<code class="computeroutput"><span class="identifier">stepper</span><span class="special">.</span><span class="identifier">order</span><span class="special">()</span></code>
</p>
</td>
<td>
<p>
<code class="computeroutput"><span class="identifier">order_type</span></code>
</p>
</td>
<td>
<p>
Returns the order of the stepper for one step without error estimation.
</p>
</td>
</tr>
<tr>
<td>
<p>
Get the stepper order
</p>
</td>
<td>
<p>
<code class="computeroutput"><span class="identifier">stepper</span><span class="special">.</span><span class="identifier">stepper_order</span><span class="special">()</span></code>
</p>
</td>
<td>
<p>
<code class="computeroutput"><span class="identifier">order_type</span></code>
</p>
</td>
<td>
<p>
Returns the order of the stepper for one error estimation step
which is used for error calculation.
</p>
</td>
</tr>
<tr>
<td>
<p>
Get the error order
</p>
</td>
<td>
<p>
<code class="computeroutput"><span class="identifier">stepper</span><span class="special">.</span><span class="identifier">errorr_order</span><span class="special">()</span></code>
</p>
</td>
<td>
<p>
<code class="computeroutput"><span class="identifier">order_type</span></code>
</p>
</td>
<td>
<p>
Returns the order of the error step which is used for error calculation.
</p>
</td>
</tr>
<tr>
<td>
<p>
Do step
</p>
</td>
<td>
<p>
<code class="computeroutput"><span class="identifier">stepper</span><span class="special">.</span><span class="identifier">do_step</span><span class="special">(</span>
<span class="identifier">sys</span> <span class="special">,</span>
<span class="identifier">x</span> <span class="special">,</span>
<span class="identifier">t</span> <span class="special">,</span>
<span class="identifier">dt</span> <span class="special">)</span></code>
</p>
</td>
<td>
<p>
<code class="computeroutput"><span class="keyword">void</span></code>
</p>
</td>
<td>
<p>
Performs one step of step size <code class="computeroutput"><span class="identifier">dt</span></code>.
The newly obtained state is written in-place to <code class="computeroutput"><span class="identifier">x</span></code>.
</p>
</td>
</tr>
<tr>
<td>
<p>
Do step with error estimation
</p>
</td>
<td>
<p>
<code class="computeroutput"><span class="identifier">stepper</span><span class="special">.</span><span class="identifier">do_step</span><span class="special">(</span>
<span class="identifier">sys</span> <span class="special">,</span>
<span class="identifier">x</span> <span class="special">,</span>
<span class="identifier">t</span> <span class="special">,</span>
<span class="identifier">dt</span> <span class="special">,</span>
<span class="identifier">xerr</span> <span class="special">)</span></code>
</p>
</td>
<td>
<p>
<code class="computeroutput"><span class="keyword">void</span></code>
</p>
</td>
<td>
<p>
Performs one step of step size <code class="computeroutput"><span class="identifier">dt</span></code>
with error estimation. The newly obtained state is written in-place
to <code class="computeroutput"><span class="identifier">x</span></code> and the estimated
error to <code class="computeroutput"><span class="identifier">xerr</span></code>.
</p>
</td>
</tr>
</tbody>
</table></div>
<h5>
<a name="boost_numeric_odeint.concepts.error_stepper.h5"></a>
<span><a name="boost_numeric_odeint.concepts.error_stepper.models"></a></span><a class="link" href="error_stepper.html#boost_numeric_odeint.concepts.error_stepper.models">Models</a>
</h5>
<div class="itemizedlist"><ul class="itemizedlist" type="disc">
<li class="listitem">
<code class="computeroutput"><span class="identifier">runge_kutta_cash_karp54</span></code>
</li>
<li class="listitem">
<code class="computeroutput"><span class="identifier">runge_kutta_dopri5</span></code>
</li>
<li class="listitem">
<code class="computeroutput"><span class="identifier">runge_kutta_fehlberg78</span></code>
</li>
<li class="listitem">
<code class="computeroutput"><span class="identifier">rosenbrock4</span></code>
</li>
</ul></div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright &#169; 2009-2011 Karsten Ahnert
and Mario Mulansky<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
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>)
</p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="stepper.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../concepts.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="controlled_stepper.html"><img src="../../images/next.png" alt="Next"></a>
</div>
</body>
</html>

View File

@ -1,175 +0,0 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Implicit System</title>
<link rel="stylesheet" href="../../boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
<link rel="home" href="../../index.html" title="Chapter&#160;1.&#160;Boost.Numeric.Odeint">
<link rel="up" href="../concepts.html" title="Concepts">
<link rel="prev" href="simple_symplectic_system.html" title="Simple Symplectic System">
<link rel="next" href="stepper.html" title="Stepper">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<div class="spirit-nav">
<a accesskey="p" href="simple_symplectic_system.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../concepts.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="stepper.html"><img src="../../images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h3 class="title">
<a name="boost_numeric_odeint.concepts.implicit_system"></a><a class="link" href="implicit_system.html" title="Implicit System">Implicit
System</a>
</h3></div></div></div>
<h5>
<a name="boost_numeric_odeint.concepts.implicit_system.h0"></a>
<span><a name="boost_numeric_odeint.concepts.implicit_system.description"></a></span><a class="link" href="implicit_system.html#boost_numeric_odeint.concepts.implicit_system.description">Description</a>
</h5>
<p>
This concept describes how to define a ODE that can be solved by an implicit
routine. Implicit routines need not only the function <span class="emphasis"><em>f(x,t)</em></span>
but also the Jacobian <span class="emphasis"><em>df/dx = A(x,t)</em></span>. <span class="emphasis"><em>A</em></span>
is a matrix and implicit routines need to solve the linear problem <span class="emphasis"><em>Ax
= b</em></span>. In odeint this is implemented with use of <a href="http://www.boost.org/doc/libs/release/libs/numeric/ublas/index.html" target="_top">Boost.UBlas</a>,
therefore, the <span class="emphasis"><em>state_type</em></span> implicit routines is <span class="emphasis"><em>ublas::vector</em></span>
and the matrix is defined as <span class="emphasis"><em>ublas::matrix</em></span>.
</p>
<h5>
<a name="boost_numeric_odeint.concepts.implicit_system.h1"></a>
<span><a name="boost_numeric_odeint.concepts.implicit_system.notation"></a></span><a class="link" href="implicit_system.html#boost_numeric_odeint.concepts.implicit_system.notation">Notation</a>
</h5>
<div class="variablelist">
<p class="title"><b></b></p>
<dl>
<dt><span class="term"><code class="computeroutput"><span class="identifier">System</span></code></span></dt>
<dd><p>
A type that is a model of <code class="computeroutput"><span class="identifier">Implicit_System</span></code>
</p></dd>
<dt><span class="term"><code class="computeroutput"><span class="identifier">Time</span></code></span></dt>
<dd><p>
A type representing the time of the ODE
</p></dd>
<dt><span class="term"><code class="computeroutput"><span class="identifier">sys</span></code></span></dt>
<dd><p>
An object of type <code class="computeroutput"><span class="identifier">System</span></code>
</p></dd>
<dt><span class="term"><code class="computeroutput"><span class="identifier">x</span></code></span></dt>
<dd><p>
Object of type ublas::vector
</p></dd>
<dt><span class="term"><code class="computeroutput"><span class="identifier">dxdt</span></code></span></dt>
<dd><p>
Object of type ublas::vector
</p></dd>
<dt><span class="term"><code class="computeroutput"><span class="identifier">jacobi</span></code></span></dt>
<dd><p>
Object of type ublas::matrix
</p></dd>
<dt><span class="term"><code class="computeroutput"><span class="identifier">t</span></code></span></dt>
<dd><p>
Object of type <code class="computeroutput"><span class="identifier">Time</span></code>
</p></dd>
</dl>
</div>
<h5>
<a name="boost_numeric_odeint.concepts.implicit_system.h2"></a>
<span><a name="boost_numeric_odeint.concepts.implicit_system.valid_expressions"></a></span><a class="link" href="implicit_system.html#boost_numeric_odeint.concepts.implicit_system.valid_expressions">Valid
Expressions</a>
</h5>
<div class="informaltable"><table class="table">
<colgroup>
<col>
<col>
<col>
<col>
</colgroup>
<thead><tr>
<th>
<p>
Name
</p>
</th>
<th>
<p>
Expression
</p>
</th>
<th>
<p>
Type
</p>
</th>
<th>
<p>
Semantics
</p>
</th>
</tr></thead>
<tbody>
<tr>
<td>
<p>
Calculate <span class="emphasis"><em>dx/dt := f(x,t)</em></span>
</p>
</td>
<td>
<p>
<code class="computeroutput"><span class="identifier">sys</span><span class="special">.</span><span class="identifier">first</span><span class="special">(</span>
<span class="identifier">x</span> <span class="special">,</span>
<span class="identifier">dxdt</span> <span class="special">,</span>
<span class="identifier">t</span> <span class="special">)</span></code>
</p>
</td>
<td>
<p>
<code class="computeroutput"><span class="keyword">void</span></code>
</p>
</td>
<td>
<p>
Calculates <code class="computeroutput"><span class="identifier">f</span><span class="special">(</span><span class="identifier">x</span><span class="special">,</span><span class="identifier">t</span><span class="special">)</span></code>,
the result is stored into dxdt
</p>
</td>
</tr>
<tr>
<td>
<p>
Calculate <span class="emphasis"><em>A := df/dx (x,t)</em></span>
</p>
</td>
<td>
<p>
<code class="computeroutput"><span class="identifier">sys</span><span class="special">.</span><span class="identifier">second</span><span class="special">(</span>
<span class="identifier">x</span> <span class="special">,</span>
<span class="identifier">jacobi</span> <span class="special">,</span>
<span class="identifier">t</span> <span class="special">)</span></code>
</p>
</td>
<td>
<p>
<code class="computeroutput"><span class="keyword">void</span></code>
</p>
</td>
<td>
<p>
Calculates the Jacobian of <span class="emphasis"><em>f</em></span> at <span class="emphasis"><em>x</em></span>,<span class="emphasis"><em>t</em></span>,
the result is stored into <code class="computeroutput"><span class="identifier">jacobi</span></code>
</p>
</td>
</tr>
</tbody>
</table></div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright &#169; 2009-2011 Karsten Ahnert
and Mario Mulansky<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
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>)
</p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="simple_symplectic_system.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../concepts.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="stepper.html"><img src="../../images/next.png" alt="Next"></a>
</div>
</body>
</html>

View File

@ -1,179 +0,0 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Simple Symplectic System</title>
<link rel="stylesheet" href="../../boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
<link rel="home" href="../../index.html" title="Chapter&#160;1.&#160;Boost.Numeric.Odeint">
<link rel="up" href="../concepts.html" title="Concepts">
<link rel="prev" href="symplectic_system.html" title="Symplectic System">
<link rel="next" href="implicit_system.html" title="Implicit System">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<div class="spirit-nav">
<a accesskey="p" href="symplectic_system.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../concepts.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="implicit_system.html"><img src="../../images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h3 class="title">
<a name="boost_numeric_odeint.concepts.simple_symplectic_system"></a><a class="link" href="simple_symplectic_system.html" title="Simple Symplectic System">Simple
Symplectic System</a>
</h3></div></div></div>
<h5>
<a name="boost_numeric_odeint.concepts.simple_symplectic_system.h0"></a>
<span><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>
</h5>
<p>
In most Hamiltonian systems the kinetic term is a quadratic term in the momentum
<span class="emphasis"><em>H<sub>kin</sub> = p^2 / 2m</em></span> and in many cases it is possible to rescale
coordinates and set <span class="emphasis"><em>m=1</em></span> which leads to a trivial equation
of motion:
</p>
<p>
<span class="emphasis"><em>q'(t) = f(p) = p. </em></span>
</p>
<p>
while for <span class="emphasis"><em>p'</em></span> we still have the general form
</p>
<p>
<span class="emphasis"><em>p'(t) = g(q) </em></span>
</p>
<p>
As this case is very frequent we introduced a concept where only the nontrivial
equation for <span class="emphasis"><em>p'</em></span> has to be provided to the symplectic
stepper. We call this concept <span class="emphasis"><em>Simple_Symplectic_System</em></span>
</p>
<h5>
<a name="boost_numeric_odeint.concepts.simple_symplectic_system.h1"></a>
<span><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>
</h5>
<div class="variablelist">
<p class="title"><b></b></p>
<dl>
<dt><span class="term">System</span></dt>
<dd><p>
A type that is a model of Simple_Symplectic_System
</p></dd>
<dt><span class="term">Coor</span></dt>
<dd><p>
The type of the coordinate <span class="emphasis"><em>q</em></span>
</p></dd>
<dt><span class="term">MomentumDeriv</span></dt>
<dd><p>
The type of the derivative of momentum <span class="emphasis"><em>p'</em></span>
</p></dd>
<dt><span class="term">sys</span></dt>
<dd><p>
An object that models System
</p></dd>
<dt><span class="term">q</span></dt>
<dd><p>
Object of type Coor
</p></dd>
<dt><span class="term">dpdt</span></dt>
<dd><p>
Object of type MomentumDeriv
</p></dd>
</dl>
</div>
<h5>
<a name="boost_numeric_odeint.concepts.simple_symplectic_system.h2"></a>
<span><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
Expressions</a>
</h5>
<div class="informaltable"><table class="table">
<colgroup>
<col>
<col>
<col>
<col>
</colgroup>
<thead><tr>
<th>
<p>
Name
</p>
</th>
<th>
<p>
Expression
</p>
</th>
<th>
<p>
Type
</p>
</th>
<th>
<p>
Semantics
</p>
</th>
</tr></thead>
<tbody>
<tr>
<td>
<p>
Check for pair
</p>
</td>
<td>
<p>
<code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">is_pair</span><span class="special">&lt;</span>
<span class="identifier">System</span> <span class="special">&gt;::</span><span class="identifier">type</span></code>
</p>
</td>
<td>
<p>
<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>
</p>
</td>
<td>
<p>
Check if System is a pair, should be evaluated to false in this
case.
</p>
</td>
</tr>
<tr>
<td>
<p>
Calculate <span class="emphasis"><em>dp/dt = g(q)</em></span>
</p>
</td>
<td>
<p>
<code class="computeroutput"><span class="identifier">sys</span><span class="special">(</span>
<span class="identifier">q</span> <span class="special">,</span>
<span class="identifier">dpdt</span> <span class="special">)</span></code>
</p>
</td>
<td>
<p>
<code class="computeroutput"><span class="keyword">void</span></code>
</p>
</td>
<td>
<p>
Calculates <span class="emphasis"><em>g(q)</em></span>, the result is stored into
<code class="computeroutput"><span class="identifier">dpdt</span></code>
</p>
</td>
</tr>
</tbody>
</table></div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright &#169; 2009-2011 Karsten Ahnert
and Mario Mulansky<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
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>)
</p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="symplectic_system.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../concepts.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="implicit_system.html"><img src="../../images/next.png" alt="Next"></a>
</div>
</body>
</html>

View File

@ -1,827 +0,0 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>State Algebra Operations</title>
<link rel="stylesheet" href="../../boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
<link rel="home" href="../../index.html" title="Chapter&#160;1.&#160;Boost.Numeric.Odeint">
<link rel="up" href="../concepts.html" title="Concepts">
<link rel="prev" href="dense_output_stepper.html" title="Dense Output Stepper">
<link rel="next" href="state_wrapper.html" title="State Wrapper">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<div class="spirit-nav">
<a accesskey="p" href="dense_output_stepper.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../concepts.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="state_wrapper.html"><img src="../../images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h3 class="title">
<a name="boost_numeric_odeint.concepts.state_algebra_operations"></a><a class="link" href="state_algebra_operations.html" title="State Algebra Operations">State
Algebra Operations</a>
</h3></div></div></div>
<div class="toc"><dl>
<dt><span class="section"><a href="state_algebra_operations.html#boost_numeric_odeint.concepts.state_algebra_operations.operations">Operations</a></span></dt>
<dt><span class="section"><a href="state_algebra_operations.html#boost_numeric_odeint.concepts.state_algebra_operations.algebra">Algebra</a></span></dt>
<dt><span class="section"><a href="state_algebra_operations.html#boost_numeric_odeint.concepts.state_algebra_operations.pre_defined_implementations">Pre-Defined
implementations</a></span></dt>
<dt><span class="section"><a href="state_algebra_operations.html#boost_numeric_odeint.concepts.state_algebra_operations.example_expressions">Example
expressions</a></span></dt>
</dl></div>
<div class="note"><table border="0" summary="Note">
<tr>
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../images/note.png"></td>
<th align="left">Note</th>
</tr>
<tr><td align="left" valign="top"><p>
The following does not apply to implicit steppers like implicit_euler or
Rosenbrock 4 as there the <code class="computeroutput"><span class="identifier">state_type</span></code>
can not be changed from <code class="computeroutput"><span class="identifier">ublas</span><span class="special">::</span><span class="identifier">vector</span></code>
and no algebra/operations are used.
</p></td></tr>
</table></div>
<h5>
<a name="boost_numeric_odeint.concepts.state_algebra_operations.h0"></a>
<span><a name="boost_numeric_odeint.concepts.state_algebra_operations.description"></a></span><a class="link" href="state_algebra_operations.html#boost_numeric_odeint.concepts.state_algebra_operations.description">Description</a>
</h5>
<p>
The <code class="computeroutput"><span class="identifier">State</span></code>, <code class="computeroutput"><span class="identifier">Algebra</span></code> and <code class="computeroutput"><span class="identifier">Operations</span></code>
together define a concept describing how the mathematical vector operations
required for the stepper algorithms are performed. The typical vector operation
done within steppers is
</p>
<p>
<span class="emphasis"><em><span class="bold"><strong>y</strong></span> = &#931; &#945;<sub>i</sub> <span class="bold"><strong>x<sub>i</sub></strong></span></em></span>.
</p>
<p>
The <code class="computeroutput"><span class="identifier">State</span></code> represents the
state variable of an ODE, usually denoted with <span class="emphasis"><em>x</em></span>. Algorithmically,
the state is often realized as a <code class="computeroutput"><span class="identifier">vector</span><span class="special">&lt;</span> <span class="keyword">double</span> <span class="special">&gt;</span></code> or <code class="computeroutput"><span class="identifier">array</span><span class="special">&lt;</span> <span class="keyword">double</span> <span class="special">,</span> <span class="identifier">N</span> <span class="special">&gt;</span></code>,
however, the genericity of odeint enables you to basically use anything as
a state type. The algorithmic counterpart of such mathematical expressions
is divided into two parts. First, the <code class="computeroutput"><span class="identifier">Algebra</span></code>
is used to account for the vector character of the equation. In the case
of a <code class="computeroutput"><span class="identifier">vector</span></code> as state type
this means the <code class="computeroutput"><span class="identifier">Algebra</span></code> is
responsible for iteration over all vector elements. Second, the <code class="computeroutput"><span class="identifier">Operations</span></code> are used to represent the actual
operation applied to each of the vector elements. So the <code class="computeroutput"><span class="identifier">Algebra</span></code>
iterates over all elements of the <code class="computeroutput"><span class="identifier">State</span></code>s
and calls an operation taken from the <code class="computeroutput"><span class="identifier">Operations</span></code>
for each element. This is where <code class="computeroutput"><span class="identifier">State</span></code>,
<code class="computeroutput"><span class="identifier">Algebra</span></code> and <code class="computeroutput"><span class="identifier">Operations</span></code> have to work together to make
odeint running. Please have a look at the <code class="computeroutput"><span class="identifier">range_algebra</span></code>
and <code class="computeroutput"><span class="identifier">default_operations</span></code> to
see an example how this is implemented.
</p>
<p>
In the following we describe how <code class="computeroutput"><span class="identifier">State</span></code>,
<code class="computeroutput"><span class="identifier">Algebra</span></code> and <code class="computeroutput"><span class="identifier">Operations</span></code> are used together within the
stepper implementations.
</p>
<div class="section">
<div class="titlepage"><div><div><h4 class="title">
<a name="boost_numeric_odeint.concepts.state_algebra_operations.operations"></a><a class="link" href="state_algebra_operations.html#boost_numeric_odeint.concepts.state_algebra_operations.operations" title="Operations">Operations</a>
</h4></div></div></div>
<h6>
<a name="boost_numeric_odeint.concepts.state_algebra_operations.operations.h0"></a>
<span><a name="boost_numeric_odeint.concepts.state_algebra_operations.operations.notation"></a></span><a class="link" href="state_algebra_operations.html#boost_numeric_odeint.concepts.state_algebra_operations.operations.notation">Notation</a>
</h6>
<div class="variablelist">
<p class="title"><b></b></p>
<dl>
<dt><span class="term"><code class="computeroutput"><span class="identifier">Operations</span></code></span></dt>
<dd><p>
The operations type
</p></dd>
<dt><span class="term"><code class="computeroutput"><span class="identifier">Value1</span></code>, ... ,
<code class="computeroutput"><span class="identifier">ValueN</span></code></span></dt>
<dd><p>
Types representing the value or time type of stepper
</p></dd>
<dt><span class="term"><code class="computeroutput"><span class="identifier">Scale</span></code></span></dt>
<dd><p>
Type of the scale operation
</p></dd>
<dt><span class="term"><code class="computeroutput"><span class="identifier">scale</span></code></span></dt>
<dd><p>
Object of type <code class="computeroutput"><span class="identifier">Scale</span></code>
</p></dd>
<dt><span class="term"><code class="literal">ScaleSum<span class="emphasis"><em>N</em></span></code></span></dt>
<dd><p>
Type that represents a general scale_sum operation, <code class="literal"><span class="emphasis"><em>N</em></span></code>
should be replaced by a number from 1 to 14.
</p></dd>
<dt><span class="term"><code class="literal">scale_sum/N/</code></span></dt>
<dd><p>
Object of type <code class="literal">ScaleSum<span class="emphasis"><em>N</em></span></code>,
<code class="literal"><span class="emphasis"><em>N</em></span></code> should be replaced by a
number from 1 to 14.
</p></dd>
<dt><span class="term"><code class="computeroutput"><span class="identifier">ScaleSumSwap2</span></code></span></dt>
<dd><p>
Type of the scale sum swap operation
</p></dd>
<dt><span class="term"><code class="computeroutput"><span class="identifier">scale_sum_swap2</span></code></span></dt>
<dd><p>
Object of type <code class="computeroutput"><span class="identifier">ScaleSumSwap2</span></code>
</p></dd>
<dt><span class="term"><code class="computeroutput"><span class="identifier">a1</span><span class="special">,</span>
<span class="identifier">a2</span><span class="special">,</span>
<span class="special">...</span></code></span></dt>
<dd><p>
Objects of type <code class="computeroutput"><span class="identifier">Value1</span></code>,
<code class="computeroutput"><span class="identifier">Value2</span></code>, ...
</p></dd>
<dt><span class="term"><code class="computeroutput"><span class="identifier">y</span><span class="special">,</span>
<span class="identifier">x1</span><span class="special">,</span>
<span class="identifier">x2</span><span class="special">,</span>
<span class="special">...</span></code></span></dt>
<dd><p>
Objects of <code class="computeroutput"><span class="identifier">State</span></code>'s
value type
</p></dd>
</dl>
</div>
<h6>
<a name="boost_numeric_odeint.concepts.state_algebra_operations.operations.h1"></a>
<span><a name="boost_numeric_odeint.concepts.state_algebra_operations.operations.valid_expressions"></a></span><a class="link" href="state_algebra_operations.html#boost_numeric_odeint.concepts.state_algebra_operations.operations.valid_expressions">Valid
Expressions</a>
</h6>
<div class="informaltable"><table class="table">
<colgroup>
<col>
<col>
<col>
<col>
</colgroup>
<thead><tr>
<th>
<p>
Name
</p>
</th>
<th>
<p>
Expression
</p>
</th>
<th>
<p>
Type
</p>
</th>
<th>
<p>
Semantics
</p>
</th>
</tr></thead>
<tbody>
<tr>
<td>
<p>
Get scale operation
</p>
</td>
<td>
<p>
<code class="computeroutput"><span class="identifier">Operations</span><span class="special">::</span><span class="identifier">scale</span><span class="special">&lt;</span>
<span class="identifier">Value</span> <span class="special">&gt;</span></code>
</p>
</td>
<td>
<p>
<code class="computeroutput"><span class="identifier">Scale</span></code>
</p>
</td>
<td>
<p>
Get <code class="computeroutput"><span class="identifier">Scale</span></code> from
<code class="computeroutput"><span class="identifier">Operations</span></code>
</p>
</td>
</tr>
<tr>
<td>
<p>
<code class="computeroutput"><span class="identifier">Scale</span></code> constructor
</p>
</td>
<td>
<p>
<code class="computeroutput"><span class="identifier">Scale</span><span class="special">&lt;</span>
<span class="identifier">Value</span> <span class="special">&gt;(</span>
<span class="identifier">a</span> <span class="special">)</span></code>
</p>
</td>
<td>
<p>
<code class="computeroutput"><span class="identifier">Scale</span></code>
</p>
</td>
<td>
<p>
Constructs a <code class="computeroutput"><span class="identifier">Scale</span></code>
object
</p>
</td>
</tr>
<tr>
<td>
<p>
<code class="computeroutput"><span class="identifier">Scale</span></code> operation
</p>
</td>
<td>
<p>
<code class="computeroutput"><span class="identifier">scale</span><span class="special">(</span>
<span class="identifier">x</span> <span class="special">)</span></code>
</p>
</td>
<td>
<p>
<code class="computeroutput"><span class="keyword">void</span></code>
</p>
</td>
<td>
<p>
Calculates <code class="computeroutput"><span class="identifier">x</span> <span class="special">*=</span> <span class="identifier">a</span></code>
</p>
</td>
</tr>
<tr>
<td>
<p>
Get general <code class="computeroutput"><span class="identifier">scale_sum</span></code>
operation
</p>
</td>
<td>
<p>
<code class="literal">Operations::scale_sum/N/&lt; Value1 , ... , ValueN &gt;</code>
</p>
</td>
<td>
<p>
<code class="literal">ScaleSum/N/</code>
</p>
</td>
<td>
<p>
Get the <code class="literal">ScaleSum/N/</code> type from <code class="computeroutput"><span class="identifier">Operations</span></code>, <code class="literal"><span class="emphasis"><em>N</em></span></code>
should be replaced by a number from 1 to 14.
</p>
</td>
</tr>
<tr>
<td>
<p>
<code class="computeroutput"><span class="identifier">scale_sum</span></code> constructor
</p>
</td>
<td>
<p>
<code class="literal">ScaleSum/N/&lt; Value1 , ... , ValueN &gt;( a1 , ...
, aN )</code>
</p>
</td>
<td>
<p>
<code class="literal">ScaleSum/N/</code>
</p>
</td>
<td>
<p>
Constructs a <code class="computeroutput"><span class="identifier">scale_sum</span></code>
object given <code class="literal"><span class="emphasis"><em>N</em></span></code> parameter
values with <code class="literal"><span class="emphasis"><em>N</em></span></code> between
1 and 14.
</p>
</td>
</tr>
<tr>
<td>
<p>
<code class="computeroutput"><span class="identifier">scale_sum</span></code> operation
</p>
</td>
<td>
<p>
<code class="literal">scale_sum/N/( y , x1 , ... , xN )</code>
</p>
</td>
<td>
<p>
<code class="computeroutput"><span class="keyword">void</span></code>
</p>
</td>
<td>
<p>
Calculates <code class="computeroutput"><span class="identifier">y</span> <span class="special">=</span> <span class="identifier">a1</span><span class="special">*</span><span class="identifier">x1</span>
<span class="special">+</span> <span class="identifier">a2</span><span class="special">*</span><span class="identifier">x2</span>
<span class="special">+</span> <span class="special">...</span>
<span class="special">+</span> <span class="identifier">aN</span><span class="special">*</span><span class="identifier">xN</span></code>.
Note that this is an <code class="literal"><span class="emphasis"><em>N</em></span>+1</code>-ary
function call.
</p>
</td>
</tr>
<tr>
<td>
<p>
Get scale sum swap operation
</p>
</td>
<td>
<p>
<code class="computeroutput"><span class="identifier">Operations</span><span class="special">::</span><span class="identifier">scale_sum_swap2</span><span class="special">&lt;</span>
<span class="identifier">Value1</span> <span class="special">,</span>
<span class="identifier">Value2</span> <span class="special">&gt;</span></code>
</p>
</td>
<td>
<p>
<code class="computeroutput"><span class="identifier">ScaleSumSwap2</span></code>
</p>
</td>
<td>
<p>
Get scale sum swap from operations
</p>
</td>
</tr>
<tr>
<td>
<p>
<code class="computeroutput"><span class="identifier">ScaleSumSwap2</span></code>
constructor
</p>
</td>
<td>
<p>
<code class="computeroutput"><span class="identifier">ScaleSumSwap2</span><span class="special">&lt;</span> <span class="identifier">Value1</span>
<span class="special">,</span> <span class="identifier">Value2</span>
<span class="special">&gt;(</span> <span class="identifier">a1</span>
<span class="special">,</span> <span class="identifier">a2</span>
<span class="special">)</span></code>
</p>
</td>
<td>
<p>
<code class="computeroutput"><span class="identifier">ScaleSumSwap2</span></code>
</p>
</td>
<td>
<p>
Constructor
</p>
</td>
</tr>
<tr>
<td>
<p>
<code class="computeroutput"><span class="identifier">ScaleSumSwap2</span></code>
operation
</p>
</td>
<td>
<p>
<code class="computeroutput"><span class="identifier">scale_sum_swap2</span><span class="special">(</span> <span class="identifier">x1</span>
<span class="special">,</span> <span class="identifier">x2</span>
<span class="special">,</span> <span class="identifier">x3</span>
<span class="special">)</span></code>
</p>
</td>
<td>
<p>
<code class="computeroutput"><span class="keyword">void</span></code>
</p>
</td>
<td>
<p>
Calculates <code class="computeroutput"><span class="identifier">tmp</span> <span class="special">=</span> <span class="identifier">x1</span></code>,
<code class="computeroutput"><span class="identifier">x1</span> <span class="special">=</span>
<span class="identifier">a1</span><span class="special">*</span><span class="identifier">x2</span> <span class="special">+</span>
<span class="identifier">a2</span><span class="special">*</span><span class="identifier">x3</span></code> and <code class="computeroutput"><span class="identifier">x2</span>
<span class="special">=</span> <span class="identifier">tmp</span></code>.
</p>
</td>
</tr>
</tbody>
</table></div>
</div>
<div class="section">
<div class="titlepage"><div><div><h4 class="title">
<a name="boost_numeric_odeint.concepts.state_algebra_operations.algebra"></a><a class="link" href="state_algebra_operations.html#boost_numeric_odeint.concepts.state_algebra_operations.algebra" title="Algebra">Algebra</a>
</h4></div></div></div>
<h6>
<a name="boost_numeric_odeint.concepts.state_algebra_operations.algebra.h0"></a>
<span><a name="boost_numeric_odeint.concepts.state_algebra_operations.algebra.notation"></a></span><a class="link" href="state_algebra_operations.html#boost_numeric_odeint.concepts.state_algebra_operations.algebra.notation">Notation</a>
</h6>
<div class="variablelist">
<p class="title"><b></b></p>
<dl>
<dt><span class="term"><code class="computeroutput"><span class="identifier">State</span></code></span></dt>
<dd><p>
The state type
</p></dd>
<dt><span class="term"><code class="computeroutput"><span class="identifier">Algebra</span></code></span></dt>
<dd><p>
The algebra type
</p></dd>
<dt><span class="term"><code class="literal">Operation/N/</code></span></dt>
<dd><p>
An <code class="literal"><span class="emphasis"><em>N</em></span></code>-ary operation type,
<code class="literal"><span class="emphasis"><em>N</em></span></code> should be a number from
1 to 14.
</p></dd>
<dt><span class="term"><code class="computeroutput"><span class="identifier">algebra</span></code></span></dt>
<dd><p>
Object of type <code class="computeroutput"><span class="identifier">Algebra</span></code>
</p></dd>
<dt><span class="term"><code class="literal">operation/N/</code></span></dt>
<dd><p>
Object of type <code class="literal">Operation/N</code>
</p></dd>
<dt><span class="term"><code class="computeroutput"><span class="identifier">y</span><span class="special">,</span>
<span class="identifier">x1</span><span class="special">,</span>
<span class="identifier">x2</span><span class="special">,</span>
<span class="special">...</span></code></span></dt>
<dd><p>
Objects of type <code class="computeroutput"><span class="identifier">State</span></code>
</p></dd>
</dl>
</div>
<h6>
<a name="boost_numeric_odeint.concepts.state_algebra_operations.algebra.h1"></a>
<span><a name="boost_numeric_odeint.concepts.state_algebra_operations.algebra.valid_expressions"></a></span><a class="link" href="state_algebra_operations.html#boost_numeric_odeint.concepts.state_algebra_operations.algebra.valid_expressions">Valid
Expressions</a>
</h6>
<div class="informaltable"><table class="table">
<colgroup>
<col>
<col>
<col>
<col>
</colgroup>
<thead><tr>
<th>
<p>
Name
</p>
</th>
<th>
<p>
Expression
</p>
</th>
<th>
<p>
Type
</p>
</th>
<th>
<p>
Semantics
</p>
</th>
</tr></thead>
<tbody>
<tr>
<td>
<p>
Vector Operation with arity 2
</p>
</td>
<td>
<p>
<code class="computeroutput"><span class="identifier">algebra</span><span class="special">.</span><span class="identifier">for_each2</span><span class="special">(</span>
<span class="identifier">y</span> <span class="special">,</span>
<span class="identifier">x</span> <span class="special">,</span>
<span class="identifier">operation2</span> <span class="special">)</span></code>
</p>
</td>
<td>
<p>
void
</p>
</td>
<td>
<p>
Calls <code class="computeroutput"><span class="identifier">operation2</span><span class="special">(</span> <span class="identifier">y_i</span>
<span class="special">,</span> <span class="identifier">x_i</span>
<span class="special">)</span></code> for each element <code class="computeroutput"><span class="identifier">y_i</span></code> of <code class="computeroutput"><span class="identifier">y</span></code>
and <code class="computeroutput"><span class="identifier">x_i</span></code> of <code class="computeroutput"><span class="identifier">x</span></code>.
</p>
</td>
</tr>
<tr>
<td>
<p>
Vector Operation with arity 3
</p>
</td>
<td>
<p>
<code class="computeroutput"><span class="identifier">algebra</span><span class="special">.</span><span class="identifier">for_each3</span><span class="special">(</span>
<span class="identifier">y</span> <span class="special">,</span>
<span class="identifier">x1</span> <span class="special">,</span>
<span class="identifier">x2</span> <span class="special">,</span>
<span class="identifier">operation3</span> <span class="special">)</span></code>
</p>
</td>
<td>
<p>
void
</p>
</td>
<td>
<p>
Calls <code class="computeroutput"><span class="identifier">operation3</span><span class="special">(</span> <span class="identifier">y_i</span>
<span class="special">,</span> <span class="identifier">x1_i</span>
<span class="special">,</span> <span class="identifier">x2_i</span>
<span class="special">)</span></code> for each element <code class="computeroutput"><span class="identifier">y_i</span></code> of <code class="computeroutput"><span class="identifier">y</span></code>
and <code class="computeroutput"><span class="identifier">x1_i</span></code> of
<code class="computeroutput"><span class="identifier">x1</span></code> and <code class="computeroutput"><span class="identifier">x2_i</span></code> of <code class="computeroutput"><span class="identifier">x2</span></code>.
</p>
</td>
</tr>
<tr>
<td>
<p>
Vector Operation with arity <code class="literal"><span class="emphasis"><em>N</em></span></code>
</p>
</td>
<td>
<p>
<code class="literal">algebra.for_each/N/( y , x1 , ... , xN , operation/N/
)</code>
</p>
</td>
<td>
<p>
void
</p>
</td>
<td>
<p>
Calls <code class="literal">operation/N/( y_i , x1_i , ... , xN_i )</code>
for each element <code class="computeroutput"><span class="identifier">y_i</span></code>
of <code class="computeroutput"><span class="identifier">y</span></code> and <code class="computeroutput"><span class="identifier">x1_i</span></code> of <code class="computeroutput"><span class="identifier">x1</span></code>
and so on. <code class="literal"><span class="emphasis"><em>N</em></span></code> should be
replaced by a number between 1 and 14.
</p>
</td>
</tr>
</tbody>
</table></div>
</div>
<div class="section">
<div class="titlepage"><div><div><h4 class="title">
<a name="boost_numeric_odeint.concepts.state_algebra_operations.pre_defined_implementations"></a><a class="link" href="state_algebra_operations.html#boost_numeric_odeint.concepts.state_algebra_operations.pre_defined_implementations" title="Pre-Defined implementations">Pre-Defined
implementations</a>
</h4></div></div></div>
<p>
As standard configuration odeint uses the <code class="computeroutput"><span class="identifier">range_algebra</span></code>
and <code class="computeroutput"><span class="identifier">default_operations</span></code>
which suffices most situations. However, a few more possibilities exist
either to gain better performance or to ensure interoperability with other
libraries. In the following we list the existing <code class="computeroutput"><span class="identifier">Algebra</span></code>/<code class="computeroutput"><span class="identifier">Operations</span></code> configurations that can be
used in the steppers.
</p>
<div class="informaltable"><table class="table">
<colgroup>
<col>
<col>
<col>
<col>
</colgroup>
<thead><tr>
<th>
<p>
<code class="computeroutput"><span class="identifier">State</span></code>
</p>
</th>
<th>
<p>
<code class="computeroutput"><span class="identifier">Algebra</span></code>
</p>
</th>
<th>
<p>
<code class="computeroutput"><span class="identifier">Operations</span></code>
</p>
</th>
<th>
<p>
Remarks
</p>
</th>
</tr></thead>
<tbody>
<tr>
<td>
<p>
Anything supporting <a href="http://www.boost.org/doc/libs/release/libs/range/index.html" target="_top">Boost.Range</a>,
like <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span></code>, <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">list</span></code>,
<code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">array</span></code>,... based on a <code class="computeroutput"><span class="identifier">value_type</span></code> that supports operators
+,* (typically <code class="computeroutput"><span class="keyword">double</span></code>)
</p>
</td>
<td>
<p>
<code class="computeroutput"><span class="identifier">range_algebra</span></code>
</p>
</td>
<td>
<p>
<code class="computeroutput"><span class="identifier">default_operations</span></code>
</p>
</td>
<td>
<p>
Standard implementation, applicable for most typical situations.
</p>
</td>
</tr>
<tr>
<td>
<p>
<code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">array</span></code> based on a <code class="computeroutput"><span class="identifier">value_type</span></code> that supports operators
+,*
</p>
</td>
<td>
<p>
<code class="computeroutput"><span class="identifier">array_algebra</span></code>
</p>
</td>
<td>
<p>
<code class="computeroutput"><span class="identifier">default_operations</span></code>
</p>
</td>
<td>
<p>
Special implementation for boost::array with better performance
than <code class="computeroutput"><span class="identifier">range_algebra</span></code>
</p>
</td>
</tr>
<tr>
<td>
<p>
Anything that defines operators + within itself and * with scalar
(Mathematically spoken, anything that is a vector space).
</p>
</td>
<td>
<p>
<code class="computeroutput"><span class="identifier">vector_space_algebra</span></code>
</p>
</td>
<td>
<p>
<code class="computeroutput"><span class="identifier">default_operations</span></code>
</p>
</td>
<td>
<p>
For the use of <a class="link" href="controlled_stepper.html" title="Controlled Stepper">Controlled
Stepper</a>, the template <code class="computeroutput"><span class="identifier">vector_space_reduce</span></code>
has to be instantiated.
</p>
</td>
</tr>
<tr>
<td>
<p>
<code class="computeroutput"><span class="identifier">thrust</span><span class="special">::</span><span class="identifier">device_vector</span></code>, <code class="computeroutput"><span class="identifier">thrust</span><span class="special">::</span><span class="identifier">host_vector</span></code>
</p>
</td>
<td>
<p>
<code class="computeroutput"><span class="identifier">thrust_algebra</span></code>
</p>
</td>
<td>
<p>
<code class="computeroutput"><span class="identifier">thrust_operations</span></code>
</p>
</td>
<td>
<p>
For running odeint on CUDA devices by using <a href="http://code.google.com/p/thrust/" target="_top">Thrust</a>
</p>
</td>
</tr>
<tr>
<td>
<p>
<code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">array</span></code> or anything which allocates
the elements in a C-like manner
</p>
</td>
<td>
<p>
<code class="computeroutput"><span class="identifier">vector_space_algebra</span></code>
</p>
</td>
<td>
<p>
<code class="computeroutput"><span class="identifier">mkl_operations</span></code>
</p>
</td>
<td>
<p>
Using the <a href="http://software.intel.com/en-us/articles/intel-mkl/" target="_top">Intel
Math Kernel Library</a> in odeint for maximum performance.
Currently, only the RK4 stepper is supported.
</p>
</td>
</tr>
</tbody>
</table></div>
</div>
<div class="section">
<div class="titlepage"><div><div><h4 class="title">
<a name="boost_numeric_odeint.concepts.state_algebra_operations.example_expressions"></a><a class="link" href="state_algebra_operations.html#boost_numeric_odeint.concepts.state_algebra_operations.example_expressions" title="Example expressions">Example
expressions</a>
</h4></div></div></div>
<div class="informaltable"><table class="table">
<colgroup>
<col>
<col>
<col>
<col>
</colgroup>
<thead><tr>
<th>
<p>
Name
</p>
</th>
<th>
<p>
Expression
</p>
</th>
<th>
<p>
Type
</p>
</th>
<th>
<p>
Semantics
</p>
</th>
</tr></thead>
<tbody><tr>
<td>
<p>
Vector operation
</p>
</td>
<td>
<p>
<code class="computeroutput"><span class="identifier">algebra</span><span class="special">.</span><span class="identifier">for_each3</span><span class="special">(</span>
<span class="identifier">y</span> <span class="special">,</span>
<span class="identifier">x1</span> <span class="special">,</span>
<span class="identifier">x2</span> <span class="special">,</span>
<span class="identifier">Operations</span><span class="special">::</span><span class="identifier">scale_sum2</span><span class="special">&lt;</span>
<span class="identifier">Value1</span> <span class="special">,</span>
<span class="identifier">Value2</span> <span class="special">&gt;(</span>
<span class="identifier">a1</span> <span class="special">,</span>
<span class="identifier">a2</span> <span class="special">)</span>
<span class="special">)</span></code>
</p>
</td>
<td>
<p>
void
</p>
</td>
<td>
<p>
Calculates <span class="emphasis"><em><span class="bold"><strong>y</strong></span> = a1
<span class="bold"><strong>x1</strong></span> + a2 <span class="bold"><strong>x2</strong></span></em></span>
</p>
</td>
</tr></tbody>
</table></div>
</div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright &#169; 2009-2011 Karsten Ahnert
and Mario Mulansky<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
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>)
</p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="dense_output_stepper.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../concepts.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="state_wrapper.html"><img src="../../images/next.png" alt="Next"></a>
</div>
</body>
</html>

View File

@ -1,278 +0,0 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>State Wrapper</title>
<link rel="stylesheet" href="../../boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
<link rel="home" href="../../index.html" title="Chapter&#160;1.&#160;Boost.Numeric.Odeint">
<link rel="up" href="../concepts.html" title="Concepts">
<link rel="prev" href="state_algebra_operations.html" title="State Algebra Operations">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<div class="spirit-nav">
<a accesskey="p" href="state_algebra_operations.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../concepts.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h3 class="title">
<a name="boost_numeric_odeint.concepts.state_wrapper"></a><a class="link" href="state_wrapper.html" title="State Wrapper">State Wrapper</a>
</h3></div></div></div>
<h5>
<a name="boost_numeric_odeint.concepts.state_wrapper.h0"></a>
<span><a name="boost_numeric_odeint.concepts.state_wrapper.description"></a></span><a class="link" href="state_wrapper.html#boost_numeric_odeint.concepts.state_wrapper.description">Description</a>
</h5>
<p>
The <code class="computeroutput"><span class="identifier">State</span> <span class="identifier">Wrapper</span></code>
concept describes the way odeint creates temporary state objects to store
intermediate results within the stepper's <code class="computeroutput"><span class="identifier">do_step</span></code>
methods.
</p>
<h5>
<a name="boost_numeric_odeint.concepts.state_wrapper.h1"></a>
<span><a name="boost_numeric_odeint.concepts.state_wrapper.notation"></a></span><a class="link" href="state_wrapper.html#boost_numeric_odeint.concepts.state_wrapper.notation">Notation</a>
</h5>
<div class="variablelist">
<p class="title"><b></b></p>
<dl>
<dt><span class="term"><code class="computeroutput"><span class="identifier">State</span></code></span></dt>
<dd><p>
A type that is the <code class="computeroutput"><span class="identifier">state_type</span></code>
of the ODE
</p></dd>
<dt><span class="term"><code class="computeroutput"><span class="identifier">WrappedState</span></code></span></dt>
<dd><p>
A type that is a model of State Wrapper for the state type <code class="computeroutput"><span class="identifier">State</span></code>.
</p></dd>
<dt><span class="term"><code class="computeroutput"><span class="identifier">x</span></code></span></dt>
<dd><p>
Object of type <code class="computeroutput"><span class="identifier">State</span></code>
</p></dd>
<dt><span class="term"><code class="computeroutput"><span class="identifier">w</span></code></span></dt>
<dd><p>
Object of type <code class="computeroutput"><span class="identifier">WrappedState</span></code>
</p></dd>
</dl>
</div>
<h5>
<a name="boost_numeric_odeint.concepts.state_wrapper.h2"></a>
<span><a name="boost_numeric_odeint.concepts.state_wrapper.valid_expressions"></a></span><a class="link" href="state_wrapper.html#boost_numeric_odeint.concepts.state_wrapper.valid_expressions">Valid
Expressions</a>
</h5>
<div class="informaltable"><table class="table">
<colgroup>
<col>
<col>
<col>
<col>
</colgroup>
<thead><tr>
<th>
<p>
Name
</p>
</th>
<th>
<p>
Expression
</p>
</th>
<th>
<p>
Type
</p>
</th>
<th>
<p>
Semantics
</p>
</th>
</tr></thead>
<tbody>
<tr>
<td>
<p>
Get resizeability
</p>
</td>
<td>
<p>
<code class="computeroutput"><span class="identifier">is_resizeable</span><span class="special">&lt;</span>
<span class="identifier">State</span> <span class="special">&gt;</span></code>
</p>
</td>
<td>
<p>
<code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">false_type</span></code> or <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">true_type</span></code>
</p>
</td>
<td>
<p>
Returns <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">true_type</span></code> if the <code class="computeroutput"><span class="identifier">State</span></code> is resizeable, <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">false_type</span></code> otherwise.
</p>
</td>
</tr>
<tr>
<td>
<p>
Create <code class="computeroutput"><span class="identifier">WrappedState</span></code>
type
</p>
</td>
<td>
<p>
<code class="computeroutput"><span class="identifier">state_wrapper</span><span class="special">&lt;</span>
<span class="identifier">State</span> <span class="special">&gt;</span></code>
</p>
</td>
<td>
<p>
<code class="computeroutput"><span class="identifier">WrappedState</span></code>
</p>
</td>
<td>
<p>
Creates the type for a <code class="computeroutput"><span class="identifier">WrappedState</span></code>
for the state type <code class="computeroutput"><span class="identifier">State</span></code>
</p>
</td>
</tr>
<tr>
<td>
<p>
Constructor
</p>
</td>
<td>
<p>
<code class="computeroutput"><span class="identifier">WrappedState</span><span class="special">()</span></code>
</p>
</td>
<td>
<p>
<code class="computeroutput"><span class="identifier">WrappedState</span></code>
</p>
</td>
<td>
<p>
Constructs a state wrapper with an empty state
</p>
</td>
</tr>
<tr>
<td>
<p>
Copy Constructor
</p>
</td>
<td>
<p>
<code class="computeroutput"><span class="identifier">WrappedState</span><span class="special">(</span>
<span class="identifier">w</span> <span class="special">)</span></code>
</p>
</td>
<td>
<p>
<code class="computeroutput"><span class="identifier">WrappedState</span></code>
</p>
</td>
<td>
<p>
Constructs a state wrapper with a state of the same size as the
state in <code class="computeroutput"><span class="identifier">w</span></code>
</p>
</td>
</tr>
<tr>
<td>
<p>
Get state
</p>
</td>
<td>
<p>
<code class="computeroutput"><span class="identifier">w</span><span class="special">.</span><span class="identifier">m_v</span></code>
</p>
</td>
<td>
<p>
<code class="computeroutput"><span class="identifier">State</span></code>
</p>
</td>
<td>
<p>
Returns the <code class="computeroutput"><span class="identifier">State</span></code>
object of this state wrapper.
</p>
</td>
</tr>
<tr>
<td>
<p>
Check size
</p>
</td>
<td>
<p>
<code class="computeroutput"><span class="identifier">w</span><span class="special">.</span><span class="identifier">same_size</span><span class="special">(</span>
<span class="identifier">x</span> <span class="special">)</span></code>
</p>
</td>
<td>
<p>
<code class="computeroutput"><span class="keyword">bool</span></code>
</p>
</td>
<td>
<p>
Returns <code class="computeroutput"><span class="keyword">true</span></code> if <code class="computeroutput"><span class="identifier">x</span></code> and <code class="computeroutput"><span class="identifier">w</span><span class="special">.</span><span class="identifier">m_v</span></code>
have the same size, <code class="computeroutput"><span class="keyword">false</span></code>
otherwise. <span class="bold"><strong>Only required if <code class="computeroutput"><span class="identifier">State</span></code> is resizeable.</strong></span>
</p>
</td>
</tr>
<tr>
<td>
<p>
Resize
</p>
</td>
<td>
<p>
<code class="computeroutput"><span class="identifier">w</span><span class="special">.</span><span class="identifier">resize</span><span class="special">(</span>
<span class="identifier">x</span> <span class="special">)</span></code>
</p>
</td>
<td>
<p>
<code class="computeroutput"><span class="keyword">bool</span></code>
</p>
</td>
<td>
<p>
If <code class="computeroutput"><span class="identifier">w</span><span class="special">.</span><span class="identifier">m_v</span></code> and <code class="computeroutput"><span class="identifier">x</span></code>
have different sizes, <code class="computeroutput"><span class="identifier">w</span><span class="special">.</span><span class="identifier">m_v</span></code>
is resized to the size of <code class="computeroutput"><span class="identifier">x</span></code>
and the method returns <code class="computeroutput"><span class="keyword">true</span></code>.
Otherwise the method returns <code class="computeroutput"><span class="keyword">false</span></code>.
<span class="bold"><strong>Only required if <code class="computeroutput"><span class="identifier">State</span></code>
is resizeable.</strong></span>
</p>
</td>
</tr>
</tbody>
</table></div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright &#169; 2009-2011 Karsten Ahnert
and Mario Mulansky<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
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>)
</p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="state_algebra_operations.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../concepts.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a>
</div>
</body>
</html>

View File

@ -1,271 +0,0 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Stepper</title>
<link rel="stylesheet" href="../../boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
<link rel="home" href="../../index.html" title="Chapter&#160;1.&#160;Boost.Numeric.Odeint">
<link rel="up" href="../concepts.html" title="Concepts">
<link rel="prev" href="implicit_system.html" title="Implicit System">
<link rel="next" href="error_stepper.html" title="Error Stepper">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<div class="spirit-nav">
<a accesskey="p" href="implicit_system.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../concepts.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="error_stepper.html"><img src="../../images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h3 class="title">
<a name="boost_numeric_odeint.concepts.stepper"></a><a class="link" href="stepper.html" title="Stepper">Stepper</a>
</h3></div></div></div>
<p>
This concepts specifies the interface a simple stepper has to fulfill to
be used within the <a class="link" href="../odeint_in_detail/integrate_functions.html" title="Integrate functions">integrate
functions</a>.
</p>
<h5>
<a name="boost_numeric_odeint.concepts.stepper.h0"></a>
<span><a name="boost_numeric_odeint.concepts.stepper.description"></a></span><a class="link" href="stepper.html#boost_numeric_odeint.concepts.stepper.description">Description</a>
</h5>
<p>
The basic stepper concept. A basic stepper following this Stepper concept
is able to perform a single step of the solution <span class="emphasis"><em>x(t)</em></span>
of an ODE to obtain <span class="emphasis"><em>x(t+dt)</em></span> using a given step size
<span class="emphasis"><em>dt</em></span>. Basic steppers can be Runge Kutta steppers, symplectic
steppers as well as implicit steppers. Depending on the actual stepper, the
ODE is defined as <a class="link" href="system.html" title="System">System</a>,
<a class="link" href="symplectic_system.html" title="Symplectic System">Symplectic
System</a>, <a class="link" href="simple_symplectic_system.html" title="Simple Symplectic System">Simple
Symplectic System</a> or <a class="link" href="implicit_system.html" title="Implicit System">Implicit
System</a>. Note that all error steppers are also basic steppers.
</p>
<h5>
<a name="boost_numeric_odeint.concepts.stepper.h1"></a>
<span><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
of</a>
</h5>
<div class="itemizedlist"><ul class="itemizedlist" type="disc">
<li class="listitem">
DefaultConstructable
</li>
<li class="listitem">
CopyConstructable
</li>
</ul></div>
<h5>
<a name="boost_numeric_odeint.concepts.stepper.h2"></a>
<span><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
types</a>
</h5>
<div class="itemizedlist"><ul class="itemizedlist" type="disc">
<li class="listitem">
<p><span class="bold"><strong>state_type</strong></span></p>
<p><code class="computeroutput"><span class="identifier">Stepper</span><span class="special">::</span><span class="identifier">state_type</span></code></p>
<p>The
type characterizing the state of the ODE, hence <span class="emphasis"><em>x</em></span>.</p>
</li>
<li class="listitem">
<p><span class="bold"><strong>deriv_type</strong></span></p>
<p><code class="computeroutput"><span class="identifier">Stepper</span><span class="special">::</span><span class="identifier">deriv_type</span></code></p>
<p>The
type characterizing the derivative of the ODE, hence <span class="emphasis"><em>d x/dt</em></span>.</p>
</li>
<li class="listitem">
<p><span class="bold"><strong>time_type</strong></span></p>
<p><code class="computeroutput"><span class="identifier">Stepper</span><span class="special">::</span><span class="identifier">time_type</span></code></p>
<p>The
type characterizing the dependent variable of the ODE, hence the time
<span class="emphasis"><em>t</em></span>.</p>
</li>
<li class="listitem">
<p><span class="bold"><strong>value_type</strong></span></p>
<p><code class="computeroutput"><span class="identifier">Stepper</span><span class="special">::</span><span class="identifier">value_type</span></code></p>
<p>The
numerical data type which is used within the stepper, something like
<code class="computeroutput"><span class="keyword">float</span></code>, <code class="computeroutput"><span class="keyword">double</span></code>,
<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>
</li>
<li class="listitem">
<p><span class="bold"><strong>order_type</strong></span></p>
<p><code class="computeroutput"><span class="identifier">Stepper</span><span class="special">::</span><span class="identifier">order_type</span></code></p>
<p>The
type characterizing the order of the ODE, typically <code class="computeroutput"><span class="keyword">unsigned</span>
<span class="keyword">short</span></code>.</p>
</li>
<li class="listitem">
<p><span class="bold"><strong>stepper_category</strong></span></p>
<p><code class="computeroutput"><span class="identifier">Stepper</span><span class="special">::</span><span class="identifier">stepper_category</span></code></p>
<p>A
tag type characterizing the category of the stepper. This type must be
convertible to <code class="computeroutput"><span class="identifier">stepper_tag</span></code>.</p>
</li>
</ul></div>
<h5>
<a name="boost_numeric_odeint.concepts.stepper.h3"></a>
<span><a name="boost_numeric_odeint.concepts.stepper.notation"></a></span><a class="link" href="stepper.html#boost_numeric_odeint.concepts.stepper.notation">Notation</a>
</h5>
<div class="variablelist">
<p class="title"><b></b></p>
<dl>
<dt><span class="term"><code class="computeroutput"><span class="identifier">Stepper</span></code></span></dt>
<dd><p>
A type that is a model of Stepper
</p></dd>
<dt><span class="term"><code class="computeroutput"><span class="identifier">State</span></code></span></dt>
<dd><p>
A type representing the state <span class="emphasis"><em>x</em></span> of the ODE
</p></dd>
<dt><span class="term"><code class="computeroutput"><span class="identifier">Time</span></code></span></dt>
<dd><p>
A type representing the time <span class="emphasis"><em>t</em></span> of the ODE
</p></dd>
<dt><span class="term"><code class="computeroutput"><span class="identifier">stepper</span></code></span></dt>
<dd><p>
An object of type <code class="computeroutput"><span class="identifier">Stepper</span></code>
</p></dd>
<dt><span class="term"><code class="computeroutput"><span class="identifier">x</span></code></span></dt>
<dd><p>
Object of type <code class="computeroutput"><span class="identifier">State</span></code>
</p></dd>
<dt><span class="term"><code class="computeroutput"><span class="identifier">t</span></code>, <code class="computeroutput"><span class="identifier">dt</span></code></span></dt>
<dd><p>
Objects of type <code class="computeroutput"><span class="identifier">Time</span></code>
</p></dd>
<dt><span class="term"><code class="computeroutput"><span class="identifier">sys</span></code></span></dt>
<dd><p>
An object defining the ODE. Depending on the Stepper this might be
a model of <a class="link" href="system.html" title="System">System</a>,
<a class="link" href="symplectic_system.html" title="Symplectic System">Symplectic
System</a>, <a class="link" href="simple_symplectic_system.html" title="Simple Symplectic System">Simple
Symplectic System</a> or <a class="link" href="implicit_system.html" title="Implicit System">Implicit
System</a>
</p></dd>
</dl>
</div>
<h5>
<a name="boost_numeric_odeint.concepts.stepper.h4"></a>
<span><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>
</h5>
<div class="informaltable"><table class="table">
<colgroup>
<col>
<col>
<col>
<col>
</colgroup>
<thead><tr>
<th>
<p>
Name
</p>
</th>
<th>
<p>
Expression
</p>
</th>
<th>
<p>
Type
</p>
</th>
<th>
<p>
Semantics
</p>
</th>
</tr></thead>
<tbody>
<tr>
<td>
<p>
Get the order
</p>
</td>
<td>
<p>
<code class="computeroutput"><span class="identifier">stepper</span><span class="special">.</span><span class="identifier">order</span><span class="special">()</span></code>
</p>
</td>
<td>
<p>
<code class="computeroutput"><span class="identifier">order_type</span></code>
</p>
</td>
<td>
<p>
Returns the order of the stepper.
</p>
</td>
</tr>
<tr>
<td>
<p>
Do step
</p>
</td>
<td>
<p>
<code class="computeroutput"><span class="identifier">stepper</span><span class="special">.</span><span class="identifier">do_step</span><span class="special">(</span>
<span class="identifier">sys</span> <span class="special">,</span>
<span class="identifier">x</span> <span class="special">,</span>
<span class="identifier">t</span> <span class="special">,</span>
<span class="identifier">dt</span> <span class="special">)</span></code>
</p>
</td>
<td>
<p>
<code class="computeroutput"><span class="keyword">void</span></code>
</p>
</td>
<td>
<p>
Performs one step of step size <code class="computeroutput"><span class="identifier">dt</span></code>.
The newly obtained state is written in place in <code class="computeroutput"><span class="identifier">x</span></code>.
</p>
</td>
</tr>
</tbody>
</table></div>
<h5>
<a name="boost_numeric_odeint.concepts.stepper.h5"></a>
<span><a name="boost_numeric_odeint.concepts.stepper.models"></a></span><a class="link" href="stepper.html#boost_numeric_odeint.concepts.stepper.models">Models</a>
</h5>
<div class="itemizedlist"><ul class="itemizedlist" type="disc">
<li class="listitem">
<code class="computeroutput"><span class="identifier">runge_kutta4</span></code>
</li>
<li class="listitem">
<code class="computeroutput"><span class="identifier">euler</span></code>
</li>
<li class="listitem">
<code class="computeroutput"><span class="identifier">runge_kutta_cash_karp54</span></code>
</li>
<li class="listitem">
<code class="computeroutput"><span class="identifier">runge_kutta_dopri5</span></code>
</li>
<li class="listitem">
<code class="computeroutput"><span class="identifier">runge_kutta_fehlberg78</span></code>
</li>
<li class="listitem">
<code class="computeroutput"><span class="identifier">modified_midpoint</span></code>
</li>
<li class="listitem">
<code class="computeroutput"><span class="identifier">rosenbrock4</span></code>
</li>
</ul></div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright &#169; 2009-2011 Karsten Ahnert
and Mario Mulansky<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
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>)
</p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="implicit_system.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../concepts.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="error_stepper.html"><img src="../../images/next.png" alt="Next"></a>
</div>
</body>
</html>

View File

@ -1,233 +0,0 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Symplectic System</title>
<link rel="stylesheet" href="../../boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
<link rel="home" href="../../index.html" title="Chapter&#160;1.&#160;Boost.Numeric.Odeint">
<link rel="up" href="../concepts.html" title="Concepts">
<link rel="prev" href="system.html" title="System">
<link rel="next" href="simple_symplectic_system.html" title="Simple Symplectic System">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<div class="spirit-nav">
<a accesskey="p" href="system.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../concepts.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="simple_symplectic_system.html"><img src="../../images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h3 class="title">
<a name="boost_numeric_odeint.concepts.symplectic_system"></a><a class="link" href="symplectic_system.html" title="Symplectic System">Symplectic
System</a>
</h3></div></div></div>
<h5>
<a name="boost_numeric_odeint.concepts.symplectic_system.h0"></a>
<span><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>
</h5>
<p>
This concept describes how to define a symplectic system written with generalized
coordinate <code class="computeroutput"><span class="identifier">q</span></code> and generalized
momentum <code class="computeroutput"><span class="identifier">p</span></code>:
</p>
<p>
<span class="emphasis"><em>q'(t) = f(p) </em></span>
</p>
<p>
<span class="emphasis"><em>p'(t) = g(q) </em></span>
</p>
<p>
Such a situation is typically found for Hamiltonian systems with a separable
Hamiltonian:
</p>
<p>
<span class="emphasis"><em>H(p,q) = H<sub>kin</sub>(p) + V(q) </em></span>
</p>
<p>
which gives the equations of motion:
</p>
<p>
<span class="emphasis"><em>q'(t) = dH<sub>kin</sub> / dp = f(p) </em></span>
</p>
<p>
<span class="emphasis"><em>p'(t) = dV / dq = g(q) </em></span>
</p>
<p>
The algorithmic implementation of this situation is described by a pair of
callable objects for <span class="emphasis"><em>f</em></span> and <span class="emphasis"><em>g</em></span> 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 <code class="computeroutput"><span class="identifier">symplectic_rkn_sb3a_mclachlan</span></code>.
</p>
<h5>
<a name="boost_numeric_odeint.concepts.symplectic_system.h1"></a>
<span><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>
</h5>
<div class="variablelist">
<p class="title"><b></b></p>
<dl>
<dt><span class="term"><code class="computeroutput"><span class="identifier">System</span></code></span></dt>
<dd><p>
A type that is a model of Symplectic_System
</p></dd>
<dt><span class="term"><code class="computeroutput"><span class="identifier">Coor</span></code></span></dt>
<dd><p>
The type of the coordinate <span class="emphasis"><em>q</em></span>
</p></dd>
<dt><span class="term"><code class="computeroutput"><span class="identifier">Momentum</span></code></span></dt>
<dd><p>
The type of the momentum <span class="emphasis"><em>p</em></span>
</p></dd>
<dt><span class="term"><code class="computeroutput"><span class="identifier">CoorDeriv</span></code></span></dt>
<dd><p>
The type of the derivative of coordinate <span class="emphasis"><em>q'</em></span>
</p></dd>
<dt><span class="term"><code class="computeroutput"><span class="identifier">MomentumDeriv</span></code></span></dt>
<dd><p>
The type of the derivative of momentum <span class="emphasis"><em>p'</em></span>
</p></dd>
<dt><span class="term"><code class="computeroutput"><span class="identifier">sys</span></code></span></dt>
<dd><p>
An object of the type <code class="computeroutput"><span class="identifier">System</span></code>
</p></dd>
<dt><span class="term"><code class="computeroutput"><span class="identifier">q</span></code></span></dt>
<dd><p>
Object of type Coor
</p></dd>
<dt><span class="term"><code class="computeroutput"><span class="identifier">p</span></code></span></dt>
<dd><p>
Object of type Momentum
</p></dd>
<dt><span class="term"><code class="computeroutput"><span class="identifier">dqdt</span></code></span></dt>
<dd><p>
Object of type CoorDeriv
</p></dd>
<dt><span class="term"><code class="computeroutput"><span class="identifier">dpdt</span></code></span></dt>
<dd><p>
Object of type MomentumDeriv
</p></dd>
</dl>
</div>
<h5>
<a name="boost_numeric_odeint.concepts.symplectic_system.h2"></a>
<span><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
expressions</a>
</h5>
<div class="informaltable"><table class="table">
<colgroup>
<col>
<col>
<col>
<col>
</colgroup>
<thead><tr>
<th>
<p>
Name
</p>
</th>
<th>
<p>
Expression
</p>
</th>
<th>
<p>
Type
</p>
</th>
<th>
<p>
Semantics
</p>
</th>
</tr></thead>
<tbody>
<tr>
<td>
<p>
Check for pair
</p>
</td>
<td>
<p>
<code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">is_pair</span><span class="special">&lt;</span>
<span class="identifier">System</span> <span class="special">&gt;::</span><span class="identifier">type</span></code>
</p>
</td>
<td>
<p>
<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>
</p>
</td>
<td>
<p>
Check if System is a pair
</p>
</td>
</tr>
<tr>
<td>
<p>
Calculate <span class="emphasis"><em>dq/dt = f(p)</em></span>
</p>
</td>
<td>
<p>
<code class="computeroutput"><span class="identifier">sys</span><span class="special">.</span><span class="identifier">first</span><span class="special">(</span>
<span class="identifier">p</span> <span class="special">,</span>
<span class="identifier">dqdt</span> <span class="special">)</span></code>
</p>
</td>
<td>
<p>
<code class="computeroutput"><span class="keyword">void</span></code>
</p>
</td>
<td>
<p>
Calculates <span class="emphasis"><em>f(p)</em></span>, the result is stored into
<code class="computeroutput"><span class="identifier">dqdt</span></code>
</p>
</td>
</tr>
<tr>
<td>
<p>
Calculate <span class="emphasis"><em>dp/dt = g(q)</em></span>
</p>
</td>
<td>
<p>
<code class="computeroutput"><span class="identifier">sys</span><span class="special">.</span><span class="identifier">second</span><span class="special">(</span>
<span class="identifier">q</span> <span class="special">,</span>
<span class="identifier">dpdt</span> <span class="special">)</span></code>
</p>
</td>
<td>
<p>
<code class="computeroutput"><span class="keyword">void</span></code>
</p>
</td>
<td>
<p>
Calculates <span class="emphasis"><em>g(q)</em></span>, the result is stored into
<code class="computeroutput"><span class="identifier">dpdt</span></code>
</p>
</td>
</tr>
</tbody>
</table></div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright &#169; 2009-2011 Karsten Ahnert
and Mario Mulansky<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
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>)
</p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="system.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../concepts.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="simple_symplectic_system.html"><img src="../../images/next.png" alt="Next"></a>
</div>
</body>
</html>

View File

@ -1,150 +0,0 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>System</title>
<link rel="stylesheet" href="../../boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
<link rel="home" href="../../index.html" title="Chapter&#160;1.&#160;Boost.Numeric.Odeint">
<link rel="up" href="../concepts.html" title="Concepts">
<link rel="prev" href="../concepts.html" title="Concepts">
<link rel="next" href="symplectic_system.html" title="Symplectic System">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<div class="spirit-nav">
<a accesskey="p" href="../concepts.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../concepts.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="symplectic_system.html"><img src="../../images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h3 class="title">
<a name="boost_numeric_odeint.concepts.system"></a><a class="link" href="system.html" title="System">System</a>
</h3></div></div></div>
<h5>
<a name="boost_numeric_odeint.concepts.system.h0"></a>
<span><a name="boost_numeric_odeint.concepts.system.description"></a></span><a class="link" href="system.html#boost_numeric_odeint.concepts.system.description">Description</a>
</h5>
<p>
The System concept models the algorithmic implementation of the rhs. of the
ODE <span class="emphasis"><em>x' = f(x,t)</em></span>. The only requirement for this concept
is that it should be callable with a specific parameter syntax (see below).
A System is typically implemented as a function or a functor. Systems fulfilling
this concept are required by all Runge-Kutta steppers as well as the Bulirsch-Stoer
steppers. However, symplectic and implicit steppers work with other system
concepts, see <a class="link" href="symplectic_system.html" title="Symplectic System">Symplectic
System</a> and <a class="link" href="implicit_system.html" title="Implicit System">Implicit
System</a>.
</p>
<h5>
<a name="boost_numeric_odeint.concepts.system.h1"></a>
<span><a name="boost_numeric_odeint.concepts.system.notation"></a></span><a class="link" href="system.html#boost_numeric_odeint.concepts.system.notation">Notation</a>
</h5>
<div class="variablelist">
<p class="title"><b></b></p>
<dl>
<dt><span class="term"><code class="computeroutput"><span class="identifier">System</span></code></span></dt>
<dd><p>
A type that is a model of System
</p></dd>
<dt><span class="term"><code class="computeroutput"><span class="identifier">State</span></code></span></dt>
<dd><p>
A type representing the state <span class="emphasis"><em>x</em></span> of the ODE
</p></dd>
<dt><span class="term"><code class="computeroutput"><span class="identifier">Deriv</span></code></span></dt>
<dd><p>
A type representing the derivative <span class="emphasis"><em>x'</em></span> of the ODE
</p></dd>
<dt><span class="term"><code class="computeroutput"><span class="identifier">Time</span></code></span></dt>
<dd><p>
A type representing the time
</p></dd>
<dt><span class="term"><code class="computeroutput"><span class="identifier">sys</span></code></span></dt>
<dd><p>
An object of type <code class="computeroutput"><span class="identifier">System</span></code>
</p></dd>
<dt><span class="term"><code class="computeroutput"><span class="identifier">x</span></code></span></dt>
<dd><p>
Object of type <code class="computeroutput"><span class="identifier">State</span></code>
</p></dd>
<dt><span class="term"><code class="computeroutput"><span class="identifier">dxdt</span></code></span></dt>
<dd><p>
Object of type <code class="computeroutput"><span class="identifier">Deriv</span></code>
</p></dd>
<dt><span class="term"><code class="computeroutput"><span class="identifier">t</span></code></span></dt>
<dd><p>
Object of type <code class="computeroutput"><span class="identifier">Time</span></code>
</p></dd>
</dl>
</div>
<h5>
<a name="boost_numeric_odeint.concepts.system.h2"></a>
<span><a name="boost_numeric_odeint.concepts.system.valid_expressions"></a></span><a class="link" href="system.html#boost_numeric_odeint.concepts.system.valid_expressions">Valid expressions</a>
</h5>
<div class="informaltable"><table class="table">
<colgroup>
<col>
<col>
<col>
<col>
</colgroup>
<thead><tr>
<th>
<p>
Name
</p>
</th>
<th>
<p>
Expression
</p>
</th>
<th>
<p>
Type
</p>
</th>
<th>
<p>
Semantics
</p>
</th>
</tr></thead>
<tbody><tr>
<td>
<p>
Calculate <span class="emphasis"><em>dx/dt := f(x,t)</em></span>
</p>
</td>
<td>
<p>
<code class="computeroutput"><span class="identifier">sys</span><span class="special">(</span>
<span class="identifier">x</span> <span class="special">,</span>
<span class="identifier">dxdt</span> <span class="special">,</span>
<span class="identifier">t</span> <span class="special">)</span></code>
</p>
</td>
<td>
<p>
<code class="computeroutput"><span class="keyword">void</span></code>
</p>
</td>
<td>
<p>
Calculates f(x,t), the result is stored into dxdt
</p>
</td>
</tr></tbody>
</table></div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright &#169; 2009-2011 Karsten Ahnert
and Mario Mulansky<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
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>)
</p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="../concepts.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../concepts.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="symplectic_system.html"><img src="../../images/next.png" alt="Next"></a>
</div>
</body>
</html>

View File

@ -1,42 +0,0 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Getting started</title>
<link rel="stylesheet" href="../boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
<link rel="home" href="../index.html" title="Chapter&#160;1.&#160;Boost.Numeric.Odeint">
<link rel="up" href="../index.html" title="Chapter&#160;1.&#160;Boost.Numeric.Odeint">
<link rel="prev" href="../index.html" title="Chapter&#160;1.&#160;Boost.Numeric.Odeint">
<link rel="next" href="getting_started/overview.html" title="Overview">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<div class="spirit-nav">
<a accesskey="p" href="../index.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="getting_started/overview.html"><img src="../images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="boost_numeric_odeint.getting_started"></a><a class="link" href="getting_started.html" title="Getting started">Getting started</a>
</h2></div></div></div>
<div class="toc"><dl>
<dt><span class="section"><a href="getting_started/overview.html">Overview</a></span></dt>
<dt><span class="section"><a href="getting_started/usage__compilation__headers.html">Usage,
Compilation, Headers</a></span></dt>
<dt><span class="section"><a href="getting_started/short_example.html">Short
Example</a></span></dt>
</dl></div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright &#169; 2009-2011 Karsten Ahnert
and Mario Mulansky<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
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>)
</p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="../index.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="getting_started/overview.html"><img src="../images/next.png" alt="Next"></a>
</div>
</body>
</html>

File diff suppressed because it is too large Load Diff

View File

@ -1,200 +0,0 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Short Example</title>
<link rel="stylesheet" href="../../boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
<link rel="home" href="../../index.html" title="Chapter&#160;1.&#160;Boost.Numeric.Odeint">
<link rel="up" href="../getting_started.html" title="Getting started">
<link rel="prev" href="usage__compilation__headers.html" title="Usage, Compilation, Headers">
<link rel="next" href="../tutorial.html" title="Tutorial">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<div class="spirit-nav">
<a accesskey="p" href="usage__compilation__headers.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../getting_started.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="../tutorial.html"><img src="../../images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h3 class="title">
<a name="boost_numeric_odeint.getting_started.short_example"></a><a class="link" href="short_example.html" title="Short Example">Short
Example</a>
</h3></div></div></div>
<p>
Imaging, you want to numerically integrate a harmonic oscillator with friction.
The equations of motion are given by <span class="emphasis"><em>x'' = -x + &#947; x'</em></span>.
Odeint only deals with first order ODEs that have no higher derivatives than
x' involved. However, any higher order ODE can be transformed to a system
of first order ODEs by introducing the new variables <span class="emphasis"><em>q=x</em></span>
and <span class="emphasis"><em>p=x'</em></span> such that <span class="emphasis"><em>w=(q,p)</em></span>. To
apply numerical integration one first has to design the right hand side of
the equation <span class="emphasis"><em>w' = f(w) = (p,-q+&#947; p)</em></span>:
</p>
<p>
</p>
<pre class="programlisting"><span class="comment">/* The type of container used to hold the state vector */</span>
<span class="keyword">typedef</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special">&lt;</span> <span class="keyword">double</span> <span class="special">&gt;</span> <span class="identifier">state_type</span><span class="special">;</span>
<span class="keyword">const</span> <span class="keyword">double</span> <span class="identifier">gam</span> <span class="special">=</span> <span class="number">0.15</span><span class="special">;</span>
<span class="comment">/* The rhs of x' = f(x) */</span>
<span class="keyword">void</span> <span class="identifier">harmonic_oscillator</span><span class="special">(</span> <span class="keyword">const</span> <span class="identifier">state_type</span> <span class="special">&amp;</span><span class="identifier">x</span> <span class="special">,</span> <span class="identifier">state_type</span> <span class="special">&amp;</span><span class="identifier">dxdt</span> <span class="special">,</span> <span class="keyword">const</span> <span class="keyword">double</span> <span class="comment">/* t */</span> <span class="special">)</span>
<span class="special">{</span>
<span class="identifier">dxdt</span><span class="special">[</span><span class="number">0</span><span class="special">]</span> <span class="special">=</span> <span class="identifier">x</span><span class="special">[</span><span class="number">1</span><span class="special">];</span>
<span class="identifier">dxdt</span><span class="special">[</span><span class="number">1</span><span class="special">]</span> <span class="special">=</span> <span class="special">-</span><span class="identifier">x</span><span class="special">[</span><span class="number">0</span><span class="special">]</span> <span class="special">-</span> <span class="identifier">gam</span><span class="special">*</span><span class="identifier">x</span><span class="special">[</span><span class="number">1</span><span class="special">];</span>
<span class="special">}</span>
</pre>
<p>
</p>
<p>
Here we chose <code class="computeroutput"><span class="identifier">vector</span><span class="special">&lt;</span><span class="keyword">double</span><span class="special">&gt;</span></code>
as the state type, but others are also possible, for example <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">array</span><span class="special">&lt;</span><span class="keyword">double</span><span class="special">,</span><span class="number">2</span><span class="special">&gt;</span></code>. odeint is designed in such a way that
you can easily use your own state types. Next, the ODE is defined which is
in this case a simple function calculating <span class="emphasis"><em>f(x)'</em></span>. The
parameter signature of this function is crucial: the integration methods
will always call them in the form <code class="computeroutput"><span class="identifier">f</span><span class="special">(</span><span class="identifier">x</span><span class="special">,</span>
<span class="identifier">dxdt</span><span class="special">,</span>
<span class="identifier">t</span><span class="special">)</span></code>
(there are exceptions for some special routines). So, even if there is no
explicit time dependence, one has to define <code class="computeroutput"><span class="identifier">t</span></code>
as a function parameter.
</p>
<p>
Now, we have to define the initial state from which the integration should
start:
</p>
<p>
</p>
<pre class="programlisting"><span class="identifier">state_type</span> <span class="identifier">x</span><span class="special">(</span><span class="number">2</span><span class="special">);</span>
<span class="identifier">x</span><span class="special">[</span><span class="number">0</span><span class="special">]</span> <span class="special">=</span> <span class="number">1.0</span><span class="special">;</span> <span class="comment">// start at x=1.0, p=0.0</span>
<span class="identifier">x</span><span class="special">[</span><span class="number">1</span><span class="special">]</span> <span class="special">=</span> <span class="number">0.0</span><span class="special">;</span>
</pre>
<p>
</p>
<p>
For the integration itself we'll use the <code class="computeroutput">integrate</code>
function, which is a convenient way to get quick results. It is based on
the error-controlled <code class="computeroutput">runge_kutta_rk5_ck</code>
stepper (5th order) and uses adaptive step-size.
</p>
<p>
</p>
<pre class="programlisting"><span class="identifier">size_t</span> <span class="identifier">steps</span> <span class="special">=</span> <span class="identifier">integrate</span><span class="special">(</span> <span class="identifier">harmonic_oscillator</span> <span class="special">,</span>
<span class="identifier">x</span> <span class="special">,</span> <span class="number">0.0</span> <span class="special">,</span> <span class="number">10.0</span> <span class="special">,</span> <span class="number">0.1</span> <span class="special">);</span>
</pre>
<p>
</p>
<p>
The integrate function expects as parameters the rhs of the ode as defined
above, the initial state <code class="computeroutput"><span class="identifier">x</span></code>,
the start-and end-time of the integration as well as the initial time step=size.
Note, that <code class="computeroutput">integrate</code>
uses an adaptive step-size during the integration steps so the time points
will not be equally spaced. The integration returns the number of steps that
were applied and updates x which is set to the approximate solution of the
ODE at the end of integration.
</p>
<p>
It is, of course, also possible to represent the ode system as a class. The
rhs must then be implemented as a functor having defined the ()-operator:
</p>
<p>
</p>
<pre class="programlisting"><span class="comment">/* The rhs of x' = f(x) defined as a class */</span>
<span class="keyword">class</span> <span class="identifier">harm_osc</span> <span class="special">{</span>
<span class="keyword">double</span> <span class="identifier">m_gam</span><span class="special">;</span>
<span class="keyword">public</span><span class="special">:</span>
<span class="identifier">harm_osc</span><span class="special">(</span> <span class="keyword">double</span> <span class="identifier">gam</span> <span class="special">)</span> <span class="special">:</span> <span class="identifier">m_gam</span><span class="special">(</span><span class="identifier">gam</span><span class="special">)</span> <span class="special">{</span> <span class="special">}</span>
<span class="keyword">void</span> <span class="keyword">operator</span><span class="special">()</span> <span class="special">(</span> <span class="keyword">const</span> <span class="identifier">state_type</span> <span class="special">&amp;</span><span class="identifier">x</span> <span class="special">,</span> <span class="identifier">state_type</span> <span class="special">&amp;</span><span class="identifier">dxdt</span> <span class="special">,</span> <span class="keyword">const</span> <span class="keyword">double</span> <span class="comment">/* t */</span> <span class="special">)</span>
<span class="special">{</span>
<span class="identifier">dxdt</span><span class="special">[</span><span class="number">0</span><span class="special">]</span> <span class="special">=</span> <span class="identifier">x</span><span class="special">[</span><span class="number">1</span><span class="special">];</span>
<span class="identifier">dxdt</span><span class="special">[</span><span class="number">1</span><span class="special">]</span> <span class="special">=</span> <span class="special">-</span><span class="identifier">x</span><span class="special">[</span><span class="number">0</span><span class="special">]</span> <span class="special">-</span> <span class="identifier">m_gam</span><span class="special">*</span><span class="identifier">x</span><span class="special">[</span><span class="number">1</span><span class="special">];</span>
<span class="special">}</span>
<span class="special">};</span>
</pre>
<p>
</p>
<p>
which can be used via
</p>
<p>
</p>
<pre class="programlisting"><span class="identifier">harm_osc</span> <span class="identifier">ho</span><span class="special">(</span><span class="number">0.15</span><span class="special">);</span>
<span class="identifier">steps</span> <span class="special">=</span> <span class="identifier">integrate</span><span class="special">(</span> <span class="identifier">ho</span> <span class="special">,</span>
<span class="identifier">x</span> <span class="special">,</span> <span class="number">0.0</span> <span class="special">,</span> <span class="number">10.0</span> <span class="special">,</span> <span class="number">0.1</span> <span class="special">);</span>
</pre>
<p>
</p>
<p>
You surely have already noticed that during the integration a lot of steps
had to be done. You might wonder if you could access them do observe the
solution during the iteration. Yes, this is possible, of course. All you
have to do is to provide a reasonable observer. An example is
</p>
<p>
</p>
<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">push_back_state_and_time</span>
<span class="special">{</span>
<span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special">&lt;</span> <span class="identifier">state_type</span> <span class="special">&gt;&amp;</span> <span class="identifier">m_states</span><span class="special">;</span>
<span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special">&lt;</span> <span class="keyword">double</span> <span class="special">&gt;&amp;</span> <span class="identifier">m_times</span><span class="special">;</span>
<span class="identifier">push_back_state_and_time</span><span class="special">(</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special">&lt;</span> <span class="identifier">state_type</span> <span class="special">&gt;</span> <span class="special">&amp;</span><span class="identifier">states</span> <span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special">&lt;</span> <span class="keyword">double</span> <span class="special">&gt;</span> <span class="special">&amp;</span><span class="identifier">times</span> <span class="special">)</span>
<span class="special">:</span> <span class="identifier">m_states</span><span class="special">(</span> <span class="identifier">states</span> <span class="special">)</span> <span class="special">,</span> <span class="identifier">m_times</span><span class="special">(</span> <span class="identifier">times</span> <span class="special">)</span> <span class="special">{</span> <span class="special">}</span>
<span class="keyword">void</span> <span class="keyword">operator</span><span class="special">()(</span> <span class="keyword">const</span> <span class="identifier">state_type</span> <span class="special">&amp;</span><span class="identifier">x</span> <span class="special">,</span> <span class="keyword">double</span> <span class="identifier">t</span> <span class="special">)</span>
<span class="special">{</span>
<span class="identifier">m_states</span><span class="special">.</span><span class="identifier">push_back</span><span class="special">(</span> <span class="identifier">x</span> <span class="special">);</span>
<span class="identifier">m_times</span><span class="special">.</span><span class="identifier">push_back</span><span class="special">(</span> <span class="identifier">t</span> <span class="special">);</span>
<span class="special">}</span>
<span class="special">};</span>
</pre>
<p>
</p>
<p>
which stores the intermediate steps in a container. Note, the argument structure
of the ()-operator: odeint calls the observer exactly in this way, providing
the current state and time. Now, you only have to pass this container to
the integration function:
</p>
<p>
</p>
<pre class="programlisting"><span class="identifier">vector</span><span class="special">&lt;</span><span class="identifier">state_type</span><span class="special">&gt;</span> <span class="identifier">x_vec</span><span class="special">;</span>
<span class="identifier">vector</span><span class="special">&lt;</span><span class="keyword">double</span><span class="special">&gt;</span> <span class="identifier">times</span><span class="special">;</span>
<span class="identifier">steps</span> <span class="special">=</span> <span class="identifier">integrate</span><span class="special">(</span> <span class="identifier">harmonic_oscillator</span> <span class="special">,</span>
<span class="identifier">x</span> <span class="special">,</span> <span class="number">0.0</span> <span class="special">,</span> <span class="number">10.0</span> <span class="special">,</span> <span class="number">0.1</span> <span class="special">,</span>
<span class="identifier">push_back_state_and_time</span><span class="special">(</span> <span class="identifier">x_vec</span> <span class="special">,</span> <span class="identifier">times</span> <span class="special">)</span> <span class="special">);</span>
<span class="comment">/* output */</span>
<span class="keyword">for</span><span class="special">(</span> <span class="identifier">size_t</span> <span class="identifier">i</span><span class="special">=</span><span class="number">0</span><span class="special">;</span> <span class="identifier">i</span><span class="special">&lt;=</span><span class="identifier">steps</span><span class="special">;</span> <span class="identifier">i</span><span class="special">++</span> <span class="special">)</span>
<span class="special">{</span>
<span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">times</span><span class="special">[</span><span class="identifier">i</span><span class="special">]</span> <span class="special">&lt;&lt;</span> <span class="char">'\t'</span> <span class="special">&lt;&lt;</span> <span class="identifier">x_vec</span><span class="special">[</span><span class="identifier">i</span><span class="special">][</span><span class="number">0</span><span class="special">]</span> <span class="special">&lt;&lt;</span> <span class="char">'\t'</span> <span class="special">&lt;&lt;</span> <span class="identifier">x_vec</span><span class="special">[</span><span class="identifier">i</span><span class="special">][</span><span class="number">1</span><span class="special">]</span> <span class="special">&lt;&lt;</span> <span class="char">'\n'</span><span class="special">;</span>
<span class="special">}</span>
</pre>
<p>
</p>
<p>
That is all. Of course, you can use functional libraries like <a href="http://www.boost.org/doc/libs/release/doc/html/lambda.html" target="_top">Boost.Lambda</a>
or <a href="http://www.boost.org/doc/libs/1_46_1/libs/spirit/phoenix/doc/html/index.html" target="_top">Boost.Phoenix</a>
to ease the creation of observer functions.
</p>
<p>
The full cpp file for this example can be found here: <a href="../../../../examples/harmonic_oscillator.cpp" target="_top">../../examples/harmonic_oscillator.cpp</a>
</p>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright &#169; 2009-2011 Karsten Ahnert
and Mario Mulansky<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
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>)
</p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="usage__compilation__headers.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../getting_started.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="../tutorial.html"><img src="../../images/next.png" alt="Next"></a>
</div>
</body>
</html>

View File

@ -1,52 +0,0 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Usage, Compilation, Headers</title>
<link rel="stylesheet" href="../../boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
<link rel="home" href="../../index.html" title="Chapter&#160;1.&#160;Boost.Numeric.Odeint">
<link rel="up" href="../getting_started.html" title="Getting started">
<link rel="prev" href="overview.html" title="Overview">
<link rel="next" href="short_example.html" title="Short Example">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<div class="spirit-nav">
<a accesskey="p" href="overview.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../getting_started.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="short_example.html"><img src="../../images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h3 class="title">
<a name="boost_numeric_odeint.getting_started.usage__compilation__headers"></a><a class="link" href="usage__compilation__headers.html" title="Usage, Compilation, Headers">Usage,
Compilation, Headers</a>
</h3></div></div></div>
<p>
odeint is completely header-only, no linking against pre-compiled code is
required. It can be include by
</p>
<p>
</p>
<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">numeric</span><span class="special">/</span><span class="identifier">odeint</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
</pre>
<p>
which includes all headers of the library. All functions and classes from
odeint live in the namespace
</p>
<pre class="programlisting"><span class="keyword">using</span> <span class="keyword">namespace</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">numeric</span><span class="special">::</span><span class="identifier">odeint</span><span class="special">;</span>
</pre>
<p>
</p>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright &#169; 2009-2011 Karsten Ahnert
and Mario Mulansky<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
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>)
</p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="overview.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../getting_started.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="short_example.html"><img src="../../images/next.png" alt="Next"></a>
</div>
</body>
</html>

View File

@ -1,49 +0,0 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>odeint in detail</title>
<link rel="stylesheet" href="../boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
<link rel="home" href="../index.html" title="Chapter&#160;1.&#160;Boost.Numeric.Odeint">
<link rel="up" href="../index.html" title="Chapter&#160;1.&#160;Boost.Numeric.Odeint">
<link rel="prev" href="tutorial/references.html" title="References">
<link rel="next" href="odeint_in_detail/steppers.html" title="Steppers">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<div class="spirit-nav">
<a accesskey="p" href="tutorial/references.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="odeint_in_detail/steppers.html"><img src="../images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="boost_numeric_odeint.odeint_in_detail"></a><a class="link" href="odeint_in_detail.html" title="odeint in detail">odeint in detail</a>
</h2></div></div></div>
<div class="toc"><dl>
<dt><span class="section"><a href="odeint_in_detail/steppers.html">Steppers</a></span></dt>
<dt><span class="section"><a href="odeint_in_detail/generation_functions.html">Generation
functions</a></span></dt>
<dt><span class="section"><a href="odeint_in_detail/integrate_functions.html">Integrate
functions</a></span></dt>
<dt><span class="section"><a href="odeint_in_detail/iterators.html">Iterators</a></span></dt>
<dt><span class="section"><a href="odeint_in_detail/state_types__algebras_and_operations.html">State
types, algebras and operations</a></span></dt>
<dt><span class="section"><a href="odeint_in_detail/using_boost__ref.html">Using
boost::ref</a></span></dt>
<dt><span class="section"><a href="odeint_in_detail/using_boost__range.html">Using
boost::range</a></span></dt>
</dl></div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright &#169; 2009-2011 Karsten Ahnert
and Mario Mulansky<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
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>)
</p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="tutorial/references.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="odeint_in_detail/steppers.html"><img src="../images/next.png" alt="Next"></a>
</div>
</body>
</html>

View File

@ -1,301 +0,0 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Generation functions</title>
<link rel="stylesheet" href="../../boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
<link rel="home" href="../../index.html" title="Chapter&#160;1.&#160;Boost.Numeric.Odeint">
<link rel="up" href="../odeint_in_detail.html" title="odeint in detail">
<link rel="prev" href="steppers.html" title="Steppers">
<link rel="next" href="integrate_functions.html" title="Integrate functions">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<div class="spirit-nav">
<a accesskey="p" href="steppers.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../odeint_in_detail.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="integrate_functions.html"><img src="../../images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h3 class="title">
<a name="boost_numeric_odeint.odeint_in_detail.generation_functions"></a><a class="link" href="generation_functions.html" title="Generation functions">Generation
functions</a>
</h3></div></div></div>
<p>
In the <a class="link" href="../tutorial.html" title="Tutorial">Tutorial</a> we have
learned how we can use the generation functions <code class="computeroutput"><span class="identifier">make_controlled</span></code>
and <code class="computeroutput"><span class="identifier">make_dense_output</span></code> to
create controlled and dense output stepper from a simple stepper or an error
stepper. The syntax of these two functions is very simple:
</p>
<p>
</p>
<pre class="programlisting"><span class="keyword">auto</span> <span class="identifier">stepper1</span> <span class="special">=</span> <span class="identifier">make_controlled</span><span class="special">(</span> <span class="number">1.0e-6</span> <span class="special">,</span> <span class="number">1.0e-6</span> <span class="special">,</span> <span class="identifier">stepper_type</span><span class="special">()</span> <span class="special">);</span>
<span class="keyword">auto</span> <span class="identifier">stepper2</span> <span class="special">=</span> <span class="identifier">make_dense_output</span><span class="special">(</span> <span class="number">1.0e-6</span> <span class="special">,</span> <span class="number">1.0e-6</span> <span class="special">,</span> <span class="identifier">stepper_type</span><span class="special">()</span> <span class="special">);</span>
</pre>
<p>
</p>
<p>
The first two parameters are the absolute and the relative error tolerances
and the third parameter is the stepper. In C++03 you can infer the type from
the <code class="computeroutput"><span class="identifier">result_of</span></code> mechanism:
</p>
<p>
</p>
<pre class="programlisting"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">numeric</span><span class="special">::</span><span class="identifier">odeint</span><span class="special">::</span><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">make_controlled</span><span class="special">&lt;</span> <span class="identifier">stepper_type</span> <span class="special">&gt;::</span><span class="identifier">type</span> <span class="identifier">stepper3</span> <span class="special">=</span> <span class="identifier">make_controlled</span><span class="special">(</span> <span class="number">1.0e-6</span> <span class="special">,</span> <span class="number">1.0e-6</span> <span class="special">,</span> <span class="identifier">stepper_type</span><span class="special">()</span> <span class="special">);</span>
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">numeric</span><span class="special">::</span><span class="identifier">odeint</span><span class="special">::</span><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">make_dense_output</span><span class="special">&lt;</span> <span class="identifier">stepper_type</span> <span class="special">&gt;::</span><span class="identifier">type</span> <span class="identifier">stepper4</span> <span class="special">=</span> <span class="identifier">make_dense_output</span><span class="special">(</span> <span class="number">1.0e-6</span> <span class="special">,</span> <span class="number">1.0e-6</span> <span class="special">,</span> <span class="identifier">stepper_type</span><span class="special">()</span> <span class="special">);</span>
</pre>
<p>
</p>
<p>
To use your own steppers with the <code class="computeroutput"><span class="identifier">make_controlled</span></code>
or <code class="computeroutput"><span class="identifier">make_dense_output</span></code> you
need to specialize two class templates. Suppose your steppers are called
<code class="computeroutput"><span class="identifier">custom_stepper</span></code>, <code class="computeroutput"><span class="identifier">custom_controller</span></code> and <code class="computeroutput"><span class="identifier">custom_dense_output</span></code>.
Then, the first class you need to specialize is <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">numeric</span><span class="special">::</span><span class="identifier">get_controller</span></code>,
a meta function returning the type of the controller:
</p>
<p>
</p>
<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">numeric</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">odeint</span> <span class="special">{</span>
<span class="keyword">template</span><span class="special">&lt;&gt;</span>
<span class="keyword">struct</span> <span class="identifier">get_controller</span><span class="special">&lt;</span> <span class="identifier">custom_stepper</span> <span class="special">&gt;</span>
<span class="special">{</span>
<span class="keyword">typedef</span> <span class="identifier">custom_controller</span> <span class="identifier">type</span><span class="special">;</span>
<span class="special">};</span>
<span class="special">}</span> <span class="special">}</span> <span class="special">}</span>
</pre>
<p>
</p>
<p>
The second one is a factory class <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">numeric</span><span class="special">::</span><span class="identifier">odeint</span><span class="special">::</span><span class="identifier">controller_factory</span></code>
which constructs the controller from the tolerances and the stepper. In our
dummy implementation this class is
</p>
<p>
</p>
<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">numeric</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">odeint</span> <span class="special">{</span>
<span class="keyword">template</span><span class="special">&lt;&gt;</span>
<span class="keyword">struct</span> <span class="identifier">controller_factory</span><span class="special">&lt;</span> <span class="identifier">custom_stepper</span> <span class="special">,</span> <span class="identifier">custom_controller</span> <span class="special">&gt;</span>
<span class="special">{</span>
<span class="identifier">custom_controller</span> <span class="keyword">operator</span><span class="special">()(</span> <span class="keyword">double</span> <span class="identifier">abs_tol</span> <span class="special">,</span> <span class="keyword">double</span> <span class="identifier">rel_tol</span> <span class="special">,</span> <span class="keyword">const</span> <span class="identifier">custom_stepper</span> <span class="special">&amp;</span> <span class="special">)</span> <span class="keyword">const</span>
<span class="special">{</span>
<span class="keyword">return</span> <span class="identifier">custom_controller</span><span class="special">();</span>
<span class="special">}</span>
<span class="special">};</span>
<span class="special">}</span> <span class="special">}</span> <span class="special">}</span>
</pre>
<p>
</p>
<p>
This is all to use the <code class="computeroutput"><span class="identifier">make_controlled</span></code>
mechanism. Now you can use your controller via
</p>
<p>
</p>
<pre class="programlisting"><span class="keyword">auto</span> <span class="identifier">stepper5</span> <span class="special">=</span> <span class="identifier">make_controlled</span><span class="special">(</span> <span class="number">1.0e-6</span> <span class="special">,</span> <span class="number">1.0e-6</span> <span class="special">,</span> <span class="identifier">custom_stepper</span><span class="special">()</span> <span class="special">);</span>
</pre>
<p>
</p>
<p>
For the dense_output_stepper everything works similar. Here you have to specialize
<code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">numeric</span><span class="special">::</span><span class="identifier">odeint</span><span class="special">::</span><span class="identifier">get_dense_output</span></code> and <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">numeric</span><span class="special">::</span><span class="identifier">odeint</span><span class="special">::</span><span class="identifier">dense_output_factory</span></code>.
These two classes have the same syntax as their relatives <code class="computeroutput"><span class="identifier">get_controller</span></code>
and <code class="computeroutput"><span class="identifier">controller_factory</span></code>.
</p>
<p>
Of course, all controllers and dense-output steppers in odeint can be used
with these mechanisms. In the table below you will find, which steppers is
constructed from <code class="computeroutput"><span class="identifier">make_controlled</span></code>
or <code class="computeroutput"><span class="identifier">make_dense_output</span></code> if applied
on a stepper from odeint:
</p>
<div class="table">
<a name="boost_numeric_odeint.odeint_in_detail.generation_functions.generation_functions_make_controlled__abs_error___rel_error___stepper__"></a><p class="title"><b>Table&#160;1.8.&#160;Generation functions make_controlled( abs_error , rel_error , stepper
)</b></p>
<div class="table-contents"><table class="table" summary="Generation functions make_controlled( abs_error , rel_error , stepper
)">
<colgroup>
<col>
<col>
<col>
</colgroup>
<thead><tr>
<th>
<p>
Stepper
</p>
</th>
<th>
<p>
Result of make_controlled
</p>
</th>
<th>
<p>
Remarks
</p>
</th>
</tr></thead>
<tbody>
<tr>
<td>
<p>
<code class="computeroutput"><span class="identifier">runge_kutta_cash_karp54</span></code>
</p>
</td>
<td>
<p>
<code class="computeroutput"><span class="identifier">controlled_runge_kutta</span><span class="special">&lt;</span> <span class="identifier">runge_kutta_cash_karp54</span>
<span class="special">,</span> <span class="identifier">default_error_checker</span><span class="special">&lt;...&gt;</span> <span class="special">&gt;</span></code>
</p>
</td>
<td>
<p>
<span class="emphasis"><em>a<sub>x</sub>=1</em></span>, <span class="emphasis"><em>a<sub>dxdt</sub>=1</em></span>
</p>
</td>
</tr>
<tr>
<td>
<p>
<code class="computeroutput"><span class="identifier">runge_kutta_fehlberg78</span></code>
</p>
</td>
<td>
<p>
<code class="computeroutput"><span class="identifier">controlled_runge_kutta</span><span class="special">&lt;</span> <span class="identifier">runge_kutta_fehlberg78</span>
<span class="special">,</span> <span class="identifier">default_error_checker</span><span class="special">&lt;...&gt;</span> <span class="special">&gt;</span></code>
</p>
</td>
<td>
<p>
<span class="emphasis"><em>a<sub>x</sub>=1</em></span>, <span class="emphasis"><em>a<sub>dxdt</sub>=1</em></span>
</p>
</td>
</tr>
<tr>
<td>
<p>
<code class="computeroutput"><span class="identifier">runge_kutta_dopri5</span></code>
</p>
</td>
<td>
<p>
<code class="computeroutput"><span class="identifier">controlled_runge_kutta</span><span class="special">&lt;</span> <span class="identifier">runge_kutta_dopri5</span>
<span class="special">,</span> <span class="identifier">default_error_checker</span><span class="special">&lt;...&gt;</span> <span class="special">&gt;</span></code>
</p>
</td>
<td>
<p>
<span class="emphasis"><em>a <sub>x</sub>=1</em></span>, <span class="emphasis"><em>a<sub>dxdt</sub>=1</em></span>
</p>
</td>
</tr>
<tr>
<td>
<p>
<code class="computeroutput"><span class="identifier">rosenbrock4</span></code>
</p>
</td>
<td>
<p>
<code class="computeroutput"><span class="identifier">rosenbrock4_controlled</span><span class="special">&lt;</span> <span class="identifier">rosenbrock4</span>
<span class="special">&gt;</span></code>
</p>
</td>
<td>
<p>
-
</p>
</td>
</tr>
</tbody>
</table></div>
</div>
<br class="table-break"><div class="table">
<a name="boost_numeric_odeint.odeint_in_detail.generation_functions.generation_functions_make_dense_output__abs_error___rel_error___stepper__"></a><p class="title"><b>Table&#160;1.9.&#160;Generation functions make_dense_output( abs_error , rel_error , stepper
)</b></p>
<div class="table-contents"><table class="table" summary="Generation functions make_dense_output( abs_error , rel_error , stepper
)">
<colgroup>
<col>
<col>
<col>
</colgroup>
<thead><tr>
<th>
<p>
Stepper
</p>
</th>
<th>
<p>
Result of make_dense_output
</p>
</th>
<th>
<p>
Remarks
</p>
</th>
</tr></thead>
<tbody>
<tr>
<td>
<p>
<code class="computeroutput"><span class="identifier">runge_kutta_dopri5</span></code>
</p>
</td>
<td>
<p>
<code class="computeroutput"><span class="identifier">dense_output_runge_kutta</span><span class="special">&lt;</span> <span class="identifier">controlled_runge_kutta</span><span class="special">&lt;</span> <span class="identifier">runge_kutta_dopri5</span>
<span class="special">,</span> <span class="identifier">default_error_checker</span><span class="special">&lt;...&gt;</span> <span class="special">&gt;</span>
<span class="special">&gt;</span></code>
</p>
</td>
<td>
<p>
<span class="emphasis"><em>a <sub>x</sub>=1</em></span>, <span class="emphasis"><em>a<sub>dxdt</sub>=1</em></span>
</p>
</td>
</tr>
<tr>
<td>
<p>
<code class="computeroutput"><span class="identifier">rosenbrock4</span></code>
</p>
</td>
<td>
<p>
<code class="computeroutput"><span class="identifier">rosenbrock4_dense_output</span><span class="special">&lt;</span> <span class="identifier">rosenbrock4_controller</span><span class="special">&lt;</span> <span class="identifier">rosenbrock4</span>
<span class="special">&gt;</span> <span class="special">&gt;</span></code>
</p>
</td>
<td>
<p>
-
</p>
</td>
</tr>
</tbody>
</table></div>
</div>
<br class="table-break">
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright &#169; 2009-2011 Karsten Ahnert
and Mario Mulansky<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
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>)
</p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="steppers.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../odeint_in_detail.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="integrate_functions.html"><img src="../../images/next.png" alt="Next"></a>
</div>
</body>
</html>

View File

@ -1,340 +0,0 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Integrate functions</title>
<link rel="stylesheet" href="../../boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
<link rel="home" href="../../index.html" title="Chapter&#160;1.&#160;Boost.Numeric.Odeint">
<link rel="up" href="../odeint_in_detail.html" title="odeint in detail">
<link rel="prev" href="generation_functions.html" title="Generation functions">
<link rel="next" href="iterators.html" title="Iterators">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<div class="spirit-nav">
<a accesskey="p" href="generation_functions.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../odeint_in_detail.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="iterators.html"><img src="../../images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h3 class="title">
<a name="boost_numeric_odeint.odeint_in_detail.integrate_functions"></a><a class="link" href="integrate_functions.html" title="Integrate functions">Integrate
functions</a>
</h3></div></div></div>
<p>
Integrate functions perform the time evolution of a given ODE from some starting
time <span class="emphasis"><em>t<sub>0</sub></em></span> to a given end time <span class="emphasis"><em>t<sub>1</sub></em></span>
and starting at state <span class="emphasis"><em>x<sub>0</sub></em></span> by subsequent calls of a given
stepper's <code class="computeroutput"><span class="identifier">do_step</span></code> function.
Additionally, the user can provide an __observer to analyze the state during
time evolution. There are five different integrate functions which have different
strategies on when to call the observer function during integration. All
of the integrate functions except <code class="computeroutput"><span class="identifier">integrate_n_steps</span></code>
can be called with any stepper following one of the stepper concepts: <a class="link" href="../concepts/stepper.html" title="Stepper">Stepper</a> , <a class="link" href="../concepts/error_stepper.html" title="Error Stepper">Error
Stepper</a> , <a class="link" href="../concepts/controlled_stepper.html" title="Controlled Stepper">Controlled
Stepper</a> , <a class="link" href="../concepts/dense_output_stepper.html" title="Dense Output Stepper">Dense
Output Stepper</a>. Depending on the abilities of the stepper, the integrate
functions make use of step-size control or dense output.
</p>
<h5>
<a name="boost_numeric_odeint.odeint_in_detail.integrate_functions.h0"></a>
<span><a name="boost_numeric_odeint.odeint_in_detail.integrate_functions.equidistant_observer_calls"></a></span><a class="link" href="integrate_functions.html#boost_numeric_odeint.odeint_in_detail.integrate_functions.equidistant_observer_calls">Equidistant
observer calls</a>
</h5>
<p>
If observer calls at equidistant time intervals <span class="emphasis"><em>dt</em></span> are
needed, the <code class="computeroutput"><span class="identifier">integrate_const</span></code>
or <code class="computeroutput"><span class="identifier">integrate_n_steps</span></code> function
should be used. We start with explaining <code class="computeroutput"><span class="identifier">integrate_const</span></code>:
</p>
<p>
<code class="computeroutput"><span class="identifier">integrate_const</span><span class="special">(</span>
<span class="identifier">stepper</span> <span class="special">,</span>
<span class="identifier">system</span> <span class="special">,</span>
<span class="identifier">x0</span> <span class="special">,</span>
<span class="identifier">t0</span> <span class="special">,</span>
<span class="identifier">t1</span> <span class="special">,</span>
<span class="identifier">dt</span> <span class="special">)</span></code>
</p>
<p>
<code class="computeroutput"><span class="identifier">integrate_const</span><span class="special">(</span>
<span class="identifier">stepper</span> <span class="special">,</span>
<span class="identifier">system</span> <span class="special">,</span>
<span class="identifier">x0</span> <span class="special">,</span>
<span class="identifier">t0</span> <span class="special">,</span>
<span class="identifier">t1</span> <span class="special">,</span>
<span class="identifier">dt</span> <span class="special">,</span>
<span class="identifier">observer</span> <span class="special">)</span></code>
</p>
<p>
These integrate the ODE given by <code class="computeroutput"><span class="identifier">system</span></code>
with subsequent steps from <code class="computeroutput"><span class="identifier">stepper</span></code>.
Integration start at <code class="computeroutput"><span class="identifier">t0</span></code> and
<code class="computeroutput"><span class="identifier">x0</span></code> and ends at some <span class="emphasis"><em>t'
= t<sub>0</sub> + n dt</em></span> with <span class="emphasis"><em>n</em></span> such that <span class="emphasis"><em>t<sub>1</sub> -
dt &lt; t' &lt;= t<sub>1</sub></em></span>. <code class="computeroutput"><span class="identifier">x0</span></code>
is changed to the approximative solution <span class="emphasis"><em>x(t')</em></span> at the
end of integration. If provided, the <code class="computeroutput"><span class="identifier">observer</span></code>
is invoked at times <span class="emphasis"><em>t<sub>0</sub></em></span>, <span class="emphasis"><em>t<sub>0</sub> + dt</em></span>,
<span class="emphasis"><em>t<sub>0</sub> + 2dt</em></span>, ... ,<span class="emphasis"><em>t'</em></span>. <code class="computeroutput"><span class="identifier">integrate_const</span></code> returns the number of steps
performed during the integration. Note that if you are using a simple <a class="link" href="../concepts/stepper.html" title="Stepper">Stepper</a> or <a class="link" href="../concepts/error_stepper.html" title="Error Stepper">Error
Stepper</a> and want to make exactly <code class="computeroutput"><span class="identifier">n</span></code>
steps you should prefer the <code class="computeroutput"><span class="identifier">integrate_n_steps</span></code>
function below.
</p>
<div class="itemizedlist"><ul class="itemizedlist" type="disc">
<li class="listitem">
If <code class="computeroutput"><span class="identifier">stepper</span></code> is a <a class="link" href="../concepts/stepper.html" title="Stepper">Stepper</a> or <a class="link" href="../concepts/error_stepper.html" title="Error Stepper">Error Stepper</a>
then <code class="computeroutput"><span class="identifier">dt</span></code> is also the step
size used for integration and the observer is called just after every
step.
</li>
<li class="listitem">
If <code class="computeroutput"><span class="identifier">stepper</span></code> is a <a class="link" href="../concepts/controlled_stepper.html" title="Controlled Stepper">Controlled
Stepper</a> then <code class="computeroutput"><span class="identifier">dt</span></code>
is the initial step size. The actual step size will change due to error
control during time evolution. However, if an observer is provided the
step size will be adjusted such that the algorithm always calculates
<span class="emphasis"><em>x(t)</em></span> at <span class="emphasis"><em>t = t<sub>0</sub> + n dt</em></span> and calls
the observer at that point. Note that the use of <a class="link" href="../concepts/controlled_stepper.html" title="Controlled Stepper">Controlled
Stepper</a> is reasonable here only if <code class="computeroutput"><span class="identifier">dt</span></code>
is considerably larger than typical step sizes used by the stepper.
</li>
<li class="listitem">
If <code class="computeroutput"><span class="identifier">stepper</span></code> is a <a class="link" href="../concepts/dense_output_stepper.html" title="Dense Output Stepper">Dense Output
Stepper</a> then <code class="computeroutput"><span class="identifier">dt</span></code>
is the initial step size. The actual step size will be adjusted during
integration due to error control. If an observer is provided dense output
is used to calculate <span class="emphasis"><em>x(t)</em></span> at <span class="emphasis"><em>t = t<sub>0</sub> + n
dt</em></span>.
</li>
</ul></div>
<h5>
<a name="boost_numeric_odeint.odeint_in_detail.integrate_functions.h1"></a>
<span><a name="boost_numeric_odeint.odeint_in_detail.integrate_functions.integrate_a_given_number_of_steps"></a></span><a class="link" href="integrate_functions.html#boost_numeric_odeint.odeint_in_detail.integrate_functions.integrate_a_given_number_of_steps">Integrate
a given number of steps</a>
</h5>
<p>
This function is very similar to <code class="computeroutput"><span class="identifier">integrate_const</span></code>
above. The only difference is that it does not take the end time as parameter,
but rather the number of steps. The integration is then performed until the
time <code class="computeroutput"><span class="identifier">t0</span><span class="special">+</span><span class="identifier">n</span><span class="special">*</span><span class="identifier">dt</span></code>.
</p>
<p>
<code class="computeroutput"><span class="identifier">integrate_n_steps</span><span class="special">(</span>
<span class="identifier">stepper</span> <span class="special">,</span>
<span class="identifier">system</span> <span class="special">,</span>
<span class="identifier">x0</span> <span class="special">,</span>
<span class="identifier">t0</span> <span class="special">,</span>
<span class="identifier">dt</span> <span class="special">,</span>
<span class="identifier">n</span> <span class="special">)</span></code>
</p>
<p>
<code class="computeroutput"><span class="identifier">integrate_n_steps</span><span class="special">(</span>
<span class="identifier">stepper</span> <span class="special">,</span>
<span class="identifier">system</span> <span class="special">,</span>
<span class="identifier">x0</span> <span class="special">,</span>
<span class="identifier">t0</span> <span class="special">,</span>
<span class="identifier">dt</span> <span class="special">,</span>
<span class="identifier">n</span> <span class="special">,</span> <span class="identifier">observer</span> <span class="special">)</span></code>
</p>
<p>
Integrates the ODE given by <code class="computeroutput"><span class="identifier">system</span></code>
with subsequent steps from <code class="computeroutput"><span class="identifier">stepper</span></code>
starting at <span class="emphasis"><em>x<sub>0</sub></em></span> and <span class="emphasis"><em>t<sub>0</sub></em></span>. If provided,
<code class="computeroutput"><span class="identifier">observer</span></code> is called after
every step and at the beginning with <code class="computeroutput"><span class="identifier">t0</span></code>,
similar as above. The approximate result for <span class="emphasis"><em>x( t<sub>0</sub> + n dt )</em></span>
is stored in <code class="computeroutput"><span class="identifier">x0</span></code>. This function
returns the end time <code class="computeroutput"><span class="identifier">t0</span> <span class="special">+</span> <span class="identifier">n</span><span class="special">*</span><span class="identifier">dt</span></code>.
</p>
<h5>
<a name="boost_numeric_odeint.odeint_in_detail.integrate_functions.h2"></a>
<span><a name="boost_numeric_odeint.odeint_in_detail.integrate_functions.observer_calls_at_each_step"></a></span><a class="link" href="integrate_functions.html#boost_numeric_odeint.odeint_in_detail.integrate_functions.observer_calls_at_each_step">Observer
calls at each step</a>
</h5>
<p>
If the observer should be called at each time step then the <code class="computeroutput"><span class="identifier">integrate_adaptive</span></code> function should be used.
Note that in the case of <a class="link" href="../concepts/controlled_stepper.html" title="Controlled Stepper">Controlled
Stepper</a> or <a class="link" href="../concepts/dense_output_stepper.html" title="Dense Output Stepper">Dense
Output Stepper</a> this leads to non-equidistant observer calls as the
step size changes.
</p>
<p>
<code class="computeroutput"><span class="identifier">integrate_adaptive</span><span class="special">(</span>
<span class="identifier">stepper</span> <span class="special">,</span>
<span class="identifier">system</span> <span class="special">,</span>
<span class="identifier">x0</span> <span class="special">,</span>
<span class="identifier">t0</span> <span class="special">,</span>
<span class="identifier">t1</span> <span class="special">,</span>
<span class="identifier">dt</span> <span class="special">)</span></code>
</p>
<p>
<code class="computeroutput"><span class="identifier">integrate_adaptive</span><span class="special">(</span>
<span class="identifier">stepper</span> <span class="special">,</span>
<span class="identifier">system</span> <span class="special">,</span>
<span class="identifier">x0</span> <span class="special">,</span>
<span class="identifier">t0</span> <span class="special">,</span>
<span class="identifier">t1</span> <span class="special">,</span>
<span class="identifier">dt</span> <span class="special">,</span>
<span class="identifier">observer</span> <span class="special">)</span></code>
</p>
<p>
Integrates the ODE given by <code class="computeroutput"><span class="identifier">system</span></code>
with subsequent steps from <code class="computeroutput"><span class="identifier">stepper</span></code>.
Integration start at <code class="computeroutput"><span class="identifier">t0</span></code> and
<code class="computeroutput"><span class="identifier">x0</span></code> and ends at <span class="emphasis"><em>t<sub>1</sub></em></span>.
<code class="computeroutput"><span class="identifier">x0</span></code> is changed to the approximative
solution <span class="emphasis"><em>x(t<sub>1</sub>)</em></span> at the end of integration. If provided,
the <code class="computeroutput"><span class="identifier">observer</span></code> is called after
each step (and before the first step at <code class="computeroutput"><span class="identifier">t0</span></code>).
<code class="computeroutput"><span class="identifier">integrate_adaptive</span></code> returns
the number of steps performed during the integration.
</p>
<div class="itemizedlist"><ul class="itemizedlist" type="disc">
<li class="listitem">
If <code class="computeroutput"><span class="identifier">stepper</span></code> is a <a class="link" href="../concepts/stepper.html" title="Stepper">Stepper</a> or <a class="link" href="../concepts/error_stepper.html" title="Error Stepper">Error Stepper</a>
then <code class="computeroutput"><span class="identifier">dt</span></code> is the step size
used for integration and <code class="computeroutput"><span class="identifier">integrate_adaptive</span></code>
behaves like <code class="computeroutput"><span class="identifier">integrate_const</span></code>
except that for the last step the step size is reduced to ensure we end
exactly at <code class="computeroutput"><span class="identifier">t1</span></code>. If provided,
the observer is called at each step.
</li>
<li class="listitem">
If <code class="computeroutput"><span class="identifier">stepper</span></code> is a <a class="link" href="../concepts/controlled_stepper.html" title="Controlled Stepper">Controlled
Stepper</a> then <code class="computeroutput"><span class="identifier">dt</span></code>
is the initial step size. The actual step size is changed according to
error control of the stepper. For the last step, the step size will be
reduced to ensure we end exactly at <code class="computeroutput"><span class="identifier">t1</span></code>.
If provided, the observer is called after each time step (and before
the first step at <code class="computeroutput"><span class="identifier">t0</span></code>).
</li>
<li class="listitem">
If stepper is a <a class="link" href="../concepts/dense_output_stepper.html" title="Dense Output Stepper">Dense
Output Stepper</a> then <code class="computeroutput"><span class="identifier">dt</span></code>
is the initial step size and <code class="computeroutput"><span class="identifier">integrate_adaptive</span></code>
behaves just like for <a class="link" href="../concepts/controlled_stepper.html" title="Controlled Stepper">Controlled
Stepper</a> above. No dense output is used.
</li>
</ul></div>
<h5>
<a name="boost_numeric_odeint.odeint_in_detail.integrate_functions.h3"></a>
<span><a name="boost_numeric_odeint.odeint_in_detail.integrate_functions.observer_calls_at_given_time_points"></a></span><a class="link" href="integrate_functions.html#boost_numeric_odeint.odeint_in_detail.integrate_functions.observer_calls_at_given_time_points">Observer
calls at given time points</a>
</h5>
<p>
If the observer should be called at some user given time points the <code class="computeroutput"><span class="identifier">integrate_times</span></code> function should be used.
The times for observer calls are provided as a sequence of time values. The
sequence is either defined via two iterators pointing to begin and end of
the sequence or in terms of a <a href="http://www.boost.org/doc/libs/release/libs/range/index.html" target="_top">Boost.Range</a>
object.
</p>
<p>
<code class="computeroutput"><span class="identifier">integrate_times</span><span class="special">(</span>
<span class="identifier">stepper</span> <span class="special">,</span>
<span class="identifier">system</span> <span class="special">,</span>
<span class="identifier">x0</span> <span class="special">,</span>
<span class="identifier">times_start</span> <span class="special">,</span>
<span class="identifier">times_end</span> <span class="special">,</span>
<span class="identifier">dt</span> <span class="special">,</span>
<span class="identifier">observer</span> <span class="special">)</span></code>
</p>
<p>
<code class="computeroutput"><span class="identifier">integrate_times</span><span class="special">(</span>
<span class="identifier">stepper</span> <span class="special">,</span>
<span class="identifier">system</span> <span class="special">,</span>
<span class="identifier">x0</span> <span class="special">,</span>
<span class="identifier">time_range</span> <span class="special">,</span>
<span class="identifier">dt</span> <span class="special">,</span>
<span class="identifier">observer</span> <span class="special">)</span></code>
</p>
<p>
Integrates the ODE given by <code class="computeroutput"><span class="identifier">system</span></code>
with subsequent steps from <code class="computeroutput"><span class="identifier">stepper</span></code>.
Integration starts at <code class="computeroutput"><span class="special">*</span><span class="identifier">times_start</span></code>
and ends exactly at <code class="computeroutput"><span class="special">*(</span><span class="identifier">times_end</span><span class="special">-</span><span class="number">1</span><span class="special">)</span></code>.
<code class="computeroutput"><span class="identifier">x0</span></code> contains the approximate
solution at the end point of integration. This function requires an observer
which is invoked at the subsequent times <code class="computeroutput"><span class="special">*</span><span class="identifier">times_start</span><span class="special">++</span></code>
until <code class="computeroutput"><span class="identifier">times_start</span> <span class="special">==</span>
<span class="identifier">times_end</span></code>. If called with a <a href="http://www.boost.org/doc/libs/release/libs/range/index.html" target="_top">Boost.Range</a>
<code class="computeroutput"><span class="identifier">time_range</span></code> the function behaves
the same with <code class="computeroutput"><span class="identifier">times_start</span> <span class="special">=</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">begin</span><span class="special">(</span> <span class="identifier">time_range</span>
<span class="special">)</span></code> and <code class="computeroutput"><span class="identifier">times_end</span>
<span class="special">=</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">end</span><span class="special">(</span>
<span class="identifier">time_range</span> <span class="special">)</span></code>.
<code class="computeroutput"><span class="identifier">integrate_times</span></code> returns the
number of steps performed during the integration.
</p>
<div class="itemizedlist"><ul class="itemizedlist" type="disc">
<li class="listitem">
If <code class="computeroutput"><span class="identifier">stepper</span></code> is a <a class="link" href="../concepts/stepper.html" title="Stepper">Stepper</a> or <a class="link" href="../concepts/error_stepper.html" title="Error Stepper">Error Stepper</a>
<code class="computeroutput"><span class="identifier">dt</span></code> is the step size used
for integration. However, whenever a time point from the sequence is
approached the step size <code class="computeroutput"><span class="identifier">dt</span></code>
will be reduced to obtain the state <span class="emphasis"><em>x(t)</em></span> exactly
at the time point.
</li>
<li class="listitem">
If <code class="computeroutput"><span class="identifier">stepper</span></code> is a <a class="link" href="../concepts/controlled_stepper.html" title="Controlled Stepper">Controlled
Stepper</a> then <code class="computeroutput"><span class="identifier">dt</span></code>
is the initial step size. The actual step size is adjusted during integration
according to error control. However, if a time point from the sequence
is approached the step size is reduced to obtain the state <span class="emphasis"><em>x(t)</em></span>
exactly at the time point.
</li>
<li class="listitem">
If <code class="computeroutput"><span class="identifier">stepper</span></code> is a <a class="link" href="../concepts/dense_output_stepper.html" title="Dense Output Stepper">Dense Output
Stepper</a> then <code class="computeroutput"><span class="identifier">dt</span></code>
is the initial step size. The actual step size is adjusted during integration
according to error control. Dense output is used to obtain the states
<span class="emphasis"><em>x(t)</em></span> at the time points from the sequence.
</li>
</ul></div>
<h5>
<a name="boost_numeric_odeint.odeint_in_detail.integrate_functions.h4"></a>
<span><a name="boost_numeric_odeint.odeint_in_detail.integrate_functions.convenience_integrate_function"></a></span><a class="link" href="integrate_functions.html#boost_numeric_odeint.odeint_in_detail.integrate_functions.convenience_integrate_function">Convenience
integrate function</a>
</h5>
<p>
Additionally to the sophisticated integrate function above odeint also provides
a simple <code class="computeroutput"><span class="identifier">integrate</span></code> routine
which uses a dense output stepper based on <code class="computeroutput"><span class="identifier">runge_kutta_dopri5</span></code>
with standard error bounds <span class="emphasis"><em>10<sup>-6</sup></em></span> for the steps.
</p>
<p>
<code class="computeroutput"><span class="identifier">integrate</span><span class="special">(</span>
<span class="identifier">system</span> <span class="special">,</span>
<span class="identifier">x0</span> <span class="special">,</span>
<span class="identifier">t0</span> <span class="special">,</span>
<span class="identifier">t1</span> <span class="special">,</span>
<span class="identifier">dt</span> <span class="special">)</span></code>
</p>
<p>
<code class="computeroutput"><span class="identifier">integrate</span><span class="special">(</span>
<span class="identifier">system</span> <span class="special">,</span>
<span class="identifier">x0</span> <span class="special">,</span>
<span class="identifier">t0</span> <span class="special">,</span>
<span class="identifier">t1</span> <span class="special">,</span>
<span class="identifier">dt</span> <span class="special">,</span>
<span class="identifier">observer</span> <span class="special">)</span></code>
</p>
<p>
This function behaves exactly like <code class="computeroutput"><span class="identifier">integrate_adaptive</span></code>
above but no stepper has to be provided. It also returns the number of steps
performed during the integration.
</p>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright &#169; 2009-2011 Karsten Ahnert
and Mario Mulansky<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
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>)
</p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="generation_functions.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../odeint_in_detail.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="iterators.html"><img src="../../images/next.png" alt="Next"></a>
</div>
</body>
</html>

File diff suppressed because it is too large Load Diff

View File

@ -1,246 +0,0 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Using boost::range</title>
<link rel="stylesheet" href="../../boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
<link rel="home" href="../../index.html" title="Chapter&#160;1.&#160;Boost.Numeric.Odeint">
<link rel="up" href="../odeint_in_detail.html" title="odeint in detail">
<link rel="prev" href="using_boost__ref.html" title="Using boost::ref">
<link rel="next" href="../concepts.html" title="Concepts">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<div class="spirit-nav">
<a accesskey="p" href="using_boost__ref.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../odeint_in_detail.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="../concepts.html"><img src="../../images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h3 class="title">
<a name="boost_numeric_odeint.odeint_in_detail.using_boost__range"></a><a class="link" href="using_boost__range.html" title="Using boost::range">Using
boost::range</a>
</h3></div></div></div>
<p>
Most steppers in odeint also accept the state give as a range. A range is
sequence of values modeled by a range concept. See <a href="http://www.boost.org/doc/libs/release/libs/range/index.html" target="_top">Boost.Range</a>
for an overview over existing concepts and examples of ranges. This means
that the <code class="computeroutput"><span class="identifier">state_type</span></code> of the
stepper must not necessarily be used to call the <code class="computeroutput"><span class="identifier">do_step</span></code>
method.
</p>
<p>
One use-case for <a href="http://www.boost.org/doc/libs/release/libs/range/index.html" target="_top">Boost.Range</a>
in odeint has been shown in <a class="link" href="../tutorial/chaotic_systems_and_lyapunov_exponents.html" title="Chaotic systems and Lyapunov exponents">Chaotic
System</a> where the state consists of two parts: one for the original
system and one for the perturbations. The ranges are used to initialize (solve)
only the system part where the perturbation part is not touched, that is
a range consisting only of the system part is used. After that the complete
state including the perturbations is solved.
</p>
<p>
Another use case is a system consisting of coupled units where you want to
initialize each unit separately with the ODE of the uncoupled unit. An example
is a chain of coupled van-der-Pol-oscillators which are initialized uniformly
from the uncoupled van-der-Pol-oscillator. Then you can use <a href="http://www.boost.org/doc/libs/release/libs/range/index.html" target="_top">Boost.Range</a>
to solve only one individual oscillator in the chain.
</p>
<p>
In short, you can <a href="http://www.boost.org/doc/libs/release/libs/range/index.html" target="_top">Boost.Range</a>
to use one state within two system functions which expect states with different
sizes.
</p>
<p>
An example was given in the <a class="link" href="../tutorial/chaotic_systems_and_lyapunov_exponents.html" title="Chaotic systems and Lyapunov exponents">Chaotic
System</a> tutorial. Using Boost.Range usually means that your system
function needs to adapt to the iterators of Boost.Range. That is, your function
is called with a range and you need to get the iterators from that range.
This can easily be done. You have to implement your system as a class or
a struct and you have to templatize the <code class="computeroutput"><span class="keyword">operator</span><span class="special">()</span></code>. Then you can use the <code class="computeroutput"><span class="identifier">range_iterator</span></code>-meta
function and <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">begin</span></code> and <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">end</span></code> to
obtain the iterators of your range:
</p>
<p>
</p>
<pre class="programlisting"><span class="keyword">class</span> <span class="identifier">sys</span>
<span class="special">{</span>
<span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">class</span> <span class="identifier">State</span> <span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Deriv</span> <span class="special">&gt;</span>
<span class="keyword">void</span> <span class="keyword">operator</span><span class="special">()(</span> <span class="keyword">const</span> <span class="identifier">State</span> <span class="special">&amp;</span><span class="identifier">x_</span> <span class="special">,</span> <span class="identifier">Deriv</span> <span class="special">&amp;</span><span class="identifier">dxdt_</span> <span class="special">,</span> <span class="keyword">double</span> <span class="identifier">t</span> <span class="special">)</span> <span class="keyword">const</span>
<span class="special">{</span>
<span class="keyword">typename</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">range_iterator</span><span class="special">&lt;</span> <span class="keyword">const</span> <span class="identifier">State</span> <span class="special">&gt;::</span><span class="identifier">type</span> <span class="identifier">x</span> <span class="special">=</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">begin</span><span class="special">(</span> <span class="identifier">x_</span> <span class="special">);</span>
<span class="keyword">typename</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">range_iterator</span><span class="special">&lt;</span> <span class="identifier">Deriv</span> <span class="special">&gt;::</span><span class="identifier">type</span> <span class="identifier">dxdt</span> <span class="special">=</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">begin</span><span class="special">(</span> <span class="identifier">dxdt_</span> <span class="special">);</span>
<span class="comment">// fill dxdt</span>
<span class="special">}</span>
<span class="special">};</span>
</pre>
<p>
</p>
<p>
If your range is a random access-range you can also apply the bracket operator
to the iterator to access the elements in the range:
</p>
<pre class="programlisting"><span class="keyword">class</span> <span class="identifier">sys</span>
<span class="special">{</span>
<span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">class</span> <span class="identifier">State</span> <span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Deriv</span> <span class="special">&gt;</span>
<span class="keyword">void</span> <span class="keyword">operator</span><span class="special">()(</span> <span class="keyword">const</span> <span class="identifier">State</span> <span class="special">&amp;</span><span class="identifier">x_</span> <span class="special">,</span> <span class="identifier">Deriv</span> <span class="special">&amp;</span><span class="identifier">dxdt_</span> <span class="special">,</span> <span class="keyword">double</span> <span class="identifier">t</span> <span class="special">)</span> <span class="keyword">const</span>
<span class="special">{</span>
<span class="keyword">typename</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">range_iterator</span><span class="special">&lt;</span> <span class="keyword">const</span> <span class="identifier">State</span> <span class="special">&gt;::</span><span class="identifier">type</span> <span class="identifier">x</span> <span class="special">=</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">begin</span><span class="special">(</span> <span class="identifier">x_</span> <span class="special">);</span>
<span class="keyword">typename</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">range_iterator</span><span class="special">&lt;</span> <span class="identifier">Deriv</span> <span class="special">&gt;::</span><span class="identifier">type</span> <span class="identifier">dxdt</span> <span class="special">=</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">begin</span><span class="special">(</span> <span class="identifier">dxdt_</span> <span class="special">);</span>
<span class="identifier">dxdt</span><span class="special">[</span><span class="number">0</span><span class="special">]</span> <span class="special">=</span> <span class="identifier">f1</span><span class="special">(</span> <span class="identifier">x</span><span class="special">[</span><span class="number">0</span><span class="special">]</span> <span class="special">,</span> <span class="identifier">x</span><span class="special">[</span><span class="number">1</span><span class="special">]</span> <span class="special">);</span>
<span class="identifier">dxdt</span><span class="special">[</span><span class="number">1</span><span class="special">]</span> <span class="special">=</span> <span class="identifier">f2</span><span class="special">(</span> <span class="identifier">x</span><span class="special">[</span><span class="number">0</span><span class="special">]</span> <span class="special">,</span> <span class="identifier">x</span><span class="special">[</span><span class="number">1</span><span class="special">]</span> <span class="special">);</span>
<span class="special">}</span>
<span class="special">};</span>
</pre>
<p>
</p>
<p>
The following two tables show which steppers and which algebras are compatible
with <a href="http://www.boost.org/doc/libs/release/libs/range/index.html" target="_top">Boost.Range</a>.
</p>
<div class="table">
<a name="boost_numeric_odeint.odeint_in_detail.using_boost__range.steppers_supporting_boost_range"></a><p class="title"><b>Table&#160;1.10.&#160;Steppers supporting Boost.Range</b></p>
<div class="table-contents"><table class="table" summary="Steppers supporting Boost.Range">
<colgroup><col></colgroup>
<thead><tr><th>
<p>
Stepper
</p>
</th></tr></thead>
<tbody>
<tr><td>
<p>
adams_bashforth_moulton
</p>
</td></tr>
<tr><td>
<p>
bulirsch_stoer_dense_out
</p>
</td></tr>
<tr><td>
<p>
bulirsch_stoer
</p>
</td></tr>
<tr><td>
<p>
controlled_runge_kutta
</p>
</td></tr>
<tr><td>
<p>
dense_output_runge_kutta
</p>
</td></tr>
<tr><td>
<p>
euler
</p>
</td></tr>
<tr><td>
<p>
explicit_error_generic_rk
</p>
</td></tr>
<tr><td>
<p>
explicit_generic_rk
</p>
</td></tr>
<tr><td>
<p>
rosenbrock4_controller
</p>
</td></tr>
<tr><td>
<p>
rosenbrock4_dense_output
</p>
</td></tr>
<tr><td>
<p>
rosenbrock4
</p>
</td></tr>
<tr><td>
<p>
runge_kutta4_classic
</p>
</td></tr>
<tr><td>
<p>
runge_kutta4
</p>
</td></tr>
<tr><td>
<p>
runge_kutta_cash_karp54_classic
</p>
</td></tr>
<tr><td>
<p>
runge_kutta_cash_karp54
</p>
</td></tr>
<tr><td>
<p>
runge_kutta_dopri5
</p>
</td></tr>
<tr><td>
<p>
runge_kutta_fehlberg78
</p>
</td></tr>
<tr><td>
<p>
symplectic_euler
</p>
</td></tr>
<tr><td>
<p>
symplectic_rkn_sb3a_mclachlan
</p>
</td></tr>
</tbody>
</table></div>
</div>
<br class="table-break"><div class="table">
<a name="boost_numeric_odeint.odeint_in_detail.using_boost__range.algebras_supporting_boost_range"></a><p class="title"><b>Table&#160;1.11.&#160;Algebras supporting Boost.Range</b></p>
<div class="table-contents"><table class="table" summary="Algebras supporting Boost.Range">
<colgroup><col></colgroup>
<thead><tr><th>
<p>
algebra
</p>
</th></tr></thead>
<tbody>
<tr><td>
<p>
range_algebra
</p>
</td></tr>
<tr><td>
<p>
thrust_algebra
</p>
</td></tr>
</tbody>
</table></div>
</div>
<br class="table-break">
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright &#169; 2009-2011 Karsten Ahnert
and Mario Mulansky<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
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>)
</p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="using_boost__ref.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../odeint_in_detail.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="../concepts.html"><img src="../../images/next.png" alt="Next"></a>
</div>
</body>
</html>

View File

@ -1,79 +0,0 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Using boost::ref</title>
<link rel="stylesheet" href="../../boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
<link rel="home" href="../../index.html" title="Chapter&#160;1.&#160;Boost.Numeric.Odeint">
<link rel="up" href="../odeint_in_detail.html" title="odeint in detail">
<link rel="prev" href="state_types__algebras_and_operations.html" title="State types, algebras and operations">
<link rel="next" href="using_boost__range.html" title="Using boost::range">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<div class="spirit-nav">
<a accesskey="p" href="state_types__algebras_and_operations.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../odeint_in_detail.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="using_boost__range.html"><img src="../../images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h3 class="title">
<a name="boost_numeric_odeint.odeint_in_detail.using_boost__ref"></a><a class="link" href="using_boost__ref.html" title="Using boost::ref">Using
boost::ref</a>
</h3></div></div></div>
<p>
In odeint all system functions and observers are passed by value. For example,
if you call a <code class="computeroutput"><span class="identifier">do_step</span></code> method
of a particular stepper or the integration functions, your system and your
stepper will be passed by value:
</p>
<p>
</p>
<pre class="programlisting"><span class="identifier">rk4</span><span class="special">.</span><span class="identifier">do_step</span><span class="special">(</span> <span class="identifier">sys</span> <span class="special">,</span> <span class="identifier">x</span> <span class="special">,</span> <span class="identifier">t</span> <span class="special">,</span> <span class="identifier">dt</span> <span class="special">);</span> <span class="comment">// pass sys by value</span>
</pre>
<p>
</p>
<p>
This behavior is suitable for most systems, especially if your system does
not contain any data or only a few parameters. However, in some cases you
might contain some large amount of data with you system function and passing
them by value is not desired since the data would be copied.
</p>
<p>
In such cases you can easily use <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">ref</span></code> (and
its relative <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">cref</span></code>) which passes its argument by reference
(or constant reference). odeint will unpack the arguments and no copying
at all of your system object will take place:
</p>
<p>
</p>
<pre class="programlisting"><span class="identifier">rk4</span><span class="special">.</span><span class="identifier">do_step</span><span class="special">(</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">ref</span><span class="special">(</span> <span class="identifier">sys</span> <span class="special">)</span> <span class="special">,</span> <span class="identifier">x</span> <span class="special">,</span> <span class="identifier">t</span> <span class="special">,</span> <span class="identifier">dt</span> <span class="special">);</span> <span class="comment">// pass sys as references</span>
</pre>
<p>
</p>
<p>
The same mechanism can be used for the observers in the integrate functions.
</p>
<div class="tip"><table border="0" summary="Tip">
<tr>
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Tip]" src="../../images/tip.png"></td>
<th align="left">Tip</th>
</tr>
<tr><td align="left" valign="top"><p>
If you are using C++11 you can also use <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">ref</span></code>
and <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">cref</span></code>
</p></td></tr>
</table></div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright &#169; 2009-2011 Karsten Ahnert
and Mario Mulansky<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
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>)
</p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="state_types__algebras_and_operations.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../odeint_in_detail.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="using_boost__range.html"><img src="../../images/next.png" alt="Next"></a>
</div>
</body>
</html>

View File

@ -1,51 +0,0 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Tutorial</title>
<link rel="stylesheet" href="../boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
<link rel="home" href="../index.html" title="Chapter&#160;1.&#160;Boost.Numeric.Odeint">
<link rel="up" href="../index.html" title="Chapter&#160;1.&#160;Boost.Numeric.Odeint">
<link rel="prev" href="getting_started/short_example.html" title="Short Example">
<link rel="next" href="tutorial/harmonic_oscillator.html" title="Harmonic oscillator">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<div class="spirit-nav">
<a accesskey="p" href="getting_started/short_example.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="tutorial/harmonic_oscillator.html"><img src="../images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="boost_numeric_odeint.tutorial"></a><a class="link" href="tutorial.html" title="Tutorial">Tutorial</a>
</h2></div></div></div>
<div class="toc"><dl>
<dt><span class="section"><a href="tutorial/harmonic_oscillator.html">Harmonic
oscillator</a></span></dt>
<dt><span class="section"><a href="tutorial/solar_system.html">Solar system</a></span></dt>
<dt><span class="section"><a href="tutorial/chaotic_systems_and_lyapunov_exponents.html">Chaotic
systems and Lyapunov exponents</a></span></dt>
<dt><span class="section"><a href="tutorial/stiff_systems.html">Stiff systems</a></span></dt>
<dt><span class="section"><a href="tutorial/special_topics.html">Special
topics</a></span></dt>
<dt><span class="section"><a href="tutorial/using_cuda_and_thrust.html">Using
Cuda and Thrust</a></span></dt>
<dt><span class="section"><a href="tutorial/using_opencl_and_vexcl.html">Using
OpenCL and VexCL</a></span></dt>
<dt><span class="section"><a href="tutorial/all_examples.html">All examples</a></span></dt>
<dt><span class="section"><a href="tutorial/references.html">References</a></span></dt>
</dl></div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright &#169; 2009-2011 Karsten Ahnert
and Mario Mulansky<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
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>)
</p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="getting_started/short_example.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="tutorial/harmonic_oscillator.html"><img src="../images/next.png" alt="Next"></a>
</div>
</body>
</html>

View File

@ -1,376 +0,0 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>All examples</title>
<link rel="stylesheet" href="../../boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
<link rel="home" href="../../index.html" title="Chapter&#160;1.&#160;Boost.Numeric.Odeint">
<link rel="up" href="../tutorial.html" title="Tutorial">
<link rel="prev" href="using_opencl_and_vexcl.html" title="Using OpenCL and VexCL">
<link rel="next" href="references.html" title="References">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<div class="spirit-nav">
<a accesskey="p" href="using_opencl_and_vexcl.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../tutorial.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="references.html"><img src="../../images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h3 class="title">
<a name="boost_numeric_odeint.tutorial.all_examples"></a><a class="link" href="all_examples.html" title="All examples">All examples</a>
</h3></div></div></div>
<p>
The following table gives an overview over all examples.
</p>
<div class="table">
<a name="boost_numeric_odeint.tutorial.all_examples.examples_overview"></a><p class="title"><b>Table&#160;1.5.&#160;Examples Overview</b></p>
<div class="table-contents"><table class="table" summary="Examples Overview">
<colgroup>
<col>
<col>
</colgroup>
<thead><tr>
<th>
<p>
File
</p>
</th>
<th>
<p>
Brief Description
</p>
</th>
</tr></thead>
<tbody>
<tr>
<td>
<p>
<a href="https://github.com/headmyshoulder/odeint-v2/tree/master/libs/numeric/odeint/examples/harmonic_oscillator.cpp" target="_top">harmonic_oscillator.cpp</a>
</p>
</td>
<td>
<p>
The harmonic oscillator examples gives a brief introduction to
odeint and shows the usage of the classical Runge-Kutta-solvers.
</p>
</td>
</tr>
<tr>
<td>
<p>
<a href="https://github.com/headmyshoulder/odeint-v2/tree/master/libs/numeric/odeint/examples/simple1d.cpp" target="_top">simple1d.cpp</a>
</p>
</td>
<td>
<p>
Integrating a simple, one-dimensional ODE showing the usage of
integrate- and generate-functions.
</p>
</td>
</tr>
<tr>
<td>
<p>
<a href="https://github.com/headmyshoulder/odeint-v2/tree/master/libs/numeric/odeint/examples/elliptic_functions.cpp" target="_top">elliptic_functions.cpp</a>
</p>
</td>
<td>
<p>
Example calculating the elliptic functions using Bulirsch-Stoer
and Runge-Kutta-Dopri5 Steppers with dense output.
</p>
</td>
</tr>
<tr>
<td>
<p>
<a href="https://github.com/headmyshoulder/odeint-v2/tree/master/libs/numeric/odeint/examples/solar_system.cpp" target="_top">solar_system.cpp</a>
</p>
</td>
<td>
<p>
The solar system example shows the usage of the symplectic solvers.
</p>
</td>
</tr>
<tr>
<td>
<p>
<a href="https://github.com/headmyshoulder/odeint-v2/tree/master/libs/numeric/odeint/examples/chaotic_system.cpp" target="_top">chaotic_system.cpp</a>
</p>
</td>
<td>
<p>
The chaotic system examples integrates the Lorenz system and calculates
the Lyapunov exponents.
</p>
</td>
</tr>
<tr>
<td>
<p>
<a href="https://github.com/headmyshoulder/odeint-v2/tree/master/libs/numeric/odeint/examples/stiff_system.cpp" target="_top">stiff_system.cpp</a>
</p>
</td>
<td>
<p>
The stiff system example shows the usage of the stiff solvers using
the Jacobian of the system function.
</p>
</td>
</tr>
<tr>
<td>
<p>
<a href="https://github.com/headmyshoulder/odeint-v2/tree/master/libs/numeric/odeint/examples/van_der_pol_stiff.cpp" target="_top">van_der_pol_stiff.cpp</a>
</p>
</td>
<td>
<p>
This stiff system example again shows the usage of the stiff solvers
by integrating the van der Pol osscillator.
</p>
</td>
</tr>
<tr>
<td>
<p>
<a href="https://github.com/headmyshoulder/odeint-v2/tree/master/libs/numeric/odeint/examples/stuart_landau.cpp" target="_top">stuart_landau.cpp</a>
</p>
</td>
<td>
<p>
The Stuart-Landau example shows how odeint can be used with complex
state types.
</p>
</td>
</tr>
<tr>
<td>
<p>
<a href="https://github.com/headmyshoulder/odeint-v2/tree/master/libs/numeric/odeint/examples/fpu.cpp" target="_top">fpu.cpp</a>
</p>
</td>
<td>
<p>
The Fermi-Pasta-Ulam (FPU) example shows how odeint can be used
to integrate lattice systems.
</p>
</td>
</tr>
<tr>
<td>
<p>
<a href="https://github.com/headmyshoulder/odeint-v2/tree/master/libs/numeric/odeint/examples/phase_oscillator_ensemble.cpp" target="_top">phase_oscillator_ensemble.cpp</a>
</p>
</td>
<td>
<p>
The phase oscillator ensemble example shows how globally coupled
oscillators can be analyzed and how statistical measures can be
computed during integration.
</p>
</td>
</tr>
<tr>
<td>
<p>
<a href="https://github.com/headmyshoulder/odeint-v2/tree/master/libs/numeric/odeint/examples/stepper_details.cpp" target="_top">stepper_details.cpp</a>
</p>
</td>
<td>
<p>
Trivial example showing the usability of the several stepper classes.
</p>
</td>
</tr>
<tr>
<td>
<p>
<a href="https://github.com/headmyshoulder/odeint-v2/tree/master/libs/numeric/odeint/examples/harmonic_oscillator_units.cpp" target="_top">harmonic_oscillator_units.cpp</a>
</p>
</td>
<td>
<p>
This examples shows how <a href="http://www.boost.org/doc/libs/release/libs/units/index.html" target="_top">Boost.Units</a>
can be used with odeint.
</p>
</td>
</tr>
<tr>
<td>
<p>
<a href="https://github.com/headmyshoulder/odeint-v2/tree/master/libs/numeric/odeint/examples/two_dimensional_phase_lattice.cpp" target="_top">two_dimensional_phase_lattice.cpp</a>
</p>
</td>
<td>
<p>
The 2D phase oscillator example shows how a two-dimensional lattice
works with odeint and how matrix types can be used as state types
in odeint.
</p>
</td>
</tr>
<tr>
<td>
<p>
<a href="https://github.com/headmyshoulder/odeint-v2/tree/master/libs/numeric/odeint/examples/resizing_lattice.cpp" target="_top">resizing_lattice.cpp</a>
</p>
</td>
<td>
<p>
Shows the strength of odeint's memory management by simulating
a Hamiltonian system on an expanding lattice.
</p>
</td>
</tr>
<tr>
<td>
<p>
<a href="https://github.com/headmyshoulder/odeint-v2/tree/master/libs/numeric/odeint/examples/list_lattice.cpp" target="_top">list_lattice.cpp</a>
</p>
</td>
<td>
<p>
Example of a phase lattice integration using <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">list</span></code>
as state type.
</p>
</td>
</tr>
<tr>
<td>
<p>
<a href="https://github.com/headmyshoulder/odeint-v2/tree/master/libs/numeric/odeint/examples/lorenz_point.cpp" target="_top">lorenz_point.cpp</a>
</p>
</td>
<td>
<p>
Alternative way of integrating lorenz by using a self defined point3d
data type as state type.
</p>
</td>
</tr>
<tr>
<td>
<p>
<a href="https://github.com/headmyshoulder/odeint-v2/tree/master/libs/numeric/odeint/examples/lorenz_gmpxx.cpp" target="_top">lorenz_gmpxx.cpp</a>
</p>
</td>
<td>
<p>
This examples integrates the Lorenz system by means of an arbitrary
precision type.
</p>
</td>
</tr>
<tr>
<td>
<p>
<a href="https://github.com/headmyshoulder/odeint-v2/tree/master/libs/numeric/odeint/examples/my_vector.cpp" target="_top">my_vector.cpp</a>
</p>
</td>
<td>
<p>
Simple example showing how to get odeint to work with a self-defined
vector type.
</p>
</td>
</tr>
<tr>
<td>
<p>
<a href="https://github.com/headmyshoulder/odeint-v2/tree/master/libs/numeric/odeint/examples/thrust/phase_oscillator_ensemble.cu" target="_top">phase_oscillator_ensemble.cu</a>
</p>
</td>
<td>
<p>
The Thrust phase oscillator ensemble example shows how globally
coupled oscillators can be analyzed with Thrust and CUDA, employing
the power of modern graphic devices.
</p>
</td>
</tr>
<tr>
<td>
<p>
<a href="https://github.com/headmyshoulder/odeint-v2/tree/master/libs/numeric/odeint/examples/thrust/phase_oscillator_chain.cu" target="_top">phase_oscillator_chain.cu</a>
</p>
</td>
<td>
<p>
The Thrust phase oscillator chain example shows how chains of nearest
neighbor coupled oscillators can be integrated with Thrust and
odeint.
</p>
</td>
</tr>
<tr>
<td>
<p>
<a href="https://github.com/headmyshoulder/odeint-v2/tree/master/libs/numeric/odeint/examples/thrust/lorenz_parameters.cu" target="_top">lorenz_parameters.cu</a>
</p>
</td>
<td>
<p>
The Lorenz parameters examples show how ensembles of ordinary differential
equations can be solved by means of Thrust to study the dependence
of an ODE on some parameters.
</p>
</td>
</tr>
<tr>
<td>
<p>
<a href="https://github.com/headmyshoulder/odeint-v2/tree/master/libs/numeric/odeint/examples/mtl/gauss_packet.cpp" target="_top">gauss_packet.cpp</a>
</p>
</td>
<td>
<p>
The MTL-Gauss-packet example shows how the MTL can be easily used
with odeint.
</p>
</td>
</tr>
<tr>
<td>
<p>
<a href="https://github.com/headmyshoulder/odeint-v2/tree/master/libs/numeric/odeint/examples/stochastic_euler.cpp" target="_top">stochastic_euler.cpp</a>
</p>
</td>
<td>
<p>
Implementation of a custom stepper - the stochastic euler - for
solving stochastic differential equations.
</p>
</td>
</tr>
<tr>
<td>
<p>
<a href="https://github.com/headmyshoulder/odeint-v2/tree/master/libs/numeric/odeint/examples/generation_functions.cpp" target="_top">generation_functions.cpp</a>
</p>
</td>
<td>
<p>
Shows skeletal code on how to implemente own factory functions.
</p>
</td>
</tr>
</tbody>
</table></div>
</div>
<br class="table-break">
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright &#169; 2009-2011 Karsten Ahnert
and Mario Mulansky<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
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>)
</p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="using_opencl_and_vexcl.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../tutorial.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="references.html"><img src="../../images/next.png" alt="Next"></a>
</div>
</body>
</html>

View File

@ -1,278 +0,0 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Chaotic systems and Lyapunov exponents</title>
<link rel="stylesheet" href="../../boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
<link rel="home" href="../../index.html" title="Chapter&#160;1.&#160;Boost.Numeric.Odeint">
<link rel="up" href="../tutorial.html" title="Tutorial">
<link rel="prev" href="solar_system.html" title="Solar system">
<link rel="next" href="stiff_systems.html" title="Stiff systems">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<div class="spirit-nav">
<a accesskey="p" href="solar_system.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../tutorial.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="stiff_systems.html"><img src="../../images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h3 class="title">
<a name="boost_numeric_odeint.tutorial.chaotic_systems_and_lyapunov_exponents"></a><a class="link" href="chaotic_systems_and_lyapunov_exponents.html" title="Chaotic systems and Lyapunov exponents">Chaotic
systems and Lyapunov exponents</a>
</h3></div></div></div>
<p>
odeint can easily be used to investigate the properties of chaotic deterministic
systems. In mathematical terms chaotic refers to an exponential growth of
perturbations <span class="emphasis"><em>&#948; x</em></span>. In order to observe this exponential
growth one usually solves the equations for the tangential dynamics which
is again an ordinary differential equation. These equations are linear but
time dependent and can be obtained via
</p>
<p>
<span class="emphasis"><em>d &#948; x / dt = J(x) &#948; x</em></span>
</p>
<p>
where <span class="emphasis"><em>J</em></span> is the Jacobian of the system under consideration.
<span class="emphasis"><em>&#948; x</em></span> can also be interpreted as a perturbation of the original
system. In principle <span class="emphasis"><em>n</em></span> of these perturbations exit,
they form a hypercube and evolve in the time. The Lyapunov exponents are
then defined as logarithmic growth rates of the perturbations. If one Lyapunov
exponent is larger then zero nearby trajectories diverge exponentially hence
they are chaotic. If the largest Lyapunov exponent is zero one is usually
faced with periodic motion. In the case of a largest Lyapunov exponent smaller
then zero the converges the a fixed point. More information's about Lyapunov
exponents and nonlinear dynamical systems can be found in many textbooks,
see for example: E. Ott "Chaos is Dynamical Systems", Cambridge.
</p>
<p>
To calculate the Lyapunov exponents numerically one usually solves the equations
of motion for <span class="emphasis"><em>n</em></span> perturbations and orthonormalizes them
every <span class="emphasis"><em>k</em></span> steps. The Lyapunov exponent is the average
the logarithm of the stretching factor of each perturbation.
</p>
<p>
To demonstrate how one can use odeint to determine the Lyapunov exponents
we choose the Lorenz system. It is one of the most studied dynamical systems
in the nonlinear dynamics community. For the standard parameters it possesses
a strange attractor with non-integer dimension. The Lyapunov exponents take
values of approximately 0.9, 0 and -12.
</p>
<p>
The implementation of the Lorenz system is
</p>
<p>
</p>
<pre class="programlisting"><span class="keyword">const</span> <span class="keyword">double</span> <span class="identifier">sigma</span> <span class="special">=</span> <span class="number">10.0</span><span class="special">;</span>
<span class="keyword">const</span> <span class="keyword">double</span> <span class="identifier">R</span> <span class="special">=</span> <span class="number">28.0</span><span class="special">;</span>
<span class="keyword">const</span> <span class="keyword">double</span> <span class="identifier">b</span> <span class="special">=</span> <span class="number">8.0</span> <span class="special">/</span> <span class="number">3.0</span><span class="special">;</span>
<span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">array</span><span class="special">&lt;</span> <span class="keyword">double</span> <span class="special">,</span> <span class="number">3</span> <span class="special">&gt;</span> <span class="identifier">lorenz_state_type</span><span class="special">;</span>
<span class="keyword">void</span> <span class="identifier">lorenz</span><span class="special">(</span> <span class="keyword">const</span> <span class="identifier">lorenz_state_type</span> <span class="special">&amp;</span><span class="identifier">x</span> <span class="special">,</span> <span class="identifier">lorenz_state_type</span> <span class="special">&amp;</span><span class="identifier">dxdt</span> <span class="special">,</span> <span class="keyword">double</span> <span class="identifier">t</span> <span class="special">)</span>
<span class="special">{</span>
<span class="identifier">dxdt</span><span class="special">[</span><span class="number">0</span><span class="special">]</span> <span class="special">=</span> <span class="identifier">sigma</span> <span class="special">*</span> <span class="special">(</span> <span class="identifier">x</span><span class="special">[</span><span class="number">1</span><span class="special">]</span> <span class="special">-</span> <span class="identifier">x</span><span class="special">[</span><span class="number">0</span><span class="special">]</span> <span class="special">);</span>
<span class="identifier">dxdt</span><span class="special">[</span><span class="number">1</span><span class="special">]</span> <span class="special">=</span> <span class="identifier">R</span> <span class="special">*</span> <span class="identifier">x</span><span class="special">[</span><span class="number">0</span><span class="special">]</span> <span class="special">-</span> <span class="identifier">x</span><span class="special">[</span><span class="number">1</span><span class="special">]</span> <span class="special">-</span> <span class="identifier">x</span><span class="special">[</span><span class="number">0</span><span class="special">]</span> <span class="special">*</span> <span class="identifier">x</span><span class="special">[</span><span class="number">2</span><span class="special">];</span>
<span class="identifier">dxdt</span><span class="special">[</span><span class="number">2</span><span class="special">]</span> <span class="special">=</span> <span class="special">-</span><span class="identifier">b</span> <span class="special">*</span> <span class="identifier">x</span><span class="special">[</span><span class="number">2</span><span class="special">]</span> <span class="special">+</span> <span class="identifier">x</span><span class="special">[</span><span class="number">0</span><span class="special">]</span> <span class="special">*</span> <span class="identifier">x</span><span class="special">[</span><span class="number">1</span><span class="special">];</span>
<span class="special">}</span>
</pre>
<p>
We need also to integrate the set of the perturbations. This is done in parallel
to the original system, hence within one system function. Of course, we want
to use the above definition of the Lorenz system, hence the definition of
the system function including the Lorenz system itself and the perturbation
could look like:
</p>
<p>
</p>
<pre class="programlisting"><span class="keyword">const</span> <span class="identifier">size_t</span> <span class="identifier">n</span> <span class="special">=</span> <span class="number">3</span><span class="special">;</span>
<span class="keyword">const</span> <span class="identifier">size_t</span> <span class="identifier">num_of_lyap</span> <span class="special">=</span> <span class="number">3</span><span class="special">;</span>
<span class="keyword">const</span> <span class="identifier">size_t</span> <span class="identifier">N</span> <span class="special">=</span> <span class="identifier">n</span> <span class="special">+</span> <span class="identifier">n</span><span class="special">*</span><span class="identifier">num_of_lyap</span><span class="special">;</span>
<span class="keyword">typedef</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">tr1</span><span class="special">::</span><span class="identifier">array</span><span class="special">&lt;</span> <span class="keyword">double</span> <span class="special">,</span> <span class="identifier">N</span> <span class="special">&gt;</span> <span class="identifier">state_type</span><span class="special">;</span>
<span class="keyword">typedef</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">tr1</span><span class="special">::</span><span class="identifier">array</span><span class="special">&lt;</span> <span class="keyword">double</span> <span class="special">,</span> <span class="identifier">num_of_lyap</span> <span class="special">&gt;</span> <span class="identifier">lyap_type</span><span class="special">;</span>
<span class="keyword">void</span> <span class="identifier">lorenz_with_lyap</span><span class="special">(</span> <span class="keyword">const</span> <span class="identifier">state_type</span> <span class="special">&amp;</span><span class="identifier">x</span> <span class="special">,</span> <span class="identifier">state_type</span> <span class="special">&amp;</span><span class="identifier">dxdt</span> <span class="special">,</span> <span class="keyword">double</span> <span class="identifier">t</span> <span class="special">)</span>
<span class="special">{</span>
<span class="identifier">lorenz</span><span class="special">(</span> <span class="identifier">x</span> <span class="special">,</span> <span class="identifier">dxdt</span> <span class="special">,</span> <span class="identifier">t</span> <span class="special">);</span>
<span class="keyword">for</span><span class="special">(</span> <span class="identifier">size_t</span> <span class="identifier">l</span><span class="special">=</span><span class="number">0</span> <span class="special">;</span> <span class="identifier">l</span><span class="special">&lt;</span><span class="identifier">num_of_lyap</span> <span class="special">;</span> <span class="special">++</span><span class="identifier">l</span> <span class="special">)</span>
<span class="special">{</span>
<span class="keyword">const</span> <span class="keyword">double</span> <span class="special">*</span><span class="identifier">pert</span> <span class="special">=</span> <span class="identifier">x</span><span class="special">.</span><span class="identifier">begin</span><span class="special">()</span> <span class="special">+</span> <span class="number">3</span> <span class="special">+</span> <span class="identifier">l</span> <span class="special">*</span> <span class="number">3</span><span class="special">;</span>
<span class="keyword">double</span> <span class="special">*</span><span class="identifier">dpert</span> <span class="special">=</span> <span class="identifier">dxdt</span><span class="special">.</span><span class="identifier">begin</span><span class="special">()</span> <span class="special">+</span> <span class="number">3</span> <span class="special">+</span> <span class="identifier">l</span> <span class="special">*</span> <span class="number">3</span><span class="special">;</span>
<span class="identifier">dpert</span><span class="special">[</span><span class="number">0</span><span class="special">]</span> <span class="special">=</span> <span class="special">-</span> <span class="identifier">sigma</span> <span class="special">*</span> <span class="identifier">pert</span><span class="special">[</span><span class="number">0</span><span class="special">]</span> <span class="special">+</span> <span class="number">10.0</span> <span class="special">*</span> <span class="identifier">pert</span><span class="special">[</span><span class="number">1</span><span class="special">];</span>
<span class="identifier">dpert</span><span class="special">[</span><span class="number">1</span><span class="special">]</span> <span class="special">=</span> <span class="special">(</span> <span class="identifier">R</span> <span class="special">-</span> <span class="identifier">x</span><span class="special">[</span><span class="number">2</span><span class="special">]</span> <span class="special">)</span> <span class="special">*</span> <span class="identifier">pert</span><span class="special">[</span><span class="number">0</span><span class="special">]</span> <span class="special">-</span> <span class="identifier">pert</span><span class="special">[</span><span class="number">1</span><span class="special">]</span> <span class="special">-</span> <span class="identifier">x</span><span class="special">[</span><span class="number">0</span><span class="special">]</span> <span class="special">*</span> <span class="identifier">pert</span><span class="special">[</span><span class="number">2</span><span class="special">];</span>
<span class="identifier">dpert</span><span class="special">[</span><span class="number">2</span><span class="special">]</span> <span class="special">=</span> <span class="identifier">x</span><span class="special">[</span><span class="number">1</span><span class="special">]</span> <span class="special">*</span> <span class="identifier">pert</span><span class="special">[</span><span class="number">0</span><span class="special">]</span> <span class="special">+</span> <span class="identifier">x</span><span class="special">[</span><span class="number">0</span><span class="special">]</span> <span class="special">*</span> <span class="identifier">pert</span><span class="special">[</span><span class="number">1</span><span class="special">]</span> <span class="special">-</span> <span class="identifier">b</span> <span class="special">*</span> <span class="identifier">pert</span><span class="special">[</span><span class="number">2</span><span class="special">];</span>
<span class="special">}</span>
<span class="special">}</span>
</pre>
<p>
</p>
<p>
The perturbations are stored linearly in the <code class="computeroutput"><span class="identifier">state_type</span></code>
behind the state of the Lorenz system. The problem that lorenz() and lorenz_with_lyap() have different
state types. A simple trick to over come this problem is put the Lorenz system
inside a functor with templatized arguments:
</p>
<p>
</p>
<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">lorenz</span>
<span class="special">{</span>
<span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">class</span> <span class="identifier">StateIn</span> <span class="special">,</span> <span class="keyword">class</span> <span class="identifier">StateOut</span> <span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Value</span> <span class="special">&gt;</span>
<span class="keyword">void</span> <span class="keyword">operator</span><span class="special">()(</span> <span class="keyword">const</span> <span class="identifier">StateIn</span> <span class="special">&amp;</span><span class="identifier">x</span> <span class="special">,</span> <span class="identifier">StateOut</span> <span class="special">&amp;</span><span class="identifier">dxdt</span> <span class="special">,</span> <span class="identifier">Value</span> <span class="identifier">t</span> <span class="special">)</span>
<span class="special">{</span>
<span class="identifier">dxdt</span><span class="special">[</span><span class="number">0</span><span class="special">]</span> <span class="special">=</span> <span class="identifier">sigma</span> <span class="special">*</span> <span class="special">(</span> <span class="identifier">x</span><span class="special">[</span><span class="number">1</span><span class="special">]</span> <span class="special">-</span> <span class="identifier">x</span><span class="special">[</span><span class="number">0</span><span class="special">]</span> <span class="special">);</span>
<span class="identifier">dxdt</span><span class="special">[</span><span class="number">1</span><span class="special">]</span> <span class="special">=</span> <span class="identifier">R</span> <span class="special">*</span> <span class="identifier">x</span><span class="special">[</span><span class="number">0</span><span class="special">]</span> <span class="special">-</span> <span class="identifier">x</span><span class="special">[</span><span class="number">1</span><span class="special">]</span> <span class="special">-</span> <span class="identifier">x</span><span class="special">[</span><span class="number">0</span><span class="special">]</span> <span class="special">*</span> <span class="identifier">x</span><span class="special">[</span><span class="number">2</span><span class="special">];</span>
<span class="identifier">dxdt</span><span class="special">[</span><span class="number">2</span><span class="special">]</span> <span class="special">=</span> <span class="special">-</span><span class="identifier">b</span> <span class="special">*</span> <span class="identifier">x</span><span class="special">[</span><span class="number">2</span><span class="special">]</span> <span class="special">+</span> <span class="identifier">x</span><span class="special">[</span><span class="number">0</span><span class="special">]</span> <span class="special">*</span> <span class="identifier">x</span><span class="special">[</span><span class="number">1</span><span class="special">];</span>
<span class="special">}</span>
<span class="special">};</span>
<span class="keyword">void</span> <span class="identifier">lorenz_with_lyap</span><span class="special">(</span> <span class="keyword">const</span> <span class="identifier">state_type</span> <span class="special">&amp;</span><span class="identifier">x</span> <span class="special">,</span> <span class="identifier">state_type</span> <span class="special">&amp;</span><span class="identifier">dxdt</span> <span class="special">,</span> <span class="keyword">double</span> <span class="identifier">t</span> <span class="special">)</span>
<span class="special">{</span>
<span class="identifier">lorenz</span><span class="special">()(</span> <span class="identifier">x</span> <span class="special">,</span> <span class="identifier">dxdt</span> <span class="special">,</span> <span class="identifier">t</span> <span class="special">);</span>
<span class="special">...</span>
<span class="special">}</span>
</pre>
<p>
This works fine and <code class="computeroutput"><span class="identifier">lorenz_with_lyap</span></code>
can be used for example via
</p>
<pre class="programlisting"><span class="identifier">state_type</span> <span class="identifier">x</span><span class="special">;</span>
<span class="comment">// initialize x</span>
<span class="identifier">explicit_rk4</span><span class="special">&lt;</span> <span class="identifier">state_type</span> <span class="special">&gt;</span> <span class="identifier">rk4</span><span class="special">;</span>
<span class="identifier">integrate_n_steps</span><span class="special">(</span> <span class="identifier">rk4</span> <span class="special">,</span> <span class="identifier">lorenz_with_lyap</span> <span class="special">,</span> <span class="identifier">x</span> <span class="special">,</span> <span class="number">0.0</span> <span class="special">,</span> <span class="number">0.01</span> <span class="special">,</span> <span class="number">1000</span> <span class="special">);</span>
</pre>
<p>
This code snippet performs 1000 steps with constant step size 0.01.
</p>
<p>
A real world use case for the calculation of the Lyapunov exponents of Lorenz
system would always include some transient steps, just to ensure that the
current state lies on the attractor, hence it would look like
</p>
<p>
</p>
<pre class="programlisting"><span class="identifier">state_type</span> <span class="identifier">x</span><span class="special">;</span>
<span class="comment">// initialize x</span>
<span class="identifier">explicit_rk4</span><span class="special">&lt;</span> <span class="identifier">state_type</span> <span class="special">&gt;</span> <span class="identifier">rk4</span><span class="special">;</span>
<span class="identifier">integrate_n_steps</span><span class="special">(</span> <span class="identifier">rk4</span> <span class="special">,</span> <span class="identifier">lorenz</span> <span class="special">,</span> <span class="identifier">x</span> <span class="special">,</span> <span class="number">0.0</span> <span class="special">,</span> <span class="number">0.01</span> <span class="special">,</span> <span class="number">1000</span> <span class="special">);</span>
</pre>
<p>
The problem is now, that <code class="computeroutput"><span class="identifier">x</span></code>
is the full state containing also the perturbations and <code class="computeroutput"><span class="identifier">integrate_n_steps</span></code>
does not know that it should only use 3 elements. In detail, odeint and its
steppers determine the length of the system under consideration by determining
the length of the state. In the classical solvers, e.g. from Numerical Recipes,
the problem was solved by pointer to the state and an appropriate length,
something similar to
</p>
<p>
</p>
<pre class="programlisting"><span class="keyword">void</span> <span class="identifier">lorenz</span><span class="special">(</span> <span class="keyword">double</span><span class="special">*</span> <span class="identifier">x</span> <span class="special">,</span> <span class="keyword">double</span> <span class="special">*</span><span class="identifier">dxdt</span> <span class="special">,</span> <span class="keyword">double</span> <span class="identifier">t</span><span class="special">,</span> <span class="keyword">void</span><span class="special">*</span> <span class="identifier">params</span> <span class="special">)</span>
<span class="special">{</span>
<span class="special">...</span>
<span class="special">}</span>
<span class="keyword">int</span> <span class="identifier">system_length</span> <span class="special">=</span> <span class="number">3</span><span class="special">;</span>
<span class="identifier">rk4</span><span class="special">(</span> <span class="identifier">x</span> <span class="special">,</span> <span class="identifier">system_length</span> <span class="special">,</span> <span class="identifier">t</span> <span class="special">,</span> <span class="identifier">dt</span> <span class="special">,</span> <span class="identifier">lorenz</span> <span class="special">);</span>
</pre>
<p>
</p>
<p>
But odeint supports a similar and much more sophisticated concept: <a href="http://www.boost.org/doc/libs/release/libs/range/index.html" target="_top">Boost.Range</a>.
To make the steppers and the system ready to work with <a href="http://www.boost.org/doc/libs/release/libs/range/index.html" target="_top">Boost.Range</a>
the system has to by changed:
</p>
<p>
</p>
<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">lorenz</span>
<span class="special">{</span>
<span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">class</span> <span class="identifier">State</span> <span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Deriv</span> <span class="special">&gt;</span>
<span class="keyword">void</span> <span class="keyword">operator</span><span class="special">()(</span> <span class="keyword">const</span> <span class="identifier">State</span> <span class="special">&amp;</span><span class="identifier">x_</span> <span class="special">,</span> <span class="identifier">Deriv</span> <span class="special">&amp;</span><span class="identifier">dxdt_</span> <span class="special">,</span> <span class="keyword">double</span> <span class="identifier">t</span> <span class="special">)</span> <span class="keyword">const</span>
<span class="special">{</span>
<span class="keyword">typename</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">range_iterator</span><span class="special">&lt;</span> <span class="keyword">const</span> <span class="identifier">State</span> <span class="special">&gt;::</span><span class="identifier">type</span> <span class="identifier">x</span> <span class="special">=</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">begin</span><span class="special">(</span> <span class="identifier">x_</span> <span class="special">);</span>
<span class="keyword">typename</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">range_iterator</span><span class="special">&lt;</span> <span class="identifier">Deriv</span> <span class="special">&gt;::</span><span class="identifier">type</span> <span class="identifier">dxdt</span> <span class="special">=</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">begin</span><span class="special">(</span> <span class="identifier">dxdt_</span> <span class="special">);</span>
<span class="identifier">dxdt</span><span class="special">[</span><span class="number">0</span><span class="special">]</span> <span class="special">=</span> <span class="identifier">sigma</span> <span class="special">*</span> <span class="special">(</span> <span class="identifier">x</span><span class="special">[</span><span class="number">1</span><span class="special">]</span> <span class="special">-</span> <span class="identifier">x</span><span class="special">[</span><span class="number">0</span><span class="special">]</span> <span class="special">);</span>
<span class="identifier">dxdt</span><span class="special">[</span><span class="number">1</span><span class="special">]</span> <span class="special">=</span> <span class="identifier">R</span> <span class="special">*</span> <span class="identifier">x</span><span class="special">[</span><span class="number">0</span><span class="special">]</span> <span class="special">-</span> <span class="identifier">x</span><span class="special">[</span><span class="number">1</span><span class="special">]</span> <span class="special">-</span> <span class="identifier">x</span><span class="special">[</span><span class="number">0</span><span class="special">]</span> <span class="special">*</span> <span class="identifier">x</span><span class="special">[</span><span class="number">2</span><span class="special">];</span>
<span class="identifier">dxdt</span><span class="special">[</span><span class="number">2</span><span class="special">]</span> <span class="special">=</span> <span class="special">-</span><span class="identifier">b</span> <span class="special">*</span> <span class="identifier">x</span><span class="special">[</span><span class="number">2</span><span class="special">]</span> <span class="special">+</span> <span class="identifier">x</span><span class="special">[</span><span class="number">0</span><span class="special">]</span> <span class="special">*</span> <span class="identifier">x</span><span class="special">[</span><span class="number">1</span><span class="special">];</span>
<span class="special">}</span>
<span class="special">};</span>
</pre>
<p>
</p>
<p>
This is in principle all. Now, we only have to call <code class="computeroutput"><span class="identifier">integrate_n_steps</span></code>
with a range including only the first 3 components of <span class="emphasis"><em>x</em></span>:
</p>
<p>
</p>
<pre class="programlisting"><span class="comment">// perform 10000 transient steps</span>
<span class="identifier">integrate_n_steps</span><span class="special">(</span> <span class="identifier">rk4</span> <span class="special">,</span> <span class="identifier">lorenz</span><span class="special">()</span> <span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">make_pair</span><span class="special">(</span> <span class="identifier">x</span><span class="special">.</span><span class="identifier">begin</span><span class="special">()</span> <span class="special">,</span> <span class="identifier">x</span><span class="special">.</span><span class="identifier">begin</span><span class="special">()</span> <span class="special">+</span> <span class="identifier">n</span> <span class="special">)</span> <span class="special">,</span> <span class="number">0.0</span> <span class="special">,</span> <span class="identifier">dt</span> <span class="special">,</span> <span class="number">10000</span> <span class="special">);</span>
</pre>
<p>
</p>
<p>
Having integrated a sufficient number of transients steps we are now able
to calculate the Lyapunov exponents:
</p>
<div class="orderedlist"><ol class="orderedlist" type="1">
<li class="listitem">
We initialize the perturbations. They are stored linearly behind the
state of the Lorenz system. The perturbations are initialized such that
<span class="emphasis"><em>p <sub>&#8203;ij</sub> = &#948; <sub>&#8203;ij</sub></em></span>, where <span class="emphasis"><em>p <sub>&#8203;ij</sub></em></span> is the
<span class="emphasis"><em>j</em></span>-component of the <span class="emphasis"><em>i</em></span>.-th perturbation
and <span class="emphasis"><em>&#948; <sub>&#8203;ij</sub></em></span> is the Kronecker symbol.
</li>
<li class="listitem">
Integrate 100 steps of the full system with perturbations
</li>
<li class="listitem">
Orthonormalize the perturbation using Gram-Schmidt orthonormalization
algorithm.
</li>
<li class="listitem">
Repeat step 2 and 3. Every 10000 steps write the current Lyapunov exponent.
</li>
</ol></div>
<p>
</p>
<pre class="programlisting"><span class="identifier">fill</span><span class="special">(</span> <span class="identifier">x</span><span class="special">.</span><span class="identifier">begin</span><span class="special">()+</span><span class="identifier">n</span> <span class="special">,</span> <span class="identifier">x</span><span class="special">.</span><span class="identifier">end</span><span class="special">()</span> <span class="special">,</span> <span class="number">0.0</span> <span class="special">);</span>
<span class="keyword">for</span><span class="special">(</span> <span class="identifier">size_t</span> <span class="identifier">i</span><span class="special">=</span><span class="number">0</span> <span class="special">;</span> <span class="identifier">i</span><span class="special">&lt;</span><span class="identifier">num_of_lyap</span> <span class="special">;</span> <span class="special">++</span><span class="identifier">i</span> <span class="special">)</span> <span class="identifier">x</span><span class="special">[</span><span class="identifier">n</span><span class="special">+</span><span class="identifier">n</span><span class="special">*</span><span class="identifier">i</span><span class="special">+</span><span class="identifier">i</span><span class="special">]</span> <span class="special">=</span> <span class="number">1.0</span><span class="special">;</span>
<span class="identifier">fill</span><span class="special">(</span> <span class="identifier">lyap</span><span class="special">.</span><span class="identifier">begin</span><span class="special">()</span> <span class="special">,</span> <span class="identifier">lyap</span><span class="special">.</span><span class="identifier">end</span><span class="special">()</span> <span class="special">,</span> <span class="number">0.0</span> <span class="special">);</span>
<span class="keyword">double</span> <span class="identifier">t</span> <span class="special">=</span> <span class="number">0.0</span><span class="special">;</span>
<span class="identifier">size_t</span> <span class="identifier">count</span> <span class="special">=</span> <span class="number">0</span><span class="special">;</span>
<span class="keyword">while</span><span class="special">(</span> <span class="keyword">true</span> <span class="special">)</span>
<span class="special">{</span>
<span class="identifier">t</span> <span class="special">=</span> <span class="identifier">integrate_n_steps</span><span class="special">(</span> <span class="identifier">rk4</span> <span class="special">,</span> <span class="identifier">lorenz_with_lyap</span> <span class="special">,</span> <span class="identifier">x</span> <span class="special">,</span> <span class="identifier">t</span> <span class="special">,</span> <span class="identifier">dt</span> <span class="special">,</span> <span class="number">100</span> <span class="special">);</span>
<span class="identifier">gram_schmidt</span><span class="special">&lt;</span> <span class="identifier">num_of_lyap</span> <span class="special">&gt;(</span> <span class="identifier">x</span> <span class="special">,</span> <span class="identifier">lyap</span> <span class="special">,</span> <span class="identifier">n</span> <span class="special">);</span>
<span class="special">++</span><span class="identifier">count</span><span class="special">;</span>
<span class="keyword">if</span><span class="special">(</span> <span class="special">!(</span><span class="identifier">count</span> <span class="special">%</span> <span class="number">100000</span><span class="special">)</span> <span class="special">)</span>
<span class="special">{</span>
<span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">t</span><span class="special">;</span>
<span class="keyword">for</span><span class="special">(</span> <span class="identifier">size_t</span> <span class="identifier">i</span><span class="special">=</span><span class="number">0</span> <span class="special">;</span> <span class="identifier">i</span><span class="special">&lt;</span><span class="identifier">num_of_lyap</span> <span class="special">;</span> <span class="special">++</span><span class="identifier">i</span> <span class="special">)</span> <span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"\t"</span> <span class="special">&lt;&lt;</span> <span class="identifier">lyap</span><span class="special">[</span><span class="identifier">i</span><span class="special">]</span> <span class="special">/</span> <span class="identifier">t</span> <span class="special">;</span>
<span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">endl</span><span class="special">;</span>
<span class="special">}</span>
<span class="special">}</span>
</pre>
<p>
</p>
<p>
The full code can be found here: <a href="https://github.com/headmyshoulder/odeint-v2/tree/master/libs/numeric/odeint/examples/chaotic_system.cpp" target="_top">chaotic_system.cpp</a>
</p>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright &#169; 2009-2011 Karsten Ahnert
and Mario Mulansky<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
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>)
</p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="solar_system.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../tutorial.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="stiff_systems.html"><img src="../../images/next.png" alt="Next"></a>
</div>
</body>
</html>

File diff suppressed because it is too large Load Diff

View File

@ -1,87 +0,0 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>References</title>
<link rel="stylesheet" href="../../boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
<link rel="home" href="../../index.html" title="Chapter&#160;1.&#160;Boost.Numeric.Odeint">
<link rel="up" href="../tutorial.html" title="Tutorial">
<link rel="prev" href="all_examples.html" title="All examples">
<link rel="next" href="../odeint_in_detail.html" title="odeint in detail">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<div class="spirit-nav">
<a accesskey="p" href="all_examples.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../tutorial.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="../odeint_in_detail.html"><img src="../../images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h3 class="title">
<a name="boost_numeric_odeint.tutorial.references"></a><a class="link" href="references.html" title="References">References</a>
</h3></div></div></div>
<p>
<span class="bold"><strong>General information about numerical integration of
ordinary differential equations:</strong></span>
</p>
<p>
[1] Press William H et al., Numerical Recipes 3rd Edition: The Art of Scientific
Computing, 3rd ed. (Cambridge University Press, 2007).
</p>
<p>
[2] Ernst Hairer, Syvert P. N&#248;rsett, and Gerhard Wanner, Solving Ordinary
Differential Equations I: Nonstiff Problems, 2nd ed. (Springer, Berlin, 2009).
</p>
<p>
[3] Ernst Hairer and Gerhard Wanner, Solving Ordinary Differential Equations
II: Stiff and Differential-Algebraic Problems, 2nd ed. (Springer, Berlin,
2010).
</p>
<p>
<span class="bold"><strong>Symplectic integration of numerical integration:</strong></span>
</p>
<p>
[4] Ernst Hairer, Gerhard Wanner, and Christian Lubich, Geometric Numerical
Integration: Structure-Preserving Algorithms for Ordinary Differential Equations,
2nd ed. (Springer-Verlag Gmbh, 2006).
</p>
<p>
[5] Leimkuhler Benedict and Reich Sebastian, Simulating Hamiltonian Dynamics
(Cambridge University Press, 2005).
</p>
<p>
<span class="bold"><strong>Special symplectic methods:</strong></span>
</p>
<p>
[6] Haruo Yoshida, &#8220;Construction of higher order symplectic integrators,&#8221;
Physics Letters A 150, no. 5 (November 12, 1990): 262-268.
</p>
<p>
[7] Robert I. McLachlan, &#8220;On the numerical integration of ordinary differential
equations by symmetric composition methods,&#8221; SIAM J. Sci. Comput. 16, no.
1 (1995): 151-168.
</p>
<p>
<span class="bold"><strong>Special systems:</strong></span>
</p>
<p>
[8] <a href="http://www.scholarpedia.org/article/Fermi-Pasta-Ulam_nonlinear_lattice_oscillations" target="_top">Fermi-Pasta-Ulam
nonlinear lattice oscillations</a>
</p>
<p>
[9] Arkady Pikovsky, Michael Rosemblum, and J&#252;rgen Kurths, Synchronization:
A Universal Concept in Nonlinear Sciences. (Cambridge University Press, 2001).
</p>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright &#169; 2009-2011 Karsten Ahnert
and Mario Mulansky<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
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>)
</p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="all_examples.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../tutorial.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="../odeint_in_detail.html"><img src="../../images/next.png" alt="Next"></a>
</div>
</body>
</html>

View File

@ -1,300 +0,0 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Solar system</title>
<link rel="stylesheet" href="../../boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
<link rel="home" href="../../index.html" title="Chapter&#160;1.&#160;Boost.Numeric.Odeint">
<link rel="up" href="../tutorial.html" title="Tutorial">
<link rel="prev" href="harmonic_oscillator.html" title="Harmonic oscillator">
<link rel="next" href="chaotic_systems_and_lyapunov_exponents.html" title="Chaotic systems and Lyapunov exponents">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<div class="spirit-nav">
<a accesskey="p" href="harmonic_oscillator.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../tutorial.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="chaotic_systems_and_lyapunov_exponents.html"><img src="../../images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h3 class="title">
<a name="boost_numeric_odeint.tutorial.solar_system"></a><a class="link" href="solar_system.html" title="Solar system">Solar system</a>
</h3></div></div></div>
<div class="toc"><dl>
<dt><span class="section"><a href="solar_system.html#boost_numeric_odeint.tutorial.solar_system.gravitation_and_energy_conservation">Gravitation
and energy conservation</a></span></dt>
<dt><span class="section"><a href="solar_system.html#boost_numeric_odeint.tutorial.solar_system.define_the_system_function">Define
the system function</a></span></dt>
</dl></div>
<div class="section">
<div class="titlepage"><div><div><h4 class="title">
<a name="boost_numeric_odeint.tutorial.solar_system.gravitation_and_energy_conservation"></a><a class="link" href="solar_system.html#boost_numeric_odeint.tutorial.solar_system.gravitation_and_energy_conservation" title="Gravitation and energy conservation">Gravitation
and energy conservation</a>
</h4></div></div></div>
<p>
The next example in this tutorial is a simulation of the outer solar system,
consisting of the sun, Jupiter, Saturn, Uranus, Neptune and Pluto.
</p>
<p>
<span class="inlinemediaobject"><img src="../../solar_system.jpg" alt="solar_system"></span>
</p>
<p>
Each planet and of course the sun will be represented by mass points. The
interaction force between each object is the gravitational force which
can be written as
</p>
<p>
<span class="emphasis"><em>F<sub>&#8203;ij</sub> = -&#947; m<sub>&#8203;i</sub> m<sub>&#8203;j</sub> ( q<sub>&#8203;i</sub> - q<sub>&#8203;j</sub> ) / | q<sub>&#8203;i</sub> - q<sub>&#8203;j</sub> | <sup>3</sup></em></span>
</p>
<p>
where <span class="emphasis"><em>&#947;</em></span> is the gravitational constant, <span class="emphasis"><em>m<sub>&#8203;i</sub></em></span>
and <span class="emphasis"><em>m<sub>&#8203;j</sub></em></span> are the masses and <span class="emphasis"><em>q<sub>&#8203;i</sub></em></span>
and <span class="emphasis"><em>q<sub>&#8203;j</sub></em></span> are the locations of the two objects. The equations
of motion are then
</p>
<p>
<span class="emphasis"><em>dq<sub>&#8203;i</sub> / dt = p<sub>&#8203;i</sub></em></span>
</p>
<p>
<span class="emphasis"><em>dp<sub>&#8203;i</sub> / dt = 1 / m<sub>&#8203;i</sub> &#931;<sub>&#8203;ji</sub> F<sub>&#8203;ij</sub></em></span>
</p>
<p>
where <span class="emphasis"><em>p<sub>&#8203;i</sub></em></span> is the momenta of object <span class="emphasis"><em>i</em></span>.
The equations of motion can also be derived from the Hamiltonian
</p>
<p>
<span class="emphasis"><em>H = &#931;<sub>&#8203;i</sub> p<sub>&#8203;i</sub><sup>2</sup> / ( 2 m<sub>&#8203;i</sub> ) + &#931;<sub>&#8203;j</sub> V( q<sub>&#8203;i</sub> , q<sub>&#8203;j</sub> )</em></span>
</p>
<p>
with the interaction potential <span class="emphasis"><em>V(q<sub>&#8203;i</sub>,q<sub>&#8203;j</sub>)</em></span>. The Hamiltonian
equations give the equations of motion
</p>
<p>
<span class="emphasis"><em>dq<sub>&#8203;i</sub> / dt = dH / dp<sub>&#8203;i</sub></em></span>
</p>
<p>
<span class="emphasis"><em>dp<sub>&#8203;i</sub> / dt = -dH / dq<sub>&#8203;i</sub></em></span>
</p>
<p>
In time independent Hamiltonian system the energy and the phase space volume
are conserved and special integration methods have to be applied in order
to ensure these conservation laws. The odeint library provides classes
for separable Hamiltonian systems, which can be written in the form <span class="emphasis"><em>H
= &#931;
p<sub>&#8203;i</sub><sup>2</sup> / (2m<sub>&#8203;i</sub>) + H<sub>&#8203;q</sub>(q)</em></span>, where <span class="emphasis"><em>H<sub>&#8203;q</sub>(q)</em></span> only
depends on the coordinates. Although this functional form might look a
bit arbitrary, it covers nearly all classical mechanical systems with inertia
and without dissipation, or where the equations of motion can be written
in the form <span class="emphasis"><em>dq<sub>&#8203;i</sub> / dt = p<sub>&#8203;i</sub></em></span> / m<sub>&#8203;i</sub> , <span class="emphasis"><em>dp<sub>&#8203;i</sub> / dt =
f( q<sub>&#8203;i</sub> )</em></span>.
</p>
<div class="note"><table border="0" summary="Note">
<tr>
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../images/note.png"></td>
<th align="left">Note</th>
</tr>
<tr><td align="left" valign="top"><p>
A short physical note: While the two-body-problem is known to be integrable,
that means it can be solved with purely analytic techniques, already
the three-body-problem is not solveable. This was found in the end of
the 19th century by H. Poincare which lead to the whole new subject of
<a href="http://en.wikipedia.org/wiki/Chaos_theory" target="_top">Chaos Theory</a>.
</p></td></tr>
</table></div>
</div>
<div class="section">
<div class="titlepage"><div><div><h4 class="title">
<a name="boost_numeric_odeint.tutorial.solar_system.define_the_system_function"></a><a class="link" href="solar_system.html#boost_numeric_odeint.tutorial.solar_system.define_the_system_function" title="Define the system function">Define
the system function</a>
</h4></div></div></div>
<p>
To implement this system we define a 3D point type which will represent
the space as well as the velocity. Therefore, we use the operators from
<a href="http://www.boost.org/doc/libs/release/doc/html/operators.html" target="_top">Boost.Operators</a>:
</p>
<p>
</p>
<pre class="programlisting"><span class="comment">/*the point type */</span>
<span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">class</span> <span class="identifier">T</span> <span class="special">,</span> <span class="identifier">size_t</span> <span class="identifier">Dim</span> <span class="special">&gt;</span>
<span class="keyword">class</span> <span class="identifier">point</span> <span class="special">:</span>
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">additive1</span><span class="special">&lt;</span> <span class="identifier">point</span><span class="special">&lt;</span> <span class="identifier">T</span> <span class="special">,</span> <span class="identifier">Dim</span> <span class="special">&gt;</span> <span class="special">,</span>
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">additive2</span><span class="special">&lt;</span> <span class="identifier">point</span><span class="special">&lt;</span> <span class="identifier">T</span> <span class="special">,</span> <span class="identifier">Dim</span> <span class="special">&gt;</span> <span class="special">,</span> <span class="identifier">T</span> <span class="special">,</span>
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">multiplicative2</span><span class="special">&lt;</span> <span class="identifier">point</span><span class="special">&lt;</span> <span class="identifier">T</span> <span class="special">,</span> <span class="identifier">Dim</span> <span class="special">&gt;</span> <span class="special">,</span> <span class="identifier">T</span>
<span class="special">&gt;</span> <span class="special">&gt;</span> <span class="special">&gt;</span>
<span class="special">{</span>
<span class="keyword">public</span><span class="special">:</span>
<span class="keyword">const</span> <span class="keyword">static</span> <span class="identifier">size_t</span> <span class="identifier">dim</span> <span class="special">=</span> <span class="identifier">Dim</span><span class="special">;</span>
<span class="keyword">typedef</span> <span class="identifier">T</span> <span class="identifier">value_type</span><span class="special">;</span>
<span class="keyword">typedef</span> <span class="identifier">point</span><span class="special">&lt;</span> <span class="identifier">value_type</span> <span class="special">,</span> <span class="identifier">dim</span> <span class="special">&gt;</span> <span class="identifier">point_type</span><span class="special">;</span>
<span class="comment">// ...</span>
<span class="comment">// constructors</span>
<span class="comment">// ...</span>
<span class="comment">// operators</span>
<span class="keyword">private</span><span class="special">:</span>
<span class="identifier">T</span> <span class="identifier">m_val</span><span class="special">[</span><span class="identifier">dim</span><span class="special">];</span>
<span class="special">};</span>
<span class="comment">//...</span>
<span class="comment">// more operators</span>
</pre>
<p>
</p>
<p>
The next step is to define a container type storing the values of <span class="emphasis"><em>q</em></span>
and <span class="emphasis"><em>p</em></span> and to define system functions. As container
type we use <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">array</span></code>
</p>
<p>
</p>
<pre class="programlisting"><span class="comment">// we simulate 5 planets and the sun</span>
<span class="keyword">const</span> <span class="identifier">size_t</span> <span class="identifier">n</span> <span class="special">=</span> <span class="number">6</span><span class="special">;</span>
<span class="keyword">typedef</span> <span class="identifier">point</span><span class="special">&lt;</span> <span class="keyword">double</span> <span class="special">,</span> <span class="number">3</span> <span class="special">&gt;</span> <span class="identifier">point_type</span><span class="special">;</span>
<span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">array</span><span class="special">&lt;</span> <span class="identifier">point_type</span> <span class="special">,</span> <span class="identifier">n</span> <span class="special">&gt;</span> <span class="identifier">container_type</span><span class="special">;</span>
<span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">array</span><span class="special">&lt;</span> <span class="keyword">double</span> <span class="special">,</span> <span class="identifier">n</span> <span class="special">&gt;</span> <span class="identifier">mass_type</span><span class="special">;</span>
</pre>
<p>
</p>
<p>
The <code class="computeroutput"><span class="identifier">container_type</span></code> is different
from the state type of the ODE. The state type of the ode is simply a
<code class="computeroutput"><span class="identifier">pair</span><span class="special">&lt;</span>
<span class="identifier">container_type</span> <span class="special">,</span>
<span class="identifier">container_type</span> <span class="special">&gt;</span></code>
since it needs the information about the coordinates and the momenta.
</p>
<p>
Next we define the system's equations. As we will use a stepper that accounts
for the Hamiltonian (energy-preserving) character of the system, we have
to define the rhs different from the usual case where it is just a single
function. The stepper will make use of the separable character, which means
the system will be defined by two objects representing <span class="emphasis"><em>f(p) =
-dH/dq</em></span> and <span class="emphasis"><em>g(q) = dH/dp</em></span>:
</p>
<p>
</p>
<pre class="programlisting"><span class="keyword">const</span> <span class="keyword">double</span> <span class="identifier">gravitational_constant</span> <span class="special">=</span> <span class="number">2.95912208286e-4</span><span class="special">;</span>
<span class="keyword">struct</span> <span class="identifier">solar_system_coor</span>
<span class="special">{</span>
<span class="keyword">const</span> <span class="identifier">mass_type</span> <span class="special">&amp;</span><span class="identifier">m_masses</span><span class="special">;</span>
<span class="identifier">solar_system_coor</span><span class="special">(</span> <span class="keyword">const</span> <span class="identifier">mass_type</span> <span class="special">&amp;</span><span class="identifier">masses</span> <span class="special">)</span> <span class="special">:</span> <span class="identifier">m_masses</span><span class="special">(</span> <span class="identifier">masses</span> <span class="special">)</span> <span class="special">{</span> <span class="special">}</span>
<span class="keyword">void</span> <span class="keyword">operator</span><span class="special">()(</span> <span class="keyword">const</span> <span class="identifier">container_type</span> <span class="special">&amp;</span><span class="identifier">p</span> <span class="special">,</span> <span class="identifier">container_type</span> <span class="special">&amp;</span><span class="identifier">dqdt</span> <span class="special">)</span> <span class="keyword">const</span>
<span class="special">{</span>
<span class="keyword">for</span><span class="special">(</span> <span class="identifier">size_t</span> <span class="identifier">i</span><span class="special">=</span><span class="number">0</span> <span class="special">;</span> <span class="identifier">i</span><span class="special">&lt;</span><span class="identifier">n</span> <span class="special">;</span> <span class="special">++</span><span class="identifier">i</span> <span class="special">)</span>
<span class="identifier">dqdt</span><span class="special">[</span><span class="identifier">i</span><span class="special">]</span> <span class="special">=</span> <span class="identifier">p</span><span class="special">[</span><span class="identifier">i</span><span class="special">]</span> <span class="special">/</span> <span class="identifier">m_masses</span><span class="special">[</span><span class="identifier">i</span><span class="special">];</span>
<span class="special">}</span>
<span class="special">};</span>
</pre>
<p>
</p>
<p>
</p>
<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">solar_system_momentum</span>
<span class="special">{</span>
<span class="keyword">const</span> <span class="identifier">mass_type</span> <span class="special">&amp;</span><span class="identifier">m_masses</span><span class="special">;</span>
<span class="identifier">solar_system_momentum</span><span class="special">(</span> <span class="keyword">const</span> <span class="identifier">mass_type</span> <span class="special">&amp;</span><span class="identifier">masses</span> <span class="special">)</span> <span class="special">:</span> <span class="identifier">m_masses</span><span class="special">(</span> <span class="identifier">masses</span> <span class="special">)</span> <span class="special">{</span> <span class="special">}</span>
<span class="keyword">void</span> <span class="keyword">operator</span><span class="special">()(</span> <span class="keyword">const</span> <span class="identifier">container_type</span> <span class="special">&amp;</span><span class="identifier">q</span> <span class="special">,</span> <span class="identifier">container_type</span> <span class="special">&amp;</span><span class="identifier">dpdt</span> <span class="special">)</span> <span class="keyword">const</span>
<span class="special">{</span>
<span class="keyword">const</span> <span class="identifier">size_t</span> <span class="identifier">n</span> <span class="special">=</span> <span class="identifier">q</span><span class="special">.</span><span class="identifier">size</span><span class="special">();</span>
<span class="keyword">for</span><span class="special">(</span> <span class="identifier">size_t</span> <span class="identifier">i</span><span class="special">=</span><span class="number">0</span> <span class="special">;</span> <span class="identifier">i</span><span class="special">&lt;</span><span class="identifier">n</span> <span class="special">;</span> <span class="special">++</span><span class="identifier">i</span> <span class="special">)</span>
<span class="special">{</span>
<span class="identifier">dpdt</span><span class="special">[</span><span class="identifier">i</span><span class="special">]</span> <span class="special">=</span> <span class="number">0.0</span><span class="special">;</span>
<span class="keyword">for</span><span class="special">(</span> <span class="identifier">size_t</span> <span class="identifier">j</span><span class="special">=</span><span class="number">0</span> <span class="special">;</span> <span class="identifier">j</span><span class="special">&lt;</span><span class="identifier">i</span> <span class="special">;</span> <span class="special">++</span><span class="identifier">j</span> <span class="special">)</span>
<span class="special">{</span>
<span class="identifier">point_type</span> <span class="identifier">diff</span> <span class="special">=</span> <span class="identifier">q</span><span class="special">[</span><span class="identifier">j</span><span class="special">]</span> <span class="special">-</span> <span class="identifier">q</span><span class="special">[</span><span class="identifier">i</span><span class="special">];</span>
<span class="keyword">double</span> <span class="identifier">d</span> <span class="special">=</span> <span class="identifier">abs</span><span class="special">(</span> <span class="identifier">diff</span> <span class="special">);</span>
<span class="identifier">diff</span> <span class="special">*=</span> <span class="special">(</span> <span class="identifier">gravitational_constant</span> <span class="special">*</span> <span class="identifier">m_masses</span><span class="special">[</span><span class="identifier">i</span><span class="special">]</span> <span class="special">*</span> <span class="identifier">m_masses</span><span class="special">[</span><span class="identifier">j</span><span class="special">]</span> <span class="special">/</span> <span class="identifier">d</span> <span class="special">/</span> <span class="identifier">d</span> <span class="special">/</span> <span class="identifier">d</span> <span class="special">);</span>
<span class="identifier">dpdt</span><span class="special">[</span><span class="identifier">i</span><span class="special">]</span> <span class="special">+=</span> <span class="identifier">diff</span><span class="special">;</span>
<span class="identifier">dpdt</span><span class="special">[</span><span class="identifier">j</span><span class="special">]</span> <span class="special">-=</span> <span class="identifier">diff</span><span class="special">;</span>
<span class="special">}</span>
<span class="special">}</span>
<span class="special">}</span>
<span class="special">};</span>
</pre>
<p>
</p>
<p>
In general a three body-system is chaotic, hence we can not expect that
arbitrary initial conditions of the system will lead to a dynamic which
is comparable with the solar system. That is we have to define proper initial
conditions, which are taken from the book of Hairer, Wannier, Lubich.
</p>
<p>
As mentioned above, we need to use some special integrators in order to
conserve phase space volume. There is a well known family of such integrators,
the so-called Runge-Kutta-Nystroem solvers, which we apply here in terms
of a <code class="computeroutput"><span class="identifier">symplectic_rkn_sb3a_mclachlan</span></code>
stepper:
</p>
<p>
</p>
<pre class="programlisting"><span class="keyword">typedef</span> <span class="identifier">symplectic_rkn_sb3a_mclachlan</span><span class="special">&lt;</span> <span class="identifier">container_type</span> <span class="special">&gt;</span> <span class="identifier">stepper_type</span><span class="special">;</span>
<span class="keyword">const</span> <span class="keyword">double</span> <span class="identifier">dt</span> <span class="special">=</span> <span class="number">100.0</span><span class="special">;</span>
<span class="identifier">integrate_const</span><span class="special">(</span>
<span class="identifier">stepper_type</span><span class="special">()</span> <span class="special">,</span>
<span class="identifier">make_pair</span><span class="special">(</span> <span class="identifier">solar_system_coor</span><span class="special">(</span> <span class="identifier">masses</span> <span class="special">)</span> <span class="special">,</span> <span class="identifier">solar_system_momentum</span><span class="special">(</span> <span class="identifier">masses</span> <span class="special">)</span> <span class="special">)</span> <span class="special">,</span>
<span class="identifier">make_pair</span><span class="special">(</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">ref</span><span class="special">(</span> <span class="identifier">q</span> <span class="special">)</span> <span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">ref</span><span class="special">(</span> <span class="identifier">p</span> <span class="special">)</span> <span class="special">)</span> <span class="special">,</span>
<span class="number">0.0</span> <span class="special">,</span> <span class="number">200000.0</span> <span class="special">,</span> <span class="identifier">dt</span> <span class="special">,</span> <span class="identifier">streaming_observer</span><span class="special">(</span> <span class="identifier">cout</span> <span class="special">)</span> <span class="special">);</span>
</pre>
<p>
</p>
<p>
These integration routine was used to produce the above sketch of the solar
system. Note, that there are two particularities in this example. First,
the state of the symplectic stepper is not <code class="computeroutput"><span class="identifier">container_type</span></code>
but a pair of <code class="computeroutput"><span class="identifier">container_type</span></code>.
Hence, we must pass such a pair to the integrate function. Since, we want
to pass them as references we can simply pack them into <a href="http://www.boost.org/doc/libs/release/doc/html/ref.html" target="_top">Boost.Ref</a>.
The second point is the observer, which is called with a state type, hence
a pair of <code class="computeroutput"><span class="identifier">container_type</span></code>.
The reference wrapper is also passed, but this is not a problem at all:
</p>
<p>
</p>
<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">streaming_observer</span>
<span class="special">{</span>
<span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream</span><span class="special">&amp;</span> <span class="identifier">m_out</span><span class="special">;</span>
<span class="identifier">streaming_observer</span><span class="special">(</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream</span> <span class="special">&amp;</span><span class="identifier">out</span> <span class="special">)</span> <span class="special">:</span> <span class="identifier">m_out</span><span class="special">(</span> <span class="identifier">out</span> <span class="special">)</span> <span class="special">{</span> <span class="special">}</span>
<span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">class</span> <span class="identifier">State</span> <span class="special">&gt;</span>
<span class="keyword">void</span> <span class="keyword">operator</span><span class="special">()(</span> <span class="keyword">const</span> <span class="identifier">State</span> <span class="special">&amp;</span><span class="identifier">x</span> <span class="special">,</span> <span class="keyword">double</span> <span class="identifier">t</span> <span class="special">)</span> <span class="keyword">const</span>
<span class="special">{</span>
<span class="identifier">container_type</span> <span class="special">&amp;</span><span class="identifier">q</span> <span class="special">=</span> <span class="identifier">x</span><span class="special">.</span><span class="identifier">first</span><span class="special">;</span>
<span class="identifier">m_out</span> <span class="special">&lt;&lt;</span> <span class="identifier">t</span><span class="special">;</span>
<span class="keyword">for</span><span class="special">(</span> <span class="identifier">size_t</span> <span class="identifier">i</span><span class="special">=</span><span class="number">0</span> <span class="special">;</span> <span class="identifier">i</span><span class="special">&lt;</span><span class="identifier">q</span><span class="special">.</span><span class="identifier">size</span><span class="special">()</span> <span class="special">;</span> <span class="special">++</span><span class="identifier">i</span> <span class="special">)</span> <span class="identifier">m_out</span> <span class="special">&lt;&lt;</span> <span class="string">"\t"</span> <span class="special">&lt;&lt;</span> <span class="identifier">q</span><span class="special">[</span><span class="identifier">i</span><span class="special">];</span>
<span class="identifier">m_out</span> <span class="special">&lt;&lt;</span> <span class="string">"\n"</span><span class="special">;</span>
<span class="special">}</span>
<span class="special">};</span>
</pre>
<p>
</p>
<p>
The full example can be found here: <a href="https://github.com/headmyshoulder/odeint-v2/tree/master/libs/numeric/odeint/examples/solar_system.cpp" target="_top">solar_system.cpp</a>
</p>
</div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright &#169; 2009-2011 Karsten Ahnert
and Mario Mulansky<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
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>)
</p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="harmonic_oscillator.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../tutorial.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="chaotic_systems_and_lyapunov_exponents.html"><img src="../../images/next.png" alt="Next"></a>
</div>
</body>
</html>

File diff suppressed because it is too large Load Diff

View File

@ -1,163 +0,0 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Stiff systems</title>
<link rel="stylesheet" href="../../boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
<link rel="home" href="../../index.html" title="Chapter&#160;1.&#160;Boost.Numeric.Odeint">
<link rel="up" href="../tutorial.html" title="Tutorial">
<link rel="prev" href="chaotic_systems_and_lyapunov_exponents.html" title="Chaotic systems and Lyapunov exponents">
<link rel="next" href="special_topics.html" title="Special topics">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<div class="spirit-nav">
<a accesskey="p" href="chaotic_systems_and_lyapunov_exponents.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../tutorial.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="special_topics.html"><img src="../../images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h3 class="title">
<a name="boost_numeric_odeint.tutorial.stiff_systems"></a><a class="link" href="stiff_systems.html" title="Stiff systems">Stiff systems</a>
</h3></div></div></div>
<p>
An important class of ordinary differential equations are so called stiff
system which are characterized by two or more time scales of different order.
Examples of such systems are found in chemical systems where reaction rates
of individual sub-reaction might differ over large ranges, for example:
</p>
<p>
<span class="emphasis"><em>d S<sub>&#8203;1</sub> / dt = - 101 S<sub>&#8203;2</sub> - 100 S<sub>&#8203;1</sub></em></span>
</p>
<p>
<span class="emphasis"><em>d S<sub>&#8203;2</sub> / dt = S<sub>&#8203;1</sub></em></span>
</p>
<p>
To solve stiff systems efficiently using numerics the Jacobian
</p>
<p>
<span class="emphasis"><em>J = d f<sub>&#8203;i</sub> / d x<sub>&#8203;j</sub></em></span>
</p>
<p>
is needed. Here is the definition of the above example
</p>
<p>
</p>
<pre class="programlisting"><span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">numeric</span><span class="special">::</span><span class="identifier">ublas</span><span class="special">::</span><span class="identifier">vector</span><span class="special">&lt;</span> <span class="keyword">double</span> <span class="special">&gt;</span> <span class="identifier">vector_type</span><span class="special">;</span>
<span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">numeric</span><span class="special">::</span><span class="identifier">ublas</span><span class="special">::</span><span class="identifier">matrix</span><span class="special">&lt;</span> <span class="keyword">double</span> <span class="special">&gt;</span> <span class="identifier">matrix_type</span><span class="special">;</span>
<span class="keyword">struct</span> <span class="identifier">stiff_system</span>
<span class="special">{</span>
<span class="keyword">void</span> <span class="keyword">operator</span><span class="special">()(</span> <span class="keyword">const</span> <span class="identifier">vector_type</span> <span class="special">&amp;</span><span class="identifier">x</span> <span class="special">,</span> <span class="identifier">vector_type</span> <span class="special">&amp;</span><span class="identifier">dxdt</span> <span class="special">,</span> <span class="keyword">double</span> <span class="comment">/* t */</span> <span class="special">)</span>
<span class="special">{</span>
<span class="identifier">dxdt</span><span class="special">[</span> <span class="number">0</span> <span class="special">]</span> <span class="special">=</span> <span class="special">-</span><span class="number">101.0</span> <span class="special">*</span> <span class="identifier">x</span><span class="special">[</span> <span class="number">0</span> <span class="special">]</span> <span class="special">-</span> <span class="number">100.0</span> <span class="special">*</span> <span class="identifier">x</span><span class="special">[</span> <span class="number">1</span> <span class="special">];</span>
<span class="identifier">dxdt</span><span class="special">[</span> <span class="number">1</span> <span class="special">]</span> <span class="special">=</span> <span class="identifier">x</span><span class="special">[</span> <span class="number">0</span> <span class="special">];</span>
<span class="special">}</span>
<span class="special">};</span>
<span class="keyword">struct</span> <span class="identifier">stiff_system_jacobi</span>
<span class="special">{</span>
<span class="keyword">void</span> <span class="keyword">operator</span><span class="special">()(</span> <span class="keyword">const</span> <span class="identifier">vector_type</span> <span class="special">&amp;</span> <span class="comment">/* x */</span> <span class="special">,</span> <span class="identifier">matrix_type</span> <span class="special">&amp;</span><span class="identifier">J</span> <span class="special">,</span> <span class="keyword">const</span> <span class="keyword">double</span> <span class="special">&amp;</span> <span class="comment">/* t */</span> <span class="special">,</span> <span class="identifier">vector_type</span> <span class="special">&amp;</span><span class="identifier">dfdt</span> <span class="special">)</span>
<span class="special">{</span>
<span class="identifier">J</span><span class="special">(</span> <span class="number">0</span> <span class="special">,</span> <span class="number">0</span> <span class="special">)</span> <span class="special">=</span> <span class="special">-</span><span class="number">101.0</span><span class="special">;</span>
<span class="identifier">J</span><span class="special">(</span> <span class="number">0</span> <span class="special">,</span> <span class="number">1</span> <span class="special">)</span> <span class="special">=</span> <span class="special">-</span><span class="number">100.0</span><span class="special">;</span>
<span class="identifier">J</span><span class="special">(</span> <span class="number">1</span> <span class="special">,</span> <span class="number">0</span> <span class="special">)</span> <span class="special">=</span> <span class="number">1.0</span><span class="special">;</span>
<span class="identifier">J</span><span class="special">(</span> <span class="number">1</span> <span class="special">,</span> <span class="number">1</span> <span class="special">)</span> <span class="special">=</span> <span class="number">0.0</span><span class="special">;</span>
<span class="identifier">dfdt</span><span class="special">[</span><span class="number">0</span><span class="special">]</span> <span class="special">=</span> <span class="number">0.0</span><span class="special">;</span>
<span class="identifier">dfdt</span><span class="special">[</span><span class="number">1</span><span class="special">]</span> <span class="special">=</span> <span class="number">0.0</span><span class="special">;</span>
<span class="special">}</span>
<span class="special">};</span>
</pre>
<p>
</p>
<p>
The state type has to be a <code class="computeroutput"><span class="identifier">ublas</span><span class="special">::</span><span class="identifier">vector</span></code>
and the matrix type must by a <code class="computeroutput"><span class="identifier">ublas</span><span class="special">::</span><span class="identifier">matrix</span></code>
since the stiff integrator only accepts these types. However, you might want
use non-stiff intgrators on this system, too - we will do so later for demonstration.
Therefore we want to use the same function also with other state_types, realized
by templatizing the <code class="computeroutput"><span class="keyword">operator</span><span class="special">()</span></code>:
</p>
<p>
</p>
<pre class="programlisting"><span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">numeric</span><span class="special">::</span><span class="identifier">ublas</span><span class="special">::</span><span class="identifier">vector</span><span class="special">&lt;</span> <span class="keyword">double</span> <span class="special">&gt;</span> <span class="identifier">vector_type</span><span class="special">;</span>
<span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">numeric</span><span class="special">::</span><span class="identifier">ublas</span><span class="special">::</span><span class="identifier">matrix</span><span class="special">&lt;</span> <span class="keyword">double</span> <span class="special">&gt;</span> <span class="identifier">matrix_type</span><span class="special">;</span>
<span class="keyword">struct</span> <span class="identifier">stiff_system</span>
<span class="special">{</span>
<span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">class</span> <span class="identifier">State</span> <span class="special">&gt;</span>
<span class="keyword">void</span> <span class="keyword">operator</span><span class="special">()(</span> <span class="keyword">const</span> <span class="identifier">State</span> <span class="special">&amp;</span><span class="identifier">x</span> <span class="special">,</span> <span class="identifier">State</span> <span class="special">&amp;</span><span class="identifier">dxdt</span> <span class="special">,</span> <span class="keyword">double</span> <span class="identifier">t</span> <span class="special">)</span>
<span class="special">{</span>
<span class="special">...</span>
<span class="special">}</span>
<span class="special">};</span>
<span class="keyword">struct</span> <span class="identifier">stiff_system_jacobi</span>
<span class="special">{</span>
<span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">class</span> <span class="identifier">State</span> <span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Matrix</span> <span class="special">&gt;</span>
<span class="keyword">void</span> <span class="keyword">operator</span><span class="special">()(</span> <span class="keyword">const</span> <span class="identifier">State</span> <span class="special">&amp;</span><span class="identifier">x</span> <span class="special">,</span> <span class="identifier">Matrix</span> <span class="special">&amp;</span><span class="identifier">J</span> <span class="special">,</span> <span class="keyword">const</span> <span class="keyword">double</span> <span class="special">&amp;</span><span class="identifier">t</span> <span class="special">,</span> <span class="identifier">State</span> <span class="special">&amp;</span><span class="identifier">dfdt</span> <span class="special">)</span>
<span class="special">{</span>
<span class="special">...</span>
<span class="special">}</span>
<span class="special">};</span>
</pre>
<p>
</p>
<p>
Now you can use <code class="computeroutput"><span class="identifier">stiff_system</span></code>
in combination with <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span></code> or <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">array</span></code>.
In the example the explicit time derivative of <span class="emphasis"><em>f(x,t)</em></span>
is introduced separately in the Jacobian. If <span class="emphasis"><em>df / dt = 0</em></span>
simply fill <code class="computeroutput"><span class="identifier">dfdt</span></code> with zeros.
</p>
<p>
A well know solver for stiff systems is the so called Rosenbrock method.
It has a step size control and dense output facilities and can be used like
all the other stepper:
</p>
<p>
</p>
<pre class="programlisting"><span class="identifier">vector_type</span> <span class="identifier">x</span><span class="special">(</span> <span class="number">2</span> <span class="special">,</span> <span class="number">1.0</span> <span class="special">);</span>
<span class="identifier">size_t</span> <span class="identifier">num_of_steps</span> <span class="special">=</span> <span class="identifier">integrate_const</span><span class="special">(</span> <span class="identifier">make_dense_output</span><span class="special">&lt;</span> <span class="identifier">rosenbrock4</span><span class="special">&lt;</span> <span class="keyword">double</span> <span class="special">&gt;</span> <span class="special">&gt;(</span> <span class="number">1.0e-6</span> <span class="special">,</span> <span class="number">1.0e-6</span> <span class="special">)</span> <span class="special">,</span>
<span class="identifier">make_pair</span><span class="special">(</span> <span class="identifier">stiff_system</span><span class="special">()</span> <span class="special">,</span> <span class="identifier">stiff_system_jacobi</span><span class="special">()</span> <span class="special">)</span> <span class="special">,</span>
<span class="identifier">x</span> <span class="special">,</span> <span class="number">0.0</span> <span class="special">,</span> <span class="number">50.0</span> <span class="special">,</span> <span class="number">0.01</span> <span class="special">,</span>
<span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">phoenix</span><span class="special">::</span><span class="identifier">arg_names</span><span class="special">::</span><span class="identifier">arg2</span> <span class="special">&lt;&lt;</span> <span class="string">" "</span> <span class="special">&lt;&lt;</span> <span class="identifier">phoenix</span><span class="special">::</span><span class="identifier">arg_names</span><span class="special">::</span><span class="identifier">arg1</span><span class="special">[</span><span class="number">0</span><span class="special">]</span> <span class="special">&lt;&lt;</span> <span class="string">"\n"</span> <span class="special">);</span>
</pre>
<p>
</p>
<p>
During the integration 71 steps have been done. Comparing to a classical
Runge-Kutta solver this is a very good result. For example the Dormand-Prince
5 method with step size control and dense output yields 1531 steps.
</p>
<p>
</p>
<pre class="programlisting"><span class="identifier">vector_type</span> <span class="identifier">x2</span><span class="special">(</span> <span class="number">2</span> <span class="special">,</span> <span class="number">1.0</span> <span class="special">);</span>
<span class="identifier">size_t</span> <span class="identifier">num_of_steps2</span> <span class="special">=</span> <span class="identifier">integrate_const</span><span class="special">(</span> <span class="identifier">make_dense_output</span><span class="special">&lt;</span> <span class="identifier">runge_kutta_dopri5</span><span class="special">&lt;</span> <span class="identifier">vector_type</span> <span class="special">&gt;</span> <span class="special">&gt;(</span> <span class="number">1.0e-6</span> <span class="special">,</span> <span class="number">1.0e-6</span> <span class="special">)</span> <span class="special">,</span>
<span class="identifier">stiff_system</span><span class="special">()</span> <span class="special">,</span> <span class="identifier">x2</span> <span class="special">,</span> <span class="number">0.0</span> <span class="special">,</span> <span class="number">50.0</span> <span class="special">,</span> <span class="number">0.01</span> <span class="special">,</span>
<span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">phoenix</span><span class="special">::</span><span class="identifier">arg_names</span><span class="special">::</span><span class="identifier">arg2</span> <span class="special">&lt;&lt;</span> <span class="string">" "</span> <span class="special">&lt;&lt;</span> <span class="identifier">phoenix</span><span class="special">::</span><span class="identifier">arg_names</span><span class="special">::</span><span class="identifier">arg1</span><span class="special">[</span><span class="number">0</span><span class="special">]</span> <span class="special">&lt;&lt;</span> <span class="string">"\n"</span> <span class="special">);</span>
</pre>
<p>
</p>
<p>
Note, that we have used <a href="http://www.boost.org/doc/libs/1_46_1/libs/spirit/phoenix/doc/html/index.html" target="_top">Boost.Phoenix</a>,
a great functional programming library to create and compose the observer.
</p>
<p>
The full example can be found here: <a href="https://github.com/headmyshoulder/odeint-v2/tree/master/libs/numeric/odeint/examples/stiff_system.cpp" target="_top">stiff_system.cpp</a>
</p>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright &#169; 2009-2011 Karsten Ahnert
and Mario Mulansky<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
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>)
</p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="chaotic_systems_and_lyapunov_exponents.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../tutorial.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="special_topics.html"><img src="../../images/next.png" alt="Next"></a>
</div>
</body>
</html>

View File

@ -1,691 +0,0 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Using Cuda and Thrust</title>
<link rel="stylesheet" href="../../boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
<link rel="home" href="../../index.html" title="Chapter&#160;1.&#160;Boost.Numeric.Odeint">
<link rel="up" href="../tutorial.html" title="Tutorial">
<link rel="prev" href="special_topics.html" title="Special topics">
<link rel="next" href="using_opencl_and_vexcl.html" title="Using OpenCL and VexCL">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<div class="spirit-nav">
<a accesskey="p" href="special_topics.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../tutorial.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="using_opencl_and_vexcl.html"><img src="../../images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h3 class="title">
<a name="boost_numeric_odeint.tutorial.using_cuda_and_thrust"></a><a class="link" href="using_cuda_and_thrust.html" title="Using Cuda and Thrust">Using
Cuda and Thrust</a>
</h3></div></div></div>
<div class="toc"><dl>
<dt><span class="section"><a href="using_cuda_and_thrust.html#boost_numeric_odeint.tutorial.using_cuda_and_thrust.phase_oscillator_ensemble">Phase
oscillator ensemble</a></span></dt>
<dt><span class="section"><a href="using_cuda_and_thrust.html#boost_numeric_odeint.tutorial.using_cuda_and_thrust.large_oscillator_chains">Large
oscillator chains</a></span></dt>
<dt><span class="section"><a href="using_cuda_and_thrust.html#boost_numeric_odeint.tutorial.using_cuda_and_thrust.parameter_studies">Parameter
studies</a></span></dt>
</dl></div>
<p>
Modern graphic cards (graphic processing units - GPUs) can be used to speed
up the performance of time consuming algorithms by means of massive parallelization.
They are designed to execute many operations in parallel. odeint can utilize
the power of GPUs by means of CUDA and <a href="http://code.google.com/p/thrust/" target="_top">Thrust</a>,
which is a STL-like interface for the native CUDA API.
</p>
<div class="important"><table border="0" summary="Important">
<tr>
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Important]" src="../../images/important.png"></td>
<th align="left">Important</th>
</tr>
<tr><td align="left" valign="top"><p>
Thrust also supports parallelization using OpenMP. You can switch between
CUDA-parallelization and OpenMP-parallelization by a simple compiler switch.
Hence, this also provides an easy way to get basic OpenMP parallelization
into odeint.
</p></td></tr>
</table></div>
<p>
To use odeint with CUDA a few points have to be taken into account. First
of all, the problem has to be well chosen. It makes absolutely no sense to
try to parallelize the code for a three dimensional system, it is simply
to small and not worth the effort. One single function call (kernel execution)
on the GPU is slow but you can do the operation on a huge set of data with
only one call. We have experienced that the vector size over which is parallelized
should be of the order of <span class="emphasis"><em>10<sup>6</sup></em></span> to make full use of the
GPU. Secondly, you have to use <a href="http://code.google.com/p/thrust/" target="_top">Thrust</a>'s
algorithms and functors when implementing the rhs the ODE. This might be
tricky since it involves some kind of functional programming knowledge.
</p>
<p>
Typical applications for CUDA and odeint are large systems, like lattices
or discretizations of PDE, and parameter studies. We introduce now three
examples which show how the power of GPUs can be used in combination with
odeint.
</p>
<div class="important"><table border="0" summary="Important">
<tr>
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Important]" src="../../images/important.png"></td>
<th align="left">Important</th>
</tr>
<tr><td align="left" valign="top"><p>
The full power of CUDA is only available for really large systems where
the number of coupled ordinary differential equations is of order <span class="emphasis"><em>N=10<sup>6</sup></em></span>
or larger. For smaller systems the CPU is usually much faster. You can
also integrate an ensemble of different uncoupled ODEs in parallel as shown
in the last example.
</p></td></tr>
</table></div>
<div class="section">
<div class="titlepage"><div><div><h4 class="title">
<a name="boost_numeric_odeint.tutorial.using_cuda_and_thrust.phase_oscillator_ensemble"></a><a class="link" href="using_cuda_and_thrust.html#boost_numeric_odeint.tutorial.using_cuda_and_thrust.phase_oscillator_ensemble" title="Phase oscillator ensemble">Phase
oscillator ensemble</a>
</h4></div></div></div>
<p>
The first example is the phase oscillator ensemble from the previous section:
</p>
<p>
<span class="emphasis"><em>d&#966;<sub>&#8203;k</sub> / dt = &#969;<sub>&#8203;k</sub> + &#949; / N &#931;<sub>&#8203;j</sub> sin( &#966;<sub>&#8203;j</sub> - &#966;<sub>&#8203;k</sub> ).</em></span>
</p>
<p>
It has a phase transition at <span class="emphasis"><em>&#949; = 2</em></span> in the limit of infinite
numbers of oscillators <span class="emphasis"><em>N</em></span>. In the case of finite <span class="emphasis"><em>N</em></span>
this transition is smeared out but still clearly visible.
</p>
<p>
<a href="http://code.google.com/p/thrust/" target="_top">Thrust</a> and Cuda are
perfectly suited for such kinds of problems where one needs a large number
of particles (oscillators). We start by defining the state type which is
a <code class="computeroutput"><span class="identifier">thrust</span><span class="special">::</span><span class="identifier">device_vector</span></code>. The content of this vector
lives on the GPU. If you are not familiar with this we recommend reading
the <span class="emphasis"><em>Getting started</em></span> section on the <a href="http://code.google.com/p/thrust/" target="_top">Thrust</a>
website.
</p>
<p>
</p>
<pre class="programlisting"><span class="comment">//change this to float if your device does not support double computation</span>
<span class="keyword">typedef</span> <span class="keyword">double</span> <span class="identifier">value_type</span><span class="special">;</span>
<span class="comment">//change this to host_vector&lt; ... &gt; of you want to run on CPU</span>
<span class="keyword">typedef</span> <span class="identifier">thrust</span><span class="special">::</span><span class="identifier">device_vector</span><span class="special">&lt;</span> <span class="identifier">value_type</span> <span class="special">&gt;</span> <span class="identifier">state_type</span><span class="special">;</span>
<span class="comment">// typedef thrust::host_vector&lt; value_type &gt; state_type;</span>
</pre>
<p>
</p>
<p>
Thrust follows a functional programming approach. If you want to perform
a calculation on the GPU you usually have to call a global function like
<code class="computeroutput"><span class="identifier">thrust</span><span class="special">::</span><span class="identifier">for_each</span></code>, <code class="computeroutput"><span class="identifier">thrust</span><span class="special">::</span><span class="identifier">reduce</span></code>,
... with an appropriate local functor which performs the basic operation.
An example is
</p>
<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">add_two</span>
<span class="special">{</span>
<span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">class</span> <span class="identifier">T</span> <span class="special">&gt;</span>
<span class="identifier">__host__</span> <span class="identifier">__device__</span>
<span class="keyword">void</span> <span class="keyword">operator</span><span class="special">()(</span> <span class="identifier">T</span> <span class="special">&amp;</span><span class="identifier">t</span> <span class="special">)</span> <span class="keyword">const</span>
<span class="special">{</span>
<span class="identifier">t</span> <span class="special">+=</span> <span class="identifier">T</span><span class="special">(</span> <span class="number">2</span> <span class="special">);</span>
<span class="special">}</span>
<span class="special">};</span>
<span class="comment">// ...</span>
<span class="identifier">thrust</span><span class="special">::</span><span class="identifier">for_each</span><span class="special">(</span> <span class="identifier">x</span><span class="special">.</span><span class="identifier">begin</span><span class="special">()</span> <span class="special">,</span> <span class="identifier">x</span><span class="special">.</span><span class="identifier">end</span><span class="special">()</span> <span class="special">,</span> <span class="identifier">add_two</span><span class="special">()</span> <span class="special">);</span>
</pre>
<p>
This code generically adds two to every element in the container <code class="computeroutput"><span class="identifier">x</span></code>.
</p>
<p>
For the purpose of integrating the phase oscillator ensemble we need
</p>
<div class="itemizedlist"><ul class="itemizedlist" type="disc">
<li class="listitem">
to calculate the system function, hence the r.h.s. of the ODE.
</li>
<li class="listitem">
this involves computing the mean field of the oscillator example, i.e.
the values of <span class="emphasis"><em>R</em></span> and <span class="emphasis"><em>&#952;</em></span>
</li>
</ul></div>
<p>
The mean field is calculated in a class <code class="computeroutput"><span class="identifier">mean_field_calculator</span></code>
</p>
<p>
</p>
<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">mean_field_calculator</span>
<span class="special">{</span>
<span class="keyword">struct</span> <span class="identifier">sin_functor</span> <span class="special">:</span> <span class="keyword">public</span> <span class="identifier">thrust</span><span class="special">::</span><span class="identifier">unary_function</span><span class="special">&lt;</span> <span class="identifier">value_type</span> <span class="special">,</span> <span class="identifier">value_type</span> <span class="special">&gt;</span>
<span class="special">{</span>
<span class="identifier">__host__</span> <span class="identifier">__device__</span>
<span class="identifier">value_type</span> <span class="keyword">operator</span><span class="special">()(</span> <span class="identifier">value_type</span> <span class="identifier">x</span><span class="special">)</span> <span class="keyword">const</span>
<span class="special">{</span>
<span class="keyword">return</span> <span class="identifier">sin</span><span class="special">(</span> <span class="identifier">x</span> <span class="special">);</span>
<span class="special">}</span>
<span class="special">};</span>
<span class="keyword">struct</span> <span class="identifier">cos_functor</span> <span class="special">:</span> <span class="keyword">public</span> <span class="identifier">thrust</span><span class="special">::</span><span class="identifier">unary_function</span><span class="special">&lt;</span> <span class="identifier">value_type</span> <span class="special">,</span> <span class="identifier">value_type</span> <span class="special">&gt;</span>
<span class="special">{</span>
<span class="identifier">__host__</span> <span class="identifier">__device__</span>
<span class="identifier">value_type</span> <span class="keyword">operator</span><span class="special">()(</span> <span class="identifier">value_type</span> <span class="identifier">x</span><span class="special">)</span> <span class="keyword">const</span>
<span class="special">{</span>
<span class="keyword">return</span> <span class="identifier">cos</span><span class="special">(</span> <span class="identifier">x</span> <span class="special">);</span>
<span class="special">}</span>
<span class="special">};</span>
<span class="keyword">static</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special">&lt;</span> <span class="identifier">value_type</span> <span class="special">,</span> <span class="identifier">value_type</span> <span class="special">&gt;</span> <span class="identifier">get_mean</span><span class="special">(</span> <span class="keyword">const</span> <span class="identifier">state_type</span> <span class="special">&amp;</span><span class="identifier">x</span> <span class="special">)</span>
<span class="special">{</span>
<span class="identifier">value_type</span> <span class="identifier">sin_sum</span> <span class="special">=</span> <span class="identifier">thrust</span><span class="special">::</span><span class="identifier">reduce</span><span class="special">(</span>
<span class="identifier">thrust</span><span class="special">::</span><span class="identifier">make_transform_iterator</span><span class="special">(</span> <span class="identifier">x</span><span class="special">.</span><span class="identifier">begin</span><span class="special">()</span> <span class="special">,</span> <span class="identifier">sin_functor</span><span class="special">()</span> <span class="special">)</span> <span class="special">,</span>
<span class="identifier">thrust</span><span class="special">::</span><span class="identifier">make_transform_iterator</span><span class="special">(</span> <span class="identifier">x</span><span class="special">.</span><span class="identifier">end</span><span class="special">()</span> <span class="special">,</span> <span class="identifier">sin_functor</span><span class="special">()</span> <span class="special">)</span> <span class="special">);</span>
<span class="identifier">value_type</span> <span class="identifier">cos_sum</span> <span class="special">=</span> <span class="identifier">thrust</span><span class="special">::</span><span class="identifier">reduce</span><span class="special">(</span>
<span class="identifier">thrust</span><span class="special">::</span><span class="identifier">make_transform_iterator</span><span class="special">(</span> <span class="identifier">x</span><span class="special">.</span><span class="identifier">begin</span><span class="special">()</span> <span class="special">,</span> <span class="identifier">cos_functor</span><span class="special">()</span> <span class="special">)</span> <span class="special">,</span>
<span class="identifier">thrust</span><span class="special">::</span><span class="identifier">make_transform_iterator</span><span class="special">(</span> <span class="identifier">x</span><span class="special">.</span><span class="identifier">end</span><span class="special">()</span> <span class="special">,</span> <span class="identifier">cos_functor</span><span class="special">()</span> <span class="special">)</span> <span class="special">);</span>
<span class="identifier">cos_sum</span> <span class="special">/=</span> <span class="identifier">value_type</span><span class="special">(</span> <span class="identifier">x</span><span class="special">.</span><span class="identifier">size</span><span class="special">()</span> <span class="special">);</span>
<span class="identifier">sin_sum</span> <span class="special">/=</span> <span class="identifier">value_type</span><span class="special">(</span> <span class="identifier">x</span><span class="special">.</span><span class="identifier">size</span><span class="special">()</span> <span class="special">);</span>
<span class="identifier">value_type</span> <span class="identifier">K</span> <span class="special">=</span> <span class="identifier">sqrt</span><span class="special">(</span> <span class="identifier">cos_sum</span> <span class="special">*</span> <span class="identifier">cos_sum</span> <span class="special">+</span> <span class="identifier">sin_sum</span> <span class="special">*</span> <span class="identifier">sin_sum</span> <span class="special">);</span>
<span class="identifier">value_type</span> <span class="identifier">Theta</span> <span class="special">=</span> <span class="identifier">atan2</span><span class="special">(</span> <span class="identifier">sin_sum</span> <span class="special">,</span> <span class="identifier">cos_sum</span> <span class="special">);</span>
<span class="keyword">return</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">make_pair</span><span class="special">(</span> <span class="identifier">K</span> <span class="special">,</span> <span class="identifier">Theta</span> <span class="special">);</span>
<span class="special">}</span>
<span class="special">};</span>
</pre>
<p>
</p>
<p>
Inside this class two member structures <code class="computeroutput"><span class="identifier">sin_functor</span></code>
and <code class="computeroutput"><span class="identifier">cos_functor</span></code> are defined.
They compute the sine and the cosine of a value and they are used within
a transform iterator to calculate the sum of <span class="emphasis"><em>sin(&#966;<sub>&#8203;k</sub>)</em></span>
and <span class="emphasis"><em>cos(&#966;<sub>&#8203;k</sub>)</em></span>. The classifiers <code class="computeroutput"><span class="identifier">__host__</span></code>
and <code class="computeroutput"><span class="identifier">__device__</span></code> are CUDA
specific and define a function or operator which can be executed on the
GPU as well as on the CPU. The line
</p>
<p>
</p>
<pre class="programlisting"><span class="identifier">value_type</span> <span class="identifier">sin_sum</span> <span class="special">=</span> <span class="identifier">thrust</span><span class="special">::</span><span class="identifier">reduce</span><span class="special">(</span>
<span class="identifier">thrust</span><span class="special">::</span><span class="identifier">make_transform_iterator</span><span class="special">(</span> <span class="identifier">x</span><span class="special">.</span><span class="identifier">begin</span><span class="special">()</span> <span class="special">,</span> <span class="identifier">sin_functor</span><span class="special">()</span> <span class="special">)</span> <span class="special">,</span>
<span class="identifier">thrust</span><span class="special">::</span><span class="identifier">make_transform_iterator</span><span class="special">(</span> <span class="identifier">x</span><span class="special">.</span><span class="identifier">end</span><span class="special">()</span> <span class="special">,</span> <span class="identifier">sin_functor</span><span class="special">()</span> <span class="special">)</span> <span class="special">);</span>
</pre>
<p>
</p>
<p>
performs the calculation of this sine-sum on the GPU (or on the CPU, depending
on your thrust configuration).
</p>
<p>
The system function is defined via
</p>
<p>
</p>
<pre class="programlisting"><span class="keyword">class</span> <span class="identifier">phase_oscillator_ensemble</span>
<span class="special">{</span>
<span class="keyword">public</span><span class="special">:</span>
<span class="keyword">struct</span> <span class="identifier">sys_functor</span>
<span class="special">{</span>
<span class="identifier">value_type</span> <span class="identifier">m_K</span> <span class="special">,</span> <span class="identifier">m_Theta</span> <span class="special">,</span> <span class="identifier">m_epsilon</span><span class="special">;</span>
<span class="identifier">sys_functor</span><span class="special">(</span> <span class="identifier">value_type</span> <span class="identifier">K</span> <span class="special">,</span> <span class="identifier">value_type</span> <span class="identifier">Theta</span> <span class="special">,</span> <span class="identifier">value_type</span> <span class="identifier">epsilon</span> <span class="special">)</span>
<span class="special">:</span> <span class="identifier">m_K</span><span class="special">(</span> <span class="identifier">K</span> <span class="special">)</span> <span class="special">,</span> <span class="identifier">m_Theta</span><span class="special">(</span> <span class="identifier">Theta</span> <span class="special">)</span> <span class="special">,</span> <span class="identifier">m_epsilon</span><span class="special">(</span> <span class="identifier">epsilon</span> <span class="special">)</span> <span class="special">{</span> <span class="special">}</span>
<span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">class</span> <span class="identifier">Tuple</span> <span class="special">&gt;</span>
<span class="identifier">__host__</span> <span class="identifier">__device__</span>
<span class="keyword">void</span> <span class="keyword">operator</span><span class="special">()(</span> <span class="identifier">Tuple</span> <span class="identifier">t</span> <span class="special">)</span>
<span class="special">{</span>
<span class="identifier">thrust</span><span class="special">::</span><span class="identifier">get</span><span class="special">&lt;</span><span class="number">2</span><span class="special">&gt;(</span><span class="identifier">t</span><span class="special">)</span> <span class="special">=</span> <span class="identifier">thrust</span><span class="special">::</span><span class="identifier">get</span><span class="special">&lt;</span><span class="number">1</span><span class="special">&gt;(</span><span class="identifier">t</span><span class="special">)</span> <span class="special">+</span> <span class="identifier">m_epsilon</span> <span class="special">*</span> <span class="identifier">m_K</span> <span class="special">*</span> <span class="identifier">sin</span><span class="special">(</span> <span class="identifier">m_Theta</span> <span class="special">-</span> <span class="identifier">thrust</span><span class="special">::</span><span class="identifier">get</span><span class="special">&lt;</span><span class="number">0</span><span class="special">&gt;(</span><span class="identifier">t</span><span class="special">)</span> <span class="special">);</span>
<span class="special">}</span>
<span class="special">};</span>
<span class="comment">// ...</span>
<span class="keyword">void</span> <span class="keyword">operator</span><span class="special">()</span> <span class="special">(</span> <span class="keyword">const</span> <span class="identifier">state_type</span> <span class="special">&amp;</span><span class="identifier">x</span> <span class="special">,</span> <span class="identifier">state_type</span> <span class="special">&amp;</span><span class="identifier">dxdt</span> <span class="special">,</span> <span class="keyword">const</span> <span class="identifier">value_type</span> <span class="identifier">dt</span> <span class="special">)</span> <span class="keyword">const</span>
<span class="special">{</span>
<span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special">&lt;</span> <span class="identifier">value_type</span> <span class="special">,</span> <span class="identifier">value_type</span> <span class="special">&gt;</span> <span class="identifier">mean_field</span> <span class="special">=</span> <span class="identifier">mean_field_calculator</span><span class="special">::</span><span class="identifier">get_mean</span><span class="special">(</span> <span class="identifier">x</span> <span class="special">);</span>
<span class="identifier">thrust</span><span class="special">::</span><span class="identifier">for_each</span><span class="special">(</span>
<span class="identifier">thrust</span><span class="special">::</span><span class="identifier">make_zip_iterator</span><span class="special">(</span> <span class="identifier">thrust</span><span class="special">::</span><span class="identifier">make_tuple</span><span class="special">(</span> <span class="identifier">x</span><span class="special">.</span><span class="identifier">begin</span><span class="special">()</span> <span class="special">,</span> <span class="identifier">m_omega</span><span class="special">.</span><span class="identifier">begin</span><span class="special">()</span> <span class="special">,</span> <span class="identifier">dxdt</span><span class="special">.</span><span class="identifier">begin</span><span class="special">()</span> <span class="special">)</span> <span class="special">),</span>
<span class="identifier">thrust</span><span class="special">::</span><span class="identifier">make_zip_iterator</span><span class="special">(</span> <span class="identifier">thrust</span><span class="special">::</span><span class="identifier">make_tuple</span><span class="special">(</span> <span class="identifier">x</span><span class="special">.</span><span class="identifier">end</span><span class="special">()</span> <span class="special">,</span> <span class="identifier">m_omega</span><span class="special">.</span><span class="identifier">end</span><span class="special">()</span> <span class="special">,</span> <span class="identifier">dxdt</span><span class="special">.</span><span class="identifier">end</span><span class="special">())</span> <span class="special">)</span> <span class="special">,</span>
<span class="identifier">sys_functor</span><span class="special">(</span> <span class="identifier">mean_field</span><span class="special">.</span><span class="identifier">first</span> <span class="special">,</span> <span class="identifier">mean_field</span><span class="special">.</span><span class="identifier">second</span> <span class="special">,</span> <span class="identifier">m_epsilon</span> <span class="special">)</span>
<span class="special">);</span>
<span class="special">}</span>
<span class="comment">// ...</span>
<span class="special">};</span>
</pre>
<p>
</p>
<p>
This class is used within the <code class="computeroutput"><span class="identifier">do_step</span></code>
and <code class="computeroutput"><span class="identifier">integrate</span></code> method. It
defines a member structure <code class="computeroutput"><span class="identifier">sys_functor</span></code>
for the r.h.s. of each individual oscillator and the <code class="computeroutput"><span class="keyword">operator</span><span class="special">()</span></code> for the use in the steppers and integrators
of odeint. The functor computes first the mean field of <span class="emphasis"><em>&#966;<sub>&#8203;k</sub></em></span>
and secondly calculates the whole r.h.s. of the ODE using this mean field.
Note, how nicely <code class="computeroutput"><span class="identifier">thrust</span><span class="special">::</span><span class="identifier">tuple</span></code>
and <code class="computeroutput"><span class="identifier">thrust</span><span class="special">::</span><span class="identifier">zip_iterator</span></code> play together.
</p>
<p>
Now, we are ready to put everything together. All we have to do for making
odeint ready for using the GPU is to parametrize the stepper with the appropriate
thrust algebra/operations:
</p>
<p>
</p>
<pre class="programlisting"><span class="keyword">typedef</span> <span class="identifier">runge_kutta4</span><span class="special">&lt;</span> <span class="identifier">state_type</span> <span class="special">,</span> <span class="identifier">value_type</span> <span class="special">,</span> <span class="identifier">state_type</span> <span class="special">,</span> <span class="identifier">value_type</span> <span class="special">,</span> <span class="identifier">thrust_algebra</span> <span class="special">,</span> <span class="identifier">thrust_operations</span> <span class="special">&gt;</span> <span class="identifier">stepper_type</span><span class="special">;</span>
</pre>
<p>
</p>
<p>
Of course, you can also use a controlled or dense output stepper, e.g.
</p>
<p>
</p>
<pre class="programlisting"><span class="keyword">typedef</span> <span class="identifier">runge_kutta_dopri5</span><span class="special">&lt;</span> <span class="identifier">state_type</span> <span class="special">,</span> <span class="identifier">value_type</span> <span class="special">,</span> <span class="identifier">state_type</span> <span class="special">,</span> <span class="identifier">value_type</span> <span class="special">,</span> <span class="identifier">thrust_algebra</span> <span class="special">,</span> <span class="identifier">thrust_operations</span> <span class="special">&gt;</span> <span class="identifier">stepper_type</span><span class="special">;</span>
</pre>
<p>
</p>
<p>
Then, it is straightforward to integrate the phase ensemble by creating
an instance of the rhs class and using an integration function:
</p>
<p>
</p>
<pre class="programlisting"><span class="identifier">phase_oscillator_ensemble</span> <span class="identifier">ensemble</span><span class="special">(</span> <span class="identifier">N</span> <span class="special">,</span> <span class="number">1.0</span> <span class="special">);</span>
</pre>
<p>
</p>
<p>
</p>
<pre class="programlisting"><span class="identifier">size_t</span> <span class="identifier">steps1</span> <span class="special">=</span> <span class="identifier">integrate_const</span><span class="special">(</span> <span class="identifier">make_controlled</span><span class="special">(</span> <span class="number">1.0e-6</span> <span class="special">,</span> <span class="number">1.0e-6</span> <span class="special">,</span> <span class="identifier">stepper_type</span><span class="special">()</span> <span class="special">)</span> <span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">ref</span><span class="special">(</span> <span class="identifier">ensemble</span> <span class="special">)</span> <span class="special">,</span> <span class="identifier">x</span> <span class="special">,</span> <span class="number">0.0</span> <span class="special">,</span> <span class="identifier">t_transients</span> <span class="special">,</span> <span class="identifier">dt</span> <span class="special">);</span>
</pre>
<p>
</p>
<p>
We have to use <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">ref</span></code> here in order to pass the rhs class
as reference and not by value. This ensures that the natural frequencies
of each oscillator are not copied when calling <code class="computeroutput"><span class="identifier">integrate_const</span></code>.
In the full example the performance and results of the Runge-Kutta-4 and
the Dopri5 solver are compared.
</p>
<p>
The full example can be found at <a href="https://github.com/headmyshoulder/odeint-v2/tree/master/libs/numeric/odeint/examples/thrust/phase_oscillator_ensemble.cu" target="_top">phase_oscillator_example.cu</a>.
</p>
</div>
<div class="section">
<div class="titlepage"><div><div><h4 class="title">
<a name="boost_numeric_odeint.tutorial.using_cuda_and_thrust.large_oscillator_chains"></a><a class="link" href="using_cuda_and_thrust.html#boost_numeric_odeint.tutorial.using_cuda_and_thrust.large_oscillator_chains" title="Large oscillator chains">Large
oscillator chains</a>
</h4></div></div></div>
<p>
The next example is a large, one-dimensional chain of nearest-neighbor
coupled phase oscillators with the following equations of motion:
</p>
<p>
<span class="emphasis"><em>d &#966;<sub>&#8203;k</sub> / dt = &#969;<sub>&#8203;k</sub> + sin( &#966;<sub>&#8203;k+1</sub> - &#966;<sub>&#8203;k</sub> ) + sin( &#966;<sub>&#8203;k</sub> - &#966;<sub>&#8203;k-1</sub>)</em></span>
</p>
<p>
In principle we can use all the techniques from the previous phase oscillator
ensemble example, but we have to take special care about the coupling of
the oscillators. To efficiently implement the coupling you can use a very
elegant way employing Thrust's permutation iterator. A permutation iterator
behaves like a normal iterator on a vector but it does not iterate along
the usual order of the elements. It rather iterates along some permutation
of the elements defined by some index map. To realize the nearest neighbor
coupling we create one permutation iterator which travels one step behind
a usual iterator and another permutation iterator which travels one step
in front. The full system class is:
</p>
<p>
</p>
<pre class="programlisting"><span class="comment">//change this to host_vector&lt; ... &gt; if you want to run on CPU</span>
<span class="keyword">typedef</span> <span class="identifier">thrust</span><span class="special">::</span><span class="identifier">device_vector</span><span class="special">&lt;</span> <span class="identifier">value_type</span> <span class="special">&gt;</span> <span class="identifier">state_type</span><span class="special">;</span>
<span class="keyword">typedef</span> <span class="identifier">thrust</span><span class="special">::</span><span class="identifier">device_vector</span><span class="special">&lt;</span> <span class="identifier">size_t</span> <span class="special">&gt;</span> <span class="identifier">index_vector_type</span><span class="special">;</span>
<span class="comment">//typedef thrust::host_vector&lt; value_type &gt; state_type;</span>
<span class="comment">//typedef thrust::host_vector&lt; size_t &gt; index_vector_type;</span>
<span class="keyword">class</span> <span class="identifier">phase_oscillators</span>
<span class="special">{</span>
<span class="keyword">public</span><span class="special">:</span>
<span class="keyword">struct</span> <span class="identifier">sys_functor</span>
<span class="special">{</span>
<span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">class</span> <span class="identifier">Tuple</span> <span class="special">&gt;</span>
<span class="identifier">__host__</span> <span class="identifier">__device__</span>
<span class="keyword">void</span> <span class="keyword">operator</span><span class="special">()(</span> <span class="identifier">Tuple</span> <span class="identifier">t</span> <span class="special">)</span> <span class="comment">// this functor works on tuples of values</span>
<span class="special">{</span>
<span class="comment">// first, unpack the tuple into value, neighbors and omega</span>
<span class="keyword">const</span> <span class="identifier">value_type</span> <span class="identifier">phi</span> <span class="special">=</span> <span class="identifier">thrust</span><span class="special">::</span><span class="identifier">get</span><span class="special">&lt;</span><span class="number">0</span><span class="special">&gt;(</span><span class="identifier">t</span><span class="special">);</span>
<span class="keyword">const</span> <span class="identifier">value_type</span> <span class="identifier">phi_left</span> <span class="special">=</span> <span class="identifier">thrust</span><span class="special">::</span><span class="identifier">get</span><span class="special">&lt;</span><span class="number">1</span><span class="special">&gt;(</span><span class="identifier">t</span><span class="special">);</span> <span class="comment">// left neighbor</span>
<span class="keyword">const</span> <span class="identifier">value_type</span> <span class="identifier">phi_right</span> <span class="special">=</span> <span class="identifier">thrust</span><span class="special">::</span><span class="identifier">get</span><span class="special">&lt;</span><span class="number">2</span><span class="special">&gt;(</span><span class="identifier">t</span><span class="special">);</span> <span class="comment">// right neighbor</span>
<span class="keyword">const</span> <span class="identifier">value_type</span> <span class="identifier">omega</span> <span class="special">=</span> <span class="identifier">thrust</span><span class="special">::</span><span class="identifier">get</span><span class="special">&lt;</span><span class="number">3</span><span class="special">&gt;(</span><span class="identifier">t</span><span class="special">);</span>
<span class="comment">// the dynamical equation</span>
<span class="identifier">thrust</span><span class="special">::</span><span class="identifier">get</span><span class="special">&lt;</span><span class="number">4</span><span class="special">&gt;(</span><span class="identifier">t</span><span class="special">)</span> <span class="special">=</span> <span class="identifier">omega</span> <span class="special">+</span> <span class="identifier">sin</span><span class="special">(</span> <span class="identifier">phi_right</span> <span class="special">-</span> <span class="identifier">phi</span> <span class="special">)</span> <span class="special">+</span> <span class="identifier">sin</span><span class="special">(</span> <span class="identifier">phi</span> <span class="special">-</span> <span class="identifier">phi_left</span> <span class="special">);</span>
<span class="special">}</span>
<span class="special">};</span>
<span class="identifier">phase_oscillators</span><span class="special">(</span> <span class="keyword">const</span> <span class="identifier">state_type</span> <span class="special">&amp;</span><span class="identifier">omega</span> <span class="special">)</span>
<span class="special">:</span> <span class="identifier">m_omega</span><span class="special">(</span> <span class="identifier">omega</span> <span class="special">)</span> <span class="special">,</span> <span class="identifier">m_N</span><span class="special">(</span> <span class="identifier">omega</span><span class="special">.</span><span class="identifier">size</span><span class="special">()</span> <span class="special">)</span> <span class="special">,</span> <span class="identifier">m_prev</span><span class="special">(</span> <span class="identifier">omega</span><span class="special">.</span><span class="identifier">size</span><span class="special">()</span> <span class="special">)</span> <span class="special">,</span> <span class="identifier">m_next</span><span class="special">(</span> <span class="identifier">omega</span><span class="special">.</span><span class="identifier">size</span><span class="special">()</span> <span class="special">)</span>
<span class="special">{</span>
<span class="comment">// build indices pointing to left and right neighbours</span>
<span class="identifier">thrust</span><span class="special">::</span><span class="identifier">counting_iterator</span><span class="special">&lt;</span><span class="identifier">size_t</span><span class="special">&gt;</span> <span class="identifier">c</span><span class="special">(</span> <span class="number">0</span> <span class="special">);</span>
<span class="identifier">thrust</span><span class="special">::</span><span class="identifier">copy</span><span class="special">(</span> <span class="identifier">c</span> <span class="special">,</span> <span class="identifier">c</span><span class="special">+</span><span class="identifier">m_N</span><span class="special">-</span><span class="number">1</span> <span class="special">,</span> <span class="identifier">m_prev</span><span class="special">.</span><span class="identifier">begin</span><span class="special">()+</span><span class="number">1</span> <span class="special">);</span>
<span class="identifier">m_prev</span><span class="special">[</span><span class="number">0</span><span class="special">]</span> <span class="special">=</span> <span class="number">0</span><span class="special">;</span> <span class="comment">// m_prev = { 0 , 0 , 1 , 2 , 3 , ... , N-1 }</span>
<span class="identifier">thrust</span><span class="special">::</span><span class="identifier">copy</span><span class="special">(</span> <span class="identifier">c</span><span class="special">+</span><span class="number">1</span> <span class="special">,</span> <span class="identifier">c</span><span class="special">+</span><span class="identifier">m_N</span> <span class="special">,</span> <span class="identifier">m_next</span><span class="special">.</span><span class="identifier">begin</span><span class="special">()</span> <span class="special">);</span>
<span class="identifier">m_next</span><span class="special">[</span><span class="identifier">m_N</span><span class="special">-</span><span class="number">1</span><span class="special">]</span> <span class="special">=</span> <span class="identifier">m_N</span><span class="special">-</span><span class="number">1</span><span class="special">;</span> <span class="comment">// m_next = { 1 , 2 , 3 , ... , N-1 , N-1 }</span>
<span class="special">}</span>
<span class="keyword">void</span> <span class="keyword">operator</span><span class="special">()</span> <span class="special">(</span> <span class="keyword">const</span> <span class="identifier">state_type</span> <span class="special">&amp;</span><span class="identifier">x</span> <span class="special">,</span> <span class="identifier">state_type</span> <span class="special">&amp;</span><span class="identifier">dxdt</span> <span class="special">,</span> <span class="keyword">const</span> <span class="identifier">value_type</span> <span class="identifier">dt</span> <span class="special">)</span>
<span class="special">{</span>
<span class="identifier">thrust</span><span class="special">::</span><span class="identifier">for_each</span><span class="special">(</span>
<span class="identifier">thrust</span><span class="special">::</span><span class="identifier">make_zip_iterator</span><span class="special">(</span>
<span class="identifier">thrust</span><span class="special">::</span><span class="identifier">make_tuple</span><span class="special">(</span>
<span class="identifier">x</span><span class="special">.</span><span class="identifier">begin</span><span class="special">()</span> <span class="special">,</span>
<span class="identifier">thrust</span><span class="special">::</span><span class="identifier">make_permutation_iterator</span><span class="special">(</span> <span class="identifier">x</span><span class="special">.</span><span class="identifier">begin</span><span class="special">()</span> <span class="special">,</span> <span class="identifier">m_prev</span><span class="special">.</span><span class="identifier">begin</span><span class="special">()</span> <span class="special">)</span> <span class="special">,</span>
<span class="identifier">thrust</span><span class="special">::</span><span class="identifier">make_permutation_iterator</span><span class="special">(</span> <span class="identifier">x</span><span class="special">.</span><span class="identifier">begin</span><span class="special">()</span> <span class="special">,</span> <span class="identifier">m_next</span><span class="special">.</span><span class="identifier">begin</span><span class="special">()</span> <span class="special">)</span> <span class="special">,</span>
<span class="identifier">m_omega</span><span class="special">.</span><span class="identifier">begin</span><span class="special">()</span> <span class="special">,</span>
<span class="identifier">dxdt</span><span class="special">.</span><span class="identifier">begin</span><span class="special">()</span>
<span class="special">)</span> <span class="special">),</span>
<span class="identifier">thrust</span><span class="special">::</span><span class="identifier">make_zip_iterator</span><span class="special">(</span>
<span class="identifier">thrust</span><span class="special">::</span><span class="identifier">make_tuple</span><span class="special">(</span>
<span class="identifier">x</span><span class="special">.</span><span class="identifier">end</span><span class="special">()</span> <span class="special">,</span>
<span class="identifier">thrust</span><span class="special">::</span><span class="identifier">make_permutation_iterator</span><span class="special">(</span> <span class="identifier">x</span><span class="special">.</span><span class="identifier">begin</span><span class="special">()</span> <span class="special">,</span> <span class="identifier">m_prev</span><span class="special">.</span><span class="identifier">end</span><span class="special">()</span> <span class="special">)</span> <span class="special">,</span>
<span class="identifier">thrust</span><span class="special">::</span><span class="identifier">make_permutation_iterator</span><span class="special">(</span> <span class="identifier">x</span><span class="special">.</span><span class="identifier">begin</span><span class="special">()</span> <span class="special">,</span> <span class="identifier">m_next</span><span class="special">.</span><span class="identifier">end</span><span class="special">()</span> <span class="special">)</span> <span class="special">,</span>
<span class="identifier">m_omega</span><span class="special">.</span><span class="identifier">end</span><span class="special">()</span> <span class="special">,</span>
<span class="identifier">dxdt</span><span class="special">.</span><span class="identifier">end</span><span class="special">())</span> <span class="special">)</span> <span class="special">,</span>
<span class="identifier">sys_functor</span><span class="special">()</span>
<span class="special">);</span>
<span class="special">}</span>
<span class="keyword">private</span><span class="special">:</span>
<span class="keyword">const</span> <span class="identifier">state_type</span> <span class="special">&amp;</span><span class="identifier">m_omega</span><span class="special">;</span>
<span class="keyword">const</span> <span class="identifier">size_t</span> <span class="identifier">m_N</span><span class="special">;</span>
<span class="identifier">index_vector_type</span> <span class="identifier">m_prev</span><span class="special">;</span>
<span class="identifier">index_vector_type</span> <span class="identifier">m_next</span><span class="special">;</span>
<span class="special">};</span>
</pre>
<p>
</p>
<p>
Note, how easy you can obtain the value for the left and right neighboring
oscillator in the system functor using the permutation iterators. But,
the call of the <code class="computeroutput"><span class="identifier">thrust</span><span class="special">::</span><span class="identifier">for_each</span></code>
function looks relatively complicated. Every term of the r.h.s. of the
ODE is resembled by one iterator packed in exactly the same way as it is
unpacked in the functor above.
</p>
<p>
Now we put everything together. We create random initial conditions and
decreasing frequencies such that we should get synchronization. We copy
the frequencies and the initial conditions onto the device and finally
initialize and perform the integration. As result we simply write out the
current state, hence the phase of each oscillator.
</p>
<p>
</p>
<pre class="programlisting"><span class="comment">// create initial conditions and omegas on host:</span>
<span class="identifier">vector</span><span class="special">&lt;</span> <span class="identifier">value_type</span> <span class="special">&gt;</span> <span class="identifier">x_host</span><span class="special">(</span> <span class="identifier">N</span> <span class="special">);</span>
<span class="identifier">vector</span><span class="special">&lt;</span> <span class="identifier">value_type</span> <span class="special">&gt;</span> <span class="identifier">omega_host</span><span class="special">(</span> <span class="identifier">N</span> <span class="special">);</span>
<span class="keyword">for</span><span class="special">(</span> <span class="identifier">size_t</span> <span class="identifier">i</span><span class="special">=</span><span class="number">0</span> <span class="special">;</span> <span class="identifier">i</span><span class="special">&lt;</span><span class="identifier">N</span> <span class="special">;</span> <span class="special">++</span><span class="identifier">i</span> <span class="special">)</span>
<span class="special">{</span>
<span class="identifier">x_host</span><span class="special">[</span><span class="identifier">i</span><span class="special">]</span> <span class="special">=</span> <span class="number">2.0</span> <span class="special">*</span> <span class="identifier">pi</span> <span class="special">*</span> <span class="identifier">drand48</span><span class="special">();</span>
<span class="identifier">omega_host</span><span class="special">[</span><span class="identifier">i</span><span class="special">]</span> <span class="special">=</span> <span class="special">(</span> <span class="identifier">N</span> <span class="special">-</span> <span class="identifier">i</span> <span class="special">)</span> <span class="special">*</span> <span class="identifier">epsilon</span><span class="special">;</span> <span class="comment">// decreasing frequencies</span>
<span class="special">}</span>
<span class="comment">// copy to device</span>
<span class="identifier">state_type</span> <span class="identifier">x</span> <span class="special">=</span> <span class="identifier">x_host</span><span class="special">;</span>
<span class="identifier">state_type</span> <span class="identifier">omega</span> <span class="special">=</span> <span class="identifier">omega_host</span><span class="special">;</span>
<span class="comment">// create stepper</span>
<span class="identifier">runge_kutta4</span><span class="special">&lt;</span> <span class="identifier">state_type</span> <span class="special">,</span> <span class="identifier">value_type</span> <span class="special">,</span> <span class="identifier">state_type</span> <span class="special">,</span> <span class="identifier">value_type</span> <span class="special">,</span> <span class="identifier">thrust_algebra</span> <span class="special">,</span> <span class="identifier">thrust_operations</span> <span class="special">&gt;</span> <span class="identifier">stepper</span><span class="special">;</span>
<span class="comment">// create phase oscillator system function</span>
<span class="identifier">phase_oscillators</span> <span class="identifier">sys</span><span class="special">(</span> <span class="identifier">omega</span> <span class="special">);</span>
<span class="comment">// integrate</span>
<span class="identifier">integrate_const</span><span class="special">(</span> <span class="identifier">stepper</span> <span class="special">,</span> <span class="identifier">sys</span> <span class="special">,</span> <span class="identifier">x</span> <span class="special">,</span> <span class="number">0.0</span> <span class="special">,</span> <span class="number">10.0</span> <span class="special">,</span> <span class="identifier">dt</span> <span class="special">);</span>
<span class="identifier">thrust</span><span class="special">::</span><span class="identifier">copy</span><span class="special">(</span> <span class="identifier">x</span><span class="special">.</span><span class="identifier">begin</span><span class="special">()</span> <span class="special">,</span> <span class="identifier">x</span><span class="special">.</span><span class="identifier">end</span><span class="special">()</span> <span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream_iterator</span><span class="special">&lt;</span> <span class="identifier">value_type</span> <span class="special">&gt;(</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">,</span> <span class="string">"\n"</span> <span class="special">)</span> <span class="special">);</span>
<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
</pre>
<p>
</p>
<p>
The full example can be found at <a href="https://github.com/headmyshoulder/odeint-v2/tree/master/libs/numeric/odeint/examples/thrust/phase_oscillator_chain.cu" target="_top">phase_oscillator_chain.cu</a>.
</p>
</div>
<div class="section">
<div class="titlepage"><div><div><h4 class="title">
<a name="boost_numeric_odeint.tutorial.using_cuda_and_thrust.parameter_studies"></a><a class="link" href="using_cuda_and_thrust.html#boost_numeric_odeint.tutorial.using_cuda_and_thrust.parameter_studies" title="Parameter studies">Parameter
studies</a>
</h4></div></div></div>
<p>
Another important use case for <a href="http://code.google.com/p/thrust/" target="_top">Thrust</a>
and Cuda are parameter studies of relatively small systems. Consider for
example the three-dimensional Lorenz system from the chaotic systems example
in the previous section which has three parameters. If you want to study
the behavior of this system for different parameters you usually have to
integrate the system for many parameter values. Using thrust and odeint
you can do this integration in parallel, hence you integrate a whole ensemble
of Lorenz systems where each individual realization has a different parameter
value.
</p>
<p>
In the following we will show how you can use <a href="http://code.google.com/p/thrust/" target="_top">Thrust</a>
to integrate the above mentioned ensemble of Lorenz systems. We will vary
only the parameter <span class="emphasis"><em>&#946;</em></span> but it is straightforward to vary
other parameters or even two or all three parameters. Furthermore, we will
use the largest Lyapunov exponent to quantify the behavior of the system
(chaoticity).
</p>
<p>
We start by defining the range of the parameters we want to study. Of course,
the state_type is again a <code class="computeroutput"><span class="identifier">thrust</span><span class="special">::</span><span class="identifier">device_vector</span><span class="special">&lt;</span> <span class="identifier">value_type</span>
<span class="special">&gt;</span></code>.
</p>
<p>
</p>
<pre class="programlisting"><span class="identifier">vector</span><span class="special">&lt;</span> <span class="identifier">value_type</span> <span class="special">&gt;</span> <span class="identifier">beta_host</span><span class="special">(</span> <span class="identifier">N</span> <span class="special">);</span>
<span class="keyword">const</span> <span class="identifier">value_type</span> <span class="identifier">beta_min</span> <span class="special">=</span> <span class="number">0.0</span> <span class="special">,</span> <span class="identifier">beta_max</span> <span class="special">=</span> <span class="number">56.0</span><span class="special">;</span>
<span class="keyword">for</span><span class="special">(</span> <span class="identifier">size_t</span> <span class="identifier">i</span><span class="special">=</span><span class="number">0</span> <span class="special">;</span> <span class="identifier">i</span><span class="special">&lt;</span><span class="identifier">N</span> <span class="special">;</span> <span class="special">++</span><span class="identifier">i</span> <span class="special">)</span>
<span class="identifier">beta_host</span><span class="special">[</span><span class="identifier">i</span><span class="special">]</span> <span class="special">=</span> <span class="identifier">beta_min</span> <span class="special">+</span> <span class="identifier">value_type</span><span class="special">(</span> <span class="identifier">i</span> <span class="special">)</span> <span class="special">*</span> <span class="special">(</span> <span class="identifier">beta_max</span> <span class="special">-</span> <span class="identifier">beta_min</span> <span class="special">)</span> <span class="special">/</span> <span class="identifier">value_type</span><span class="special">(</span> <span class="identifier">N</span> <span class="special">-</span> <span class="number">1</span> <span class="special">);</span>
<span class="identifier">state_type</span> <span class="identifier">beta</span> <span class="special">=</span> <span class="identifier">beta_host</span><span class="special">;</span>
</pre>
<p>
</p>
<p>
The next thing we have to implement is the Lorenz system without perturbations.
Later, a system with perturbations is also implemented in order to calculate
the Lyapunov exponent. We will use an ansatz where each device function
calculates one particular realization of the Lorenz ensemble
</p>
<p>
</p>
<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">lorenz_system</span>
<span class="special">{</span>
<span class="keyword">struct</span> <span class="identifier">lorenz_functor</span>
<span class="special">{</span>
<span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">class</span> <span class="identifier">T</span> <span class="special">&gt;</span>
<span class="identifier">__host__</span> <span class="identifier">__device__</span>
<span class="keyword">void</span> <span class="keyword">operator</span><span class="special">()(</span> <span class="identifier">T</span> <span class="identifier">t</span> <span class="special">)</span> <span class="keyword">const</span>
<span class="special">{</span>
<span class="comment">// unpack the parameter we want to vary and the Lorenz variables</span>
<span class="identifier">value_type</span> <span class="identifier">R</span> <span class="special">=</span> <span class="identifier">thrust</span><span class="special">::</span><span class="identifier">get</span><span class="special">&lt;</span> <span class="number">3</span> <span class="special">&gt;(</span> <span class="identifier">t</span> <span class="special">);</span>
<span class="identifier">value_type</span> <span class="identifier">x</span> <span class="special">=</span> <span class="identifier">thrust</span><span class="special">::</span><span class="identifier">get</span><span class="special">&lt;</span> <span class="number">0</span> <span class="special">&gt;(</span> <span class="identifier">t</span> <span class="special">);</span>
<span class="identifier">value_type</span> <span class="identifier">y</span> <span class="special">=</span> <span class="identifier">thrust</span><span class="special">::</span><span class="identifier">get</span><span class="special">&lt;</span> <span class="number">1</span> <span class="special">&gt;(</span> <span class="identifier">t</span> <span class="special">);</span>
<span class="identifier">value_type</span> <span class="identifier">z</span> <span class="special">=</span> <span class="identifier">thrust</span><span class="special">::</span><span class="identifier">get</span><span class="special">&lt;</span> <span class="number">2</span> <span class="special">&gt;(</span> <span class="identifier">t</span> <span class="special">);</span>
<span class="identifier">thrust</span><span class="special">::</span><span class="identifier">get</span><span class="special">&lt;</span> <span class="number">4</span> <span class="special">&gt;(</span> <span class="identifier">t</span> <span class="special">)</span> <span class="special">=</span> <span class="identifier">sigma</span> <span class="special">*</span> <span class="special">(</span> <span class="identifier">y</span> <span class="special">-</span> <span class="identifier">x</span> <span class="special">);</span>
<span class="identifier">thrust</span><span class="special">::</span><span class="identifier">get</span><span class="special">&lt;</span> <span class="number">5</span> <span class="special">&gt;(</span> <span class="identifier">t</span> <span class="special">)</span> <span class="special">=</span> <span class="identifier">R</span> <span class="special">*</span> <span class="identifier">x</span> <span class="special">-</span> <span class="identifier">y</span> <span class="special">-</span> <span class="identifier">x</span> <span class="special">*</span> <span class="identifier">z</span><span class="special">;</span>
<span class="identifier">thrust</span><span class="special">::</span><span class="identifier">get</span><span class="special">&lt;</span> <span class="number">6</span> <span class="special">&gt;(</span> <span class="identifier">t</span> <span class="special">)</span> <span class="special">=</span> <span class="special">-</span><span class="identifier">b</span> <span class="special">*</span> <span class="identifier">z</span> <span class="special">+</span> <span class="identifier">x</span> <span class="special">*</span> <span class="identifier">y</span> <span class="special">;</span>
<span class="special">}</span>
<span class="special">};</span>
<span class="identifier">lorenz_system</span><span class="special">(</span> <span class="identifier">size_t</span> <span class="identifier">N</span> <span class="special">,</span> <span class="keyword">const</span> <span class="identifier">state_type</span> <span class="special">&amp;</span><span class="identifier">beta</span> <span class="special">)</span>
<span class="special">:</span> <span class="identifier">m_N</span><span class="special">(</span> <span class="identifier">N</span> <span class="special">)</span> <span class="special">,</span> <span class="identifier">m_beta</span><span class="special">(</span> <span class="identifier">beta</span> <span class="special">)</span> <span class="special">{</span> <span class="special">}</span>
<span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">class</span> <span class="identifier">State</span> <span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Deriv</span> <span class="special">&gt;</span>
<span class="keyword">void</span> <span class="keyword">operator</span><span class="special">()(</span> <span class="keyword">const</span> <span class="identifier">State</span> <span class="special">&amp;</span><span class="identifier">x</span> <span class="special">,</span> <span class="identifier">Deriv</span> <span class="special">&amp;</span><span class="identifier">dxdt</span> <span class="special">,</span> <span class="identifier">value_type</span> <span class="identifier">t</span> <span class="special">)</span> <span class="keyword">const</span>
<span class="special">{</span>
<span class="identifier">thrust</span><span class="special">::</span><span class="identifier">for_each</span><span class="special">(</span>
<span class="identifier">thrust</span><span class="special">::</span><span class="identifier">make_zip_iterator</span><span class="special">(</span> <span class="identifier">thrust</span><span class="special">::</span><span class="identifier">make_tuple</span><span class="special">(</span>
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">begin</span><span class="special">(</span> <span class="identifier">x</span> <span class="special">)</span> <span class="special">,</span>
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">begin</span><span class="special">(</span> <span class="identifier">x</span> <span class="special">)</span> <span class="special">+</span> <span class="identifier">m_N</span> <span class="special">,</span>
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">begin</span><span class="special">(</span> <span class="identifier">x</span> <span class="special">)</span> <span class="special">+</span> <span class="number">2</span> <span class="special">*</span> <span class="identifier">m_N</span> <span class="special">,</span>
<span class="identifier">m_beta</span><span class="special">.</span><span class="identifier">begin</span><span class="special">()</span> <span class="special">,</span>
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">begin</span><span class="special">(</span> <span class="identifier">dxdt</span> <span class="special">)</span> <span class="special">,</span>
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">begin</span><span class="special">(</span> <span class="identifier">dxdt</span> <span class="special">)</span> <span class="special">+</span> <span class="identifier">m_N</span> <span class="special">,</span>
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">begin</span><span class="special">(</span> <span class="identifier">dxdt</span> <span class="special">)</span> <span class="special">+</span> <span class="number">2</span> <span class="special">*</span> <span class="identifier">m_N</span> <span class="special">)</span> <span class="special">)</span> <span class="special">,</span>
<span class="identifier">thrust</span><span class="special">::</span><span class="identifier">make_zip_iterator</span><span class="special">(</span> <span class="identifier">thrust</span><span class="special">::</span><span class="identifier">make_tuple</span><span class="special">(</span>
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">begin</span><span class="special">(</span> <span class="identifier">x</span> <span class="special">)</span> <span class="special">+</span> <span class="identifier">m_N</span> <span class="special">,</span>
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">begin</span><span class="special">(</span> <span class="identifier">x</span> <span class="special">)</span> <span class="special">+</span> <span class="number">2</span> <span class="special">*</span> <span class="identifier">m_N</span> <span class="special">,</span>
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">begin</span><span class="special">(</span> <span class="identifier">x</span> <span class="special">)</span> <span class="special">+</span> <span class="number">3</span> <span class="special">*</span> <span class="identifier">m_N</span> <span class="special">,</span>
<span class="identifier">m_beta</span><span class="special">.</span><span class="identifier">begin</span><span class="special">()</span> <span class="special">,</span>
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">begin</span><span class="special">(</span> <span class="identifier">dxdt</span> <span class="special">)</span> <span class="special">+</span> <span class="identifier">m_N</span> <span class="special">,</span>
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">begin</span><span class="special">(</span> <span class="identifier">dxdt</span> <span class="special">)</span> <span class="special">+</span> <span class="number">2</span> <span class="special">*</span> <span class="identifier">m_N</span> <span class="special">,</span>
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">begin</span><span class="special">(</span> <span class="identifier">dxdt</span> <span class="special">)</span> <span class="special">+</span> <span class="number">3</span> <span class="special">*</span> <span class="identifier">m_N</span> <span class="special">)</span> <span class="special">)</span> <span class="special">,</span>
<span class="identifier">lorenz_functor</span><span class="special">()</span> <span class="special">);</span>
<span class="special">}</span>
<span class="identifier">size_t</span> <span class="identifier">m_N</span><span class="special">;</span>
<span class="keyword">const</span> <span class="identifier">state_type</span> <span class="special">&amp;</span><span class="identifier">m_beta</span><span class="special">;</span>
<span class="special">};</span>
</pre>
<p>
</p>
<p>
As <code class="computeroutput"><span class="identifier">state_type</span></code> a <code class="computeroutput"><span class="identifier">thrust</span><span class="special">::</span><span class="identifier">device_vector</span></code> or a <a href="http://www.boost.org/doc/libs/release/libs/range/index.html" target="_top">Boost.Range</a>
of a <code class="computeroutput"><span class="identifier">device_vector</span></code> is used.
The length of the state is <span class="emphasis"><em>3N</em></span> where <span class="emphasis"><em>N</em></span>
is the number of systems. The system is encoded into this vector such that
all <span class="emphasis"><em>x</em></span> components come first, then every <span class="emphasis"><em>y</em></span>
components and finally every <span class="emphasis"><em>z</em></span> components. Implementing
the device function is then a simple task, you only have to decompose the
tuple originating from the zip iterators.
</p>
<p>
Besides the system without perturbations we furthermore need to calculate
the system including linearized equations governing the time evolution
of small perturbations. Using the method from above this is straightforward,
with a small difficulty that Thrust's tuples have a maximal arity of 10.
But this is only a small problem since we can create a zip iterator packed
with zip iterators. So the top level zip iterator contains one zip iterator
for the state, one normal iterator for the parameter, and one zip iterator
for the derivative. Accessing the elements of this tuple in the system
function is then straightforward, you unpack the tuple with <code class="computeroutput"><span class="identifier">thrust</span><span class="special">::</span><span class="identifier">get</span><span class="special">&lt;&gt;()</span></code>.
We will not show the code here, it is to large. It can be found <a href="https://github.com/headmyshoulder/odeint-v2/tree/master/libs/numeric/odeint/examples/thrust/lorenz_parameters.cu" target="_top">here</a> and
is easy to understand.
</p>
<p>
Furthermore, we need an observer which determines the norm of the perturbations,
normalizes them and averages the logarithm of the norm. The device functor
which is used within this observer is defined
</p>
<p>
</p>
<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">lyap_functor</span>
<span class="special">{</span>
<span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">class</span> <span class="identifier">T</span> <span class="special">&gt;</span>
<span class="identifier">__host__</span> <span class="identifier">__device__</span>
<span class="keyword">void</span> <span class="keyword">operator</span><span class="special">()(</span> <span class="identifier">T</span> <span class="identifier">t</span> <span class="special">)</span> <span class="keyword">const</span>
<span class="special">{</span>
<span class="identifier">value_type</span> <span class="special">&amp;</span><span class="identifier">dx</span> <span class="special">=</span> <span class="identifier">thrust</span><span class="special">::</span><span class="identifier">get</span><span class="special">&lt;</span> <span class="number">0</span> <span class="special">&gt;(</span> <span class="identifier">t</span> <span class="special">);</span>
<span class="identifier">value_type</span> <span class="special">&amp;</span><span class="identifier">dy</span> <span class="special">=</span> <span class="identifier">thrust</span><span class="special">::</span><span class="identifier">get</span><span class="special">&lt;</span> <span class="number">1</span> <span class="special">&gt;(</span> <span class="identifier">t</span> <span class="special">);</span>
<span class="identifier">value_type</span> <span class="special">&amp;</span><span class="identifier">dz</span> <span class="special">=</span> <span class="identifier">thrust</span><span class="special">::</span><span class="identifier">get</span><span class="special">&lt;</span> <span class="number">2</span> <span class="special">&gt;(</span> <span class="identifier">t</span> <span class="special">);</span>
<span class="identifier">value_type</span> <span class="identifier">norm</span> <span class="special">=</span> <span class="identifier">sqrt</span><span class="special">(</span> <span class="identifier">dx</span> <span class="special">*</span> <span class="identifier">dx</span> <span class="special">+</span> <span class="identifier">dy</span> <span class="special">*</span> <span class="identifier">dy</span> <span class="special">+</span> <span class="identifier">dz</span> <span class="special">*</span> <span class="identifier">dz</span> <span class="special">);</span>
<span class="identifier">dx</span> <span class="special">/=</span> <span class="identifier">norm</span><span class="special">;</span>
<span class="identifier">dy</span> <span class="special">/=</span> <span class="identifier">norm</span><span class="special">;</span>
<span class="identifier">dz</span> <span class="special">/=</span> <span class="identifier">norm</span><span class="special">;</span>
<span class="identifier">thrust</span><span class="special">::</span><span class="identifier">get</span><span class="special">&lt;</span> <span class="number">3</span> <span class="special">&gt;(</span> <span class="identifier">t</span> <span class="special">)</span> <span class="special">+=</span> <span class="identifier">log</span><span class="special">(</span> <span class="identifier">norm</span> <span class="special">);</span>
<span class="special">}</span>
<span class="special">};</span>
</pre>
<p>
</p>
<p>
Note, that this functor manipulates the state, i.e. the perturbations.
</p>
<p>
Now we complete the whole code to calculate the Lyapunov exponents. First,
we have to define a state vector. This vector contains <span class="emphasis"><em>6N</em></span>
entries, the state <span class="emphasis"><em>x,y,z</em></span> and its perturbations <span class="emphasis"><em>dx,dy,dz</em></span>.
We initialize them such that <span class="emphasis"><em>x=y=z=10</em></span>, <span class="emphasis"><em>dx=1</em></span>,
and <span class="emphasis"><em>dy=dz=0</em></span>. We define a stepper type, a controlled
Runge-Kutta Dormand-Prince 5 stepper. We start with some integration to
overcome the transient behavior. For this, we do not involve the perturbation
and run the algorithm only on the state <span class="emphasis"><em>x,y,z</em></span> without
any observer. Note, how <a href="http://www.boost.org/doc/libs/release/libs/range/index.html" target="_top">Boost.Range</a>
is used for partial integration of the state vector without perturbations
(the first half of the whole state). After the transient, the full system
with perturbations is integrated and the Lyapunov exponents are calculated
and written to <code class="computeroutput"><span class="identifier">stdout</span></code>.
</p>
<p>
</p>
<pre class="programlisting"><span class="identifier">state_type</span> <span class="identifier">x</span><span class="special">(</span> <span class="number">6</span> <span class="special">*</span> <span class="identifier">N</span> <span class="special">);</span>
<span class="comment">// initialize x,y,z</span>
<span class="identifier">thrust</span><span class="special">::</span><span class="identifier">fill</span><span class="special">(</span> <span class="identifier">x</span><span class="special">.</span><span class="identifier">begin</span><span class="special">()</span> <span class="special">,</span> <span class="identifier">x</span><span class="special">.</span><span class="identifier">begin</span><span class="special">()</span> <span class="special">+</span> <span class="number">3</span> <span class="special">*</span> <span class="identifier">N</span> <span class="special">,</span> <span class="number">10.0</span> <span class="special">);</span>
<span class="comment">// initial dx</span>
<span class="identifier">thrust</span><span class="special">::</span><span class="identifier">fill</span><span class="special">(</span> <span class="identifier">x</span><span class="special">.</span><span class="identifier">begin</span><span class="special">()</span> <span class="special">+</span> <span class="number">3</span> <span class="special">*</span> <span class="identifier">N</span> <span class="special">,</span> <span class="identifier">x</span><span class="special">.</span><span class="identifier">begin</span><span class="special">()</span> <span class="special">+</span> <span class="number">4</span> <span class="special">*</span> <span class="identifier">N</span> <span class="special">,</span> <span class="number">1.0</span> <span class="special">);</span>
<span class="comment">// initialize dy,dz</span>
<span class="identifier">thrust</span><span class="special">::</span><span class="identifier">fill</span><span class="special">(</span> <span class="identifier">x</span><span class="special">.</span><span class="identifier">begin</span><span class="special">()</span> <span class="special">+</span> <span class="number">4</span> <span class="special">*</span> <span class="identifier">N</span> <span class="special">,</span> <span class="identifier">x</span><span class="special">.</span><span class="identifier">end</span><span class="special">()</span> <span class="special">,</span> <span class="number">0.0</span> <span class="special">);</span>
<span class="comment">// create error stepper, can be used with make_controlled or make_dense_output</span>
<span class="keyword">typedef</span> <span class="identifier">runge_kutta_dopri5</span><span class="special">&lt;</span> <span class="identifier">state_type</span> <span class="special">,</span> <span class="identifier">value_type</span> <span class="special">,</span> <span class="identifier">state_type</span> <span class="special">,</span> <span class="identifier">value_type</span> <span class="special">,</span> <span class="identifier">thrust_algebra</span> <span class="special">,</span> <span class="identifier">thrust_operations</span> <span class="special">&gt;</span> <span class="identifier">stepper_type</span><span class="special">;</span>
<span class="identifier">lorenz_system</span> <span class="identifier">lorenz</span><span class="special">(</span> <span class="identifier">N</span> <span class="special">,</span> <span class="identifier">beta</span> <span class="special">);</span>
<span class="identifier">lorenz_perturbation_system</span> <span class="identifier">lorenz_perturbation</span><span class="special">(</span> <span class="identifier">N</span> <span class="special">,</span> <span class="identifier">beta</span> <span class="special">);</span>
<span class="identifier">lyap_observer</span> <span class="identifier">obs</span><span class="special">(</span> <span class="identifier">N</span> <span class="special">,</span> <span class="number">1</span> <span class="special">);</span>
<span class="comment">// calculate transients</span>
<span class="identifier">integrate_adaptive</span><span class="special">(</span> <span class="identifier">make_controlled</span><span class="special">(</span> <span class="number">1.0e-6</span> <span class="special">,</span> <span class="number">1.0e-6</span> <span class="special">,</span> <span class="identifier">stepper_type</span><span class="special">()</span> <span class="special">)</span> <span class="special">,</span> <span class="identifier">lorenz</span> <span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">make_pair</span><span class="special">(</span> <span class="identifier">x</span><span class="special">.</span><span class="identifier">begin</span><span class="special">()</span> <span class="special">,</span> <span class="identifier">x</span><span class="special">.</span><span class="identifier">begin</span><span class="special">()</span> <span class="special">+</span> <span class="number">3</span> <span class="special">*</span> <span class="identifier">N</span> <span class="special">)</span> <span class="special">,</span> <span class="number">0.0</span> <span class="special">,</span> <span class="number">10.0</span> <span class="special">,</span> <span class="identifier">dt</span> <span class="special">);</span>
<span class="comment">// calculate the Lyapunov exponents -- the main loop</span>
<span class="keyword">double</span> <span class="identifier">t</span> <span class="special">=</span> <span class="number">0.0</span><span class="special">;</span>
<span class="keyword">while</span><span class="special">(</span> <span class="identifier">t</span> <span class="special">&lt;</span> <span class="number">10000.0</span> <span class="special">)</span>
<span class="special">{</span>
<span class="identifier">integrate_adaptive</span><span class="special">(</span> <span class="identifier">make_controlled</span><span class="special">(</span> <span class="number">1.0e-6</span> <span class="special">,</span> <span class="number">1.0e-6</span> <span class="special">,</span> <span class="identifier">stepper_type</span><span class="special">()</span> <span class="special">)</span> <span class="special">,</span> <span class="identifier">lorenz_perturbation</span> <span class="special">,</span> <span class="identifier">x</span> <span class="special">,</span> <span class="identifier">t</span> <span class="special">,</span> <span class="identifier">t</span> <span class="special">+</span> <span class="number">1.0</span> <span class="special">,</span> <span class="number">0.1</span> <span class="special">);</span>
<span class="identifier">t</span> <span class="special">+=</span> <span class="number">1.0</span><span class="special">;</span>
<span class="identifier">obs</span><span class="special">(</span> <span class="identifier">x</span> <span class="special">,</span> <span class="identifier">t</span> <span class="special">);</span>
<span class="special">}</span>
<span class="identifier">vector</span><span class="special">&lt;</span> <span class="identifier">value_type</span> <span class="special">&gt;</span> <span class="identifier">lyap</span><span class="special">(</span> <span class="identifier">N</span> <span class="special">);</span>
<span class="identifier">obs</span><span class="special">.</span><span class="identifier">fill_lyap</span><span class="special">(</span> <span class="identifier">lyap</span> <span class="special">);</span>
<span class="keyword">for</span><span class="special">(</span> <span class="identifier">size_t</span> <span class="identifier">i</span><span class="special">=</span><span class="number">0</span> <span class="special">;</span> <span class="identifier">i</span><span class="special">&lt;</span><span class="identifier">N</span> <span class="special">;</span> <span class="special">++</span><span class="identifier">i</span> <span class="special">)</span>
<span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">beta_host</span><span class="special">[</span><span class="identifier">i</span><span class="special">]</span> <span class="special">&lt;&lt;</span> <span class="string">"\t"</span> <span class="special">&lt;&lt;</span> <span class="identifier">lyap</span><span class="special">[</span><span class="identifier">i</span><span class="special">]</span> <span class="special">&lt;&lt;</span> <span class="string">"\n"</span><span class="special">;</span>
</pre>
<p>
</p>
<p>
The full example can be found at <a href="https://github.com/headmyshoulder/odeint-v2/tree/master/libs/numeric/odeint/examples/thrust/lorenz_parameters.cu" target="_top">lorenz_parameters.cu</a>.
</p>
</div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright &#169; 2009-2011 Karsten Ahnert
and Mario Mulansky<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
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>)
</p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="special_topics.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../tutorial.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="using_opencl_and_vexcl.html"><img src="../../images/next.png" alt="Next"></a>
</div>
</body>
</html>

View File

@ -1,618 +0,0 @@
/*=============================================================================
Copyright (c) 2004 Joel de Guzman
http://spirit.sourceforge.net/
Distributed under the Boost Software License, Version 1.0. (See accompany-
ing file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
=============================================================================*/
/*=============================================================================
Body defaults
=============================================================================*/
body
{
margin: 1em;
font-family: sans-serif;
}
/*=============================================================================
Paragraphs
=============================================================================*/
p
{
text-align: left;
font-size: 10pt;
line-height: 1.15;
}
/*=============================================================================
Program listings
=============================================================================*/
/* Code on paragraphs */
p tt.computeroutput
{
font-size: 9pt;
}
pre.synopsis
{
font-size: 9pt;
margin: 1pc 4% 0pc 4%;
padding: 0.5pc 0.5pc 0.5pc 0.5pc;
}
.programlisting,
.screen
{
font-size: 9pt;
display: block;
margin: 1pc 4% 0pc 4%;
padding: 0.5pc 0.5pc 0.5pc 0.5pc;
}
/* Program listings in tables don't get borders */
td .programlisting,
td .screen
{
margin: 0pc 0pc 0pc 0pc;
padding: 0pc 0pc 0pc 0pc;
}
/*=============================================================================
Headings
=============================================================================*/
h1, h2, h3, h4, h5, h6
{
text-align: left;
margin: 1em 0em 0.5em 0em;
font-weight: bold;
}
h1 { font-size: 140%; }
h2 {
/* changed by Mario Mulansky to show logo instead of title */
height: 127px;
background: white url(logo.jpg) left no-repeat;
text-indent: -999px;
/* end change */
font-weight: bold; font-size: 140%;
}
h3 { font-weight: bold; font-size: 130%; }
h4 { font-weight: bold; font-size: 120%; }
h5 { font-weight: normal; font-style: italic; font-size: 110%; }
h6 { font-weight: normal; font-style: italic; font-size: 100%; }
/* Top page titles */
title,
h1.title,
h2.title
h3.title,
h4.title,
h5.title,
h6.title,
.refentrytitle
{
font-weight: bold;
margin-bottom: 1pc;
}
h1.title { font-size: 140% }
h2.title { font-size: 140% }
h3.title { font-size: 130% }
h4.title { font-size: 120% }
h5.title { font-size: 110% }
h6.title { font-size: 100% }
.section h1
{
margin: 0em 0em 0.5em 0em;
font-size: 140%;
}
.section h2 { font-size: 140% }
.section h3 { font-size: 130% }
.section h4 { font-size: 120% }
.section h5 { font-size: 110% }
.section h6 { font-size: 100% }
/* Code on titles */
h1 tt.computeroutput { font-size: 140% }
h2 tt.computeroutput { font-size: 140% }
h3 tt.computeroutput { font-size: 130% }
h4 tt.computeroutput { font-size: 130% }
h5 tt.computeroutput { font-size: 130% }
h6 tt.computeroutput { font-size: 130% }
/*=============================================================================
Author
=============================================================================*/
h3.author
{
font-size: 100%
}
/*=============================================================================
Lists
=============================================================================*/
li
{
font-size: 10pt;
line-height: 1.3;
}
/* Unordered lists */
ul
{
text-align: left;
}
/* Ordered lists */
ol
{
text-align: left;
}
/*=============================================================================
Links
=============================================================================*/
a
{
text-decoration: none; /* no underline */
}
a:hover
{
text-decoration: underline;
}
/*=============================================================================
Spirit style navigation
=============================================================================*/
.spirit-nav
{
text-align: right;
}
.spirit-nav a
{
color: white;
padding-left: 0.5em;
}
.spirit-nav img
{
border-width: 0px;
}
/*=============================================================================
Copyright footer
=============================================================================*/
.copyright-footer
{
text-align: right;
font-size: 70%;
}
.copyright-footer p
{
text-align: right;
font-size: 80%;
}
/*=============================================================================
Table of contents
=============================================================================*/
.toc
{
margin: 1pc 4% 0pc 4%;
padding: 0.1pc 1pc 0.1pc 1pc;
font-size: 80%;
line-height: 1.15;
}
.boost-toc
{
float: right;
padding: 0.5pc;
}
/* Code on toc */
.toc .computeroutput { font-size: 120% }
/* No margin on nested menus */
.toc dl dl { margin: 0; }
/*=============================================================================
Tables
=============================================================================*/
.table-title,
div.table p.title
{
margin-left: 4%;
padding-right: 0.5em;
padding-left: 0.5em;
}
.informaltable table,
.table table
{
width: 92%;
margin-left: 4%;
margin-right: 4%;
}
div.informaltable table,
div.table table
{
padding: 4px;
}
/* Table Cells */
div.informaltable table tr td,
div.table table tr td
{
padding: 0.5em;
text-align: left;
font-size: 9pt;
}
div.informaltable table tr th,
div.table table tr th
{
padding: 0.5em 0.5em 0.5em 0.5em;
border: 1pt solid white;
font-size: 80%;
}
table.simplelist
{
width: auto !important;
margin: 0em !important;
padding: 0em !important;
border: none !important;
}
table.simplelist td
{
margin: 0em !important;
padding: 0em !important;
text-align: left !important;
font-size: 9pt !important;
border: none !important;
}
/*=============================================================================
Blurbs
=============================================================================*/
div.note,
div.tip,
div.important,
div.caution,
div.warning,
p.blurb
{
font-size: 9pt; /* A little bit smaller than the main text */
line-height: 1.2;
display: block;
margin: 1pc 4% 0pc 4%;
padding: 0.5pc 0.5pc 0.5pc 0.5pc;
}
p.blurb img
{
padding: 1pt;
}
/*=============================================================================
Variable Lists
=============================================================================*/
div.variablelist
{
margin: 1em 0;
}
/* Make the terms in definition lists bold */
div.variablelist dl dt,
span.term
{
font-weight: bold;
font-size: 10pt;
}
div.variablelist table tbody tr td
{
text-align: left;
vertical-align: top;
padding: 0em 2em 0em 0em;
font-size: 10pt;
margin: 0em 0em 0.5em 0em;
line-height: 1;
}
div.variablelist dl dt
{
margin-bottom: 0.2em;
}
div.variablelist dl dd
{
margin: 0em 0em 0.5em 2em;
font-size: 10pt;
}
div.variablelist table tbody tr td p,
div.variablelist dl dd p
{
margin: 0em 0em 0.5em 0em;
line-height: 1;
}
/*=============================================================================
Misc
=============================================================================*/
/* Title of books and articles in bibliographies */
span.title
{
font-style: italic;
}
span.underline
{
text-decoration: underline;
}
span.strikethrough
{
text-decoration: line-through;
}
/* Copyright, Legal Notice */
div div.legalnotice p
{
text-align: left
}
/*=============================================================================
Colors
=============================================================================*/
@media screen
{
body {
background-color: #FFFFFF;
color: #000000;
}
/* Syntax Highlighting */
.keyword { color: #0000AA; }
.identifier { color: #000000; }
.special { color: #707070; }
.preprocessor { color: #402080; }
.char { color: teal; }
.comment { color: #800000; }
.string { color: teal; }
.number { color: teal; }
.white_bkd { background-color: #FFFFFF; }
.dk_grey_bkd { background-color: #999999; }
/* Links */
a, a .keyword, a .identifier, a .special, a .preprocessor
a .char, a .comment, a .string, a .number
{
color: #005a9c;
}
a:visited, a:visited .keyword, a:visited .identifier,
a:visited .special, a:visited .preprocessor a:visited .char,
a:visited .comment, a:visited .string, a:visited .number
{
color: #9c5a9c;
}
h1 a, h2 a, h3 a, h4 a, h5 a, h6 a,
h1 a:hover, h2 a:hover, h3 a:hover, h4 a:hover, h5 a:hover, h6 a:hover,
h1 a:visited, h2 a:visited, h3 a:visited, h4 a:visited, h5 a:visited, h6 a:visited
{
text-decoration: none; /* no underline */
color: #000000;
}
/* Copyright, Legal Notice */
.copyright
{
color: #666666;
font-size: small;
}
div div.legalnotice p
{
color: #666666;
}
/* Program listing */
pre.synopsis
{
border: 1px solid #DCDCDC;
}
.programlisting,
.screen
{
border: 1px solid #DCDCDC;
}
td .programlisting,
td .screen
{
border: 0px solid #DCDCDC;
}
/* Blurbs */
div.note,
div.tip,
div.important,
div.caution,
div.warning,
p.blurb
{
border: 1px solid #DCDCDC;
}
/* Table of contents */
.toc
{
border: 1px solid #DCDCDC;
}
/* Tables */
div.informaltable table tr td,
div.table table tr td
{
border: 1px solid #DCDCDC;
}
div.informaltable table tr th,
div.table table tr th
{
background-color: #F0F0F0;
border: 1px solid #DCDCDC;
}
.copyright-footer
{
color: #8F8F8F;
}
/* Misc */
span.highlight
{
color: #00A000;
}
}
@media print
{
/* Links */
a
{
color: black;
}
a:visited
{
color: black;
}
.spirit-nav
{
display: none;
}
/* Program listing */
pre.synopsis
{
border: 1px solid gray;
}
.programlisting,
.screen
{
border: 1px solid gray;
}
td .programlisting,
td .screen
{
border: 0px solid #DCDCDC;
}
/* Table of contents */
.toc
{
border: 1px solid gray;
}
.informaltable table,
.table table
{
border: 1px solid gray;
border-collapse: collapse;
}
/* Tables */
div.informaltable table tr td,
div.table table tr td
{
border: 1px solid gray;
}
div.informaltable table tr th,
div.table table tr th
{
border: 1px solid gray;
}
table.simplelist tr td
{
border: none !important;
}
/* Misc */
span.highlight
{
font-weight: bold;
}
}
/*=============================================================================
Images
=============================================================================*/
span.inlinemediaobject img
{
vertical-align: middle;
}
/*==============================================================================
Super and Subscript: style so that line spacing isn't effected, see
http://www.adobe.com/cfusion/communityengine/index.cfm?event=showdetails&productId=1&postId=5341
==============================================================================*/
sup,
sub {
height: 0;
line-height: 1;
vertical-align: baseline;
position: relative;
}
/* For internet explorer: */
* html sup,
* html sub {
vertical-align: bottom;
}
sup {
bottom: 1ex;
}
sub {
top: .5ex;
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 603 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 374 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 391 B

View File

@ -1,15 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 12.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 51448) -->
<!DOCTYPE svg [
<!ENTITY ns_svg "http://www.w3.org/2000/svg">
<!ENTITY ns_xlink "http://www.w3.org/1999/xlink">
]>
<svg version="1.0" id="Layer_1" xmlns="&ns_svg;" xmlns:xlink="&ns_xlink;" width="33" height="33" viewBox="0 0 33 33"
style="overflow:visible;enable-background:new 0 0 33 33;" xml:space="preserve">
<circle style="stroke:#000000;" cx="16.5" cy="16.5" r="16"/>
<g>
<g style="enable-background:new ;">
<path style="fill:#FFFFFF;" d="M10.428,10.411h0.56c3.78,0,4.788-1.96,4.872-3.444h3.22v19.88h-3.92V13.154h-4.732V10.411z"/>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 703 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 485 B

View File

@ -1,18 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 12.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 51448) -->
<!DOCTYPE svg [
<!ENTITY ns_svg "http://www.w3.org/2000/svg">
<!ENTITY ns_xlink "http://www.w3.org/1999/xlink">
]>
<svg version="1.0" id="Layer_1" xmlns="&ns_svg;" xmlns:xlink="&ns_xlink;" width="33" height="33" viewBox="0 0 33 33"
style="overflow:visible;enable-background:new 0 0 33 33;" xml:space="preserve">
<circle style="stroke:#000000;" cx="16.5" cy="16.5" r="16"/>
<g>
<g style="enable-background:new ;">
<path style="fill:#FFFFFF;" d="M3.815,10.758h0.48c3.24,0,4.104-1.681,4.176-2.952h2.76v17.04h-3.36V13.11H3.815V10.758z"/>
<path style="fill:#FFFFFF;" d="M22.175,7.806c4.009,0,5.904,2.76,5.904,8.736c0,5.975-1.896,8.76-5.904,8.76
c-4.008,0-5.904-2.785-5.904-8.76C16.271,10.566,18.167,7.806,22.175,7.806z M22.175,22.613c1.921,0,2.448-1.68,2.448-6.071
c0-4.393-0.527-6.049-2.448-6.049c-1.92,0-2.448,1.656-2.448,6.049C19.727,20.934,20.255,22.613,22.175,22.613z"/>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 410 B

View File

@ -1,16 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 12.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 51448) -->
<!DOCTYPE svg [
<!ENTITY ns_svg "http://www.w3.org/2000/svg">
<!ENTITY ns_xlink "http://www.w3.org/1999/xlink">
]>
<svg version="1.0" id="Layer_1" xmlns="&ns_svg;" xmlns:xlink="&ns_xlink;" width="33" height="33" viewBox="0 0 33 33"
style="overflow:visible;enable-background:new 0 0 33 33;" xml:space="preserve">
<circle style="stroke:#000000;" cx="16.5" cy="16.5" r="16"/>
<g>
<g style="enable-background:new ;">
<path style="fill:#FFFFFF;" d="M5.209,10.412h0.48c3.24,0,4.104-1.681,4.176-2.952h2.76V24.5h-3.36V12.764H5.209V10.412z"/>
<path style="fill:#FFFFFF;" d="M18.553,10.412h0.48c3.24,0,4.104-1.681,4.176-2.952h2.76V24.5h-3.359V12.764h-4.056V10.412z"/>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 827 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 488 B

View File

@ -1,18 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 12.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 51448) -->
<!DOCTYPE svg [
<!ENTITY ns_svg "http://www.w3.org/2000/svg">
<!ENTITY ns_xlink "http://www.w3.org/1999/xlink">
]>
<svg version="1.0" id="Layer_1" xmlns="&ns_svg;" xmlns:xlink="&ns_xlink;" width="33" height="33" viewBox="0 0 33 33"
style="overflow:visible;enable-background:new 0 0 33 33;" xml:space="preserve">
<circle style="stroke:#000000;" cx="16.5" cy="16.5" r="16"/>
<g>
<g style="enable-background:new ;">
<path style="fill:#FFFFFF;" d="M4.813,10.412h0.48c3.24,0,4.104-1.681,4.176-2.952h2.76V24.5h-3.36V12.764H4.813V10.412z"/>
<path style="fill:#FFFFFF;" d="M17.316,13.484c0-5.545,4.056-6.024,5.568-6.024c3.265,0,5.856,1.92,5.856,5.376
c0,2.928-1.896,4.416-3.553,5.544c-2.256,1.584-3.432,2.353-3.815,3.145h7.392V24.5h-11.64c0.12-1.992,0.264-4.08,3.96-6.768
c3.072-2.232,4.296-3.097,4.296-5.017c0-1.128-0.72-2.424-2.353-2.424c-2.352,0-2.423,1.944-2.447,3.192H17.316z"/>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 509 B

View File

@ -1,20 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 12.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 51448) -->
<!DOCTYPE svg [
<!ENTITY ns_svg "http://www.w3.org/2000/svg">
<!ENTITY ns_xlink "http://www.w3.org/1999/xlink">
]>
<svg version="1.0" id="Layer_1" xmlns="&ns_svg;" xmlns:xlink="&ns_xlink;" width="33" height="33" viewBox="0 0 33 33"
style="overflow:visible;enable-background:new 0 0 33 33;" xml:space="preserve">
<circle style="stroke:#000000;" cx="16.5" cy="16.5" r="16"/>
<g>
<g style="enable-background:new ;">
<path style="fill:#FFFFFF;" d="M3.813,10.412h0.48c3.24,0,4.104-1.681,4.176-2.952h2.76V24.5h-3.36V12.764H3.813V10.412z"/>
<path style="fill:#FFFFFF;" d="M20.611,14.636h0.529c1.008,0,2.855-0.096,2.855-2.304c0-0.624-0.288-2.185-2.137-2.185
c-2.303,0-2.303,2.185-2.303,2.784h-3.12c0-3.191,1.8-5.472,5.64-5.472c2.279,0,5.279,1.152,5.279,4.752
c0,1.728-1.08,2.808-2.039,3.24V15.5c0.6,0.168,2.568,1.056,2.568,3.96c0,3.216-2.377,5.496-5.809,5.496
c-1.607,0-5.928-0.36-5.928-5.688h3.288l-0.024,0.024c0,0.912,0.24,2.976,2.496,2.976c1.344,0,2.52-0.911,2.52-2.808
c0-2.328-2.256-2.424-3.816-2.424V14.636z"/>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 499 B

View File

@ -1,17 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 12.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 51448) -->
<!DOCTYPE svg [
<!ENTITY ns_svg "http://www.w3.org/2000/svg">
<!ENTITY ns_xlink "http://www.w3.org/1999/xlink">
]>
<svg version="1.0" id="Layer_1" xmlns="&ns_svg;" xmlns:xlink="&ns_xlink;" width="33" height="33" viewBox="0 0 33 33"
style="overflow:visible;enable-background:new 0 0 33 33;" xml:space="preserve">
<circle style="stroke:#000000;" cx="16.5" cy="16.5" r="16"/>
<g>
<g style="enable-background:new ;">
<path style="fill:#FFFFFF;" d="M4.146,10.412h0.48c3.24,0,4.104-1.681,4.176-2.952h2.76V24.5h-3.36V12.764H4.146V10.412z"/>
<path style="fill:#FFFFFF;" d="M28.457,20.732h-1.896V24.5h-3.36v-3.768h-6.72v-2.904L22.746,7.46h3.815v10.656h1.896V20.732z
M23.201,18.116c0-4.128,0.072-6.792,0.072-7.32h-0.048l-4.272,7.32H23.201z"/>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 906 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 507 B

View File

@ -1,19 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 12.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 51448) -->
<!DOCTYPE svg [
<!ENTITY ns_svg "http://www.w3.org/2000/svg">
<!ENTITY ns_xlink "http://www.w3.org/1999/xlink">
]>
<svg version="1.0" id="Layer_1" xmlns="&ns_svg;" xmlns:xlink="&ns_xlink;" width="33" height="33" viewBox="0 0 33 33"
style="overflow:visible;enable-background:new 0 0 33 33;" xml:space="preserve">
<circle style="stroke:#000000;" cx="16.5" cy="16.5" r="16"/>
<g>
<g style="enable-background:new ;">
<path style="fill:#FFFFFF;" d="M3.479,11.079h0.48c3.24,0,4.104-1.681,4.176-2.952h2.76v17.04h-3.36V13.43H3.479V11.079z"/>
<path style="fill:#FFFFFF;" d="M19.342,14.943c0.625-0.433,1.392-0.937,3.048-0.937c2.279,0,5.16,1.584,5.16,5.496
c0,2.328-1.176,6.121-6.192,6.121c-2.664,0-5.376-1.584-5.544-5.016h3.36c0.144,1.391,0.888,2.326,2.376,2.326
c1.607,0,2.544-1.367,2.544-3.191c0-1.512-0.72-3.047-2.496-3.047c-0.456,0-1.608,0.023-2.256,1.223l-3-0.143l1.176-9.361h9.36
v2.832h-6.937L19.342,14.943z"/>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1.1 KiB

View File

@ -1,20 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 12.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 51448) -->
<!DOCTYPE svg [
<!ENTITY ns_svg "http://www.w3.org/2000/svg">
<!ENTITY ns_xlink "http://www.w3.org/1999/xlink">
]>
<svg version="1.0" id="Layer_1" xmlns="&ns_svg;" xmlns:xlink="&ns_xlink;" width="33" height="33" viewBox="0 0 33 33"
style="overflow:visible;enable-background:new 0 0 33 33;" xml:space="preserve">
<circle style="stroke:#000000;" cx="16.5" cy="16.5" r="16"/>
<g>
<g style="enable-background:new ;">
<path style="fill:#FFFFFF;" d="M3.813,10.412h0.48c3.24,0,4.104-1.681,4.176-2.952h2.76V24.5h-3.36V12.764H3.813V10.412z"/>
<path style="fill:#FFFFFF;" d="M24.309,11.78c-0.097-0.96-0.721-1.633-1.969-1.633c-2.184,0-2.688,2.496-2.808,4.704L19.58,14.9
c0.456-0.624,1.296-1.416,3.191-1.416c3.529,0,5.209,2.712,5.209,5.256c0,3.72-2.28,6.216-5.568,6.216
c-5.16,0-6.168-4.32-6.168-8.568c0-3.24,0.432-8.928,6.336-8.928c0.695,0,2.641,0.264,3.48,1.104
c0.936,0.912,1.271,1.416,1.584,3.217H24.309z M22.172,16.172c-1.271,0-2.568,0.792-2.568,2.928c0,1.849,1.056,3.168,2.664,3.168
c1.225,0,2.353-0.936,2.353-3.239C24.62,16.868,23.229,16.172,22.172,16.172z"/>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1.2 KiB

View File

@ -1,17 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 12.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 51448) -->
<!DOCTYPE svg [
<!ENTITY ns_svg "http://www.w3.org/2000/svg">
<!ENTITY ns_xlink "http://www.w3.org/1999/xlink">
]>
<svg version="1.0" id="Layer_1" xmlns="&ns_svg;" xmlns:xlink="&ns_xlink;" width="33" height="33" viewBox="0 0 33 33"
style="overflow:visible;enable-background:new 0 0 33 33;" xml:space="preserve">
<circle style="stroke:#000000;" cx="16.5" cy="16.5" r="16"/>
<g>
<g style="enable-background:new ;">
<path style="fill:#FFFFFF;" d="M3.479,11.079h0.48c3.24,0,4.104-1.681,4.176-2.952h2.76v17.04h-3.36V13.43H3.479V11.079z"/>
<path style="fill:#FFFFFF;" d="M27.838,11.006c-1.631,1.776-5.807,6.816-6.215,14.16h-3.457c0.36-6.816,4.632-12.24,6.072-13.776
h-8.472l0.072-2.976h12V11.006z"/>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 866 B

View File

@ -1,21 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 12.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 51448) -->
<!DOCTYPE svg [
<!ENTITY ns_svg "http://www.w3.org/2000/svg">
<!ENTITY ns_xlink "http://www.w3.org/1999/xlink">
]>
<svg version="1.0" id="Layer_1" xmlns="&ns_svg;" xmlns:xlink="&ns_xlink;" width="33" height="33" viewBox="0 0 33 33"
style="overflow:visible;enable-background:new 0 0 33 33;" xml:space="preserve">
<circle style="stroke:#000000;" cx="16.5" cy="16.5" r="16"/>
<g>
<g style="enable-background:new ;">
<path style="fill:#FFFFFF;" d="M4.813,10.412h0.48c3.24,0,4.104-1.681,4.176-2.952h2.76V24.5h-3.36V12.764H4.813V10.412z"/>
<path style="fill:#FFFFFF;" d="M23.172,24.956c-4.392,0-5.904-2.856-5.904-5.185c0-0.863,0-3.119,2.592-4.319
c-1.344-0.672-2.064-1.752-2.064-3.336c0-2.904,2.328-4.656,5.304-4.656c3.528,0,5.4,2.088,5.4,4.44
c0,1.464-0.6,2.712-1.968,3.432c1.632,0.815,2.544,1.896,2.544,4.104C29.076,21.596,27.684,24.956,23.172,24.956z M23.124,16.916
c-1.224,0-2.4,0.792-2.4,2.64c0,1.632,0.936,2.712,2.472,2.712c1.752,0,2.424-1.512,2.424-2.688
C25.62,18.38,24.996,16.916,23.124,16.916z M25.284,12.26c0-1.296-0.888-2.112-1.968-2.112c-1.512,0-2.305,0.864-2.305,2.112
c0,1.008,0.744,2.112,2.185,2.112C24.516,14.372,25.284,13.484,25.284,12.26z"/>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1.3 KiB

View File

@ -1,20 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 12.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 51448) -->
<!DOCTYPE svg [
<!ENTITY ns_svg "http://www.w3.org/2000/svg">
<!ENTITY ns_xlink "http://www.w3.org/1999/xlink">
]>
<svg version="1.0" id="Layer_1" xmlns="&ns_svg;" xmlns:xlink="&ns_xlink;" width="33" height="33" viewBox="0 0 33 33"
style="overflow:visible;enable-background:new 0 0 33 33;" xml:space="preserve">
<circle style="stroke:#000000;" cx="16.5" cy="16.5" r="16"/>
<g>
<g style="enable-background:new ;">
<path style="fill:#FFFFFF;" d="M4.146,10.746h0.48c3.24,0,4.104-1.681,4.176-2.952h2.76v17.041h-3.36V13.097H4.146V10.746z"/>
<path style="fill:#FFFFFF;" d="M20.225,20.898v0.023c0.192,1.176,0.936,1.68,1.968,1.68c1.392,0,2.783-1.176,2.808-4.752
l-0.048-0.049c-0.768,1.152-2.088,1.441-3.24,1.441c-3.264,0-5.16-2.473-5.16-5.329c0-4.176,2.472-6.12,5.808-6.12
c5.904,0,6,6.36,6,8.76c0,6.601-3.12,8.736-6.192,8.736c-2.904,0-4.992-1.68-5.28-4.391H20.225z M22.434,16.553
c1.176,0,2.472-0.84,2.472-2.855c0-1.944-0.841-3.145-2.568-3.145c-0.864,0-2.424,0.433-2.424,2.88
C19.913,16.001,21.161,16.553,22.434,16.553z"/>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 446 B

View File

@ -1,17 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 12.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 51448) -->
<!DOCTYPE svg [
<!ENTITY ns_svg "http://www.w3.org/2000/svg">
<!ENTITY ns_xlink "http://www.w3.org/1999/xlink">
]>
<svg version="1.0" id="Layer_1" xmlns="&ns_svg;" xmlns:xlink="&ns_xlink;" width="33" height="33" viewBox="0 0 33 33"
style="overflow:visible;enable-background:new 0 0 33 33;" xml:space="preserve">
<circle style="stroke:#000000;" cx="16.5" cy="16.5" r="16"/>
<g>
<g style="enable-background:new ;">
<path style="fill:#FFFFFF;" d="M9.668,12.328c0-6.469,4.732-7.028,6.496-7.028c3.808,0,6.833,2.24,6.833,6.271
c0,3.416-2.213,5.152-4.145,6.469c-2.632,1.848-4.004,2.744-4.452,3.668h8.624v3.472H9.444c0.14-2.324,0.308-4.76,4.62-7.896
c3.584-2.604,5.012-3.612,5.012-5.853c0-1.315-0.84-2.828-2.744-2.828c-2.744,0-2.828,2.269-2.856,3.725H9.668z"/>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 926 B

View File

@ -1,20 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 12.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 51448) -->
<!DOCTYPE svg [
<!ENTITY ns_svg "http://www.w3.org/2000/svg">
<!ENTITY ns_xlink "http://www.w3.org/1999/xlink">
]>
<svg version="1.0" id="Layer_1" xmlns="&ns_svg;" xmlns:xlink="&ns_xlink;" width="33" height="33" viewBox="0 0 33 33"
style="overflow:visible;enable-background:new 0 0 33 33;" xml:space="preserve">
<circle style="stroke:#000000;" cx="16.5" cy="16.5" r="16"/>
<g>
<g style="enable-background:new ;">
<path style="fill:#FFFFFF;" d="M3.972,13.484c0-5.545,4.056-6.024,5.568-6.024c3.264,0,5.856,1.92,5.856,5.376
c0,2.928-1.896,4.416-3.552,5.544c-2.256,1.584-3.432,2.353-3.816,3.145h7.392V24.5H3.78c0.12-1.992,0.264-4.08,3.96-6.768
c3.072-2.232,4.296-3.097,4.296-5.017c0-1.128-0.72-2.424-2.352-2.424c-2.352,0-2.424,1.944-2.448,3.192H3.972z"/>
<path style="fill:#FFFFFF;" d="M23.172,7.46c4.008,0,5.904,2.76,5.904,8.736c0,5.976-1.896,8.76-5.904,8.76
s-5.904-2.784-5.904-8.76C17.268,10.22,19.164,7.46,23.172,7.46z M23.172,22.268c1.92,0,2.448-1.68,2.448-6.071
c0-4.393-0.528-6.049-2.448-6.049s-2.448,1.656-2.448,6.049C20.724,20.588,21.252,22.268,23.172,22.268z"/>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1.2 KiB

View File

@ -1,18 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 12.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 51448) -->
<!DOCTYPE svg [
<!ENTITY ns_svg "http://www.w3.org/2000/svg">
<!ENTITY ns_xlink "http://www.w3.org/1999/xlink">
]>
<svg version="1.0" id="Layer_1" xmlns="&ns_svg;" xmlns:xlink="&ns_xlink;" width="33" height="33" viewBox="0 0 33 33"
style="overflow:visible;enable-background:new 0 0 33 33;" xml:space="preserve">
<circle style="stroke:#000000;" cx="16.5" cy="16.5" r="16"/>
<g>
<g style="enable-background:new ;">
<path style="fill:#FFFFFF;" d="M5.306,13.151c0-5.545,4.056-6.024,5.568-6.024c3.264,0,5.856,1.92,5.856,5.376
c0,2.928-1.896,4.416-3.552,5.544c-2.256,1.584-3.432,2.353-3.816,3.145h7.392v2.976H5.114c0.12-1.992,0.264-4.08,3.96-6.768
c3.072-2.232,4.296-3.097,4.296-5.017c0-1.128-0.72-2.424-2.352-2.424c-2.352,0-2.424,1.944-2.448,3.192H5.306z"/>
<path style="fill:#FFFFFF;" d="M19.49,10.079h0.48c3.239,0,4.104-1.681,4.176-2.952h2.761v17.04h-3.361V12.431H19.49V10.079z"/>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1.0 KiB

View File

@ -1,20 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 12.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 51448) -->
<!DOCTYPE svg [
<!ENTITY ns_svg "http://www.w3.org/2000/svg">
<!ENTITY ns_xlink "http://www.w3.org/1999/xlink">
]>
<svg version="1.0" id="Layer_1" xmlns="&ns_svg;" xmlns:xlink="&ns_xlink;" width="33" height="33" viewBox="0 0 33 33"
style="overflow:visible;enable-background:new 0 0 33 33;" xml:space="preserve">
<circle style="stroke:#000000;" cx="16.5" cy="16.5" r="16"/>
<g>
<g style="enable-background:new ;">
<path style="fill:#FFFFFF;" d="M3.972,13.484c0-5.545,4.056-6.024,5.568-6.024c3.264,0,5.856,1.92,5.856,5.376
c0,2.928-1.896,4.416-3.552,5.544c-2.256,1.584-3.432,2.353-3.816,3.145h7.392V24.5H3.78c0.12-1.992,0.264-4.08,3.96-6.768
c3.072-2.232,4.296-3.097,4.296-5.017c0-1.128-0.72-2.424-2.352-2.424c-2.352,0-2.424,1.944-2.448,3.192H3.972z"/>
<path style="fill:#FFFFFF;" d="M17.316,13.484c0-5.545,4.056-6.024,5.568-6.024c3.265,0,5.856,1.92,5.856,5.376
c0,2.928-1.896,4.416-3.553,5.544c-2.256,1.584-3.432,2.353-3.815,3.145h7.392V24.5h-11.64c0.12-1.992,0.264-4.08,3.96-6.768
c3.072-2.232,4.296-3.097,4.296-5.017c0-1.128-0.72-2.424-2.353-2.424c-2.352,0-2.423,1.944-2.447,3.192H17.316z"/>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1.2 KiB

View File

@ -1,22 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 12.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 51448) -->
<!DOCTYPE svg [
<!ENTITY ns_svg "http://www.w3.org/2000/svg">
<!ENTITY ns_xlink "http://www.w3.org/1999/xlink">
]>
<svg version="1.0" id="Layer_1" xmlns="&ns_svg;" xmlns:xlink="&ns_xlink;" width="33" height="33" viewBox="0 0 33 33"
style="overflow:visible;enable-background:new 0 0 33 33;" xml:space="preserve">
<circle style="stroke:#000000;" cx="16.5" cy="16.5" r="16"/>
<g>
<g style="enable-background:new ;">
<path style="fill:#FFFFFF;" d="M3.972,13.484c0-5.545,4.056-6.024,5.568-6.024c3.264,0,5.856,1.92,5.856,5.376
c0,2.928-1.896,4.416-3.552,5.544c-2.256,1.584-3.432,2.353-3.816,3.145h7.392V24.5H3.78c0.12-1.992,0.264-4.08,3.96-6.768
c3.072-2.232,4.296-3.097,4.296-5.017c0-1.128-0.72-2.424-2.352-2.424c-2.352,0-2.424,1.944-2.448,3.192H3.972z"/>
<path style="fill:#FFFFFF;" d="M21.612,14.636h0.528c1.008,0,2.855-0.096,2.855-2.304c0-0.624-0.287-2.185-2.136-2.185
c-2.304,0-2.304,2.185-2.304,2.784h-3.12c0-3.191,1.8-5.472,5.64-5.472c2.28,0,5.28,1.152,5.28,4.752
c0,1.728-1.08,2.808-2.04,3.24V15.5c0.6,0.168,2.568,1.056,2.568,3.96c0,3.216-2.377,5.496-5.809,5.496
c-1.607,0-5.928-0.36-5.928-5.688h3.288l-0.024,0.024c0,0.912,0.24,2.976,2.496,2.976c1.344,0,2.521-0.911,2.521-2.808
c0-2.328-2.257-2.424-3.816-2.424V14.636z"/>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1.4 KiB

View File

@ -1,19 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 12.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 51448) -->
<!DOCTYPE svg [
<!ENTITY ns_svg "http://www.w3.org/2000/svg">
<!ENTITY ns_xlink "http://www.w3.org/1999/xlink">
]>
<svg version="1.0" id="Layer_1" xmlns="&ns_svg;" xmlns:xlink="&ns_xlink;" width="33" height="33" viewBox="0 0 33 33"
style="overflow:visible;enable-background:new 0 0 33 33;" xml:space="preserve">
<circle style="stroke:#000000;" cx="16.5" cy="16.5" r="16"/>
<g>
<g style="enable-background:new ;">
<path style="fill:#FFFFFF;" d="M4.972,13.484c0-5.545,4.056-6.024,5.568-6.024c3.264,0,5.856,1.92,5.856,5.376
c0,2.928-1.896,4.416-3.552,5.544c-2.256,1.584-3.432,2.353-3.816,3.145h7.392V24.5H4.78c0.12-1.992,0.264-4.08,3.96-6.768
c3.072-2.232,4.296-3.097,4.296-5.017c0-1.128-0.72-2.424-2.352-2.424c-2.352,0-2.424,1.944-2.448,3.192H4.972z"/>
<path style="fill:#FFFFFF;" d="M30.124,20.732h-1.896V24.5h-3.36v-3.768h-6.72v-2.904L24.412,7.46h3.816v10.656h1.896V20.732z
M24.868,18.116c0-4.128,0.071-6.792,0.071-7.32h-0.047l-4.272,7.32H24.868z"/>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1.1 KiB

View File

@ -1,21 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 12.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 51448) -->
<!DOCTYPE svg [
<!ENTITY ns_svg "http://www.w3.org/2000/svg">
<!ENTITY ns_xlink "http://www.w3.org/1999/xlink">
]>
<svg version="1.0" id="Layer_1" xmlns="&ns_svg;" xmlns:xlink="&ns_xlink;" width="33" height="33" viewBox="0 0 33 33"
style="overflow:visible;enable-background:new 0 0 33 33;" xml:space="preserve">
<circle style="stroke:#000000;" cx="16.5" cy="16.5" r="16"/>
<g>
<g style="enable-background:new ;">
<path style="fill:#FFFFFF;" d="M3.972,13.484c0-5.545,4.056-6.024,5.568-6.024c3.264,0,5.856,1.92,5.856,5.376
c0,2.928-1.896,4.416-3.552,5.544c-2.256,1.584-3.432,2.353-3.816,3.145h7.392V24.5H3.78c0.12-1.992,0.264-4.08,3.96-6.768
c3.072-2.232,4.296-3.097,4.296-5.017c0-1.128-0.72-2.424-2.352-2.424c-2.352,0-2.424,1.944-2.448,3.192H3.972z"/>
<path style="fill:#FFFFFF;" d="M20.676,14.276c0.624-0.433,1.393-0.937,3.049-0.937c2.279,0,5.16,1.584,5.16,5.496
c0,2.328-1.177,6.12-6.193,6.12c-2.664,0-5.375-1.584-5.543-5.016h3.36c0.144,1.392,0.889,2.327,2.376,2.327
c1.608,0,2.544-1.367,2.544-3.191c0-1.513-0.72-3.048-2.496-3.048c-0.455,0-1.607,0.023-2.256,1.224l-3-0.144l1.176-9.36h9.36
v2.832h-6.937L20.676,14.276z"/>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1.3 KiB

View File

@ -1,22 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 12.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 51448) -->
<!DOCTYPE svg [
<!ENTITY ns_svg "http://www.w3.org/2000/svg">
<!ENTITY ns_xlink "http://www.w3.org/1999/xlink">
]>
<svg version="1.0" id="Layer_1" xmlns="&ns_svg;" xmlns:xlink="&ns_xlink;" width="33" height="33" viewBox="0 0 33 33"
style="overflow:visible;enable-background:new 0 0 33 33;" xml:space="preserve">
<circle style="stroke:#000000;" cx="16.5" cy="16.5" r="16"/>
<g>
<g style="enable-background:new ;">
<path style="fill:#FFFFFF;" d="M3.972,13.484c0-5.545,4.056-6.024,5.568-6.024c3.264,0,5.856,1.92,5.856,5.376
c0,2.928-1.896,4.416-3.552,5.544c-2.256,1.584-3.432,2.353-3.816,3.145h7.392V24.5H3.78c0.12-1.992,0.264-4.08,3.96-6.768
c3.072-2.232,4.296-3.097,4.296-5.017c0-1.128-0.72-2.424-2.352-2.424c-2.352,0-2.424,1.944-2.448,3.192H3.972z"/>
<path style="fill:#FFFFFF;" d="M25.309,11.78c-0.097-0.96-0.721-1.633-1.969-1.633c-2.184,0-2.688,2.496-2.808,4.704L20.58,14.9
c0.456-0.624,1.296-1.416,3.191-1.416c3.529,0,5.209,2.712,5.209,5.256c0,3.72-2.28,6.216-5.568,6.216
c-5.16,0-6.168-4.32-6.168-8.568c0-3.24,0.432-8.928,6.336-8.928c0.695,0,2.641,0.264,3.48,1.104
c0.936,0.912,1.271,1.416,1.584,3.217H25.309z M23.172,16.172c-1.271,0-2.568,0.792-2.568,2.928c0,1.849,1.056,3.168,2.664,3.168
c1.225,0,2.353-0.936,2.353-3.239C25.62,16.868,24.229,16.172,23.172,16.172z"/>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1.4 KiB

View File

@ -1,19 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 12.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 51448) -->
<!DOCTYPE svg [
<!ENTITY ns_svg "http://www.w3.org/2000/svg">
<!ENTITY ns_xlink "http://www.w3.org/1999/xlink">
]>
<svg version="1.0" id="Layer_1" xmlns="&ns_svg;" xmlns:xlink="&ns_xlink;" width="33" height="33" viewBox="0 0 33 33"
style="overflow:visible;enable-background:new 0 0 33 33;" xml:space="preserve">
<circle style="stroke:#000000;" cx="16.5" cy="16.5" r="16"/>
<g>
<g style="enable-background:new ;">
<path style="fill:#FFFFFF;" d="M3.972,13.484c0-5.545,4.056-6.024,5.568-6.024c3.264,0,5.856,1.92,5.856,5.376
c0,2.928-1.896,4.416-3.552,5.544c-2.256,1.584-3.432,2.353-3.816,3.145h7.392V24.5H3.78c0.12-1.992,0.264-4.08,3.96-6.768
c3.072-2.232,4.296-3.097,4.296-5.017c0-1.128-0.72-2.424-2.352-2.424c-2.352,0-2.424,1.944-2.448,3.192H3.972z"/>
<path style="fill:#FFFFFF;" d="M29.172,10.34c-1.632,1.776-5.808,6.816-6.216,14.16H19.5c0.36-6.816,4.632-12.24,6.072-13.776
H17.1l0.072-2.976h12V10.34z"/>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1.1 KiB

View File

@ -1,23 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 12.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 51448) -->
<!DOCTYPE svg [
<!ENTITY ns_svg "http://www.w3.org/2000/svg">
<!ENTITY ns_xlink "http://www.w3.org/1999/xlink">
]>
<svg version="1.0" id="Layer_1" xmlns="&ns_svg;" xmlns:xlink="&ns_xlink;" width="33" height="33" viewBox="0 0 33 33"
style="overflow:visible;enable-background:new 0 0 33 33;" xml:space="preserve">
<circle style="stroke:#000000;" cx="16.5" cy="16.5" r="16"/>
<g>
<g style="enable-background:new ;">
<path style="fill:#FFFFFF;" d="M3.972,13.484c0-5.545,4.056-6.024,5.568-6.024c3.264,0,5.856,1.92,5.856,5.376
c0,2.928-1.896,4.416-3.552,5.544c-2.256,1.584-3.432,2.353-3.816,3.145h7.392V24.5H3.78c0.12-1.992,0.264-4.08,3.96-6.768
c3.072-2.232,4.296-3.097,4.296-5.017c0-1.128-0.72-2.424-2.352-2.424c-2.352,0-2.424,1.944-2.448,3.192H3.972z"/>
<path style="fill:#FFFFFF;" d="M23.172,24.956c-4.392,0-5.904-2.856-5.904-5.185c0-0.863,0-3.119,2.592-4.319
c-1.344-0.672-2.064-1.752-2.064-3.336c0-2.904,2.328-4.656,5.304-4.656c3.528,0,5.4,2.088,5.4,4.44
c0,1.464-0.6,2.712-1.968,3.432c1.632,0.815,2.544,1.896,2.544,4.104C29.076,21.596,27.684,24.956,23.172,24.956z M23.124,16.916
c-1.224,0-2.4,0.792-2.4,2.64c0,1.632,0.936,2.712,2.472,2.712c1.752,0,2.424-1.512,2.424-2.688
C25.62,18.38,24.996,16.916,23.124,16.916z M25.284,12.26c0-1.296-0.888-2.112-1.968-2.112c-1.512,0-2.305,0.864-2.305,2.112
c0,1.008,0.744,2.112,2.185,2.112C24.516,14.372,25.284,13.484,25.284,12.26z"/>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1.5 KiB

View File

@ -1,22 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 12.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 51448) -->
<!DOCTYPE svg [
<!ENTITY ns_svg "http://www.w3.org/2000/svg">
<!ENTITY ns_xlink "http://www.w3.org/1999/xlink">
]>
<svg version="1.0" id="Layer_1" xmlns="&ns_svg;" xmlns:xlink="&ns_xlink;" width="33" height="33" viewBox="0 0 33 33"
style="overflow:visible;enable-background:new 0 0 33 33;" xml:space="preserve">
<circle style="stroke:#000000;" cx="16.5" cy="16.5" r="16"/>
<g>
<g style="enable-background:new ;">
<path style="fill:#FFFFFF;" d="M3.972,13.484c0-5.545,4.056-6.024,5.568-6.024c3.264,0,5.856,1.92,5.856,5.376
c0,2.928-1.896,4.416-3.552,5.544c-2.256,1.584-3.432,2.353-3.816,3.145h7.392V24.5H3.78c0.12-1.992,0.264-4.08,3.96-6.768
c3.072-2.232,4.296-3.097,4.296-5.017c0-1.128-0.72-2.424-2.352-2.424c-2.352,0-2.424,1.944-2.448,3.192H3.972z"/>
<path style="fill:#FFFFFF;" d="M20.893,20.564v0.023c0.191,1.176,0.936,1.68,1.967,1.68c1.393,0,2.785-1.176,2.809-4.752
l-0.048-0.048c-0.769,1.152-2.088,1.44-3.24,1.44c-3.264,0-5.16-2.473-5.16-5.328c0-4.176,2.472-6.12,5.807-6.12
c5.904,0,6.001,6.36,6.001,8.76c0,6.601-3.12,8.736-6.192,8.736c-2.904,0-4.992-1.68-5.28-4.392H20.893z M23.1,16.22
c1.176,0,2.473-0.84,2.473-2.855c0-1.944-0.84-3.145-2.568-3.145c-0.863,0-2.424,0.433-2.424,2.88
C20.58,15.668,21.828,16.22,23.1,16.22z"/>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 431 B

View File

@ -1,19 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 12.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 51448) -->
<!DOCTYPE svg [
<!ENTITY ns_svg "http://www.w3.org/2000/svg">
<!ENTITY ns_xlink "http://www.w3.org/1999/xlink">
]>
<svg version="1.0" id="Layer_1" xmlns="&ns_svg;" xmlns:xlink="&ns_xlink;" width="33" height="33" viewBox="0 0 33 33"
style="overflow:visible;enable-background:new 0 0 33 33;" xml:space="preserve">
<circle style="stroke:#000000;" cx="16.5" cy="16.5" r="16"/>
<g>
<g style="enable-background:new ;">
<path style="fill:#FFFFFF;" d="M15.127,14.005h0.616c1.176,0,3.332-0.112,3.332-2.688c0-0.728-0.336-2.548-2.492-2.548
c-2.688,0-2.688,2.548-2.688,3.248h-3.64c0-3.724,2.1-6.384,6.58-6.384c2.66,0,6.16,1.344,6.16,5.544
c0,2.016-1.261,3.276-2.38,3.78v0.056c0.699,0.196,2.996,1.232,2.996,4.62c0,3.752-2.772,6.412-6.776,6.412
c-1.876,0-6.916-0.42-6.916-6.636h3.836l-0.028,0.027c0,1.064,0.28,3.473,2.912,3.473c1.568,0,2.94-1.064,2.94-3.276
c0-2.716-2.632-2.828-4.452-2.828V14.005z"/>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1.0 KiB

View File

@ -1,22 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 12.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 51448) -->
<!DOCTYPE svg [
<!ENTITY ns_svg "http://www.w3.org/2000/svg">
<!ENTITY ns_xlink "http://www.w3.org/1999/xlink">
]>
<svg version="1.0" id="Layer_1" xmlns="&ns_svg;" xmlns:xlink="&ns_xlink;" width="33" height="33" viewBox="0 0 33 33"
style="overflow:visible;enable-background:new 0 0 33 33;" xml:space="preserve">
<circle style="stroke:#000000;" cx="16.5" cy="16.5" r="16"/>
<g>
<g style="enable-background:new ;">
<path style="fill:#FFFFFF;" d="M8.268,14.636h0.528c1.008,0,2.856-0.096,2.856-2.304c0-0.624-0.288-2.185-2.136-2.185
c-2.304,0-2.304,2.185-2.304,2.784h-3.12c0-3.191,1.8-5.472,5.64-5.472c2.28,0,5.28,1.152,5.28,4.752
c0,1.728-1.08,2.808-2.04,3.24V15.5c0.6,0.168,2.568,1.056,2.568,3.96c0,3.216-2.376,5.496-5.808,5.496
c-1.608,0-5.928-0.36-5.928-5.688h3.288l-0.024,0.024c0,0.912,0.24,2.976,2.496,2.976c1.344,0,2.52-0.911,2.52-2.808
c0-2.328-2.256-2.424-3.816-2.424V14.636z"/>
<path style="fill:#FFFFFF;" d="M23.172,7.46c4.008,0,5.904,2.76,5.904,8.736c0,5.976-1.896,8.76-5.904,8.76
s-5.904-2.784-5.904-8.76C17.268,10.22,19.164,7.46,23.172,7.46z M23.172,22.268c1.92,0,2.448-1.68,2.448-6.071
c0-4.393-0.528-6.049-2.448-6.049s-2.448,1.656-2.448,6.049C20.724,20.588,21.252,22.268,23.172,22.268z"/>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 441 B

View File

@ -1,16 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 12.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 51448) -->
<!DOCTYPE svg [
<!ENTITY ns_svg "http://www.w3.org/2000/svg">
<!ENTITY ns_xlink "http://www.w3.org/1999/xlink">
]>
<svg version="1.0" id="Layer_1" xmlns="&ns_svg;" xmlns:xlink="&ns_xlink;" width="33" height="33" viewBox="0 0 33 33"
style="overflow:visible;enable-background:new 0 0 33 33;" xml:space="preserve">
<circle style="stroke:#000000;" cx="16.5" cy="16.5" r="16"/>
<g>
<g style="enable-background:new ;">
<path style="fill:#FFFFFF;" d="M21.891,20.784h-2.212v4.396h-3.92v-4.396h-7.84v-3.389L15.227,5.3h4.452v12.432h2.212V20.784z
M15.759,17.731c0-4.815,0.084-7.924,0.084-8.54h-0.056l-4.984,8.54H15.759z"/>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 783 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 423 B

View File

@ -1,18 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 12.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 51448) -->
<!DOCTYPE svg [
<!ENTITY ns_svg "http://www.w3.org/2000/svg">
<!ENTITY ns_xlink "http://www.w3.org/1999/xlink">
]>
<svg version="1.0" id="Layer_1" xmlns="&ns_svg;" xmlns:xlink="&ns_xlink;" width="33" height="33" viewBox="0 0 33 33"
style="overflow:visible;enable-background:new 0 0 33 33;" xml:space="preserve">
<circle style="stroke:#000000;" cx="16.5" cy="16.5" r="16"/>
<g>
<g style="enable-background:new ;">
<path style="fill:#FFFFFF;" d="M14.035,14.252c0.728-0.504,1.624-1.092,3.556-1.092c2.66,0,6.02,1.848,6.02,6.411
c0,2.717-1.372,7.141-7.224,7.141c-3.108,0-6.272-1.849-6.468-5.853h3.92c0.168,1.624,1.036,2.717,2.772,2.717
c1.876,0,2.968-1.597,2.968-3.725c0-1.764-0.839-3.556-2.912-3.556c-0.532,0-1.876,0.028-2.632,1.428l-3.5-0.168l1.372-10.92
h10.919v3.304h-8.092L14.035,14.252z"/>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 967 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 431 B

View File

@ -1,19 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 12.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 51448) -->
<!DOCTYPE svg [
<!ENTITY ns_svg "http://www.w3.org/2000/svg">
<!ENTITY ns_xlink "http://www.w3.org/1999/xlink">
]>
<svg version="1.0" id="Layer_1" xmlns="&ns_svg;" xmlns:xlink="&ns_xlink;" width="33" height="33" viewBox="0 0 33 33"
style="overflow:visible;enable-background:new 0 0 33 33;" xml:space="preserve">
<circle style="stroke:#000000;" cx="16.5" cy="16.5" r="16"/>
<g>
<g style="enable-background:new ;">
<path style="fill:#FFFFFF;" d="M19.106,10.673c-0.112-1.12-0.84-1.904-2.296-1.904c-2.548,0-3.136,2.912-3.276,5.488l0.056,0.056
c0.532-0.728,1.512-1.651,3.724-1.651c4.116,0,6.077,3.164,6.077,6.131c0,4.34-2.66,7.252-6.497,7.252
c-6.02,0-7.196-5.039-7.196-9.996c0-3.78,0.504-10.416,7.392-10.416c0.812,0,3.08,0.308,4.061,1.288
c1.092,1.063,1.483,1.652,1.848,3.752H19.106z M16.614,15.797c-1.484,0-2.996,0.924-2.996,3.416c0,2.156,1.232,3.697,3.108,3.697
c1.428,0,2.745-1.094,2.745-3.781C19.471,16.609,17.846,15.797,16.614,15.797z"/>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 397 B

View File

@ -1,16 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 12.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 51448) -->
<!DOCTYPE svg [
<!ENTITY ns_svg "http://www.w3.org/2000/svg">
<!ENTITY ns_xlink "http://www.w3.org/1999/xlink">
]>
<svg version="1.0" id="Layer_1" xmlns="&ns_svg;" xmlns:xlink="&ns_xlink;" width="33" height="33" viewBox="0 0 33 33"
style="overflow:visible;enable-background:new 0 0 33 33;" xml:space="preserve">
<circle style="stroke:#000000;" cx="16.5" cy="16.5" r="16"/>
<g>
<g style="enable-background:new ;">
<path style="fill:#FFFFFF;" d="M24.28,9.66c-1.904,2.071-6.776,7.951-7.252,16.52h-4.032c0.42-7.952,5.404-14.28,7.084-16.072
h-9.884l0.084-3.472h14V9.66z"/>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 738 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 434 B

View File

@ -1,20 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 12.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 51448) -->
<!DOCTYPE svg [
<!ENTITY ns_svg "http://www.w3.org/2000/svg">
<!ENTITY ns_xlink "http://www.w3.org/1999/xlink">
]>
<svg version="1.0" id="Layer_1" xmlns="&ns_svg;" xmlns:xlink="&ns_xlink;" width="33" height="33" viewBox="0 0 33 33"
style="overflow:visible;enable-background:new 0 0 33 33;" xml:space="preserve">
<circle style="stroke:#000000;" cx="16.5" cy="16.5" r="16"/>
<g>
<g style="enable-background:new ;">
<path style="fill:#FFFFFF;" d="M16.28,26.712c-5.124,0-6.888-3.332-6.888-6.048c0-1.009,0-3.641,3.024-5.04
c-1.568-0.784-2.408-2.044-2.408-3.893c0-3.388,2.716-5.432,6.188-5.432c4.116,0,6.3,2.436,6.3,5.18
c0,1.708-0.7,3.164-2.296,4.004c1.903,0.952,2.968,2.212,2.968,4.788C23.168,22.792,21.544,26.712,16.28,26.712z M16.224,17.332
c-1.428,0-2.8,0.924-2.8,3.08c0,1.903,1.092,3.164,2.884,3.164c2.043,0,2.829-1.765,2.829-3.137
C19.137,19.04,18.408,17.332,16.224,17.332z M18.744,11.899c0-1.512-1.036-2.464-2.296-2.464c-1.764,0-2.688,1.008-2.688,2.464
c0,1.177,0.868,2.464,2.548,2.464C17.848,14.363,18.744,13.328,18.744,11.899z"/>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 420 B

View File

@ -1,19 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 12.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 51448) -->
<!DOCTYPE svg [
<!ENTITY ns_svg "http://www.w3.org/2000/svg">
<!ENTITY ns_xlink "http://www.w3.org/1999/xlink">
]>
<svg version="1.0" id="Layer_1" xmlns="&ns_svg;" xmlns:xlink="&ns_xlink;" width="33" height="33" viewBox="0 0 33 33"
style="overflow:visible;enable-background:new 0 0 33 33;" xml:space="preserve">
<circle style="stroke:#000000;" cx="16.5" cy="16.5" r="16"/>
<g>
<g style="enable-background:new ;">
<path style="fill:#FFFFFF;" d="M13.953,21.921v0.027c0.224,1.372,1.092,1.961,2.296,1.961c1.624,0,3.248-1.372,3.276-5.545
l-0.057-0.056c-0.896,1.344-2.436,1.68-3.78,1.68c-3.808,0-6.02-2.884-6.02-6.216c0-4.872,2.884-7.14,6.776-7.14
c6.888,0,7,7.42,7,10.22c0,7.7-3.641,10.192-7.224,10.192c-3.388,0-5.824-1.96-6.16-5.124H13.953z M16.529,16.853
c1.372,0,2.884-0.979,2.884-3.332c0-2.268-0.98-3.668-2.996-3.668c-1.008,0-2.828,0.504-2.828,3.36
C13.589,16.209,15.045,16.853,16.529,16.853z"/>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

View File

@ -1,68 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Generator: Adobe Illustrator 12.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 51448) --><svg height="120.648" id="Layer_1" inkscape:version="0.42" sodipodi:docbase="F:\openclip\svg da inviare" sodipodi:docname="Attenzione.svg" sodipodi:version="0.32" space="preserve" style="overflow:visible;enable-background:new 0 0 133.878 120.648;" version="1.1" viewBox="0 0 133.878 120.648" width="133.878" xmlns="http://www.w3.org/2000/svg" xmlns:cc="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:sodipodi="http://inkscape.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:svg="http://www.w3.org/2000/svg">
<metadata>
<rdf:RDF xmlns:cc="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<cc:Work rdf:about="">
<dc:title>Attenzione</dc:title>
<dc:description></dc:description>
<dc:subject>
<rdf:Bag>
<rdf:li>pulsante</rdf:li>
</rdf:Bag>
</dc:subject>
<dc:publisher>
<cc:Agent rdf:about="http://www.openclipart.org/">
<dc:title>Open Clip Art Library</dc:title>
</cc:Agent>
</dc:publisher>
<dc:creator>
<cc:Agent>
<dc:title>Architetto Francesco Rollandin</dc:title>
</cc:Agent>
</dc:creator>
<dc:rights>
<cc:Agent>
<dc:title>Architetto Francesco Rollandin</dc:title>
</cc:Agent>
</dc:rights>
<dc:date></dc:date>
<dc:format>image/svg+xml</dc:format>
<dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
<cc:license rdf:resource="http://web.resource.org/cc/PublicDomain"/>
<dc:language>en</dc:language>
</cc:Work>
<cc:License rdf:about="http://web.resource.org/cc/PublicDomain">
<cc:permits rdf:resource="http://web.resource.org/cc/Reproduction"/>
<cc:permits rdf:resource="http://web.resource.org/cc/Distribution"/>
<cc:permits rdf:resource="http://web.resource.org/cc/DerivativeWorks"/>
</cc:License>
</rdf:RDF>
</metadata>
<defs id="defs43"/>
<sodipodi:namedview bordercolor="#666666" borderopacity="1.0" id="base" inkscape:current-layer="Layer_1" inkscape:cx="66.939003" inkscape:cy="60.324001" inkscape:pageopacity="0.0" inkscape:pageshadow="2" inkscape:window-height="510" inkscape:window-width="787" inkscape:window-x="44" inkscape:window-y="58" inkscape:zoom="2.9838869" pagecolor="#ffffff"/>
<g id="g3">
<linearGradient gradientTransform="matrix(56.9977 90.4964 90.4964 -56.9977 -27343.9609 47971.0547)" gradientUnits="userSpaceOnUse" id="XMLID_4_" x1="-244.5732" x2="-242.8169" y1="455.4199" y2="455.4199">
<stop id="stop6" offset="0" style="stop-color:#FFFA5F"/>
<stop id="stop8" offset="1" style="stop-color:#9F3300"/>
</linearGradient>
<path d="M51.333,8.834C34.985,37.343,18.638,65.854,2.289,94.363 c-7.081,12.352,3.352,26.285,16.453,26.285c6.708,0,13.418,0,20.128,0c22.109,0,44.217,0,66.327,0c3.644,0,7.286,0,10.931,0 c13.293,0,20.963-14.273,16.452-26.031c-4.114-10.729-11.861-20.99-17.542-30.922c-8.81-15.403-17.618-30.809-26.429-46.212 c-1.813-3.167-3.622-6.333-5.434-9.5C76.601-3.516,57.616-2.03,51.333,8.834 M53.973,9.064" id="path10" style="fill:url(#XMLID_4_);"/>
<path d="M55.474,12.388c-8.247,14.279-16.492,28.559-24.739,42.839 c-5.526,9.567-11.05,19.137-16.577,28.707c-2.732,4.73-7.323,10.456-8.284,16c-3.799,21.9,34.927,15.743,46.734,15.743 c20.073,0,40.144,0,60.215,0c13.716,0,18.636-11.963,12.229-23.063c-6.462-11.195-12.927-22.388-19.389-33.582 c-7.249-12.557-14.499-25.113-21.75-37.671c-1.682-2.916-3.364-5.829-5.049-8.745C73.767,3.785,60.676,3.364,55.474,12.388" id="path12" style="fill-rule:evenodd;clip-rule:evenodd;fill:#FFF200;"/>
<path d="M55.474,12.388c-8.247,14.279-16.492,28.559-24.739,42.839c-5.526,9.567-11.05,19.137-16.577,28.707 c-2.732,4.73-7.323,10.456-8.284,16c-3.799,21.9,34.927,15.743,46.734,15.743c20.073,0,40.144,0,60.215,0 c13.716,0,18.636-11.963,12.229-23.063c-6.462-11.195-12.927-22.388-19.389-33.582c-7.249-12.557-14.499-25.113-21.75-37.671 c-1.682-2.916-3.364-5.829-5.049-8.745C73.767,3.785,60.676,3.364,55.474,12.388" id="path14" style="fill:#FFCE00;"/>
<path d="M126.731,95.522c-8.733-15.127-17.468-30.253-26.201-45.379 c-5.537-9.595-11.078-19.188-16.616-28.781c-3.938-6.821-7.459-15.689-16.813-15.689c1.013,0,5.901,10.225,6.469,11.196 c5.451,9.314,10.902,18.63,16.352,27.947c9.217,15.749,18.433,31.498,27.646,47.249c2.302,3.933,5.356,10.555,1.308,14.397 c-3.148,2.987-7.99,3.196-12.099,3.196c-7.225,0-14.448,0-21.674,0c-22.125,0-44.251,0-66.377,0c-3.598,0-7.197,0-10.794,0 c5.285,7.909,16.341,6.02,24.546,6.02c13.009,0,26.017,0,39.023,0c11.979,0,23.958,0,35.937,0c2.516,0,5.032,0,7.547,0 C125.136,115.678,131.878,104.435,126.731,95.522" id="path16" style="fill:#FFB600;"/>
<path d="M14.615,112.457c-4.483-7.751,1.908-16.103,5.793-22.834 c4.698-8.138,9.398-16.276,14.097-24.414C44.54,47.83,54.574,30.448,64.61,13.069c0.789-1.367,3.725-4.568,2.594-5.539 c-3.913-3.353-10.287,1.936-12.107,5.087c-3.129,5.417-6.258,10.835-9.386,16.252c-11.105,19.226-22.209,38.453-33.313,57.68 c-1.649,2.854-3.299,5.713-4.95,8.569c-4.771,8.265-0.075,19.162,9.658,20.446C16.124,114.65,15.294,113.615,14.615,112.457" id="path18" style="fill-rule:evenodd;clip-rule:evenodd;fill:#FFE600;"/>
<path d="M77.076,34.654c0,10.183-1.788,20.758-3.439,30.772 c-0.369,2.239-4.03,23.609-7.796,14.179c-4.247-10.632-4.832-23.419-5.958-34.696c-0.363-3.638-1.538-8.425-0.563-12.06 C61.667,24.099,77.076,25.199,77.076,34.654" id="path20" style="fill-rule:evenodd;clip-rule:evenodd;fill:#FFFFE1;"/>
<path d="M77.076,34.654c-2.018,0.995-1.521,8.717-1.797,11.395c-0.685,6.643-1.505,13.282-2.614,19.869 c-0.79,4.701-1.301,10.862-3.954,14.981c-1.642,2.567-3.405-5.958-3.634-6.932c-2.948-12.443-4.464-25.664-5.09-38.43 c-0.272-5.52,5.164-8.854,10.277-7.622c3.87,0.933,5.217,7.36,7.688,6.738c0.009-11.451-19.755-11.453-19.746,0 c0.017,11.956,2.087,24.599,4.423,36.294c0.501,2.507,1.642,12.376,5.449,12.376c4.059-0.021,5.285-11.432,5.79-14.137 c1.261-6.765,2.139-13.605,2.887-20.444C77.084,45.722,79.281,35.942,77.076,34.654" id="path22" style="fill:#FFFFFF;"/>
<linearGradient gradientTransform="matrix(68.2284 33.0019 33.0019 -68.2284 1613.9791 39385.6641)" gradientUnits="userSpaceOnUse" id="XMLID_5_" x1="-246.981" x2="-245.2275" y1="458.29" y2="458.29">
<stop id="stop25" offset="0" style="stop-color:#FFFA5F"/>
<stop id="stop27" offset="1" style="stop-color:#9F3300"/>
</linearGradient>
<path d="M57.957,34.654c0,10.053,1.632,20.54,3.242,30.431 c0.479,2.936,4.912,26.502,9.99,15.164c4.987-11.134,5.351-25.201,6.386-37.184c0.273-3.169,1.153-7.045,0.421-10.221 C75.628,22.587,57.957,23.788,57.957,34.654 M60.207,34.654c0-8.061,13.138-9.015,15.459-1.792c1.156,3.597-0.13,8.748-0.508,12.38 c-1.135,10.904-2.052,22.602-5.501,33.069c-2.816,8.545-5.546-10.187-5.934-12.522C62.039,55.63,60.207,44.985,60.207,34.654" id="path29" style="fill-rule:evenodd;clip-rule:evenodd;fill:url(#XMLID_5_);"/>
<path d="M77.076,96.788c0,11.964-18.555,11.964-18.555,0 C58.521,84.822,77.076,84.822,77.076,96.788" id="path31" style="fill-rule:evenodd;clip-rule:evenodd;fill:#FFFFE1;"/>
<path d="M77.076,96.788c-2.605,1.661-2.157,6.757-7.044,8.101c-6.178,1.7-12.033-4.159-10.336-10.335 c1.439-5.23,7.657-7.767,12.341-5.021c2.91,1.704,3.164,7.913,5.915,7.256c0-14.267-22.698-12.238-20.143,1.826 c0.987,5.444,6.375,9.15,11.814,8.162C72.417,106.271,81.44,98.19,77.076,96.788" id="path33" style="fill:#FFFFFF;"/>
<linearGradient gradientTransform="matrix(68.2241 32.9998 32.9998 -68.2241 1604.682 39402.625)" gradientUnits="userSpaceOnUse" id="XMLID_6_" x1="-246.998" x2="-245.2348" y1="458.0625" y2="458.0625">
<stop id="stop36" offset="0" style="stop-color:#FFFA5F"/>
<stop id="stop38" offset="1" style="stop-color:#9F3300"/>
</linearGradient>
<path d="M57.395,96.788c0,13.41,20.805,13.41,20.805,0 C78.2,83.376,57.395,83.375,57.395,96.788 M59.647,96.788c0-10.514,16.301-10.514,16.301,0 C75.948,107.3,59.647,107.3,59.647,96.788" id="path40" style="fill-rule:evenodd;clip-rule:evenodd;fill:url(#XMLID_6_);"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 8.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 358 B

View File

@ -1,26 +0,0 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- Generator: Adobe Illustrator 9.0, SVG Export Plug-In -->
<!DOCTYPE svg [
<!ENTITY st0 "fill-rule:nonzero;clip-rule:nonzero;fill:#FFFFFF;stroke:#000000;stroke-miterlimit:4;">
<!ENTITY st1 "fill:none;stroke:none;">
<!ENTITY st2 "fill:#000000;">
<!ENTITY st3 "fill:none;stroke:#FFFFFF;stroke-width:6.3469;stroke-linejoin:round;">
<!ENTITY st4 "fill-rule:evenodd;clip-rule:evenodd;stroke:none;">
<!ENTITY st5 "fill-rule:nonzero;clip-rule:nonzero;stroke:#000000;stroke-miterlimit:4;">
]>
<svg width="48pt" height="48pt" viewBox="0 0 48 48" xml:space="preserve" xmlns="http://www.w3.org/2000/svg">
<g id="Layer_x0020_3" style="&st0;">
<g style="&st4;">
<path style="&st3;" d="M22.9,7.1L5.1,21.8l0,0c-0.3,0.3-0.5,0.8-0.5,1.2c0,0.2,0,0.4,0.1,0.6c0.3,0.6,0.9,1,1.6,1c0,0,1.1,0,2.2,0c0,2.4,0,14.2,0,14.2c0,1.1,0.8,1.9,1.8,1.9h27.4c1.1,0,1.9-0.9,1.9-2c0,0,0-11.8,0-14.2c1,0,2,0,2,0c0.8,0,1.4-0.5,1.7-1.2
c0.1-0.2,0.1-0.4,0.1-0.6c0-0.5-0.2-1-0.7-1.4c0,0-3.6-3-4.5-3.7c0-1.2,0-6.9,0-6.9c0-1.2-0.8-2-2-2h-4.8c-1,0-1.7,0.6-1.9,1.5c-1.9-1.6-4.1-3.5-4.1-3.5l0.1,0.1c-0.7-0.7-1.8-0.8-2.7-0.1z"/>
<path style="&st2;" d="M22.9,7.1L5.1,21.8l0,0c-0.3,0.3-0.5,0.8-0.5,1.2c0,0.2,0,0.4,0.1,0.6c0.3,0.6,0.9,1,1.6,1c0,0,1.1,0,2.2,0c0,2.4,0,14.2,0,14.2c0,1.1,0.8,1.9,1.8,1.9h27.4c1.1,0,1.9-0.9,1.9-2c0,0,0-11.8,0-14.2c1,0,2,0,2,0c0.8,0,1.4-0.5,1.7-1.2
c0.1-0.2,0.1-0.4,0.1-0.6c0-0.5-0.2-1-0.7-1.4c0,0-3.6-3-4.5-3.7c0-1.2,0-6.9,0-6.9c0-1.2-0.8-2-2-2h-4.8c-1,0-1.7,0.6-1.9,1.5c-1.9-1.6-4.1-3.5-4.1-3.5l0.1,0.1c-0.7-0.7-1.8-0.8-2.7-0.1z"/>
<path style="&st2;" d="M41.8,22.8l-5.1-4.2v-0.1L31,13.7v0l-6.5-5.5C24.2,8,24,8,23.8,8.2L6.2,22.9c-0.1,0.1-0.1,0.3,0.1,0.3h1.6H10h28.1h1.2h2.3c0.2,0,0.4-0.2,0.2-0.4z"/>
<path d="M35.8,16.8l0-5.1c0-0.2-0.1-0.4-0.3-0.4h-3.2c-0.2,0-0.3,0.1-0.3,0.3v2.2l3.9,2.9z"/>
<path d="M11.9,24.7V37c0,0.3,0.1,0.4,0.3,0.4h23.6c0.3,0,0.4-0.2,0.4-0.4V24.7H11.9z"/>
</g>
</g>
<g id="crop_x0020_marks" style="&st5;">
<path style="&st1;" d="M48,48H0V0h48v48z"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 722 B

View File

@ -1,25 +0,0 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- Generator: Adobe Illustrator 9.0, SVG Export Plug-In -->
<!DOCTYPE svg [
<!ENTITY st0 "fill:#FFFFFF;stroke:none;">
<!ENTITY st1 "fill:#FFFFFF;stroke-width:6.6112;stroke-linecap:round;stroke-linejoin:round;">
<!ENTITY st2 "stroke:#FFFFFF;stroke-width:6.6112;">
<!ENTITY st3 "fill:none;stroke:none;">
<!ENTITY st4 "fill-rule:nonzero;clip-rule:nonzero;stroke:#000000;stroke-miterlimit:4;">
<!ENTITY st5 "stroke:none;">
]>
<svg width="48pt" height="48pt" viewBox="0 0 48 48" xml:space="preserve" xmlns="http://www.w3.org/2000/svg">
<g id="Layer_x0020_3" style="&st4;">
<g>
<path style="&st2;" d="M41.7,35.3L26.6,9.4c-0.6-1-1.7-1.7-2.9-1.6c-1.2,0-2.3,0.7-2.9,1.7L6.3,35.4c-0.6,1-0.6,2.3,0,3.3c0.6,1,1.7,1.6,2.9,1.6h29.6c1.2,0,2.3-0.6,2.9-1.7c0.6-1,0.6-2.3,0-3.3z"/>
<path style="&st1;" d="M23.7,11L9.2,37h29.6L23.7,11z"/>
<path style="&st0;" d="M23.7,11.9L10.3,36.1h27.5l-14-24.1z"/>
<g>
<path style="&st5;" d="M24.1,34c-1.1,0-1.8-0.8-1.8-1.8c0-1.1,0.7-1.8,1.8-1.8c1.1,0,1.8,0.7,1.8,1.8c0,1-0.7,1.8-1.8,1.8h0z M22.9,29.3l-0.4-9.1h3.2l-0.4,9.1h-2.3z"/>
</g>
</g>
</g>
<g id="crop_x0020_marks" style="&st4;">
<path style="&st3;" d="M48,48H0V0h48v48z"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 336 B

View File

@ -1,19 +0,0 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- Generator: Adobe Illustrator 9.0, SVG Export Plug-In -->
<!DOCTYPE svg [
<!ENTITY st0 "fill:none;stroke:none;">
<!ENTITY st1 "fill:#FFFFFF;stroke:#FFFFFF;stroke-width:7.5901;stroke-linejoin:round;">
<!ENTITY st2 "fill-rule:nonzero;clip-rule:nonzero;stroke:#000000;stroke-miterlimit:4;">
<!ENTITY st3 "stroke:none;">
]>
<svg width="48pt" height="48pt" viewBox="0 0 48 48" xml:space="preserve" xmlns="http://www.w3.org/2000/svg">
<g id="Layer_x0020_3" style="&st2;">
<g>
<path style="&st1;" d="M22.4,41.1c0,0.3,0.3,0.3,0.5,0.2l16.6-16.9c0.5-0.5,0.4-0.7,0-1L22.9,6.7c-0.1-0.1-0.4-0.1-0.4,0.1v10H8.9c-0.3,0-0.5,0.2-0.5,0.4l0,13.3C8.4,30.9,8.6,31,9,31h13.5l-0.1,10.1z"/>
<path style="&st3;" d="M22.4,41.1c0,0.3,0.3,0.3,0.5,0.2l16.6-16.9c0.5-0.5,0.4-0.7,0-1L22.9,6.7c-0.1-0.1-0.4-0.1-0.4,0.1v10H8.9c-0.3,0-0.5,0.2-0.5,0.4l0,13.3C8.4,30.9,8.6,31,9,31h13.5l-0.1,10.1z"/>
</g>
</g>
<g id="crop_x0020_marks" style="&st2;">
<path style="&st0;" d="M48,48H0V0h48v48z"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 490 B

View File

@ -1,33 +0,0 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- Generator: Adobe Illustrator 9.0, SVG Export Plug-In -->
<!DOCTYPE svg [
<!ENTITY st0 "fill:none;stroke:#FFFFFF;stroke-width:12.1438;stroke-linejoin:round;">
<!ENTITY st1 "fill:none;stroke-width:1.2429;">
<!ENTITY st2 "fill:#FFFFFF;stroke:none;">
<!ENTITY st3 "fill:none;stroke:#FFFFFF;stroke-width:12.7649;stroke-linejoin:round;">
<!ENTITY st4 "fill:#FFFFFF;stroke-width:6.3824;stroke-linejoin:round;">
<!ENTITY st5 "fill:none;stroke:none;">
<!ENTITY st6 "fill-rule:nonzero;clip-rule:nonzero;stroke:#000000;stroke-miterlimit:4;">
<!ENTITY st7 "fill:#FFFFFF;stroke:#FFFFFF;stroke-width:12.7649;stroke-linejoin:round;">
<!ENTITY st8 "stroke:none;">
<!ENTITY st9 "fill:none;stroke-width:4.9715;stroke-linejoin:round;">
]>
<svg xmlns="http://www.w3.org/2000/svg" width="48pt" height="48pt" viewBox="0 0 48 48" xml:space="preserve">
<g id="Layer_x0020_1" style="&st6;">
<path style="&st0;" d="M35.7,19.8v18.9H11V8.8h13.9l10.8,11z"/>
<path style="&st3;" d="M38.7,30.4L25,16.7l-7.7-3l2.7,8.7l13.3,13.4l5.4-5.4z"/>
<path style="&st7;" d="M35.7,8.8H11v29.9h24.7V8.8z"/>
<path style="&st4;" d="M35.7,8.8H11v29.9h24.7V8.8z"/>
<path style="&st2;" d="M35.7,8.8H11v29.9h24.7V8.8z"/>
</g>
<g id="Layer_x0020_4" style="&st6;">
<path style="&st9;" d="M38.7,30.4L25,16.7l-7.7-3l2.7,8.7l13.3,13.4l5.4-5.4z"/>
<path style="&st8;" d="M38.7,30.4L25,16.7l-7.7-3l2.7,8.7l13.3,13.4l5.4-5.4z"/>
<path style="&st8;" d="M20.6,14.7l-2.5,2.5L17,13.4l3.6,1.3z"/>
<path style="&st1;" d="M19.6,22.2l3-0.3l2.4-2.4l0.4-2.8"/>
<path style="&st2;" d="M20.4,14.9L18.3,17l1.6,5.2l2.7-0.3l2.4-2.4l0.3-2.4l-5-2.2z"/>
</g>
<g id="crop" style="&st6;">
<path style="&st5;" d="M48,48H0V0h48v48z"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 334 B

View File

@ -1,19 +0,0 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- Generator: Adobe Illustrator 9.0, SVG Export Plug-In -->
<!DOCTYPE svg [
<!ENTITY st0 "fill:none;stroke:none;">
<!ENTITY st1 "fill:#FFFFFF;stroke:#FFFFFF;stroke-width:7.5901;stroke-linejoin:round;">
<!ENTITY st2 "fill-rule:nonzero;clip-rule:nonzero;stroke:#000000;stroke-miterlimit:4;">
<!ENTITY st3 "stroke:none;">
]>
<svg width="48pt" height="48pt" viewBox="0 0 48 48" xml:space="preserve" xmlns="http://www.w3.org/2000/svg">
<g id="Layer_x0020_3" style="&st2;">
<g>
<path style="&st1;" d="M25.6,6.9c0-0.3-0.3-0.3-0.5-0.2L8.4,23.6c-0.5,0.5-0.4,0.7,0,1l16.6,16.6c0.1,0.1,0.4,0.1,0.4-0.1v-10h13.6c0.3,0,0.5-0.2,0.5-0.4l0-13.3c0-0.3-0.2-0.5-0.5-0.5H25.5l0.1-10.1z"/>
<path style="&st3;" d="M25.6,6.9c0-0.3-0.3-0.3-0.5-0.2L8.4,23.6c-0.5,0.5-0.4,0.7,0,1l16.6,16.6c0.1,0.1,0.4,0.1,0.4-0.1v-10h13.6c0.3,0,0.5-0.2,0.5-0.4l0-13.3c0-0.3-0.2-0.5-0.5-0.5H25.5l0.1-10.1z"/>
</g>
</g>
<g id="crop_x0020_marks" style="&st2;">
<path style="&st0;" d="M48,48H0V0h48v48z"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 867 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 449 B

View File

@ -1,84 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) --><svg height="1052.3622047" id="svg2" inkscape:version="0.42.2" sodipodi:docbase="/home/sergio/tmp/downloads" sodipodi:docname="lamp.svg" sodipodi:version="0.32" width="744.09448819" xmlns="http://www.w3.org/2000/svg" xmlns:cc="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:sodipodi="http://inkscape.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:svg="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<metadata>
<rdf:RDF xmlns:cc="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<cc:Work rdf:about="">
<dc:title>lamp</dc:title>
<dc:description></dc:description>
<dc:subject>
<rdf:Bag>
<rdf:li>office</rdf:li>
<rdf:li></rdf:li>
<rdf:li>lamp</rdf:li>
</rdf:Bag>
</dc:subject>
<dc:publisher>
<cc:Agent rdf:about="http://www.openclipart.org/">
<dc:title>Open Clip Art Library</dc:title>
</cc:Agent>
</dc:publisher>
<dc:creator>
<cc:Agent>
<dc:title>Sergio Luiz Araujo Silva</dc:title>
</cc:Agent>
</dc:creator>
<dc:rights>
<cc:Agent>
<dc:title>Public Domain</dc:title>
</cc:Agent>
</dc:rights>
<dc:date>set 2005</dc:date>
<dc:format>image/svg+xml</dc:format>
<dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
<cc:license rdf:resource="http://web.resource.org/cc/PublicDomain"/>
<dc:language>en</dc:language>
</cc:Work>
<cc:License rdf:about="http://web.resource.org/cc/PublicDomain">
<cc:permits rdf:resource="http://web.resource.org/cc/Reproduction"/>
<cc:permits rdf:resource="http://web.resource.org/cc/Distribution"/>
<cc:permits rdf:resource="http://web.resource.org/cc/DerivativeWorks"/>
</cc:License>
</rdf:RDF>
</metadata>
<defs id="defs4">
<linearGradient id="linearGradient13125">
<stop id="stop13127" offset="0.0000000" style="stop-color:#ffffff;stop-opacity:1.0000000;"/>
<stop id="stop13129" offset="1" style="stop-color:#fffeff;stop-opacity:0;"/>
</linearGradient>
<linearGradient id="linearGradient12389">
<stop id="stop12391" offset="0.0000000" style="stop-color:#fefefe;stop-opacity:1.0000000;"/>
<stop id="stop12393" offset="1.0000000" style="stop-color:#fffefe;stop-opacity:1.0000000;"/>
</linearGradient>
<radialGradient cx="358.25909" cy="186.06468" fx="358.25909" fy="186.06468" gradientTransform="matrix(1.000001,-8.244061e-7,3.143917e-7,0.381356,-4.028738e-4,115.1081)" gradientUnits="userSpaceOnUse" id="radialGradient13131" inkscape:collect="always" r="27.486719" xlink:href="#linearGradient13125"/>
<radialGradient cx="358.25909" cy="186.06468" fx="358.25909" fy="186.06468" gradientTransform="matrix(1.000001,-8.244061e-7,3.143917e-7,0.381356,-4.028738e-4,115.1081)" gradientUnits="userSpaceOnUse" id="radialGradient14587" inkscape:collect="always" r="27.486719" xlink:href="#linearGradient13125"/>
<radialGradient cx="358.25909" cy="186.06468" fx="358.25909" fy="186.06468" gradientTransform="matrix(1.000001,-8.244061e-7,3.143917e-7,0.381356,-4.028738e-4,115.1081)" gradientUnits="userSpaceOnUse" id="radialGradient15390" inkscape:collect="always" r="27.486719" xlink:href="#linearGradient13125"/>
<radialGradient cx="358.25909" cy="186.06468" fx="358.25909" fy="186.06468" gradientTransform="matrix(1.000001,-8.244061e-7,3.143917e-7,0.381356,-4.028738e-4,115.1081)" gradientUnits="userSpaceOnUse" id="radialGradient16141" inkscape:collect="always" r="27.486719" xlink:href="#linearGradient13125"/>
</defs>
<sodipodi:namedview bordercolor="#666666" borderopacity="1.0" id="base" inkscape:current-layer="layer1" inkscape:cx="344.34505" inkscape:cy="795.78292" inkscape:document-units="px" inkscape:guide-bbox="true" inkscape:pageopacity="0.0" inkscape:pageshadow="2" inkscape:window-height="693" inkscape:window-width="1024" inkscape:window-x="0" inkscape:window-y="25" inkscape:zoom="0.72123084" pagecolor="#ffffff" showguides="true"/>
<g id="layer1" inkscape:groupmode="layer" inkscape:label="Layer 1">
<path d="M 369.44028,121.86683 C 302.64703,119.68096 242.59223,184.30679 250.47188,250.87980 C 252.47522,280.21980 267.84094,306.49880 285.94332,328.82253 C 303.71281,358.65039 312.13900,393.24133 313.51068,427.73030 C 317.00419,446.97288 338.01608,454.57063 355.35334,455.26572 C 375.18456,456.91501 395.94281,455.09265 414.43470,447.69729 C 430.92724,435.70557 427.37713,413.20597 430.74488,395.55648 C 434.70351,361.57615 449.78002,329.76555 471.07843,303.26619 C 504.41026,252.31528 488.56419,176.76397 437.75400,143.26422 C 417.82956,129.49394 393.70573,121.69096 369.44028,121.86683 z " id="path1384" style="opacity:1.0000000;fill:#f3f2f3;fill-opacity:0.83333331;stroke:#000000;stroke-width:0.58960420;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000"/>
<path d="M 425.72698,154.07768 C 437.68158,164.87540 453.68534,182.03604 451.17873,203.82428 C 455.99913,200.54641 460.81954,197.26853 465.63995,193.99066 C 459.85546,170.27425 448.28648,162.75442 425.72698,154.07768 z " id="path2153" sodipodi:nodetypes="cccc" style="fill:#fefefe;fill-opacity:1.0000000;fill-rule:evenodd;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000"/>
<path d="M 506.99897 296.94009 A 37.120701 18.718985 0 1 1 432.75756,296.94009 A 37.120701 18.718985 0 1 1 506.99897 296.94009 z" id="path2881" sodipodi:cx="469.87827" sodipodi:cy="296.94009" sodipodi:rx="37.120701" sodipodi:ry="18.718985" sodipodi:type="arc" style="opacity:1.0000000;color:#000000;fill:#fefefe;fill-opacity:1.0000000;fill-rule:nonzero;stroke:none;stroke-width:0.64700001;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000;visibility:visible;display:inline;overflow:visible" transform="matrix(0.818103,0.000000,0.000000,0.896150,-13.89510,-26.68653)"/>
<path d="M 359.20536,314.30802 L 336.64585,244.31570 C 362.29042,230.62575 382.72895,234.28926 403.16748,243.15881 L 379.45107,315.46491 L 379.45107,315.46491" id="path3617" sodipodi:nodetypes="ccccc" style="fill:none;fill-opacity:0.75000000;fill-rule:evenodd;stroke:#8f9595;stroke-width:0.91160071px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000"/>
<path d="M 513.73605 514.32300 A 52.508934 11.885468 0 1 1 408.71818,514.32300 A 52.508934 11.885468 0 1 1 513.73605 514.32300 z" id="path4361" sodipodi:cx="461.22711" sodipodi:cy="514.32300" sodipodi:rx="52.508934" sodipodi:ry="11.885468" sodipodi:type="arc" style="opacity:1.0000000;color:#000000;fill:#a0a0a0;fill-opacity:1.0000000;fill-rule:nonzero;stroke:none;stroke-width:0.64700001;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000;visibility:visible;display:inline;overflow:visible" transform="matrix(0.982435,0.000000,0.000000,1.387810,-83.52495,-281.2705)"/>
<path d="M 315.87677,433.07959 C 319.14672,442.90428 329.03398,448.82383 338.76816,450.68840 C 362.00206,456.37952 386.74882,455.38004 409.63484,448.57985 C 414.28840,447.19363 419.18392,445.42184 422.06530,441.25295 C 423.42527,439.84003 425.68582,434.46169 424.07088,434.30126 C 411.81432,444.17256 395.75685,447.78808 380.34111,448.56322 C 362.85475,449.05661 344.64886,448.26521 328.51659,440.79114 C 324.02706,438.71576 319.76022,436.14612 315.87677,433.07959 z " id="path4363" style="fill:#d6dee6;fill-opacity:1.0000000;fill-rule:evenodd;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000"/>
<path d="M 400.47436,522.16227 C 396.48542,528.09177 392.49650,534.02126 388.50756,539.95076 C 383.93367,541.47295 366.98819,546.44954 353.57745,538.01018 C 350.34318,532.29631 347.10892,526.58244 343.87465,520.86856 C 364.35835,531.64946 396.48542,523.99502 400.47436,522.16227 z " id="path5094" sodipodi:nodetypes="ccccc" style="fill:#090a0c;fill-opacity:1.0000000;fill-rule:evenodd;stroke:#000000;stroke-width:0.91160071px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000"/>
<path d="M 419.65600,444.27781 C 419.97026,446.39906 420.28452,448.52031 420.59878,450.64156 C 421.46299,450.95582 422.32720,451.27008 423.19142,451.58434 C 423.19142,452.91994 423.19142,454.25554 423.19142,455.59114 C 422.32720,455.98397 421.46299,456.37678 420.59878,456.76961 C 420.36308,459.20512 420.12739,461.64063 419.89170,464.07614 C 420.52021,464.23327 421.14873,464.39039 421.77725,464.54753 C 421.69869,466.59021 421.62012,468.63289 421.54156,470.67558 C 420.83447,471.46123 420.12739,472.24688 419.42030,473.03253 C 419.57744,474.05387 419.73456,475.07522 419.89170,476.09656 C 420.91303,477.11790 421.93438,478.13925 422.95572,479.16058 C 422.87716,480.18193 422.79859,481.20328 422.72003,482.22461 C 422.01294,483.01026 421.30586,483.79591 420.59878,484.58156 C 420.36308,485.05294 420.12739,485.52433 419.89170,485.99572 C 419.57744,486.70280 419.26317,487.40989 418.94892,488.11697 C 419.10605,489.05975 419.26317,490.00253 419.42030,490.94531 C 419.89170,491.65239 420.36308,492.35947 420.83447,493.06655 C 420.67734,494.71641 420.52021,496.36627 420.36308,498.01614 C 415.02067,505.24410 409.67827,512.47206 404.33587,519.70003 C 403.15740,520.24998 401.97892,520.79994 400.80045,521.34989 C 397.81498,522.29266 394.82952,523.23544 391.84406,524.17822 C 386.34452,524.80674 380.84498,525.43525 375.34545,526.06378 C 371.96717,525.90664 368.58887,525.74952 365.21059,525.59238 C 362.46082,525.51382 359.71105,525.43525 356.96128,525.35669 C 353.42587,524.49247 349.89045,523.62827 346.35503,522.76405 C 345.17656,521.82128 343.99809,520.87850 342.81962,519.93572 C 339.75559,517.81447 336.69157,515.69322 333.62754,513.57197 C 328.75652,508.30813 323.88551,503.04429 319.01448,497.78044 C 319.01448,496.52341 319.01448,495.26636 319.01448,494.00933 C 319.87870,494.00933 320.74291,494.00933 321.60712,494.00933 C 321.13574,492.83086 320.66435,491.65239 320.19296,490.47392 C 319.09305,488.19554 317.99314,485.91716 316.89323,483.63878 C 316.89323,482.93170 316.89323,482.22461 316.89323,481.51753 C 318.38597,480.26049 319.87869,479.00345 321.37143,477.74642 C 320.03583,475.54660 318.70022,473.34679 317.36462,471.14697 C 317.28606,470.83271 317.20748,470.51845 317.12892,470.20419 C 318.46453,468.39720 319.80013,466.59021 321.13574,464.78322 C 320.74291,463.68331 320.35009,462.58341 319.95726,461.48350 C 319.09305,460.38359 318.22883,459.28369 317.36462,458.18378 C 317.12892,457.31956 316.89323,456.45536 316.65753,455.59114 C 317.75744,454.17697 318.85735,452.76281 319.95726,451.34864 C 319.87870,450.01304 319.80013,448.67744 319.72157,447.34184 C 319.32874,446.71332 318.93592,446.08480 318.54310,445.45628 C 318.62166,444.74920 318.70023,444.04212 318.77879,443.33503 C 319.48588,443.25647 320.19296,443.17790 320.90004,443.09934 C 324.04263,445.22059 327.18523,447.34184 330.32782,449.46309 C 348.08347,456.92674 391.76550,461.09068 419.65600,444.27781 z " id="path7284" sodipodi:nodetypes="ccccccccccccccccccccccccccccccccccccccccccccccc" style="fill:#fba246;fill-opacity:1.0000000;fill-rule:evenodd;stroke:#000000;stroke-width:0.91160071px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000"/>
<path d="M 389.86281,523.00744 C 389.46998,521.82897 391.23336,522.26765 390.84054,521.08918 C 383.37688,521.01061 375.91323,520.93205 368.44957,520.85348 C 368.44957,520.53923 368.44957,520.22496 368.44957,519.91070 C 374.10624,519.75357 379.76290,519.59645 385.41957,519.43932 C 388.24790,518.88937 391.07623,518.33941 393.90457,517.78946 C 395.39730,517.55377 396.89003,517.31807 398.38277,517.08237 C 401.44679,515.03969 404.51082,512.99701 407.57485,510.95432 C 407.49629,510.64006 407.41771,510.32580 407.33915,510.01153 C 401.36822,510.48292 395.39730,510.95432 389.42637,511.42571 C 387.30512,511.81853 385.18387,512.21135 383.06263,512.60418 C 379.13438,512.36849 375.20615,512.13279 371.27790,511.89710 C 369.78518,511.73997 368.29244,511.58284 366.79971,511.42571 C 364.44277,510.32580 362.08582,509.22589 359.72888,508.12598 C 376.54175,507.18320 396.89003,507.18320 415.11707,493.98432 C 391.31192,502.15506 371.27790,500.19093 355.01499,497.99112 C 375.91322,494.06288 396.57577,493.19867 417.00262,478.42849 C 387.38368,489.42756 366.24975,485.57788 349.35832,483.84946 C 371.51360,479.29269 403.56804,478.27136 414.40998,466.64376 C 383.06263,474.89306 355.95776,473.47890 338.75207,469.47210 C 352.81517,467.58654 366.87827,465.70098 380.94137,463.81543 C 374.10624,463.18691 367.27110,462.55840 360.43596,461.92988 C 373.32059,459.73006 386.20522,457.53024 399.08985,455.33043 C 381.88416,456.19465 346.53000,460.82997 319.89653,444.48849 C 323.66763,447.63108 328.61721,449.83090 331.20985,453.91627 C 327.28161,453.44487 323.35338,452.97349 319.42513,452.50210 C 319.66083,453.83770 319.89653,455.17330 320.13222,456.50890 C 324.13902,459.02298 328.14582,461.53704 332.15263,464.05112 C 327.43875,466.25093 322.72485,468.45075 318.01096,470.65057 C 323.90332,472.53612 329.79568,474.42169 335.68805,476.30724 C 330.03138,478.66418 322.48915,476.30724 318.71804,483.37807 C 325.55318,486.59923 335.21666,487.22774 339.22346,493.04154 C 333.33110,493.51293 326.73166,489.27043 321.54639,494.45571 C 327.67444,498.06968 333.80249,501.68367 339.93055,505.29765 C 336.55226,504.82626 333.17397,504.35487 329.79568,503.88348 C 334.58814,509.30445 341.26727,513.37780 346.05972,518.79877 C 362.00838,520.29150 373.91416,521.51471 389.86281,523.00744 z " id="path6556" sodipodi:nodetypes="ccccccccccccccccccccccccccccccccccccc" style="fill:#ffc080;fill-opacity:1.0000000;fill-rule:evenodd;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000"/>
<path d="M 410.63580,448.38806 C 375.91016,459.46570 347.07688,453.33765 330.49970,448.38806 C 332.54238,449.09515 334.58507,449.80223 336.62775,450.50931 C 365.30391,460.56561 396.80839,453.41621 407.80747,450.27362 C 408.75025,449.64510 409.69303,449.01658 410.63580,448.38806 z " id="path7286" sodipodi:nodetypes="ccccc" style="fill:#ffffff;fill-opacity:1.0000000;fill-rule:evenodd;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000"/>
<path d="M 431.22109,368.33927 C 427.74256,388.71364 424.26401,409.08801 420.78546,429.46237 C 416.60557,437.06563 407.94091,440.30372 400.07083,442.61238 C 391.48668,445.18530 382.40444,445.05799 373.54205,444.61656 C 371.08048,446.38986 364.99205,442.92177 370.06503,441.81235 C 377.17154,440.98795 384.60188,442.10538 391.38552,439.26558 C 401.04319,435.47671 410.26670,429.97354 417.05844,422.00834 C 421.19961,403.95301 425.34070,385.89766 429.48184,367.84233 C 430.06159,368.00798 430.64135,368.17360 431.22109,368.33927 z " id="path3629" style="fill:#ffffff;fill-opacity:0.64285713;fill-rule:evenodd;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000"/>
<path d="M 353.42087,428.84088 L 351.10708,419.00725 L 351.68553,378.22661 L 353.13164,373.45440 L 353.05576,339.28565 L 349.95018,336.28751 L 349.37173,316.04336 C 363.86558,304.49563 376.56238,306.21837 388.70625,316.23514 L 388.12780,336.28907 L 385.23556,339.18131 L 384.65711,373.58108 L 386.39245,378.21491 L 385.81401,427.68398 L 382.34331,429.99778 L 374.24503,428.84088 L 371.35278,425.37019 L 366.14675,425.37019 L 360.94071,429.41933 L 353.42087,428.84088 z " id="path3619" sodipodi:nodetypes="ccccccccccccccccccc" style="fill:#c1c1c1;fill-opacity:1.0000000;fill-rule:evenodd;stroke:#9b989f;stroke-width:0.91160071px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000"/>
<path d="M 358.25832,325.31572 L 358.25832,416.41507" id="path5096" style="fill:none;fill-opacity:0.75000000;fill-rule:evenodd;stroke:#ffffff;stroke-width:0.91160071px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000"/>
<path d="M 380.15345,325.31572 L 380.15345,416.41507" id="path5824" style="fill:none;fill-opacity:0.75000000;fill-rule:evenodd;stroke:#ffffff;stroke-width:0.91160071px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000"/>
<path d="M 361.91098,325.31572 L 361.91098,416.41507" id="path5826" style="fill:none;fill-opacity:0.75000000;fill-rule:evenodd;stroke:#8f8f92;stroke-width:0.91160071px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000"/>
<path d="M 376.52161,325.31572 L 376.52161,416.41507" id="path6554" style="fill:none;fill-opacity:0.75000000;fill-rule:evenodd;stroke:#8f8f92;stroke-width:0.91160071px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000"/>
<g id="g9475" transform="matrix(0.911601,0.000000,0.000000,0.911601,328.5961,-156.2531)">
<path d="M 86.864034,673.56687 L 79.199560,676.97330 L 77.155700,678.67652 L 75.793127,679.69845 L 65.573829,679.35780 L 65.403508,678.33587 L 70.683478,676.97330 C 70.683478,676.97330 74.430554,676.63266 75.111841,676.46234 C 75.793127,676.29201 78.688595,674.92944 78.688595,674.92944 L 84.649852,671.52301 L 87.034355,671.52301 L 86.864034,673.56687 z " id="path8741" style="fill:#ffffff;fill-opacity:1.0000000;fill-rule:evenodd;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000"/>
<path d="M 91.973683,686.34099 L 88.056285,686.17067 L 85.331139,687.53324 L 81.073098,689.23646 L 77.836987,691.45064 L 75.111841,692.30225 L 70.853800,692.64289 L 69.320905,693.15386 L 71.024122,693.83514 L 75.963449,693.83514 L 80.221490,694.51643 L 83.627923,693.83514 L 87.545320,690.42871 C 87.545320,690.42871 90.270466,689.23646 90.951753,688.89581 C 91.633039,688.55517 93.165934,687.87388 93.165934,687.87388 L 91.973683,686.34099 z " id="path8743" style="fill:#ffffff;fill-opacity:1.0000000;fill-rule:evenodd;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000"/>
<path d="M 94.017542,700.30736 L 89.078215,703.03251 L 85.842104,705.07637 L 83.457601,706.94991 L 77.836987,708.14216 L 75.622806,708.14216 L 81.584063,710.01570 L 86.353069,707.97184 L 91.292396,705.58733 L 92.825291,704.05444 L 94.017542,700.30736 z " id="path8745" style="fill:#ffffff;fill-opacity:1.0000000;fill-rule:evenodd;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000"/>
<path d="M 91.462718,717.85049 C 91.462718,717.85049 81.924706,721.59757 81.584063,722.27885 C 81.243420,722.96014 78.688595,723.98207 78.688595,723.98207 L 72.897660,724.66336 L 71.024122,725.68529 L 76.644736,726.36657 L 82.435671,724.49304 L 86.693712,724.32271 L 89.929823,722.10853 L 91.462718,720.40532 L 91.462718,717.85049 z " id="path8747" style="fill:#ffffff;fill-opacity:1.0000000;fill-rule:evenodd;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000"/>
</g>
<path d="M 378.14273,525.28637 C 377.57434,530.51553 378.00099,537.83204 377.43261,543.06120 C 372.27918,543.00443 367.82875,543.82657 360.97078,541.72320 C 359.43614,536.89190 356.80919,529.30796 355.27454,524.47667 C 356.26507,524.72572 356.68741,524.86790 357.82038,524.93742 C 358.95335,525.00694 360.79692,524.96593 361.90337,525.03791 C 363.00981,525.10990 364.25012,525.06768 365.31257,525.13480 C 366.37503,525.20191 367.41113,525.22689 368.41214,525.28180 C 369.41314,525.33669 370.37905,525.38365 371.30113,525.41898 C 372.22321,525.45432 374.35115,525.55378 375.17683,525.56221 C 376.00251,525.57065 375.56381,525.48806 376.27564,525.46225 C 376.98745,525.43643 377.56225,525.35378 378.14273,525.28637 z " id="path10207" sodipodi:nodetypes="ccccsssssssc" style="fill:#ffffff;fill-opacity:0.31547615;fill-rule:evenodd;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000"/>
<path d="M 467.06377,199.37552 L 453.69293,208.53364 L 451.86130,221.53816 L 468.71223,214.21167 L 467.06377,199.37552 z " id="path16869" style="fill:#fefefe;fill-opacity:1.0000000;fill-rule:evenodd;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;opacity:1.0000000;color:#000000;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-dashoffset:0;visibility:visible;display:inline;overflow:visible"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 318 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 259 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 264 B

Some files were not shown because too many files have changed in this diff Show More