|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r70391 - in sandbox/odeint/branches/karsten/libs/numeric/odeint: doc doc/html doc/html/boost_sandbox_numeric_odeint examples
From: karsten.ahnert_at_[hidden]
Date: 2011-03-22 13:28:33
Author: karsten
Date: 2011-03-22 13:28:29 EDT (Tue, 22 Mar 2011)
New Revision: 70391
URL: http://svn.boost.org/trac/boost/changeset/70391
Log:
documentation
Added:
sandbox/odeint/branches/karsten/libs/numeric/odeint/doc/tutorial_stiff_systems.qbk (contents, props changed)
Text files modified:
sandbox/odeint/branches/karsten/libs/numeric/odeint/doc/html/boost_sandbox_numeric_odeint/concepts.html | 275 ++++++++++++++++++---------------------
sandbox/odeint/branches/karsten/libs/numeric/odeint/doc/html/boost_sandbox_numeric_odeint/extend_odeint.html | 4
sandbox/odeint/branches/karsten/libs/numeric/odeint/doc/html/boost_sandbox_numeric_odeint/getting_started.html | 48 +++++-
sandbox/odeint/branches/karsten/libs/numeric/odeint/doc/html/boost_sandbox_numeric_odeint/reference.html | 6
sandbox/odeint/branches/karsten/libs/numeric/odeint/doc/html/boost_sandbox_numeric_odeint/tutorial.html | 206 +++++++++++++++++++++++++++--
sandbox/odeint/branches/karsten/libs/numeric/odeint/doc/html/index.html | 8
sandbox/odeint/branches/karsten/libs/numeric/odeint/doc/tutorial.qbk | 6
sandbox/odeint/branches/karsten/libs/numeric/odeint/examples/Jamfile | 1
sandbox/odeint/branches/karsten/libs/numeric/odeint/examples/stiff_system.cpp | 155 +++++++++++++++-------
9 files changed, 469 insertions(+), 240 deletions(-)
Modified: sandbox/odeint/branches/karsten/libs/numeric/odeint/doc/html/boost_sandbox_numeric_odeint/concepts.html
==============================================================================
--- sandbox/odeint/branches/karsten/libs/numeric/odeint/doc/html/boost_sandbox_numeric_odeint/concepts.html (original)
+++ sandbox/odeint/branches/karsten/libs/numeric/odeint/doc/html/boost_sandbox_numeric_odeint/concepts.html 2011-03-22 13:28:29 EDT (Tue, 22 Mar 2011)
@@ -13,7 +13,7 @@
<table cellpadding="2" width="100%"><tr><td valign="top"></td></tr></table>
<hr>
<div class="spirit-nav">
-<a accesskey="p" href="extend_odeint.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="reference.html"><img src="../images/next.png" alt="Next"></a>
+<a accesskey="p" href="extend_odeint.html"><img src="../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="reference.html"><img src="../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
@@ -59,8 +59,12 @@
</colgroup>
<thead><tr>
<th>
+ <p>
+ </p>
</th>
<th>
+ <p>
+ </p>
</th>
<th>
<p>
@@ -145,25 +149,23 @@
</p>
<div class="itemizedlist"><ul type="disc">
<li>
- <code class="computeroutput"><span class="identifier">Stepper</span><span class="special">()</span></code>
- Constructor.
- </li>
-<li>
- <code class="computeroutput"><span class="identifier">Stepper</span><span class="special">(</span>
- <span class="identifier">container_type</span> <span class="special">&</span><span class="identifier">x</span> <span class="special">)</span></code>
- Constructor that allocates internal memory to store intermediate results
- of the same size as <code class="computeroutput"><span class="identifier">x</span></code>.
- </li>
-<li>
- <code class="computeroutput"><span class="keyword">void</span> <span class="identifier">do_step</span><span class="special">(</span> <span class="identifier">DynamicalSystem</span>
- <span class="special">&</span><span class="identifier">system</span>
- <span class="special">,</span> <span class="identifier">container_type</span>
- <span class="special">&</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></code>
- </li>
+<code class="computeroutput"><span class="identifier">Stepper</span><span class="special">()</span></code>
+ Constructor.
+ </li>
+<li>
+<code class="computeroutput"><span class="identifier">Stepper</span><span class="special">(</span>
+ <span class="identifier">container_type</span> <span class="special">&</span><span class="identifier">x</span> <span class="special">)</span></code> Constructor
+ that allocates internal memory to store intermediate results of the same
+ size as <code class="computeroutput"><span class="identifier">x</span></code>.
+ </li>
+<li><code class="computeroutput"><span class="keyword">void</span> <span class="identifier">do_step</span><span class="special">(</span> <span class="identifier">DynamicalSystem</span>
+ <span class="special">&</span><span class="identifier">system</span>
+ <span class="special">,</span> <span class="identifier">container_type</span>
+ <span class="special">&</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></code></li>
</ul></div>
<p>
Executes one timestep with the given parameters:
@@ -266,16 +268,14 @@
The result of this method is the (approximate) state of the system <span class="bold"><strong>x(t+dt)</strong></span> and is stored in the variable <code class="computeroutput"><span class="identifier">x</span></code> (in-place). Note, that the time <code class="computeroutput"><span class="identifier">t</span></code> is not automatically increased by this
method.
</p>
-<div class="itemizedlist"><ul type="disc"><li>
- <code class="computeroutput"><span class="keyword">void</span> <span class="identifier">do_step</span><span class="special">(</span> <span class="identifier">DynamicalSystem</span>
- <span class="special">&</span><span class="identifier">system</span>
- <span class="special">,</span> <span class="identifier">container_type</span>
- <span class="special">&</span><span class="identifier">x</span>
- <span class="special">,</span> <span class="keyword">const</span>
- <span class="identifier">container_type</span> <span class="special">&</span><span class="identifier">dxdt</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></code>
- </li></ul></div>
+<div class="itemizedlist"><ul type="disc"><li><code class="computeroutput"><span class="keyword">void</span> <span class="identifier">do_step</span><span class="special">(</span> <span class="identifier">DynamicalSystem</span>
+ <span class="special">&</span><span class="identifier">system</span>
+ <span class="special">,</span> <span class="identifier">container_type</span>
+ <span class="special">&</span><span class="identifier">x</span>
+ <span class="special">,</span> <span class="keyword">const</span>
+ <span class="identifier">container_type</span> <span class="special">&</span><span class="identifier">dxdt</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></code></li></ul></div>
<p>
The same as above but with the additional parameter <code class="computeroutput"><span class="identifier">dxdt</span></code>
that represents the derivative <span class="bold"><strong>x'(t) = f(x,t)</strong></span>
@@ -283,33 +283,26 @@
</p>
<div class="itemizedlist"><ul type="disc">
<li>
- <code class="computeroutput"><span class="keyword">void</span> <span class="identifier">adjust_size</span><span class="special">(</span> <span class="keyword">const</span> <span class="identifier">container_type</span> <span class="special">&</span><span class="identifier">x</span> <span class="special">)</span></code>
- Adjusts the internal memory to store intermediate results of the same
- size as <code class="computeroutput"><span class="identifier">x</span></code>. This function
- <span class="emphasis"><em>must</em></span> be called whenever the system size changes
- during the integration.
- </li>
-<li>
- <code class="computeroutput"><span class="identifier">order_type</span> <span class="identifier">order_step</span><span class="special">()</span></code> Returns the order of the algorithm.
- If <span class="bold"><strong>n</strong></span> is the order of a method, then
- the result of one iteration with the timestep <span class="bold"><strong>dt</strong></span>
- is accurate up to <span class="bold"><strong>dt^n</strong></span>. That means the
- error made by the time discretization is of order <span class="bold"><strong>dt^(n+1)</strong></span>.
- </li>
+<code class="computeroutput"><span class="keyword">void</span> <span class="identifier">adjust_size</span><span class="special">(</span> <span class="keyword">const</span> <span class="identifier">container_type</span> <span class="special">&</span><span class="identifier">x</span> <span class="special">)</span></code> Adjusts
+ the internal memory to store intermediate results of the same size as
+ <code class="computeroutput"><span class="identifier">x</span></code>. This function <span class="emphasis"><em>must</em></span>
+ be called whenever the system size changes during the integration.
+ </li>
+<li>
+<code class="computeroutput"><span class="identifier">order_type</span> <span class="identifier">order_step</span><span class="special">()</span></code> Returns the order of the algorithm. If
+ <span class="bold"><strong>n</strong></span> is the order of a method, then the result
+ of one iteration with the timestep <span class="bold"><strong>dt</strong></span>
+ is accurate up to <span class="bold"><strong>dt^n</strong></span>. That means the
+ error made by the time discretization is of order <span class="bold"><strong>dt^(n+1)</strong></span>.
+ </li>
</ul></div>
<p>
<span class="bold"><strong>Stepper that model this concept</strong></span>
</p>
<div class="itemizedlist"><ul type="disc">
-<li>
- <code class="computeroutput"><span class="identifier">stepper_euler</span></code>
- </li>
-<li>
- <code class="computeroutput"><span class="identifier">stepper_rk4</span></code>
- </li>
-<li>
- <code class="computeroutput"><span class="identifier">stepper_rk78_fehlberg</span></code>
- </li>
+<li><code class="computeroutput"><span class="identifier">stepper_euler</span></code></li>
+<li><code class="computeroutput"><span class="identifier">stepper_rk4</span></code></li>
+<li><code class="computeroutput"><span class="identifier">stepper_rk78_fehlberg</span></code></li>
</ul></div>
</div>
<div class="section" lang="en">
@@ -339,26 +332,24 @@
</p>
<div class="itemizedlist"><ul type="disc">
<li>
- <code class="computeroutput"><span class="identifier">Error_Stepper</span><span class="special">()</span></code>
- Constructor.
- </li>
-<li>
- <code class="computeroutput"><span class="identifier">Error_Stepper</span><span class="special">(</span>
- <span class="identifier">container_type</span> <span class="special">&</span><span class="identifier">x</span> <span class="special">)</span></code>
- Constructor that allocates internal memory to store intermediate results
- of the same size as <code class="computeroutput"><span class="identifier">x</span></code>.
- </li>
-<li>
- <code class="computeroutput"><span class="keyword">void</span> <span class="identifier">do_step</span><span class="special">(</span> <span class="identifier">DynamicalSystem</span>
- <span class="special">&</span><span class="identifier">system</span>
- <span class="special">,</span> <span class="identifier">container_type</span>
- <span class="special">&</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="identifier">container_type</span>
- <span class="special">&</span><span class="identifier">xerr</span><span class="special">)</span></code>
- </li>
+<code class="computeroutput"><span class="identifier">Error_Stepper</span><span class="special">()</span></code>
+ Constructor.
+ </li>
+<li>
+<code class="computeroutput"><span class="identifier">Error_Stepper</span><span class="special">(</span>
+ <span class="identifier">container_type</span> <span class="special">&</span><span class="identifier">x</span> <span class="special">)</span></code> Constructor
+ that allocates internal memory to store intermediate results of the same
+ size as <code class="computeroutput"><span class="identifier">x</span></code>.
+ </li>
+<li><code class="computeroutput"><span class="keyword">void</span> <span class="identifier">do_step</span><span class="special">(</span> <span class="identifier">DynamicalSystem</span>
+ <span class="special">&</span><span class="identifier">system</span>
+ <span class="special">,</span> <span class="identifier">container_type</span>
+ <span class="special">&</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="identifier">container_type</span>
+ <span class="special">&</span><span class="identifier">xerr</span><span class="special">)</span></code></li>
</ul></div>
<p>
Executes one timestep with the given parameters:
@@ -480,17 +471,15 @@
Note, that the time <code class="computeroutput"><span class="identifier">t</span></code> is
not automatically increased by this method.
</p>
-<div class="itemizedlist"><ul type="disc"><li>
- <code class="computeroutput"><span class="keyword">void</span> <span class="identifier">do_step</span><span class="special">(</span> <span class="identifier">DynamicalSystem</span>
- <span class="special">&</span><span class="identifier">system</span>
- <span class="special">,</span> <span class="identifier">container_type</span>
- <span class="special">&</span><span class="identifier">x</span>
- <span class="special">,</span> <span class="keyword">const</span>
- <span class="identifier">container_type</span> <span class="special">&</span><span class="identifier">dxdt</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="identifier">container_type</span> <span class="special">&</span><span class="identifier">xerr</span><span class="special">)</span></code>
- </li></ul></div>
+<div class="itemizedlist"><ul type="disc"><li><code class="computeroutput"><span class="keyword">void</span> <span class="identifier">do_step</span><span class="special">(</span> <span class="identifier">DynamicalSystem</span>
+ <span class="special">&</span><span class="identifier">system</span>
+ <span class="special">,</span> <span class="identifier">container_type</span>
+ <span class="special">&</span><span class="identifier">x</span>
+ <span class="special">,</span> <span class="keyword">const</span>
+ <span class="identifier">container_type</span> <span class="special">&</span><span class="identifier">dxdt</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="identifier">container_type</span> <span class="special">&</span><span class="identifier">xerr</span><span class="special">)</span></code></li></ul></div>
<p>
The same as above but with the additional parameter <code class="computeroutput"><span class="identifier">dxdt</span></code>
that represents the derivative <span class="bold"><strong>x'(t) = f(x,t)</strong></span>
@@ -498,33 +487,26 @@
</p>
<div class="itemizedlist"><ul type="disc">
<li>
- <code class="computeroutput"><span class="keyword">void</span> <span class="identifier">adjust_size</span><span class="special">(</span> <span class="keyword">const</span> <span class="identifier">container_type</span> <span class="special">&</span><span class="identifier">x</span> <span class="special">)</span></code>
- Adjusts the internal memory to store intermediate results of the same
- size as <code class="computeroutput"><span class="identifier">x</span></code>. This function
- <span class="emphasis"><em>must</em></span> be called whenever the system size changes
- during the integration.
- </li>
-<li>
- <code class="computeroutput"><span class="identifier">order_type</span> <span class="identifier">order_error_step</span><span class="special">()</span></code> Returns the order of the result <span class="bold"><strong>x(t+dt)</strong></span> of the algorithm.
- </li>
-<li>
- <code class="computeroutput"><span class="identifier">order_type</span> <span class="identifier">order_error</span><span class="special">()</span></code> Returns the order of the error estimation
- of the algorithm.
- </li>
+<code class="computeroutput"><span class="keyword">void</span> <span class="identifier">adjust_size</span><span class="special">(</span> <span class="keyword">const</span> <span class="identifier">container_type</span> <span class="special">&</span><span class="identifier">x</span> <span class="special">)</span></code> Adjusts
+ the internal memory to store intermediate results of the same size as
+ <code class="computeroutput"><span class="identifier">x</span></code>. This function <span class="emphasis"><em>must</em></span>
+ be called whenever the system size changes during the integration.
+ </li>
+<li>
+<code class="computeroutput"><span class="identifier">order_type</span> <span class="identifier">order_error_step</span><span class="special">()</span></code> Returns the order of the result <span class="bold"><strong>x(t+dt)</strong></span> of the algorithm.
+ </li>
+<li>
+<code class="computeroutput"><span class="identifier">order_type</span> <span class="identifier">order_error</span><span class="special">()</span></code> Returns the order of the error estimation
+ of the algorithm.
+ </li>
</ul></div>
<p>
<span class="bold"><strong>Stepper that model this concept</strong></span>
</p>
<div class="itemizedlist"><ul type="disc">
-<li>
- <code class="computeroutput"><span class="identifier">stepper_rk5_ck</span></code>
- </li>
-<li>
- <code class="computeroutput"><span class="identifier">stepper_rk78_fehlberg</span></code>
- </li>
-<li>
- <code class="computeroutput"><span class="identifier">stepper_half_step</span></code>
- </li>
+<li><code class="computeroutput"><span class="identifier">stepper_rk5_ck</span></code></li>
+<li><code class="computeroutput"><span class="identifier">stepper_rk78_fehlberg</span></code></li>
+<li><code class="computeroutput"><span class="identifier">stepper_half_step</span></code></li>
</ul></div>
</div>
<div class="section" lang="en">
@@ -547,13 +529,11 @@
<p>
<span class="bold"><strong>Methods</strong></span>
</p>
-<div class="itemizedlist"><ul type="disc"><li>
- <code class="computeroutput"><span class="identifier">Controlled_Stepper</span><span class="special">(</span>
- <span class="identifier">time_type</span> <span class="identifier">abs_err</span><span class="special">,</span> <span class="identifier">time_type</span>
- <span class="identifier">rel_err</span><span class="special">,</span>
- <span class="identifier">time_type</span> <span class="identifier">factor_x</span><span class="special">,</span> <span class="identifier">time_type</span>
- <span class="identifier">factor_dxdt</span> <span class="special">)</span></code>
- </li></ul></div>
+<div class="itemizedlist"><ul type="disc"><li><code class="computeroutput"><span class="identifier">Controlled_Stepper</span><span class="special">(</span>
+ <span class="identifier">time_type</span> <span class="identifier">abs_err</span><span class="special">,</span> <span class="identifier">time_type</span>
+ <span class="identifier">rel_err</span><span class="special">,</span>
+ <span class="identifier">time_type</span> <span class="identifier">factor_x</span><span class="special">,</span> <span class="identifier">time_type</span>
+ <span class="identifier">factor_dxdt</span> <span class="special">)</span></code></li></ul></div>
<p>
Constructor that initializes the controlled stepper with several parameters
of the error control. The controlled stepper assures that the error done
@@ -574,18 +554,20 @@
</p>
<div class="itemizedlist"><ul type="disc">
<li>
- <code class="computeroutput"><span class="identifier">Controlled_Stepper</span><span class="special">(</span>
- <span class="identifier">container_type</span> <span class="special">&</span><span class="identifier">x</span><span class="special">,</span> <span class="identifier">time_type</span> <span class="identifier">abs_err</span><span class="special">,</span> <span class="identifier">time_type</span>
- <span class="identifier">rel_err</span><span class="special">,</span>
- <span class="identifier">time_type</span> <span class="identifier">factor_x</span><span class="special">,</span> <span class="identifier">time_type</span>
- <span class="identifier">factor_dxdt</span> <span class="special">)</span></code>
- Same as above, but with additional allocation of the internal memory
- to store intermediate results of the same size as <code class="computeroutput"><span class="identifier">x</span></code>.
- </li>
-<li>
- <code class="computeroutput"><span class="identifier">controlled_step_result</span> <span class="identifier">try_step</span><span class="special">(</span>
- <span class="identifier">DynamicalSystem</span> <span class="special">&</span><span class="identifier">system</span><span class="special">,</span> <span class="identifier">container_type</span> <span class="special">&</span><span class="identifier">x</span><span class="special">,</span> <span class="identifier">time_type</span> <span class="special">&</span><span class="identifier">t</span><span class="special">,</span> <span class="identifier">time_type</span> <span class="special">&</span><span class="identifier">dt</span> <span class="special">)</span></code>
- </li>
+<code class="computeroutput"><span class="identifier">Controlled_Stepper</span><span class="special">(</span>
+ <span class="identifier">container_type</span> <span class="special">&</span><span class="identifier">x</span><span class="special">,</span> <span class="identifier">time_type</span>
+ <span class="identifier">abs_err</span><span class="special">,</span>
+ <span class="identifier">time_type</span> <span class="identifier">rel_err</span><span class="special">,</span> <span class="identifier">time_type</span>
+ <span class="identifier">factor_x</span><span class="special">,</span>
+ <span class="identifier">time_type</span> <span class="identifier">factor_dxdt</span>
+ <span class="special">)</span></code> Same as above, but with additional
+ allocation of the internal memory to store intermediate results of the
+ same size as <code class="computeroutput"><span class="identifier">x</span></code>.
+ </li>
+<li><code class="computeroutput"><span class="identifier">controlled_step_result</span> <span class="identifier">try_step</span><span class="special">(</span> <span class="identifier">DynamicalSystem</span> <span class="special">&</span><span class="identifier">system</span><span class="special">,</span> <span class="identifier">container_type</span> <span class="special">&</span><span class="identifier">x</span><span class="special">,</span> <span class="identifier">time_type</span>
+ <span class="special">&</span><span class="identifier">t</span><span class="special">,</span> <span class="identifier">time_type</span>
+ <span class="special">&</span><span class="identifier">dt</span>
+ <span class="special">)</span></code></li>
</ul></div>
<p>
Tries one timestep with the given parameters
@@ -700,37 +682,30 @@
</p>
<div class="itemizedlist"><ul type="disc">
<li>
- <code class="computeroutput"><span class="identifier">controlled_step_result</span> <span class="identifier">try_step</span><span class="special">(</span>
- <span class="identifier">DynamicalSystem</span> <span class="special">&</span><span class="identifier">system</span><span class="special">,</span> <span class="identifier">container_type</span> <span class="special">&</span><span class="identifier">x</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">container_type</span>
- <span class="special">&</span><span class="identifier">dxdt</span><span class="special">,</span> <span class="identifier">time_type</span>
- <span class="special">&</span><span class="identifier">t</span><span class="special">,</span> <span class="identifier">time_type</span>
- <span class="special">&</span><span class="identifier">dt</span>
- <span class="special">)</span></code> Same as above but with the additional
- parameter <code class="computeroutput"><span class="identifier">dxdt</span></code> that that
- represents the derivative <span class="bold"><strong>x'(t) = f(x,t)</strong></span>
- at the time <span class="bold"><strong>t</strong></span>.
- </li>
-<li>
- <code class="computeroutput"><span class="keyword">void</span> <span class="identifier">adjust_size</span><span class="special">(</span> <span class="keyword">const</span> <span class="identifier">container_type</span> <span class="special">&</span><span class="identifier">x</span> <span class="special">)</span></code>
- Adjusts the internal memory to store intermediate results of the same
- size as <code class="computeroutput"><span class="identifier">x</span></code>. This function
- <span class="emphasis"><em>must</em></span> be called whenever the system size changes
- during the integration.
- </li>
+<code class="computeroutput"><span class="identifier">controlled_step_result</span> <span class="identifier">try_step</span><span class="special">(</span> <span class="identifier">DynamicalSystem</span> <span class="special">&</span><span class="identifier">system</span><span class="special">,</span> <span class="identifier">container_type</span> <span class="special">&</span><span class="identifier">x</span><span class="special">,</span> <span class="keyword">const</span>
+ <span class="identifier">container_type</span> <span class="special">&</span><span class="identifier">dxdt</span><span class="special">,</span> <span class="identifier">time_type</span> <span class="special">&</span><span class="identifier">t</span><span class="special">,</span> <span class="identifier">time_type</span>
+ <span class="special">&</span><span class="identifier">dt</span>
+ <span class="special">)</span></code> Same as above but with the additional
+ parameter <code class="computeroutput"><span class="identifier">dxdt</span></code> that that
+ represents the derivative <span class="bold"><strong>x'(t) = f(x,t)</strong></span>
+ at the time <span class="bold"><strong>t</strong></span>.
+ </li>
+<li>
+<code class="computeroutput"><span class="keyword">void</span> <span class="identifier">adjust_size</span><span class="special">(</span> <span class="keyword">const</span> <span class="identifier">container_type</span> <span class="special">&</span><span class="identifier">x</span> <span class="special">)</span></code> Adjusts
+ the internal memory to store intermediate results of the same size as
+ <code class="computeroutput"><span class="identifier">x</span></code>. This function <span class="emphasis"><em>must</em></span>
+ be called whenever the system size changes during the integration.
+ </li>
<li>
- <code class="computeroutput"><span class="identifier">order_type</span> <span class="identifier">order_error_step</span><span class="special">()</span></code> Returns the order of the result <span class="bold"><strong>x(t+dt)</strong></span> of the algorithm.
- </li>
+<code class="computeroutput"><span class="identifier">order_type</span> <span class="identifier">order_error_step</span><span class="special">()</span></code> Returns the order of the result <span class="bold"><strong>x(t+dt)</strong></span> of the algorithm.
+ </li>
</ul></div>
<p>
<span class="bold"><strong>Stepper that model this concept</strong></span>
</p>
<div class="itemizedlist"><ul type="disc">
-<li>
- <code class="computeroutput"><span class="identifier">controlled_stepper_standard</span></code>
- </li>
-<li>
- <code class="computeroutput"><span class="identifier">controlled_stepper_bs</span></code>
- </li>
+<li><code class="computeroutput"><span class="identifier">controlled_stepper_standard</span></code></li>
+<li><code class="computeroutput"><span class="identifier">controlled_stepper_bs</span></code></li>
</ul></div>
</div>
<div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title">
@@ -758,7 +733,7 @@
</tr></table>
<hr>
<div class="spirit-nav">
-<a accesskey="p" href="extend_odeint.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="reference.html"><img src="../images/next.png" alt="Next"></a>
+<a accesskey="p" href="extend_odeint.html"><img src="../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="reference.html"><img src="../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
</body>
</html>
Modified: sandbox/odeint/branches/karsten/libs/numeric/odeint/doc/html/boost_sandbox_numeric_odeint/extend_odeint.html
==============================================================================
--- sandbox/odeint/branches/karsten/libs/numeric/odeint/doc/html/boost_sandbox_numeric_odeint/extend_odeint.html (original)
+++ sandbox/odeint/branches/karsten/libs/numeric/odeint/doc/html/boost_sandbox_numeric_odeint/extend_odeint.html 2011-03-22 13:28:29 EDT (Tue, 22 Mar 2011)
@@ -13,7 +13,7 @@
<table cellpadding="2" width="100%"><tr><td valign="top"></td></tr></table>
<hr>
<div class="spirit-nav">
-<a accesskey="p" href="tutorial.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.html"><img src="../images/next.png" alt="Next"></a>
+<a accesskey="p" href="tutorial.html"><img src="../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="concepts.html"><img src="../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
@@ -60,7 +60,7 @@
</tr></table>
<hr>
<div class="spirit-nav">
-<a accesskey="p" href="tutorial.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.html"><img src="../images/next.png" alt="Next"></a>
+<a accesskey="p" href="tutorial.html"><img src="../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="concepts.html"><img src="../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
</body>
</html>
Modified: sandbox/odeint/branches/karsten/libs/numeric/odeint/doc/html/boost_sandbox_numeric_odeint/getting_started.html
==============================================================================
--- sandbox/odeint/branches/karsten/libs/numeric/odeint/doc/html/boost_sandbox_numeric_odeint/getting_started.html (original)
+++ sandbox/odeint/branches/karsten/libs/numeric/odeint/doc/html/boost_sandbox_numeric_odeint/getting_started.html 2011-03-22 13:28:29 EDT (Tue, 22 Mar 2011)
@@ -13,7 +13,7 @@
<table cellpadding="2" width="100%"><tr><td valign="top"></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="tutorial.html"><img src="../images/next.png" alt="Next"></a>
+<a accesskey="p" href="../index.html"><img src="../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="tutorial.html"><img src="../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
@@ -52,7 +52,7 @@
algorithms are implemented:
</p>
<div class="table">
-<a name="id518246"></a><p class="title"><b>Table 1.1. Stepper Algorithms</b></p>
+<a name="id326539"></a><p class="title"><b>Table 1.1. Stepper Algorithms</b></p>
<div class="table-contents"><table class="table" summary="Stepper Algorithms">
<colgroup>
<col>
@@ -369,7 +369,9 @@
= (x,p)</em></span>:
</p>
<p>
-
+ </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"><</span> <span class="keyword">double</span> <span class="special">></span> <span class="identifier">state_type</span><span class="special">;</span>
@@ -384,6 +386,8 @@
<span class="special">}</span>
</pre>
<p>
+ </p>
+<p>
</p>
<p>
Here we chose <code class="computeroutput"><span class="identifier">vector</span><span class="special"><</span><span class="keyword">double</span><span class="special">></span></code>
@@ -399,13 +403,17 @@
start:
</p>
<p>
-
+ </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>
</p>
<p>
For the integration itself we'll use the <code class="computeroutput">integrate</code>
@@ -414,12 +422,16 @@
stepper (5th order) and uses adaptive stepsize.
</p>
<p>
-
+ </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>
</p>
<p>
The integrate function expects as parameters the rhs of the ode as defined
@@ -435,7 +447,9 @@
rhs must then be implemented as a functor having defined the ()-operator:
</p>
<p>
-
+ </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>
@@ -453,18 +467,24 @@
<span class="special">};</span>
</pre>
<p>
+ </p>
+<p>
</p>
<p>
which can be used via
</p>
<p>
-
+ </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>
</p>
<p>
You surely have already noticed that during the integration a lot of steps
@@ -473,7 +493,9 @@
to provide a reasonable observer. An example is
</p>
<p>
-
+ </p>
+<p>
+
</p>
<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">push_back_state_and_time</span>
<span class="special">{</span>
@@ -491,13 +513,17 @@
<span class="special">};</span>
</pre>
<p>
+ </p>
+<p>
</p>
<p>
which stores the intermediate steps in a container. Now, you only have to
pass this container to the integration function:
</p>
<p>
-
+ </p>
+<p>
+
</p>
<pre class="programlisting"><span class="identifier">vector</span><span class="special"><</span><span class="identifier">state_type</span><span class="special">></span> <span class="identifier">x_vec</span><span class="special">;</span>
<span class="identifier">vector</span><span class="special"><</span><span class="keyword">double</span><span class="special">></span> <span class="identifier">times</span><span class="special">;</span>
@@ -513,6 +539,8 @@
<span class="special">}</span>
</pre>
<p>
+ </p>
+<p>
</p>
<p>
That is all. Of course, you can use functional libraries like Boost.Lambda
@@ -534,7 +562,7 @@
</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="tutorial.html"><img src="../images/next.png" alt="Next"></a>
+<a accesskey="p" href="../index.html"><img src="../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="tutorial.html"><img src="../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
</body>
</html>
Modified: sandbox/odeint/branches/karsten/libs/numeric/odeint/doc/html/boost_sandbox_numeric_odeint/reference.html
==============================================================================
--- sandbox/odeint/branches/karsten/libs/numeric/odeint/doc/html/boost_sandbox_numeric_odeint/reference.html (original)
+++ sandbox/odeint/branches/karsten/libs/numeric/odeint/doc/html/boost_sandbox_numeric_odeint/reference.html 2011-03-22 13:28:29 EDT (Tue, 22 Mar 2011)
@@ -12,7 +12,7 @@
<table cellpadding="2" width="100%"><tr><td valign="top"></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="../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="p" href="concepts.html"><img src="../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/html/images/home.png" alt="Home"></a>
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
@@ -33,7 +33,7 @@
classes</a>
</h3></div></div></div>
<div class="table">
-<a name="id568603"></a><p class="title"><b>Table 1.3. Stepper Algorithms</b></p>
+<a name="id378666"></a><p class="title"><b>Table 1.3. Stepper Algorithms</b></p>
<div class="table-contents"><table class="table" summary="Stepper Algorithms">
<colgroup>
<col>
@@ -241,7 +241,7 @@
</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="../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="p" href="concepts.html"><img src="../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/html/images/home.png" alt="Home"></a>
</div>
</body>
</html>
Modified: sandbox/odeint/branches/karsten/libs/numeric/odeint/doc/html/boost_sandbox_numeric_odeint/tutorial.html
==============================================================================
--- sandbox/odeint/branches/karsten/libs/numeric/odeint/doc/html/boost_sandbox_numeric_odeint/tutorial.html (original)
+++ sandbox/odeint/branches/karsten/libs/numeric/odeint/doc/html/boost_sandbox_numeric_odeint/tutorial.html 2011-03-22 13:28:29 EDT (Tue, 22 Mar 2011)
@@ -13,7 +13,7 @@
<table cellpadding="2" width="100%"><tr><td valign="top"></td></tr></table>
<hr>
<div class="spirit-nav">
-<a accesskey="p" href="getting_started.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="extend_odeint.html"><img src="../images/next.png" alt="Next"></a>
+<a accesskey="p" href="getting_started.html"><img src="../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="extend_odeint.html"><img src="../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
@@ -71,7 +71,9 @@
to just define a function, e.g:
</p>
<p>
-
+ </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"><</span> <span class="keyword">double</span> <span class="special">></span> <span class="identifier">state_type</span><span class="special">;</span>
@@ -86,6 +88,8 @@
<span class="special">}</span>
</pre>
<p>
+ </p>
+<p>
</p>
<p>
The parameters of the function must follow the example above where <code class="computeroutput"><span class="identifier">x</span></code> is the current state, <code class="computeroutput"><span class="identifier">dxdt</span></code> is the derivative <span class="emphasis"><em>x'</em></span>
@@ -98,7 +102,9 @@
parameter structure as above:
</p>
<p>
-
+ </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>
@@ -116,6 +122,8 @@
<span class="special">};</span>
</pre>
<p>
+ </p>
+<p>
</p>
<p>
odeint can deal with instances of such classes instead of pure functions
@@ -139,7 +147,7 @@
choose:
</p>
<div class="table">
-<a name="id561513"></a><p class="title"><b>Table 1.2. Stepper Algorithms</b></p>
+<a name="id370055"></a><p class="title"><b>Table 1.2. Stepper Algorithms</b></p>
<div class="table-contents"><table class="table" summary="Stepper Algorithms">
<colgroup>
<col>
@@ -434,12 +442,16 @@
<span class="special">)</span></code> function from odeint:
</p>
<p>
-
+ </p>
+<p>
+
</p>
<pre class="programlisting"><span class="identifier">explicit_rk4</span><span class="special"><</span> <span class="identifier">state_type</span> <span class="special">></span> <span class="identifier">stepper</span><span class="special">;</span>
<span class="identifier">integrate_const</span><span class="special">(</span> <span class="identifier">stepper</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.01</span> <span class="special">);</span>
</pre>
<p>
+ </p>
+<p>
</p>
<p>
This call integrates the system defined by <code class="computeroutput"><span class="identifier">harmonic_oscillator</span></code>
@@ -451,13 +463,17 @@
method which can used directly. So, you write down the above example as
</p>
<p>
-
+ </p>
+<p>
+
</p>
<pre class="programlisting"><span class="keyword">const</span> <span class="keyword">double</span> <span class="identifier">dt</span> <span class="special">=</span> <span class="number">0.01</span><span class="special">;</span>
<span class="keyword">for</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">t</span><span class="special"><</span><span class="number">10.0</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">stepper</span><span class="special">.</span><span class="identifier">do_step</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="identifier">t</span> <span class="special">,</span> <span class="identifier">dt</span> <span class="special">);</span>
</pre>
<p>
+ </p>
+<p>
</p>
</div>
<div class="section" lang="en">
@@ -475,12 +491,16 @@
with 4th order error estimation and coefficients introduced by Cash-Karp.
</p>
<p>
-
+ </p>
+<p>
+
</p>
<pre class="programlisting"><span class="keyword">typedef</span> <span class="identifier">explicit_error_rk54_ck</span><span class="special"><</span> <span class="identifier">state_type</span> <span class="special">></span> <span class="identifier">error_stepper_type</span><span class="special">;</span>
<span class="identifier">error_stepper_type</span> <span class="identifier">rk54</span><span class="special">;</span>
</pre>
<p>
+ </p>
+<p>
</p>
<p>
Given the error stepper, one still needs an instance that checks the error
@@ -504,13 +524,17 @@
stepper create by <code class="computeroutput"><span class="identifier">make_controlled_stepper_standard</span></code>.
</p>
<p>
-
+ </p>
+<p>
+
</p>
<pre class="programlisting"><span class="keyword">typedef</span> <span class="identifier">controlled_error_stepper</span><span class="special"><</span> <span class="identifier">error_stepper_type</span> <span class="special">></span> <span class="identifier">controlled_stepper_type</span><span class="special">;</span>
<span class="identifier">controlled_stepper_type</span> <span class="identifier">controlled_stepper</span><span class="special">;</span>
<span class="identifier">integrate_adaptive</span><span class="special">(</span> <span class="identifier">controlled_stepper</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.01</span> <span class="special">);</span>
</pre>
<p>
+ </p>
+<p>
</p>
<p>
As above, this integrates the system defined by <code class="computeroutput"><span class="identifier">harmonic_oscillator</span></code>
@@ -616,7 +640,9 @@
space as well as the velocity. Therefore, we use the operators from Boost.Operators:
</p>
<p>
-
+ </p>
+<p>
+
</p>
<pre class="programlisting"><span class="comment">/*the point type */</span>
<span class="keyword">template</span><span class="special"><</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">></span>
@@ -647,6 +673,8 @@
</span><span class="comment">// more operators
</span></pre>
<p>
+ </p>
+<p>
</p>
<p>
The next step is to define a container type storing the values of <span class="emphasis"><em>q</em></span>
@@ -654,7 +682,9 @@
type we use <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">tr1</span><span class="special">::</span><span class="identifier">array</span></code>
</p>
<p>
-
+ </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>
@@ -664,6 +694,8 @@
<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"><</span> <span class="keyword">double</span> <span class="special">,</span> <span class="identifier">n</span> <span class="special">></span> <span class="identifier">mass_type</span><span class="special">;</span>
</pre>
<p>
+ </p>
+<p>
</p>
<p>
The <code class="computeroutput"><span class="identifier">container_type</span></code> is different
@@ -677,7 +709,9 @@
As system function we have to provide <span class="emphasis"><em>f(p)</em></span> and <span class="emphasis"><em>f(q)</em></span>:
</p>
<p>
-
+ </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>
@@ -695,9 +729,13 @@
<span class="special">};</span>
</pre>
<p>
+ </p>
+<p>
</p>
<p>
-
+ </p>
+<p>
+
</p>
<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">solar_system_momentum</span>
<span class="special">{</span>
@@ -725,6 +763,8 @@
<span class="special">};</span>
</pre>
<p>
+ </p>
+<p>
</p>
<p>
In general a three body-system is chaotic, hence we can not expect that
@@ -739,7 +779,9 @@
apply here:
</p>
<p>
-
+ </p>
+<p>
+
</p>
<pre class="programlisting"><span class="keyword">typedef</span> <span class="identifier">symplectic_rkn_sb3a_mclachlan</span><span class="special"><</span> <span class="identifier">container_type</span> <span class="special">></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>
@@ -751,6 +793,8 @@
<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>
</p>
<p>
These integration routine was used to produce the above sketch of the solar
@@ -763,7 +807,9 @@
is also passed, but this is not a problem at all:
</p>
<p>
-
+ </p>
+<p>
+
</p>
<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">streaming_observer</span>
<span class="special">{</span>
@@ -782,6 +828,8 @@
<span class="special">};</span>
</pre>
<p>
+ </p>
+<p>
</p>
<p>
The full example can be found here: ../../examples/solar_system.cpp
@@ -803,7 +851,133 @@
systems</a>
</h3></div></div></div>
<p>
- blah blah
+ An important class of ordinary differential equations are so called stiff
+ system which are characterized by two or more time scales of different order.
+ </p>
+<p>
+ what are stiff systems?
+ </p>
+<p>
+ examples
+ </p>
+<p>
+ applications
+ </p>
+<p>
+ To solve stiff systems numerically the Jacobian
+ </p>
+<p>
+ <span class="emphasis"><em>J = d f<sub>​i</sub> / d x<sub>​j</sub></em></span>
+ </p>
+<p>
+ is needed. Here is the definition of the above example
+ </p>
+<p>
+ </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"><</span> <span class="keyword">double</span> <span class="special">></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"><</span> <span class="keyword">double</span> <span class="special">></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">&</span><span class="identifier">x</span> <span class="special">,</span> <span class="identifier">vector_type</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="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">&</span><span class="identifier">x</span> <span class="special">,</span> <span class="identifier">matrix_type</span> <span class="special">&</span><span class="identifier">J</span> <span class="special">,</span> <span class="keyword">const</span> <span class="keyword">double</span> <span class="special">&</span><span class="identifier">t</span> <span class="special">,</span> <span class="identifier">vector_type</span> <span class="special">&</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>
+ </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. With a little trick
+ you can simply make this functions valid for other state and matrix types,
+ just templatize the <code class="computeroutput"><span class="keyword">operator</span><span class="special">()</span></code>:
+ </p>
+<p>
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">stiff_system</span>
+<span class="special">{</span>
+ <span class="keyword">template</span><span class="special"><</span> <span class="keyword">class</span> <span class="identifier">State</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</span> <span class="special">&</span><span class="identifier">x</span> <span class="special">,</span> <span class="identifier">State</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="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"><</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">></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">&</span><span class="identifier">x</span> <span class="special">,</span> <span class="identifier">Matrix</span> <span class="special">&</span><span class="identifier">J</span> <span class="special">,</span> <span class="keyword">const</span> <span class="keyword">double</span> <span class="special">&</span><span class="identifier">t</span> <span class="special">,</span> <span class="identifier">State</span> <span class="special">&</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>
+ </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">std</span><span class="special">::</span><span class="identifier">tr1</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>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">typedef</span> <span class="identifier">rosenbrock4</span><span class="special"><</span> <span class="keyword">double</span> <span class="special">></span> <span class="identifier">stepper_type</span><span class="special">;</span>
+<span class="keyword">typedef</span> <span class="identifier">rosenbrock4_controller</span><span class="special"><</span> <span class="identifier">stepper_type</span> <span class="special">></span> <span class="identifier">controlled_stepper_type</span><span class="special">;</span>
+
+<span class="identifier">vector_type</span> <span class="identifier">x</span><span class="special">(</span> <span class="number">3</span> <span class="special">,</span> <span class="number">1.0</span> <span class="special">)</span> <span class="special">,</span> <span class="identifier">xerr</span><span class="special">(</span> <span class="number">3</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">controlled_stepper_type</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>
+</pre>
+<p>
+ </p>
+<p>
+ </p>
+<p>
+ During the integration approximately XX 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 ca.
+ XX steps.
+ </p>
+<p>
+ The full example can be found here: ../../examples/stiff_system.cpp
</p>
</div>
<div class="section" lang="en">
@@ -1018,7 +1192,7 @@
</tr></table>
<hr>
<div class="spirit-nav">
-<a accesskey="p" href="getting_started.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="extend_odeint.html"><img src="../images/next.png" alt="Next"></a>
+<a accesskey="p" href="getting_started.html"><img src="../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="extend_odeint.html"><img src="../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
</body>
</html>
Modified: sandbox/odeint/branches/karsten/libs/numeric/odeint/doc/html/index.html
==============================================================================
--- sandbox/odeint/branches/karsten/libs/numeric/odeint/doc/html/index.html (original)
+++ sandbox/odeint/branches/karsten/libs/numeric/odeint/doc/html/index.html 2011-03-22 13:28:29 EDT (Tue, 22 Mar 2011)
@@ -10,7 +10,7 @@
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr><td valign="top"></td></tr></table>
<hr>
-<div class="spirit-nav"><a accesskey="n" href="boost_sandbox_numeric_odeint/getting_started.html"><img src="images/next.png" alt="Next"></a></div>
+<div class="spirit-nav"><a accesskey="n" href="boost_sandbox_numeric_odeint/getting_started.html"><img src="../../../../doc/html/images/next.png" alt="Next"></a></div>
<div class="chapter" lang="en">
<div class="titlepage"><div>
<div><h2 class="title">
@@ -23,7 +23,7 @@
</h3></div></div>
<div><p class="copyright">Copyright © 2009 -2011 Karsten Ahnert and Mario Mulansky</p></div>
<div><div class="legalnotice">
-<a name="id549573"></a><p>
+<a name="id358081"></a><p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
</p>
@@ -93,10 +93,10 @@
</div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
-<td align="left"><p><small>Last revised: March 18, 2011 at 17:07:57 GMT</small></p></td>
+<td align="left"><p><small>Last revised: March 22, 2011 at 17:34:59 GMT</small></p></td>
<td align="right"><div class="copyright-footer"></div></td>
</tr></table>
<hr>
-<div class="spirit-nav"><a accesskey="n" href="boost_sandbox_numeric_odeint/getting_started.html"><img src="images/next.png" alt="Next"></a></div>
+<div class="spirit-nav"><a accesskey="n" href="boost_sandbox_numeric_odeint/getting_started.html"><img src="../../../../doc/html/images/next.png" alt="Next"></a></div>
</body>
</html>
Modified: sandbox/odeint/branches/karsten/libs/numeric/odeint/doc/tutorial.qbk
==============================================================================
--- sandbox/odeint/branches/karsten/libs/numeric/odeint/doc/tutorial.qbk (original)
+++ sandbox/odeint/branches/karsten/libs/numeric/odeint/doc/tutorial.qbk 2011-03-22 13:28:29 EDT (Tue, 22 Mar 2011)
@@ -10,11 +10,7 @@
[endsect]
-[section Stiff systems]
-
-blah blah
-
-[endsect]
+[include tutorial_stiff_systems.qbk]
[section Odeint in detail]
Added: sandbox/odeint/branches/karsten/libs/numeric/odeint/doc/tutorial_stiff_systems.qbk
==============================================================================
--- (empty file)
+++ sandbox/odeint/branches/karsten/libs/numeric/odeint/doc/tutorial_stiff_systems.qbk 2011-03-22 13:28:29 EDT (Tue, 22 Mar 2011)
@@ -0,0 +1,37 @@
+[section Stiff systems]
+
+[import ../examples/stiff_system.cpp]
+
+An important class of ordinary differential equations are so called stiff system which are characterized by two or more time scales of different order.
+
+what are stiff systems?
+
+examples
+
+applications
+
+To solve stiff systems numerically the Jacobian
+
+['J = d f[subl i] / d x[subl j]]
+
+is needed. Here is the definition of the above example
+
+[stiff_system_definition]
+
+The state type has to be a `ublas::vector` and the matrix type must by a `ublas::matrix` since the stiff integrator only accepts these types. With a little trick you can simply make this functions valid for other state and matrix types, just templatize the `operator()`:
+
+[stiff_system_alternative_definition]
+
+Now you can use `stiff_system` in combination with `std::vector` or `std::tr1::array`. In the example the explicit time derivative of ['f(x,t)] is introduced separately in the Jacobian. If ['df / dt = 0] simply fill `dfdt` with zeros.
+
+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:
+
+[integrate_stiff_system]
+
+During the integration approximately XX 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 ca. XX steps.
+
+
+The full example can be found here: [@../../examples/stiff_system.cpp]
+
+
+[endsect]
Modified: sandbox/odeint/branches/karsten/libs/numeric/odeint/examples/Jamfile
==============================================================================
--- sandbox/odeint/branches/karsten/libs/numeric/odeint/examples/Jamfile (original)
+++ sandbox/odeint/branches/karsten/libs/numeric/odeint/examples/Jamfile 2011-03-22 13:28:29 EDT (Tue, 22 Mar 2011)
@@ -14,5 +14,4 @@
exe harmonic_oscillator : harmonic_oscillator.cpp ;
exe solar_system : solar_system.cpp ;
-
exe stiff_system : stiff_system.cpp ;
\ No newline at end of file
Modified: sandbox/odeint/branches/karsten/libs/numeric/odeint/examples/stiff_system.cpp
==============================================================================
--- sandbox/odeint/branches/karsten/libs/numeric/odeint/examples/stiff_system.cpp (original)
+++ sandbox/odeint/branches/karsten/libs/numeric/odeint/examples/stiff_system.cpp 2011-03-22 13:28:29 EDT (Tue, 22 Mar 2011)
@@ -1,70 +1,127 @@
-/* Boost implicit_euler.cpp example file
-
- Copyright 2010 Karsten Ahnert
- Copyright 2010 Mario Mulansky
-
- This file shows the use of the implicit euler stepper
-
- Distributed under the Boost Software License, Version 1.0.
- (See accompanying file LICENSE_1_0.txt or
- copy at http://www.boost.org/LICENSE_1_0.txt)
-*/
+/*
+ * rosenbrock4.cpp
+ *
+ * Created on: Jan 9, 2011
+ * Author: karsten
+ */
#include <iostream>
+#include <fstream>
#include <utility>
+#include <tr1/array>
#include <boost/numeric/odeint.hpp>
-#include <boost/numeric/odeint/stepper/implicit_euler.hpp>
-#include <boost/numeric/odeint/algebra/vector_space_algebra.hpp>
-
-#include <boost/numeric/ublas/vector.hpp>
-#include <boost/numeric/ublas/matrix.hpp>
-#define tab '\t'
+using namespace std;
+using namespace boost::numeric::odeint;
-typedef double value_type;
-typedef boost::numeric::ublas::vector< value_type > state_type;
-typedef boost::numeric::ublas::matrix< value_type > matrix_type;
+//[ stiff_system_definition
+typedef boost::numeric::ublas::vector< double > vector_type;
+typedef boost::numeric::ublas::matrix< double > matrix_type;
-void stiff_system( state_type &x , state_type &dxdt , value_type t )
+struct stiff_system
{
- dxdt( 0 ) = -101.0 * x( 0 ) - 100.0 * x( 1 );
- dxdt( 1 ) = x( 0 );
-}
+ void operator()( const vector_type &x , vector_type &dxdt , double t )
+ {
+ dxdt[ 0 ] = -101.0 * x[ 0 ] - 100.0 * x[ 1 ];
+ dxdt[ 1 ] = x[ 0 ];
+ }
+};
-void jacobi( state_type &x , matrix_type &jacobi , value_type t )
+struct stiff_system_jacobi
{
- jacobi( 0 , 0 ) = -101.0;
- jacobi( 0 , 1 ) = -100.0;
- jacobi( 1 , 0 ) = 1.0;
- jacobi( 1 , 1 ) = 0.0;
-}
+ void operator()( const vector_type &x , matrix_type &J , const double &t , vector_type &dfdt )
+ {
+ J( 0 , 0 ) = -101.0;
+ J( 0 , 1 ) = -100.0;
+ J( 1 , 0 ) = 1.0;
+ J( 1 , 1 ) = 0.0;
+ dfdt[0] = 0.0;
+ dfdt[1] = 0.0;
+ }
+};
+//]
-using namespace std;
-using namespace boost::numeric::odeint;
-int main( void )
+/*
+//[ stiff_system_alternative_definition
+struct stiff_system
{
- explicit_euler< state_type , value_type /*, vector_space_algebra */> expl_euler;
- implicit_euler< value_type > impl_euler;
+ template< class State >
+ void operator()( const State &x , State &dxdt , double t )
+ {
+ ...
+ }
+};
+
+struct stiff_system_jacobi
+{
+ template< class State , class Matrix >
+ void operator()( const State &x , Matrix &J , const double &t , State &dfdt )
+ {
+ ...
+ }
+};
+//]
+*/
+
- state_type x1( 2 );
- x1( 0 ) = 1.0; x1( 1 ) = 0.0;
- state_type x2( x1 );
- const value_type dt = 0.01; // for dt >= 0.01 the euler method gets unstable
- const size_t steps = 1000;
- value_type t = 0.0;
- for( size_t step = 0 ; step < steps ; ++step , t+=dt )
- {
- clog << step << " of " << steps << endl;
- cout << t << tab << x1( 0 ) << tab << x1( 1 ) << tab << x2( 0 ) << tab << x2( 1 ) << tab;
- cout << 1.0 / 99.0 * exp( -100.0 * t ) * ( 100.0 - exp( 99.0 * t ) ) << tab;
- cout << 1.0 / 99.0 * exp( -100.0 * t ) * ( -1.0 + exp( 99.0 * t ) ) << endl;
- expl_euler.do_step( stiff_system , x1 , t , dt );
- impl_euler.do_step( make_pair( stiff_system , jacobi ) , x2 , t , dt );
+void rk54_ck_controlled_with_stiff_system( void )
+{
+ typedef explicit_error_rk54_ck< vector_type > stepper_type;
+ typedef controlled_error_stepper< stepper_type > controlled_stepper_type;
+ controlled_stepper_type stepper;
+
+ vector_type x( 3 , 1.0 );
+ double t = 0.0 , dt = 0.00001;
+ ofstream fout( "rk54_ck_controller_stiff.dat" );
+ size_t count = 0;
+ while( t < 50.0 )
+ {
+ fout << t << "\t" << dt << "\t" << stepper.last_error() << "\t";
+ fout << x[0] << "\t" << x[1] << "\t" << x[2] << "\t";
+ fout <<std::endl;
+
+ size_t trials = 0;
+ while( trials < 100 )
+ {
+ if( stepper.try_step( stiff_system() , x , t , dt ) != step_size_decreased )
+ break;
+ ++trials;
+ }
+ if( trials == 100 )
+ {
+ cerr << "Error : stepper did not converge! " << endl;
+ break;
+ }
+ ++count;
}
+ clog << "RK 54 : " << count << endl;
+}
+
+
+
+
+
+
+int main( int argc , char **argv )
+{
+//[ integrate_stiff_system
+ typedef rosenbrock4< double > stepper_type;
+ typedef rosenbrock4_controller< stepper_type > controlled_stepper_type;
+
+ vector_type x( 3 , 1.0 ) , xerr( 3 );
+
+ size_t num_of_steps = integrate_const( controlled_stepper_type() ,
+ make_pair( stiff_system() , stiff_system_jacobi() ) ,
+ x , 0.0 , 50.0 , 0.01 );
+//]
+ clog << num_of_steps << endl;
+
+ rk54_ck_controlled_with_stiff_system();
+ return 0;
}
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk