|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r68525 - in sandbox/odeint/branches/karsten: . boost/numeric/odeint/stepper libs/numeric/odeint/doc libs/numeric/odeint/doc/html libs/numeric/odeint/doc/html/boost_sandbox_numeric_odeint libs/numeric/odeint/doc/html/odeint libs/numeric/odeint/regression_test
From: karsten.ahnert_at_[hidden]
Date: 2011-01-28 04:29:26
Author: karsten
Date: 2011-01-28 04:29:22 EST (Fri, 28 Jan 2011)
New Revision: 68525
URL: http://svn.boost.org/trac/boost/changeset/68525
Log:
docs and dense output
Added:
sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/dense_output_explicit.hpp (contents, props changed)
sandbox/odeint/branches/karsten/libs/numeric/odeint/doc/html/
sandbox/odeint/branches/karsten/libs/numeric/odeint/doc/html/boost_sandbox_numeric_odeint/
sandbox/odeint/branches/karsten/libs/numeric/odeint/doc/html/boost_sandbox_numeric_odeint/concepts.html (contents, props changed)
sandbox/odeint/branches/karsten/libs/numeric/odeint/doc/html/boost_sandbox_numeric_odeint/extend_odeint.html (contents, props changed)
sandbox/odeint/branches/karsten/libs/numeric/odeint/doc/html/boost_sandbox_numeric_odeint/reference.html (contents, props changed)
sandbox/odeint/branches/karsten/libs/numeric/odeint/doc/html/boost_sandbox_numeric_odeint/tutorial.html (contents, props changed)
sandbox/odeint/branches/karsten/libs/numeric/odeint/doc/html/boostbook.css (contents, props changed)
sandbox/odeint/branches/karsten/libs/numeric/odeint/doc/html/index.html (contents, props changed)
sandbox/odeint/branches/karsten/libs/numeric/odeint/doc/html/odeint/
sandbox/odeint/branches/karsten/libs/numeric/odeint/doc/html/odeint/overview.html (contents, props changed)
sandbox/odeint/branches/karsten/libs/numeric/odeint/doc/html/odeint/short_example.html (contents, props changed)
sandbox/odeint/branches/karsten/libs/numeric/odeint/doc/html/standalone_HTML.manifest (contents, props changed)
sandbox/odeint/branches/karsten/libs/numeric/odeint/regression_test/dense_output_explicit.cpp (contents, props changed)
Text files modified:
sandbox/odeint/branches/karsten/TODO | 5
sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/controlled_stepper_result.hpp | 6
sandbox/odeint/branches/karsten/libs/numeric/odeint/doc/tutorial.qbk | 231 ---------------------------------------
sandbox/odeint/branches/karsten/libs/numeric/odeint/regression_test/Jamfile | 4
4 files changed, 13 insertions(+), 233 deletions(-)
Modified: sandbox/odeint/branches/karsten/TODO
==============================================================================
--- sandbox/odeint/branches/karsten/TODO (original)
+++ sandbox/odeint/branches/karsten/TODO 2011-01-28 04:29:22 EST (Fri, 28 Jan 2011)
@@ -31,7 +31,10 @@
* split resizing and copy/destruct/construct in different files
OK * change resizing concept, in order to word within the implicit steppers
OK * in all tests and regression test do not include odeint.hpp, only include the headers which are really needed
-* start new doc or cleanup the old project
+OK * start new doc or cleanup the old project
+* check header guards
+* check copyright note
+* documente every file in the preamble
* Integrate functions
* skript for setting the include defines according to the position in file system an writing a general copyright comment at the beginning
Modified: sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/controlled_stepper_result.hpp
==============================================================================
--- sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/controlled_stepper_result.hpp (original)
+++ sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/controlled_stepper_result.hpp 2011-01-28 04:29:22 EST (Fri, 28 Jan 2011)
@@ -5,8 +5,8 @@
* Author: karsten
*/
-#ifndef CONTROLLED_STEPPER_RESULT_HPP_
-#define CONTROLLED_STEPPER_RESULT_HPP_
+#ifndef BOOST_NUMERIC_ODEINT_STEPPER_CONTROLLED_STEPPER_RESULT_HPP_
+#define BOOST_NUMERIC_ODEINT_STEPPER_CONTROLLED_STEPPER_RESULT_HPP_
namespace boost {
@@ -24,4 +24,4 @@
} // numeric
} // boost
-#endif /* CONTROLLED_STEPPER_RESULT_HPP_ */
+#endif /* BOOST_NUMERIC_ODEINT_STEPPER_CONTROLLED_STEPPER_RESULT_HPP_ */
Added: sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/dense_output_explicit.hpp
==============================================================================
--- (empty file)
+++ sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/dense_output_explicit.hpp 2011-01-28 04:29:22 EST (Fri, 28 Jan 2011)
@@ -0,0 +1,142 @@
+/*
+ * dense_output_eplicit_stepper.hpp
+ *
+ * Created on: Jan 28, 2011
+ * Author: karsten
+ */
+
+#ifndef BOOST_NUMERIC_ODEINT_STEPPER_DENSE_OUTPUT_EXPLICIT_HPP_
+#define BOOST_NUMERIC_ODEINT_STEPPER_DENSE_OUTPUT_EXPLICIT_HPP_
+
+#include <utility>
+
+#include <boost/numeric/odeint/stepper/size_adjuster.hpp>
+
+namespace boost {
+namespace numeric {
+namespace odeint {
+
+
+template
+<
+ class Stepper
+>
+class dense_output_explicit
+{
+private:
+
+ void initialize_variables( void )
+ {
+ boost::numeric::odeint::construct( m_x1 );
+ boost::numeric::odeint::construct( m_x2 );
+ m_size_adjuster.register_state( 0 , m_x1 );
+ m_size_adjuster.register_state( 1 , m_x2 );
+ }
+
+ void copy_variables( const dense_output_explicit &dense_output )
+ {
+ /* ToDo : implement */
+ }
+
+public:
+
+ /*
+ * ToDo : check which types we really need
+ */
+ typedef Stepper stepper_type;
+ typedef typename stepper_type::state_type state_type;
+ typedef typename stepper_type::value_type value_type;
+ typedef typename stepper_type::deriv_type deriv_type;
+ typedef typename stepper_type::time_type time_type;
+ typedef typename stepper_type::algebra_type algebra_type;
+ typedef typename stepper_type::operations_type operations_type;
+ typedef typename stepper_type::adjust_size_policy adjust_size_policy;
+
+
+ dense_output_explicit( const stepper_type &stepper )
+ : m_stepper( stepper ) , m_size_adjuster() ,
+ m_x1() , m_x2() , m_current_state( &m_x1 ) , m_old_state( &m_x2 ) ,
+ m_t( 0.0 ) , m_t_old( 0.0 ) , m_dt( 1.0 )
+ {
+ initialize_variables();
+ }
+
+ dense_output_explicit( const dense_output_explicit &dense_ouput )
+ {
+ initialize_variables();
+ copy_variables( dense_output );
+ }
+
+ dense_output_explicit& operator=( const dense_output_explicit &dense_output )
+ {
+ copy_variables( dense_output );
+ return *this;
+ }
+
+ void initialize( const state_type &x0 , const time_type t0 , const time_type dt0 )
+ {
+ boost::numeric::odeint::copy( x0 , *m_current_state );
+ m_t = t0;
+ m_dt = dt0;
+ }
+
+ template< class System >
+ std::pair< time_type , time_type > do_step( System system )
+ {
+ m_stepper.do_step( system , *m_current_state , m_t , *m_old_state , m_dt );
+ m_t_old = m_t;
+ m_t += m_dt;
+ std::swap( m_current_state , m_old_state );
+ return std::make_pair( m_t_old , m_dt );
+ }
+
+ void calc_state( time_type t , state_type &x )
+ {
+ m_stepper.calc_state( x , *m_old_state , t , m_t_old );
+// time_type delta = t - m_t_old;
+// typename algebra_type::for_each3()( x , *m_old_state , m_euler.m_dxdt , typename operations_type::template scale_sum2< time_type , time_type >( 1.0 , delta ) );
+ }
+
+ void adjust_size( const state_type &x )
+ {
+ m_size_adjuster.adjust_size( x );
+ m_stepper.adjust_size( x );
+ }
+
+
+ const state_type& current_state( void ) const
+ {
+ return *m_current_state;
+ }
+
+ const time_type& current_time( void ) const
+ {
+ return m_t;
+ }
+
+ const time_type& previous_state( void ) const
+ {
+ return *m_old_state;
+ }
+
+ const time_type& previous_time( void ) const
+ {
+ return m_t_old;
+ }
+
+
+private:
+
+ stepper_type m_stepper;
+ size_adjuster< state_type , 2 > m_size_adjuster;
+ state_type m_x1 , m_x2;
+ state_type *m_current_state , *m_old_state;
+ time_type m_t , m_t_old , m_dt;
+
+};
+
+} // namespace odeint
+} // namespace numeric
+} // namespace boost
+
+#endif /* BOOST_NUMERIC_ODEINT_STEPPER_DENSE_OUTPUT_EPLICIT_STEPPER_HPP_ */
Added: sandbox/odeint/branches/karsten/libs/numeric/odeint/doc/html/boost_sandbox_numeric_odeint/concepts.html
==============================================================================
--- (empty file)
+++ sandbox/odeint/branches/karsten/libs/numeric/odeint/doc/html/boost_sandbox_numeric_odeint/concepts.html 2011-01-28 04:29:22 EST (Fri, 28 Jan 2011)
@@ -0,0 +1,745 @@
+<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 1. boost.sandbox.numeric.odeint">
+<link rel="up" href="../index.html" title="Chapter 1. boost.sandbox.numeric.odeint">
+<link rel="prev" href="extend_odeint.html" title="Extend odeint">
+<link rel="next" href="reference.html" title="Reference">
+</head>
+<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="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>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h2 class="title" style="clear: both">
+<a name="boost_sandbox_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.html#boost_sandbox_numeric_odeint.concepts.basic_stepper">Basic
+ stepper</a></span></dt>
+<dt><span class="section"><a href="concepts.html#boost_sandbox_numeric_odeint.concepts.error_stepper">Error
+ stepper</a></span></dt>
+<dt><span class="section"><a href="concepts.html#boost_sandbox_numeric_odeint.concepts.controlled_stepper">Controlled
+ stepper</a></span></dt>
+</dl></div>
+<p>
+ The odeint library defines three concepts for stepping objects.
+ </p>
+<div class="section">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_sandbox_numeric_odeint.concepts.basic_stepper"></a><a class="link" href="concepts.html#boost_sandbox_numeric_odeint.concepts.basic_stepper" title="Basic stepper">Basic
+ stepper</a>
+</h3></div></div></div>
+<p>
+ Basic steppers execute one timestep of a specific order with a given stepsize.
+ They usually allocate internal memory to store intermediate function call
+ results. If state types with variable size are used (e.g. <code class="computeroutput"><span class="identifier">vector</span></code>),
+ it has to be assured that the stepper gets informed about any change of the
+ state size by calling its <code class="computeroutput"><span class="identifier">adjust_size</span></code>
+ method.
+ </p>
+<p>
+ <span class="bold"><strong>Associated Types</strong></span>
+ </p>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th>
+ </th>
+<th>
+ </th>
+<th>
+ <p>
+ Description
+ </p>
+ </th>
+</tr></thead>
+<tbody>
+<tr>
+<td>
+ <p>
+ Time
+ </p>
+ </td>
+<td>
+ <p>
+ Stepper::time_type
+ </p>
+ </td>
+<td>
+ <p>
+ Type of the time variable, e.g. <code class="computeroutput"><span class="keyword">double</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Container
+ </p>
+ </td>
+<td>
+ <p>
+ Stepper::container_type
+ </p>
+ </td>
+<td>
+ <p>
+ Type of the system state, e.g. <code class="computeroutput"><span class="identifier">vector</span><span class="special"><</span><span class="keyword">double</span><span class="special">></span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Value
+ </p>
+ </td>
+<td>
+ <p>
+ Stepper::value_type
+ </p>
+ </td>
+<td>
+ <p>
+ Value type of the state, e.g. <code class="computeroutput"><span class="keyword">double</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Order Type
+ </p>
+ </td>
+<td>
+ <p>
+ Stepper::order_type
+ </p>
+ </td>
+<td>
+ <p>
+ Type of the order parameter, usually <code class="computeroutput"><span class="keyword">unsigned</span>
+ <span class="keyword">short</span></code>
+ </p>
+ </td>
+</tr>
+</tbody>
+</table></div>
+<p>
+ <span class="bold"><strong>Methods</strong></span>
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+ <code class="computeroutput"><span class="identifier">Stepper</span><span class="special">()</span></code>
+ Constructor.
+ </li>
+<li class="listitem">
+ <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 class="listitem">
+ <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:
+ </p>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th>
+ <p>
+ Parameter
+ </p>
+ </th>
+<th>
+ <p>
+ Type
+ </p>
+ </th>
+<th>
+ <p>
+ Description
+ </p>
+ </th>
+</tr></thead>
+<tbody>
+<tr>
+<td>
+ <p>
+ system
+ </p>
+ </td>
+<td>
+ <p>
+ DynamicalSystem
+ </p>
+ </td>
+<td>
+ <p>
+ Function (callable object) that computes the rhs of the ode
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ x
+ </p>
+ </td>
+<td>
+ <p>
+ container_type
+ </p>
+ </td>
+<td>
+ <p>
+ The current state of the system <span class="bold"><strong>x(t)</strong></span>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ t
+ </p>
+ </td>
+<td>
+ <p>
+ time_type
+ </p>
+ </td>
+<td>
+ <p>
+ The current time <span class="bold"><strong>t</strong></span>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ dt
+ </p>
+ </td>
+<td>
+ <p>
+ time_type
+ </p>
+ </td>
+<td>
+ <p>
+ Length of the timestep to be executed
+ </p>
+ </td>
+</tr>
+</tbody>
+</table></div>
+<p>
+ 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 class="itemizedlist" type="disc"><li class="listitem">
+ <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>
+ at the time <span class="bold"><strong>t</strong></span>.
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+ <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 class="listitem">
+ <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 class="itemizedlist" type="disc">
+<li class="listitem">
+ <code class="computeroutput"><span class="identifier">stepper_euler</span></code>
+ </li>
+<li class="listitem">
+ <code class="computeroutput"><span class="identifier">stepper_rk4</span></code>
+ </li>
+<li class="listitem">
+ <code class="computeroutput"><span class="identifier">stepper_rk78_fehlberg</span></code>
+ </li>
+</ul></div>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_sandbox_numeric_odeint.concepts.error_stepper"></a><a class="link" href="concepts.html#boost_sandbox_numeric_odeint.concepts.error_stepper" title="Error stepper">Error
+ stepper</a>
+</h3></div></div></div>
+<p>
+ Error steppers execute one timestep of a specific order with a given stepsize.
+ Additionally, an error estimation of the obtained result is computed that
+ can be used to control the error introduced by the time discretization. Like
+ the basic steppers, error steppers usually allocate internal memory to store
+ intermediate function call results. If state types with variable size are
+ used (e.g. <code class="computeroutput"><span class="identifier">vector</span></code>), it has
+ to be assured that the stepper gets informed about any change of the state
+ size by calling its <code class="computeroutput"><span class="identifier">adjust_size</span></code>
+ method.
+ </p>
+<p>
+ <span class="bold"><strong>Associated Types</strong></span>
+ </p>
+<p>
+ Same as for <span class="emphasis"><em>basic steppers</em></span> above.
+ </p>
+<p>
+ <span class="bold"><strong>Methods</strong></span>
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+ <code class="computeroutput"><span class="identifier">Error_Stepper</span><span class="special">()</span></code>
+ Constructor.
+ </li>
+<li class="listitem">
+ <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 class="listitem">
+ <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:
+ </p>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th>
+ <p>
+ Parameter
+ </p>
+ </th>
+<th>
+ <p>
+ Type
+ </p>
+ </th>
+<th>
+ <p>
+ Description
+ </p>
+ </th>
+</tr></thead>
+<tbody>
+<tr>
+<td>
+ <p>
+ system
+ </p>
+ </td>
+<td>
+ <p>
+ DynamicalSystem
+ </p>
+ </td>
+<td>
+ <p>
+ Function (callable object) that computes the rhs of the ode
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ x
+ </p>
+ </td>
+<td>
+ <p>
+ container_type
+ </p>
+ </td>
+<td>
+ <p>
+ The current state of the system <span class="bold"><strong>x(t)</strong></span>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ t
+ </p>
+ </td>
+<td>
+ <p>
+ time_type
+ </p>
+ </td>
+<td>
+ <p>
+ The current time <span class="bold"><strong>t</strong></span>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ dt
+ </p>
+ </td>
+<td>
+ <p>
+ time_type
+ </p>
+ </td>
+<td>
+ <p>
+ Length of the timestep to be executed
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ xerr
+ </p>
+ </td>
+<td>
+ <p>
+ container_type
+ </p>
+ </td>
+<td>
+ <p>
+ Used by the method to return the error estimation of this computation
+ </p>
+ </td>
+</tr>
+</tbody>
+</table></div>
+<p>
+ The result of this method is the (approximate) state of the system <span class="bold"><strong>x(t+dt)</strong></span>, which is returned in the variable <code class="computeroutput"><span class="identifier">x</span></code> (in-place), and the corresponding error
+ estimation returned in <code class="computeroutput"><span class="identifier">xerr</span></code>.
+ 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 class="itemizedlist" type="disc"><li class="listitem">
+ <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>
+ at the time <span class="bold"><strong>t</strong></span>.
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+ <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 class="listitem">
+ <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 class="listitem">
+ <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 class="itemizedlist" type="disc">
+<li class="listitem">
+ <code class="computeroutput"><span class="identifier">stepper_rk5_ck</span></code>
+ </li>
+<li class="listitem">
+ <code class="computeroutput"><span class="identifier">stepper_rk78_fehlberg</span></code>
+ </li>
+<li class="listitem">
+ <code class="computeroutput"><span class="identifier">stepper_half_step</span></code>
+ </li>
+</ul></div>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_sandbox_numeric_odeint.concepts.controlled_stepper"></a><a class="link" href="concepts.html#boost_sandbox_numeric_odeint.concepts.controlled_stepper" title="Controlled stepper">Controlled
+ stepper</a>
+</h3></div></div></div>
+<p>
+ Controlled steppers try to execute a timestep with a given error threshold.
+ If the estimated error of the obtained solution is too big, the result is
+ rejected and a new stepsize is proposed. If the error is small enough the
+ timestep is accepted and possibly an increased stepsize is proposed.
+ </p>
+<p>
+ <span class="bold"><strong>Associated Types</strong></span>
+ </p>
+<p>
+ Same as for <span class="emphasis"><em>basic steppers</em></span> above.
+ </p>
+<p>
+ <span class="bold"><strong>Methods</strong></span>
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem">
+ <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
+ by each individual timestep yields:
+ </p>
+<p>
+ <span class="bold"><strong>xerr < 1.1 ( eps_abs + eps_rel * (factor_x |x| +
+ factor_dxdt h |x'|) ) </strong></span>
+ </p>
+<p>
+ The factor 1.1 is for safety to avoid unnecessary many stepsize adjustings.
+ The above inequality should be understand to hold for <span class="emphasis"><em>all</em></span>
+ components of the possibly more dimensional vectors <span class="bold"><strong>x</strong></span>,
+ <span class="bold"><strong>x'</strong></span> and <span class="bold"><strong>xerr</strong></span>.
+ If the estimated error is too large, a reduced stepsize will be suggested.
+ If the estimated error is less than half of the desired error, an increased
+ stepsize will be suggested.
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+ <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 class="listitem">
+ <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
+ </p>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th>
+ <p>
+ Parameter
+ </p>
+ </th>
+<th>
+ <p>
+ Type
+ </p>
+ </th>
+<th>
+ <p>
+ Description
+ </p>
+ </th>
+</tr></thead>
+<tbody>
+<tr>
+<td>
+ <p>
+ system
+ </p>
+ </td>
+<td>
+ <p>
+ DynamicalSystem
+ </p>
+ </td>
+<td>
+ <p>
+ Function (callable object) that computes the rhs of the ode
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ x
+ </p>
+ </td>
+<td>
+ <p>
+ container_type
+ </p>
+ </td>
+<td>
+ <p>
+ The current state of the system <span class="bold"><strong>x(t)</strong></span>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ t
+ </p>
+ </td>
+<td>
+ <p>
+ time_type
+ </p>
+ </td>
+<td>
+ <p>
+ The current time <span class="bold"><strong>t</strong></span>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ dt
+ </p>
+ </td>
+<td>
+ <p>
+ time_type
+ </p>
+ </td>
+<td>
+ <p>
+ Length of the timestep to be executed
+ </p>
+ </td>
+</tr>
+</tbody>
+</table></div>
+<p>
+ This method has three possible outcomes represented by the returned value
+ <code class="computeroutput"><span class="identifier">result</span></code>: If <code class="computeroutput"><span class="identifier">result</span> <span class="special">=</span> <span class="identifier">success</span></code> the step has been applied and x
+ contains the new state <span class="bold"><strong>x(t)</strong></span> where the time
+ has also been increased <span class="bold"><strong>t += dt</strong></span>. If <code class="computeroutput"><span class="identifier">result</span> <span class="special">=</span> <span class="identifier">step_size_increased</span></code> the step has also been
+ accomplished, but the estimated error was so small that a new stepsize is
+ proposed in the variable <code class="computeroutput"><span class="identifier">dt</span></code>.
+ If <code class="computeroutput"><span class="identifier">result</span> <span class="special">=</span>
+ <span class="identifier">step_size_decreased</span></code> the step has
+ been rejected due to a too big error. <code class="computeroutput"><span class="identifier">x</span></code>
+ and <code class="computeroutput"><span class="identifier">t</span></code> remain unchanged and
+ <code class="computeroutput"><span class="identifier">dt</span></code> now containes the suggested
+ reduced stepsize that should give an error below the desired level.
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+ <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 class="listitem">
+ <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 class="listitem">
+ <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 class="itemizedlist" type="disc">
+<li class="listitem">
+ <code class="computeroutput"><span class="identifier">controlled_stepper_standard</span></code>
+ </li>
+<li class="listitem">
+ <code class="computeroutput"><span class="identifier">controlled_stepper_bs</span></code>
+ </li>
+</ul></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 © 2009 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 http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></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>
+</div>
+</body>
+</html>
Added: sandbox/odeint/branches/karsten/libs/numeric/odeint/doc/html/boost_sandbox_numeric_odeint/extend_odeint.html
==============================================================================
--- (empty file)
+++ sandbox/odeint/branches/karsten/libs/numeric/odeint/doc/html/boost_sandbox_numeric_odeint/extend_odeint.html 2011-01-28 04:29:22 EST (Fri, 28 Jan 2011)
@@ -0,0 +1,66 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Extend odeint</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 1. boost.sandbox.numeric.odeint">
+<link rel="up" href="../index.html" title="Chapter 1. boost.sandbox.numeric.odeint">
+<link rel="prev" href="tutorial.html" title="Tutorial">
+<link rel="next" href="concepts.html" title="Concepts">
+</head>
+<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="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>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h2 class="title" style="clear: both">
+<a name="boost_sandbox_numeric_odeint.extend_odeint"></a><a class="link" href="extend_odeint.html" title="Extend odeint">Extend odeint</a>
+</h2></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section"><a href="extend_odeint.html#boost_sandbox_numeric_odeint.extend_odeint.write_own_steppers">Write
+ own steppers</a></span></dt>
+<dt><span class="section"><a href="extend_odeint.html#boost_sandbox_numeric_odeint.extend_odeint.adapt_your_own_containers">Adapt
+ your own containers</a></span></dt>
+<dt><span class="section"><a href="extend_odeint.html#boost_sandbox_numeric_odeint.extend_odeint.adapt_your_own_operations">Adapt
+ your own operations</a></span></dt>
+</dl></div>
+<div class="section"><div class="titlepage"><div><div><h3 class="title">
+<a name="boost_sandbox_numeric_odeint.extend_odeint.write_own_steppers"></a><a class="link" href="extend_odeint.html#boost_sandbox_numeric_odeint.extend_odeint.write_own_steppers" title="Write own steppers">Write
+ own steppers</a>
+</h3></div></div></div></div>
+<div class="section">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_sandbox_numeric_odeint.extend_odeint.adapt_your_own_containers"></a><a class="link" href="extend_odeint.html#boost_sandbox_numeric_odeint.extend_odeint.adapt_your_own_containers" title="Adapt your own containers">Adapt
+ your own containers</a>
+</h3></div></div></div>
+<p>
+ gsl_vector, gsl_matrix, ublas::matrix, blitz::matrix, thrust
+ </p>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_sandbox_numeric_odeint.extend_odeint.adapt_your_own_operations"></a><a class="link" href="extend_odeint.html#boost_sandbox_numeric_odeint.extend_odeint.adapt_your_own_operations" title="Adapt your own operations">Adapt
+ your own operations</a>
+</h3></div></div></div>
+<p>
+ gsl_complex, complex, thrust
+ </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 © 2009 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 http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></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>
+</div>
+</body>
+</html>
Added: sandbox/odeint/branches/karsten/libs/numeric/odeint/doc/html/boost_sandbox_numeric_odeint/reference.html
==============================================================================
--- (empty file)
+++ sandbox/odeint/branches/karsten/libs/numeric/odeint/doc/html/boost_sandbox_numeric_odeint/reference.html 2011-01-28 04:29:22 EST (Fri, 28 Jan 2011)
@@ -0,0 +1,241 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Reference</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 1. boost.sandbox.numeric.odeint">
+<link rel="up" href="../index.html" title="Chapter 1. boost.sandbox.numeric.odeint">
+<link rel="prev" href="concepts.html" title="Concepts">
+</head>
+<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="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>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h2 class="title" style="clear: both">
+<a name="boost_sandbox_numeric_odeint.reference"></a><a class="link" href="reference.html" title="Reference">Reference</a>
+</h2></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section"><a href="reference.html#boost_sandbox_numeric_odeint.reference.stepper_classes">Stepper
+ classes</a></span></dt>
+<dt><span class="section"><a href="reference.html#boost_sandbox_numeric_odeint.reference.integration_functions">Integration
+ functions</a></span></dt>
+<dt><span class="section">Algebras</span></dt>
+<dt><span class="section">Operations</span></dt>
+<dt><span class="section">Resizing</span></dt>
+</dl></div>
+<div class="section">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_sandbox_numeric_odeint.reference.stepper_classes"></a><a class="link" href="reference.html#boost_sandbox_numeric_odeint.reference.stepper_classes" title="Stepper classes">Stepper
+ classes</a>
+</h3></div></div></div>
+<div class="table">
+<a name="id578246"></a><p class="title"><b>Table 1.3. Stepper Algorithms</b></p>
+<div class="table-contents"><table class="table" summary="Stepper Algorithms">
+<colgroup>
+<col>
+<col>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th>
+ <p>
+ Method
+ </p>
+ </th>
+<th>
+ <p>
+ Class
+ </p>
+ </th>
+<th>
+ <p>
+ Order
+ </p>
+ </th>
+<th>
+ <p>
+ Error Estimation
+ </p>
+ </th>
+</tr></thead>
+<tbody>
+<tr>
+<td>
+ <p>
+ Euler
+ </p>
+ </td>
+<td>
+ <p>
+ stepper_euler
+ </p>
+ </td>
+<td>
+ <p>
+ 1
+ </p>
+ </td>
+<td>
+ <p>
+ No
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Runge-Kutta 4
+ </p>
+ </td>
+<td>
+ <p>
+ stepper_rk4
+ </p>
+ </td>
+<td>
+ <p>
+ 4
+ </p>
+ </td>
+<td>
+ <p>
+ No
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Runge-Kutta Cash-Karp
+ </p>
+ </td>
+<td>
+ <p>
+ stepper_rk5_ck
+ </p>
+ </td>
+<td>
+ <p>
+ 5
+ </p>
+ </td>
+<td>
+ <p>
+ Yes (Order 4)
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Runge-Kutta Fehlberg
+ </p>
+ </td>
+<td>
+ <p>
+ stepper_rk78_fehlberg
+ </p>
+ </td>
+<td>
+ <p>
+ 7
+ </p>
+ </td>
+<td>
+ <p>
+ Yes (Order 8)
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Midpoint
+ </p>
+ </td>
+<td>
+ <p>
+ stepper_midpoint
+ </p>
+ </td>
+<td>
+ <p>
+ variable
+ </p>
+ </td>
+<td>
+ <p>
+ No
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Bulirsch-Stoer
+ </p>
+ </td>
+<td>
+ <p>
+ controlled_stepper_bs
+ </p>
+ </td>
+<td>
+ <p>
+ variable
+ </p>
+ </td>
+<td>
+ <p>
+ Controlled
+ </p>
+ </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<br class="table-break">
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_sandbox_numeric_odeint.reference.integration_functions"></a><a class="link" href="reference.html#boost_sandbox_numeric_odeint.reference.integration_functions" title="Integration functions">Integration
+ functions</a>
+</h3></div></div></div>
+<div class="section"><div class="titlepage"><div><div><h4 class="title">
+<a name="boost_sandbox_numeric_odeint.reference.integration_functions.constant_step_size_functions"></a><a class="link" href="reference.html#boost_sandbox_numeric_odeint.reference.integration_functions.constant_step_size_functions" title="Constant step-size functions">Constant
+ step-size functions</a>
+</h4></div></div></div></div>
+<div class="section"><div class="titlepage"><div><div><h4 class="title">
+<a name="boost_sandbox_numeric_odeint.reference.integration_functions.adaptive_step_size_functions"></a><a class="link" href="reference.html#boost_sandbox_numeric_odeint.reference.integration_functions.adaptive_step_size_functions" title="Adaptive step-size functions">Adaptive
+ step-size functions</a>
+</h4></div></div></div></div>
+</div>
+<div class="section"><div class="titlepage"><div><div><h3 class="title">
+<a name="boost_sandbox_numeric_odeint.reference.algebras"></a><a class="link" href="reference.html#boost_sandbox_numeric_odeint.reference.algebras" title="Algebras">Algebras</a>
+</h3></div></div></div></div>
+<div class="section"><div class="titlepage"><div><div><h3 class="title">
+<a name="boost_sandbox_numeric_odeint.reference.operations"></a><a class="link" href="reference.html#boost_sandbox_numeric_odeint.reference.operations" title="Operations">Operations</a>
+</h3></div></div></div></div>
+<div class="section"><div class="titlepage"><div><div><h3 class="title">
+<a name="boost_sandbox_numeric_odeint.reference.resizing"></a><a class="link" href="reference.html#boost_sandbox_numeric_odeint.reference.resizing" title="Resizing">Resizing</a>
+</h3></div></div></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 © 2009 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 http://www.boost.org/LICENSE_1_0.txt)
+ </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="../index.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>
Added: sandbox/odeint/branches/karsten/libs/numeric/odeint/doc/html/boost_sandbox_numeric_odeint/tutorial.html
==============================================================================
--- (empty file)
+++ sandbox/odeint/branches/karsten/libs/numeric/odeint/doc/html/boost_sandbox_numeric_odeint/tutorial.html 2011-01-28 04:29:22 EST (Fri, 28 Jan 2011)
@@ -0,0 +1,636 @@
+<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 1. boost.sandbox.numeric.odeint">
+<link rel="up" href="../index.html" title="Chapter 1. boost.sandbox.numeric.odeint">
+<link rel="prev" href="../odeint/short_example.html" title="Short Example">
+<link rel="next" href="extend_odeint.html" title="Extend odeint">
+</head>
+<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="p" href="../odeint/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="extend_odeint.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_sandbox_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.html#boost_sandbox_numeric_odeint.tutorial.harmonic_oscillator">Harmonic
+ oscillator</a></span></dt>
+<dt><span class="section"><a href="tutorial.html#boost_sandbox_numeric_odeint.tutorial.solar_system">Solar
+ system</a></span></dt>
+<dt><span class="section"><a href="tutorial.html#boost_sandbox_numeric_odeint.tutorial.stiff_systems">Stiff
+ systems</a></span></dt>
+<dt><span class="section"><a href="tutorial.html#boost_sandbox_numeric_odeint.tutorial.lyapunov_exponents">Lyapunov
+ exponents</a></span></dt>
+<dt><span class="section"><a href="tutorial.html#boost_sandbox_numeric_odeint.tutorial.using_boost__units">Using
+ boost::units</a></span></dt>
+<dt><span class="section"><a href="tutorial.html#boost_sandbox_numeric_odeint.tutorial.using_cuda_and_thrust">Using
+ Cuda and Thrust</a></span></dt>
+<dt><span class="section"><a href="tutorial.html#boost_sandbox_numeric_odeint.tutorial.using_matrices_as_state_types">Using
+ matrices as state types</a></span></dt>
+<dt><span class="section"><a href="tutorial.html#boost_sandbox_numeric_odeint.tutorial.special_topics">Special
+ topics</a></span></dt>
+<dt><span class="section">References</span></dt>
+</dl></div>
+<div class="section">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_sandbox_numeric_odeint.tutorial.harmonic_oscillator"></a><a class="link" href="tutorial.html#boost_sandbox_numeric_odeint.tutorial.harmonic_oscillator" title="Harmonic oscillator">Harmonic
+ oscillator</a>
+</h3></div></div></div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="boost_sandbox_numeric_odeint.tutorial.harmonic_oscillator.define_the_ode"></a><a class="link" href="tutorial.html#boost_sandbox_numeric_odeint.tutorial.harmonic_oscillator.define_the_ode" title="Define the ODE">Define
+ the ODE</a>
+</h4></div></div></div>
+<p>
+ First of all, you have to specify the datatype that represents a state
+ of your system <span class="bold"><strong>x</strong></span>. Mathematically, this
+ usually is an n-dimensional vector with real numbers or complex numbers
+ as scalar objects. For odeint the most natural way is to use <code class="computeroutput"><span class="identifier">vector</span><span class="special"><</span>
+ <span class="keyword">double</span> <span class="special">></span></code>
+ or <code class="computeroutput"><span class="identifier">vector</span><span class="special"><</span>
+ <span class="identifier">complex</span><span class="special"><</span>
+ <span class="keyword">double</span> <span class="special">></span>
+ <span class="special">></span></code> to represent the system state.
+ However, odeint can deal with other container types as well, e.g. <code class="computeroutput"><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></code>
+ as long as it is able to obtain a ForwardIterator going through all of
+ the container's elements. The scalar type must have several operations
+ ( + , - , += , -= ) and the <code class="computeroutput"><span class="identifier">abs</span><span class="special">()</span></code>-function defined. Furthermore, one can
+ choose the datatype of the time (that is, the parameter to which respect
+ the differentiation is done). The standard type for this is <code class="computeroutput"><span class="keyword">double</span></code>, but it should be possible to use,
+ for example, <code class="computeroutput"><span class="identifier">complex</span><span class="special"><</span>
+ <span class="keyword">double</span> <span class="special">></span></code>
+ as well (untested). It must be possible to multiply the time type and the
+ scalar type of the vector. For the most cases <code class="computeroutput"><span class="identifier">vector</span><span class="special"><</span> <span class="keyword">double</span> <span class="special">></span></code> as state type and the standard <code class="computeroutput"><span class="keyword">double</span></code> for the time type should be sufficient.
+ </p>
+<p>
+ To integrate a differential equation numerically, one has to define the
+ rhs of the equation <span class="emphasis"><em>x' = f(x)</em></span>. In odeint you supply
+ this function in terms of an object that implements the ()-operator with
+ a certain parameter structure. Hence, the straight forward way would be
+ to just define a function, e.g:
+ </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>
+
+<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">&</span><span class="identifier">x</span><span class="special">,</span> <span class="identifier">state_type</span> <span class="special">&</span><span class="identifier">dxdt</span><span class="special">,</span> <span class="keyword">const</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">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>
+ The parameters of the function must follow the example above where <span class="bold"><strong>x</strong></span> is the current state, <span class="bold"><strong>dxdt</strong></span>
+ is the derivative <span class="emphasis"><em>x'</em></span> and should be filled by the function
+ with <span class="emphasis"><em>f(x)</em></span> and <span class="bold"><strong>t</strong></span> is
+ the current time.
+ </p>
+<p>
+ A more sophisticated approach is to implement the system as a class where
+ the rhs function is defined as the ()-operator of the class with the same
+ parameter structure as above:
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><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">&</span><span class="identifier">x</span><span class="special">,</span> <span class="identifier">state_type</span> <span class="special">&</span><span class="identifier">dxdt</span><span class="special">,</span> <span class="keyword">const</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">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>
+ odeint can deal with instances of such classes instead of pure functions
+ which allows for cleaner code.
+ </p>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="boost_sandbox_numeric_odeint.tutorial.harmonic_oscillator.stepper_types"></a><a class="link" href="tutorial.html#boost_sandbox_numeric_odeint.tutorial.harmonic_oscillator.stepper_types" title="Stepper Types">Stepper
+ Types</a>
+</h4></div></div></div>
+<p>
+ Numerical integration works iteratively, that means you start at a state
+ <span class="emphasis"><em>x(t)</em></span> and performs a timestep of length <span class="emphasis"><em>dt</em></span>
+ to obtain the approximate state <span class="emphasis"><em>x(t+dt)</em></span>. There exist
+ many different methods to perform such a timestep each of which has a certain
+ order <span class="emphasis"><em>q</em></span>. If the order of a method is <span class="emphasis"><em>q</em></span>
+ than it is accurate up to term <span class="emphasis"><em>~dt^q</em></span> that means the
+ error in <span class="emphasis"><em>x</em></span> made by such a step is <span class="emphasis"><em>~dt^(q+1)</em></span>.
+ odeint provides several steppers of different orders from which you can
+ choose. There are three types of steppers: <span class="bold"><strong>Stepper</strong></span>,
+ <span class="bold"><strong>ErrorStepper</strong></span> and <span class="bold"><strong>ControlledStepper</strong></span>.
+ </p>
+<div class="table">
+<a name="id574628"></a><p class="title"><b>Table 1.2. Stepper Algorithms</b></p>
+<div class="table-contents"><table class="table" summary="Stepper Algorithms">
+<colgroup>
+<col>
+<col>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th>
+ <p>
+ Method
+ </p>
+ </th>
+<th>
+ <p>
+ Class
+ </p>
+ </th>
+<th>
+ <p>
+ Order
+ </p>
+ </th>
+<th>
+ <p>
+ Error Estimation
+ </p>
+ </th>
+</tr></thead>
+<tbody>
+<tr>
+<td>
+ <p>
+ Euler
+ </p>
+ </td>
+<td>
+ <p>
+ stepper_euler
+ </p>
+ </td>
+<td>
+ <p>
+ 1
+ </p>
+ </td>
+<td>
+ <p>
+ No
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Runge-Kutta 4
+ </p>
+ </td>
+<td>
+ <p>
+ stepper_rk4
+ </p>
+ </td>
+<td>
+ <p>
+ 4
+ </p>
+ </td>
+<td>
+ <p>
+ No
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Runge-Kutta Cash-Karp
+ </p>
+ </td>
+<td>
+ <p>
+ stepper_rk5_ck
+ </p>
+ </td>
+<td>
+ <p>
+ 5
+ </p>
+ </td>
+<td>
+ <p>
+ Yes (Order 4)
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Runge-Kutta Fehlberg
+ </p>
+ </td>
+<td>
+ <p>
+ stepper_rk78_fehlberg
+ </p>
+ </td>
+<td>
+ <p>
+ 7
+ </p>
+ </td>
+<td>
+ <p>
+ Yes (Order 8)
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Midpoint
+ </p>
+ </td>
+<td>
+ <p>
+ stepper_midpoint
+ </p>
+ </td>
+<td>
+ <p>
+ variable
+ </p>
+ </td>
+<td>
+ <p>
+ No
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Bulirsch-Stoer
+ </p>
+ </td>
+<td>
+ <p>
+ controlled_stepper_bs
+ </p>
+ </td>
+<td>
+ <p>
+ variable
+ </p>
+ </td>
+<td>
+ <p>
+ Controlled
+ </p>
+ </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<br class="table-break">
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="boost_sandbox_numeric_odeint.tutorial.harmonic_oscillator.integration_with_constant_step_size"></a><a class="link" href="tutorial.html#boost_sandbox_numeric_odeint.tutorial.harmonic_oscillator.integration_with_constant_step_size" title="Integration with Constant Step Size">Integration
+ with Constant Step Size</a>
+</h4></div></div></div>
+<p>
+ The basic stepper just performs one timestep and doesn't give you any information
+ about the error that was made (except that you know it is of order q+1).
+ Such steppers are used with constant step size that should be chosen small
+ enough to have reasonable small errors. However, you should apply some
+ sort of validity check of your results (such as observing conserved quantities)
+ becasue you have no other control of the error. The following example defines
+ a basic stepper based on the classical Runge-Kutta scheme of 4th order.
+ </p>
+<p>
+ [define_const_stepper]
+ </p>
+<p>
+ The declaration of the stepper requires the state type as template parameter.
+ The integration can now be done by using the <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">state</span><span class="special">,</span> <span class="identifier">start_time</span><span class="special">,</span> <span class="identifier">end_time</span><span class="special">,</span> <span class="identifier">step_size</span>
+ <span class="special">)</span></code> function from odeint:
+ </p>
+<p>
+ [integrate_const]
+ </p>
+<p>
+ This call integrates the system defined by <code class="computeroutput"><span class="identifier">harmonic_oscillator</span></code>
+ using the rk4 method from t=0 to 10 with a stepsize dt=0.01 and the initial
+ condition given in <code class="computeroutput"><span class="identifier">x</span></code>. The
+ result, <span class="emphasis"><em>x(t=10)</em></span> is stored in <code class="computeroutput"><span class="identifier">x</span></code>
+ (in-place).
+ </p>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="boost_sandbox_numeric_odeint.tutorial.harmonic_oscillator.integration_with_adaptive_step_size"></a><a class="link" href="tutorial.html#boost_sandbox_numeric_odeint.tutorial.harmonic_oscillator.integration_with_adaptive_step_size" title="Integration with Adaptive Step Size">Integration
+ with Adaptive Step Size</a>
+</h4></div></div></div>
+<p>
+ To improve the numerical results and additionally minimize the computational
+ effort, the application of a step size control is advisable. Step size
+ control is realized via stepper algorithms that additionally provide an
+ error estimation of the applied step. Odeint provides a number of such
+ <span class="bold"><strong>ErrorSteppers</strong></span> and we will show their usage
+ on the example of stepper_rk5_ck -- a 5th order Runge-Kutta method with
+ 4th order error estimation and coefficients introduced by Cash-Karp.
+ </p>
+<p>
+ [define_adapt_stepper]
+ </p>
+<p>
+ Given the error stepper, one still needs an instance that checks the error
+ and adjusts the step size accordingly. In odeint, this is done by <span class="bold"><strong>ControlledSteppers</strong></span>. The usual way to create a controlled
+ stepper is via the <code class="computeroutput"><span class="identifier">make_controlled_stepper_standard</span><span class="special">(</span> <span class="identifier">ErrorStepper</span>
+ <span class="special">,</span> <span class="identifier">eps_abs</span>
+ <span class="special">,</span> <span class="identifier">eps_rel</span>
+ <span class="special">,</span> <span class="identifier">a_x</span>
+ <span class="special">,</span> <span class="identifier">a_dxdt</span>
+ <span class="special">)</span></code> function that takes an error stepper
+ as parameter and four values defining the maximal absolute and relative
+ error allowed for one integration step. The standard controlled stepper
+ created by this method ensures that the error <span class="emphasis"><em>err</em></span>
+ of the solution fulfills <span class="emphasis"><em>err < eps_abs + eps_rel * ( a_x *
+ |x| + a_dxdt * dt * |dxdt| ) </em></span> by decreasesing the step size.
+ Note, that the stepsize is also increased if the error gets too small compared
+ to the rhs of the above relation. Now we have everything needed to integrate
+ the harmonic oscillator using an adaptive step size method. Similar to
+ the case with constant step size above, there exists a <code class="computeroutput"><span class="identifier">integrate_adaptive</span></code>
+ function with a similar parameter structure, but it requires the controlled
+ stepper create by <code class="computeroutput"><span class="identifier">make_controlled_stepper_standard</span></code>.
+ </p>
+<p>
+ [integrate_adapt]
+ </p>
+<p>
+ As above, this integrates the system defined by <code class="computeroutput"><span class="identifier">harmonic_oscillator</span></code>
+ using an adaptive step size method based on the rk5_ck scheme from t=0
+ to 10 with an initial step size of dt=0.01 (will be adjusted) and the initial
+ condition given in x. The result, x(t=10), will also be stored in x (in-place).
+ </p>
+</div>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_sandbox_numeric_odeint.tutorial.solar_system"></a><a class="link" href="tutorial.html#boost_sandbox_numeric_odeint.tutorial.solar_system" title="Solar system">Solar
+ system</a>
+</h3></div></div></div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="boost_sandbox_numeric_odeint.tutorial.solar_system.gravitation_and_energy_conservation"></a><a class="link" href="tutorial.html#boost_sandbox_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 solar system.
+ In the solar system each planet, and of course also 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>
+ F_ij = -gamma m_i m_j (q_i-q_j)/|q_i-q_j|^3
+ </p>
+<p>
+ where gamma is the gravitational constant, m_i and m_j are the masses and
+ q_i and q_j are the locations of the two objects. The equations of motion
+ are then
+ </p>
+<p>
+ dq_i/dt = p_i dp_i/dt = 1/m_i sum_ji F_ij
+ </p>
+<p>
+ where pi is the momenta of object i. The equations of motion can also be
+ derived from the Hamiltonian
+ </p>
+<p>
+ H = sum_i p_i^2/(2m_i) + sum_j V( qi , qj )
+ </p>
+<p>
+ with the interaction potential V(q_i,q_j). The Hamiltonian equations give
+ the equations of motion
+ </p>
+<p>
+ dq_i/dt = dH/dp_i
+ </p>
+<p>
+ dp_i = -dH/dq_i.
+ </p>
+<p>
+ In time independent Hamiltonian system the energy is conserved and special
+ integration methods have to be applied in order to ensure energy conservation.
+ The odeint library provides classes for Hamiltonian systems, which are
+ separable and can be written in the form H = sum p_i^2/2m_i + Hq(q), where
+ Hq(q) only depends on the coordinates.
+ </p>
+<p>
+ hamiltonian_stepper_euler hamiltonian_stepper_rk
+ </p>
+<p>
+ Alltough 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 dqi=mi pi dpi=f(qi).
+ </p>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="boost_sandbox_numeric_odeint.tutorial.solar_system.define_the_system_function"></a><a class="link" href="tutorial.html#boost_sandbox_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 point type which will represent the
+ space as well as the velocity. Therefore, we use the operators from <boost/operator.hpp>:
+ </p>
+<p>
+ [point_type]
+ </p>
+<p>
+ The next step is to define a container type storing the values of q and
+ p and to define systems (derivative) functions. As container type we use
+ std::tr1::array and the state type is then simply
+ </p>
+<p>
+ [state_type_definition]
+ </p>
+<p>
+ and represents all space coordinates q or all momenta coordinates p. As
+ system function we have to provide f(p) = dq and f(q) = -dp, which acts
+ only on p or q:
+ </p>
+<p>
+ [momentum_function]
+ </p>
+<p>
+ [coordinate_function]
+ </p>
+<p>
+ In general a three body-system is chaotic, hence we can not expect that
+ arbitray 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>
+ Now, we use the rk stepper to integrate the solar system. To visualize
+ the motion we save the trajectory of each planet in a circular buffer.
+ The output can be piped directly into gnuplot and a very nice visualization
+ of the motion appears.
+ </p>
+<p>
+ [integration_solar_system]
+ </p>
+</div>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_sandbox_numeric_odeint.tutorial.stiff_systems"></a><a class="link" href="tutorial.html#boost_sandbox_numeric_odeint.tutorial.stiff_systems" title="Stiff systems">Stiff
+ systems</a>
+</h3></div></div></div>
+<p>
+ blah blah
+ </p>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_sandbox_numeric_odeint.tutorial.lyapunov_exponents"></a><a class="link" href="tutorial.html#boost_sandbox_numeric_odeint.tutorial.lyapunov_exponents" title="Lyapunov exponents">Lyapunov
+ exponents</a>
+</h3></div></div></div>
+<p>
+ blah blah
+ </p>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_sandbox_numeric_odeint.tutorial.using_boost__units"></a><a class="link" href="tutorial.html#boost_sandbox_numeric_odeint.tutorial.using_boost__units" title="Using boost::units">Using
+ boost::units</a>
+</h3></div></div></div>
+<p>
+ blah blah
+ </p>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_sandbox_numeric_odeint.tutorial.using_cuda_and_thrust"></a><a class="link" href="tutorial.html#boost_sandbox_numeric_odeint.tutorial.using_cuda_and_thrust" title="Using Cuda and Thrust">Using
+ Cuda and Thrust</a>
+</h3></div></div></div>
+<p>
+ blah blah
+ </p>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_sandbox_numeric_odeint.tutorial.using_matrices_as_state_types"></a><a class="link" href="tutorial.html#boost_sandbox_numeric_odeint.tutorial.using_matrices_as_state_types" title="Using matrices as state types">Using
+ matrices as state types</a>
+</h3></div></div></div>
+<p>
+ Expanding resizing
+ </p>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_sandbox_numeric_odeint.tutorial.special_topics"></a><a class="link" href="tutorial.html#boost_sandbox_numeric_odeint.tutorial.special_topics" title="Special topics">Special
+ topics</a>
+</h3></div></div></div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="boost_sandbox_numeric_odeint.tutorial.special_topics.pass_by_value_or_by_reference"></a><a class="link" href="tutorial.html#boost_sandbox_numeric_odeint.tutorial.special_topics.pass_by_value_or_by_reference" title="Pass by value or by reference">Pass
+ by value or by reference</a>
+</h4></div></div></div>
+<p>
+ blah blah
+ </p>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="boost_sandbox_numeric_odeint.tutorial.special_topics.using_boost__range"></a><a class="link" href="tutorial.html#boost_sandbox_numeric_odeint.tutorial.special_topics.using_boost__range" title="Using boost::range">Using
+ boost::range</a>
+</h4></div></div></div>
+<p>
+ blah blah
+ </p>
+</div>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_sandbox_numeric_odeint.tutorial.references"></a><a class="link" href="tutorial.html#boost_sandbox_numeric_odeint.tutorial.references" title="References">References</a>
+</h3></div></div></div>
+<p>
+ <span class="bold"><strong>General informations 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ø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, “Construction of higher order symplectic integrators,”
+ Physics Letters A 150, no. 5 (November 12, 1990): 262-268.
+ </p>
+<p>
+ [7] Robert I. McLachlan, “On the numerical integration of ordinary differential
+ equations by symmetric composition methods,” SIAM J. Sci. Comput. 16, no.
+ 1 (1995): 151-168.
+ </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 © 2009 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 http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="../odeint/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="extend_odeint.html"><img src="../images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>
Added: sandbox/odeint/branches/karsten/libs/numeric/odeint/doc/html/boostbook.css
==============================================================================
--- (empty file)
+++ sandbox/odeint/branches/karsten/libs/numeric/odeint/doc/html/boostbook.css 2011-01-28 04:29:22 EST (Fri, 28 Jan 2011)
@@ -0,0 +1,601 @@
+/*=============================================================================
+ 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: 140% }
+ h2 { font: bold 140% }
+ h3 { font: bold 130% }
+ h4 { font: bold 120% }
+ h5 { font: italic 110% }
+ h6 { font: italic 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% }
+
+/*=============================================================================
+ 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;
+ _vertical-align: bottom;
+ position: relative;
+
+}
+
+sup {
+ bottom: 1ex;
+}
+
+sub {
+ top: .5ex;
+}
+
Added: sandbox/odeint/branches/karsten/libs/numeric/odeint/doc/html/index.html
==============================================================================
--- (empty file)
+++ sandbox/odeint/branches/karsten/libs/numeric/odeint/doc/html/index.html 2011-01-28 04:29:22 EST (Fri, 28 Jan 2011)
@@ -0,0 +1,95 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Chapter 1. boost.sandbox.numeric.odeint</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 1. boost.sandbox.numeric.odeint">
+<link rel="next" href="odeint/overview.html" title="Overview">
+</head>
+<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="odeint/overview.html"><img src="images/next.png" alt="Next"></a></div>
+<div class="chapter">
+<div class="titlepage"><div>
+<div><h2 class="title">
+<a name="odeint"></a>Chapter 1. boost.sandbox.numeric.odeint</h2></div>
+<div><div class="author"><h3 class="author">
+<span class="firstname">Karsten</span> <span class="surname">Ahnert</span>
+</h3></div></div>
+<div><div class="author"><h3 class="author">
+<span class="firstname">Mario</span> <span class="surname">Mulansky</span>
+</h3></div></div>
+<div><p class="copyright">Copyright © 2009 Karsten Ahnert and Mario Mulansky</p></div>
+<div><div class="legalnotice">
+<a name="id563832"></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>
+</div></div>
+</div></div>
+<div class="toc">
+<p><b>Table of Contents</b></p>
+<dl>
+<dt><span class="section">Overview</span></dt>
+<dt><span class="section">Short Example</span></dt>
+<dt><span class="section">Tutorial</span></dt>
+<dd><dl>
+<dt><span class="section"><a href="boost_sandbox_numeric_odeint/tutorial.html#boost_sandbox_numeric_odeint.tutorial.harmonic_oscillator">Harmonic
+ oscillator</a></span></dt>
+<dt><span class="section"><a href="boost_sandbox_numeric_odeint/tutorial.html#boost_sandbox_numeric_odeint.tutorial.solar_system">Solar
+ system</a></span></dt>
+<dt><span class="section"><a href="boost_sandbox_numeric_odeint/tutorial.html#boost_sandbox_numeric_odeint.tutorial.stiff_systems">Stiff
+ systems</a></span></dt>
+<dt><span class="section"><a href="boost_sandbox_numeric_odeint/tutorial.html#boost_sandbox_numeric_odeint.tutorial.lyapunov_exponents">Lyapunov
+ exponents</a></span></dt>
+<dt><span class="section"><a href="boost_sandbox_numeric_odeint/tutorial.html#boost_sandbox_numeric_odeint.tutorial.using_boost__units">Using
+ boost::units</a></span></dt>
+<dt><span class="section"><a href="boost_sandbox_numeric_odeint/tutorial.html#boost_sandbox_numeric_odeint.tutorial.using_cuda_and_thrust">Using
+ Cuda and Thrust</a></span></dt>
+<dt><span class="section"><a href="boost_sandbox_numeric_odeint/tutorial.html#boost_sandbox_numeric_odeint.tutorial.using_matrices_as_state_types">Using
+ matrices as state types</a></span></dt>
+<dt><span class="section"><a href="boost_sandbox_numeric_odeint/tutorial.html#boost_sandbox_numeric_odeint.tutorial.special_topics">Special
+ topics</a></span></dt>
+<dt><span class="section">References</span></dt>
+</dl></dd>
+<dt><span class="section">Extend odeint</span></dt>
+<dd><dl>
+<dt><span class="section"><a href="boost_sandbox_numeric_odeint/extend_odeint.html#boost_sandbox_numeric_odeint.extend_odeint.write_own_steppers">Write
+ own steppers</a></span></dt>
+<dt><span class="section"><a href="boost_sandbox_numeric_odeint/extend_odeint.html#boost_sandbox_numeric_odeint.extend_odeint.adapt_your_own_containers">Adapt
+ your own containers</a></span></dt>
+<dt><span class="section"><a href="boost_sandbox_numeric_odeint/extend_odeint.html#boost_sandbox_numeric_odeint.extend_odeint.adapt_your_own_operations">Adapt
+ your own operations</a></span></dt>
+</dl></dd>
+<dt><span class="section">Concepts</span></dt>
+<dd><dl>
+<dt><span class="section"><a href="boost_sandbox_numeric_odeint/concepts.html#boost_sandbox_numeric_odeint.concepts.basic_stepper">Basic
+ stepper</a></span></dt>
+<dt><span class="section"><a href="boost_sandbox_numeric_odeint/concepts.html#boost_sandbox_numeric_odeint.concepts.error_stepper">Error
+ stepper</a></span></dt>
+<dt><span class="section"><a href="boost_sandbox_numeric_odeint/concepts.html#boost_sandbox_numeric_odeint.concepts.controlled_stepper">Controlled
+ stepper</a></span></dt>
+</dl></dd>
+<dt><span class="section">Reference</span></dt>
+<dd><dl>
+<dt><span class="section"><a href="boost_sandbox_numeric_odeint/reference.html#boost_sandbox_numeric_odeint.reference.stepper_classes">Stepper
+ classes</a></span></dt>
+<dt><span class="section"><a href="boost_sandbox_numeric_odeint/reference.html#boost_sandbox_numeric_odeint.reference.integration_functions">Integration
+ functions</a></span></dt>
+<dt><span class="section">Algebras</span></dt>
+<dt><span class="section">Operations</span></dt>
+<dt><span class="section">Resizing</span></dt>
+</dl></dd>
+</dl>
+</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: January 27, 2011 at 17:16:36 GMT</small></p></td>
+<td align="right"><div class="copyright-footer"></div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav"><a accesskey="n" href="odeint/overview.html"><img src="images/next.png" alt="Next"></a></div>
+</body>
+</html>
Added: sandbox/odeint/branches/karsten/libs/numeric/odeint/doc/html/odeint/overview.html
==============================================================================
--- (empty file)
+++ sandbox/odeint/branches/karsten/libs/numeric/odeint/doc/html/odeint/overview.html 2011-01-28 04:29:22 EST (Fri, 28 Jan 2011)
@@ -0,0 +1,217 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Overview</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 1. boost.sandbox.numeric.odeint">
+<link rel="up" href="../index.html" title="Chapter 1. boost.sandbox.numeric.odeint">
+<link rel="prev" href="../index.html" title="Chapter 1. boost.sandbox.numeric.odeint">
+<link rel="next" href="short_example.html" title="Short Example">
+</head>
+<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="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="short_example.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="odeint.overview"></a><a class="link" href="overview.html" title="Overview">Overview</a>
+</h2></div></div></div>
+<p>
+ Odeint is a library for solving initial value problems (IVP) of ordinary differential
+ equations. Mathematically, these problems are formulated as follows: <span class="bold"><strong>x'(t) = f(x,t)</strong></span>, <span class="bold"><strong>x(0) = x0</strong></span>.
+ <span class="bold"><strong>x</strong></span> and <span class="bold"><strong>f</strong></span> can
+ be vectors and the solution is some function <span class="bold"><strong>x(t)</strong></span>
+ fullfilling both equations above. Numerical approximations for the solution
+ x(t) are calculated iteratively. The easiest algorithm is the <span class="emphasis"><em>Euler-Scheme</em></span>,
+ where starting at x(0) one finds x(dt) = x(0) + dt*f(x(0),0). Now one can use
+ x(dt) and obtain x(2dt) in a similar way and so on. The Euler method is of
+ order 1, that means the error at each step is ~ dt[superscript 2]. This is,
+ of course, not very satisfying, which is why the Euler method is merely used
+ for real life problems and serves just as illustrative example. In <span class="bold"><strong>odeint</strong></span>, the following algorithms are implemented:
+ </p>
+<div class="table">
+<a name="id533054"></a><p class="title"><b>Table 1.1. Stepper Algorithms</b></p>
+<div class="table-contents"><table class="table" summary="Stepper Algorithms">
+<colgroup>
+<col>
+<col>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th>
+ <p>
+ Method
+ </p>
+ </th>
+<th>
+ <p>
+ Class
+ </p>
+ </th>
+<th>
+ <p>
+ Order
+ </p>
+ </th>
+<th>
+ <p>
+ Error Estimation
+ </p>
+ </th>
+</tr></thead>
+<tbody>
+<tr>
+<td>
+ <p>
+ Euler
+ </p>
+ </td>
+<td>
+ <p>
+ stepper_euler
+ </p>
+ </td>
+<td>
+ <p>
+ 1
+ </p>
+ </td>
+<td>
+ <p>
+ No
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Runge-Kutta 4
+ </p>
+ </td>
+<td>
+ <p>
+ stepper_rk4
+ </p>
+ </td>
+<td>
+ <p>
+ 4
+ </p>
+ </td>
+<td>
+ <p>
+ No
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Runge-Kutta Cash-Karp
+ </p>
+ </td>
+<td>
+ <p>
+ stepper_rk5_ck
+ </p>
+ </td>
+<td>
+ <p>
+ 5
+ </p>
+ </td>
+<td>
+ <p>
+ Yes (Order 4)
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Runge-Kutta Fehlberg
+ </p>
+ </td>
+<td>
+ <p>
+ stepper_rk78_fehlberg
+ </p>
+ </td>
+<td>
+ <p>
+ 7
+ </p>
+ </td>
+<td>
+ <p>
+ Yes (Order 8)
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Midpoint
+ </p>
+ </td>
+<td>
+ <p>
+ stepper_midpoint
+ </p>
+ </td>
+<td>
+ <p>
+ variable
+ </p>
+ </td>
+<td>
+ <p>
+ No
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Bulirsch-Stoer
+ </p>
+ </td>
+<td>
+ <p>
+ controlled_stepper_bs
+ </p>
+ </td>
+<td>
+ <p>
+ variable
+ </p>
+ </td>
+<td>
+ <p>
+ Controlled
+ </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 © 2009 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 http://www.boost.org/LICENSE_1_0.txt)
+ </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="short_example.html"><img src="../images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>
Added: sandbox/odeint/branches/karsten/libs/numeric/odeint/doc/html/odeint/short_example.html
==============================================================================
--- (empty file)
+++ sandbox/odeint/branches/karsten/libs/numeric/odeint/doc/html/odeint/short_example.html 2011-01-28 04:29:22 EST (Fri, 28 Jan 2011)
@@ -0,0 +1,137 @@
+<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 1. boost.sandbox.numeric.odeint">
+<link rel="up" href="../index.html" title="Chapter 1. boost.sandbox.numeric.odeint">
+<link rel="prev" href="overview.html" title="Overview">
+<link rel="next" href="../boost_sandbox_numeric_odeint/tutorial.html" title="Tutorial">
+</head>
+<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="p" href="overview.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="../boost_sandbox_numeric_odeint/tutorial.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="odeint.short_example"></a><a class="link" href="short_example.html" title="Short Example">Short Example</a>
+</h2></div></div></div>
+<p>
+ This section gives a quick introduction to the most important features of the
+ library using a number of instructive examples. Image, for example, you want
+ to numerically integrate a harmonic oscillator with friction. The equations
+ of motion are given by x'' = -x + gamma x'. This can be transformed to a system
+ of two first-order differential equations with new variables x and p=x'. To
+ apply numerical integration one first has to design the right hand side of
+ the equation w' = f(w) where in this case w = (x,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>
+
+<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">&</span><span class="identifier">x</span><span class="special">,</span> <span class="identifier">state_type</span> <span class="special">&</span><span class="identifier">dxdt</span><span class="special">,</span> <span class="keyword">const</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">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 <span class="bold"><strong>vector<double></strong></span> as the
+ state type, but others are also possible, for example <span class="bold"><strong>tr1/array<double,2></strong></span>.
+ Odeint is designed in such a way that it works with basically any container
+ that can be accessed via iterators. The parameter structure of the function
+ is crucial: the integration methods will always call them in the form <span class="bold"><strong>f(x, dxdt, t)</strong></span>. So even if there is no explicit time
+ dependence, one has to define <span class="bold"><strong>t</strong></span> 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 stepsize. The results are stored into
+ two InsertIterators (time and state) that must be provided.
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><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>
+<span class="identifier">vector</span><span class="special"><</span><span class="identifier">state_type</span><span class="special">></span> <span class="identifier">x_t_vec</span><span class="special">;</span>
+
+<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="identifier">back_inserter</span><span class="special">(</span> <span class="identifier">times</span> <span class="special">)</span> <span class="special">,</span>
+ <span class="identifier">back_inserter</span><span class="special">(</span> <span class="identifier">x_t_vec</span> <span class="special">)</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 x, the start- and end-time of the integration and
+ two InsertIterators for the times and states where the current time and the
+ current state after each timestep is stored. Note, that <code class="computeroutput">integrate</code>
+ uses an adaptive stepsize during the integration steps so the time points will
+ not be equally spaced. The integration returns the number of steps that were
+ applied. Note, that in total steps+1 elements will be inserted into times and
+ x_t_vec as the initial time and state are inserted before the first step.
+ </p>
+<p>
+ It is, of course, also possible to implement the ode system as a class. The
+ rhs must then be defined as the ()-operator:
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><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">&</span><span class="identifier">x</span><span class="special">,</span> <span class="identifier">state_type</span> <span class="special">&</span><span class="identifier">dxdt</span><span class="special">,</span> <span class="keyword">const</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">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>
+</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 © 2009 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 http://www.boost.org/LICENSE_1_0.txt)
+ </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="../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="../boost_sandbox_numeric_odeint/tutorial.html"><img src="../images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>
Added: sandbox/odeint/branches/karsten/libs/numeric/odeint/doc/html/standalone_HTML.manifest
==============================================================================
--- (empty file)
+++ sandbox/odeint/branches/karsten/libs/numeric/odeint/doc/html/standalone_HTML.manifest 2011-01-28 04:29:22 EST (Fri, 28 Jan 2011)
@@ -0,0 +1,7 @@
+index.html
+odeint/overview.html
+odeint/short_example.html
+boost_sandbox_numeric_odeint/tutorial.html
+boost_sandbox_numeric_odeint/extend_odeint.html
+boost_sandbox_numeric_odeint/concepts.html
+boost_sandbox_numeric_odeint/reference.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-01-28 04:29:22 EST (Fri, 28 Jan 2011)
@@ -1,235 +1,8 @@
[section Tutorial]
-[section Harmonic oscillator]
-
-[section Define the ODE]
-First of all, you have to specify the datatype that represents a state of your
-system [*x]. Mathematically, this usually is an n-dimensional vector with
-real numbers or complex numbers as scalar objects. For odeint the most natural
-way is to use `vector< double >` or `vector< complex< double > >` to represent
-the system state. However, odeint can deal with other container types as well, e.g. `tr1/array< double , N >` as long as it is able to obtain
-a ForwardIterator going through all of the container's elements. The scalar type
-must have several operations ( + , - , += , -= ) and the `abs()`-function defined.
-Furthermore, one can choose the datatype of the time (that is, the parameter to
-which respect the differentiation is done). The standard type for this is
-`double`, but it should be possible to use, for example, `complex< double >` as
-well (untested). It must be possible to multiply the time type and the scalar
-type of the vector. For the most cases `vector< double >` as state type and the
-standard `double` for the time type should be sufficient.
-
-To integrate a differential equation numerically, one has to define the rhs of
-the equation ['x' = f(x)]. In odeint you supply this function in terms of
-an object that implements the ()-operator with a certain parameter structure.
-Hence, the straight forward way would be to just define a function, e.g:
-
-[rhs_function]
-
-The parameters of the function must follow the example above where [*x] is the
-current state, [*dxdt] is the derivative ['x'] and should be filled by the
-function with ['f(x)] and [*t] is the current time.
-
-A more sophisticated approach is to implement the system as a class where the
-rhs function is defined as the ()-operator of the class with the same parameter
-structure as above:
-
-[rhs_class]
-
-odeint can deal with instances of such classes instead of pure functions which
-allows for cleaner code.
-
-[endsect]
-
-[section Stepper Types]
-
-Numerical integration works iteratively, that means you start at a state ['x(t)]
-and performs a timestep of length ['dt] to obtain the approximate state
-['x(t+dt)]. There exist many different methods to perform such a timestep each
-of which has a certain order ['q]. If the order of a method is ['q] than it is
-accurate up to term ['~dt^q] that means the error in ['x] made by such a step
-is ['~dt^(q+1)]. odeint provides several steppers of different orders from which
-you can choose. There are three types of steppers: [*Stepper], [*ErrorStepper]
-and [*ControlledStepper].
-
-[table Stepper Algorithms
- [[Method] [Class] [Order] [Error Estimation]]
- [[Euler] [stepper_euler] [1] [No]]
- [[Runge-Kutta 4] [stepper_rk4] [4] [No]]
- [[Runge-Kutta Cash-Karp] [stepper_rk5_ck] [5] [Yes (Order 4)]]
- [[Runge-Kutta Fehlberg] [stepper_rk78_fehlberg] [7] [Yes (Order 8)]]
- [[Midpoint] [stepper_midpoint] [variable] [No]]
- [[Bulirsch-Stoer] [controlled_stepper_bs] [variable] [Controlled]]
-]
-
-[endsect]
-
-[section Integration with Constant Step Size]
-
-The basic stepper just performs one timestep and doesn't give you any
-information about the error that was made (except that you know it is of order
-q+1). Such steppers are used with constant step size that should be chosen small
-enough to have reasonable small errors. However, you should apply some sort of
-validity check of your results (such as observing conserved quantities) becasue
-you have no other control of the error. The following example defines a basic
-stepper based on the classical Runge-Kutta scheme of 4th order.
-
-[define_const_stepper]
-
-The declaration of the stepper requires the state type as template parameter.
-The integration can now be done by using the `integrate_const( Stepper, System,
- state, start_time, end_time, step_size )` function from odeint:
-
-[integrate_const]
-
-This call integrates the system defined by `harmonic_oscillator` using the rk4
-method from t=0 to 10 with a stepsize dt=0.01 and the initial condition given
-in `x`. The result, ['x(t=10)] is stored in `x` (in-place).
-
-[endsect]
-
-[section Integration with Adaptive Step Size]
-
-To improve the numerical results and additionally minimize the computational
-effort, the application of a step size control is advisable.
-Step size control is realized via stepper algorithms that additionally provide an
-error estimation of the applied step.
-Odeint provides a number of such *ErrorSteppers* and we will show their usage on
-the example of stepper_rk5_ck -- a 5th order Runge-Kutta method with 4th order
-error estimation and coefficients introduced by Cash-Karp.
-
-[define_adapt_stepper]
-
-Given the error stepper, one still needs an instance that checks the error and
-adjusts the step size accordingly.
-In odeint, this is done by *ControlledSteppers*.
-The usual way to create a controlled stepper is via the
-`make_controlled_stepper_standard( ErrorStepper , eps_abs , eps_rel , a_x , a_dxdt )`
-function that takes an error stepper as parameter and four values defining the maximal
-absolute and relative error allowed for one integration step.
-The standard controlled stepper created by this method ensures that the error ['err]
-of the solution fulfills
-['err < eps_abs + eps_rel * ( a_x * |x| + a_dxdt * dt * |dxdt| ) ]
-by decreasesing the step size. Note, that the stepsize is also increased if the error
-gets too small compared to the rhs of the above relation.
-Now we have everything needed to integrate the harmonic oscillator using an adaptive
-step size method.
-Similar to the case with constant step size above, there exists a `integrate_adaptive`
-function with a similar parameter structure, but it requires the controlled stepper
-create by `make_controlled_stepper_standard`.
-
-[integrate_adapt]
-
-As above, this integrates the system defined by `harmonic_oscillator` using an adaptive
-step size method based on the rk5_ck scheme from t=0 to 10 with an initial step size of
-dt=0.01 (will be adjusted) and the initial condition given in x. The result, x(t=10), will
-also be stored in x (in-place).
-
-[endsect]
-
-[endsect]
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-[section Solar system]
-
-[section Gravitation and energy conservation]
-
-The next example in this tutorial is a simulation of the solar system. In the
-solar system each planet, and of course also the sun will be represented by
-mass points. The interaction force between each object is the gravitational
-force which can be written as
-
-F_ij = -gamma m_i m_j (q_i-q_j)/|q_i-q_j|^3
-
-where gamma is the gravitational constant, m_i and m_j are the masses and q_i
-and q_j are the locations of the two objects. The equations of motion are then
-
-dq_i/dt = p_i
-dp_i/dt = 1/m_i sum_ji F_ij
-
-where pi is the momenta of object i. The equations of motion can also be
-derived from the Hamiltonian
-
-H = sum_i p_i^2/(2m_i) + sum_j V( qi , qj )
-
-with the interaction potential V(q_i,q_j). The Hamiltonian equations give the
-equations of motion
-
-dq_i/dt = dH/dp_i
-
-dp_i = -dH/dq_i.
-
-In time independent Hamiltonian system the energy is conserved and special
-integration methods have to be applied in order to ensure energy
-conservation. The odeint library provides classes for Hamiltonian
-systems, which are separable and can be written in the form H = sum p_i^2/2m_i +
-Hq(q), where Hq(q) only depends on the coordinates.
-
-hamiltonian_stepper_euler
-hamiltonian_stepper_rk
-
-Alltough 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 dqi=mi pi dpi=f(qi).
-
-[endsect]
-
-
-[section Define the system function]
-
-To implement this system we define a point type which will represent the space
-as well as the velocity. Therefore, we use the operators from
-<boost/operator.hpp>:
-
-[import ../examples/point_type.hpp]
-[point_type]
-
-
-The next step is to define a container type storing the values of q and p and
-to define systems (derivative) functions. As container type we use
-std::tr1::array and the state type is then simply
-
-[import ../examples/solar_system.cpp]
-[state_type_definition]
-
-and represents all space coordinates q or all momenta coordinates p. As system
-function we have to provide f(p) = dq and f(q) = -dp, which acts only on p or q:
-
-
-[momentum_function]
-
-[coordinate_function]
-
-In general a three body-system is chaotic, hence we can not expect that
-arbitray 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.
-
-Now, we use the rk stepper to integrate the solar system. To visualize the
-motion we save the trajectory of each planet in a circular buffer. The output
-can be piped directly into gnuplot and a very nice visualization of the motion
-appears.
-
-[integration_solar_system]
-
-[endsect]
-
-[endsect]
-
-
-
+[include tutorial_harmonic_oscillator.qbk]
+[include tutorial_solar_system.qbk]
[section Stiff systems]
Modified: sandbox/odeint/branches/karsten/libs/numeric/odeint/regression_test/Jamfile
==============================================================================
--- sandbox/odeint/branches/karsten/libs/numeric/odeint/regression_test/Jamfile (original)
+++ sandbox/odeint/branches/karsten/libs/numeric/odeint/regression_test/Jamfile 2011-01-28 04:29:22 EST (Fri, 28 Jan 2011)
@@ -23,4 +23,8 @@
exe dense_output_stepper_evolution
: dense_output_stepper_evolution.cpp
+ ;
+
+exe dense_output_explict
+ : dense_output_explicit.cpp
;
\ No newline at end of file
Added: sandbox/odeint/branches/karsten/libs/numeric/odeint/regression_test/dense_output_explicit.cpp
==============================================================================
--- (empty file)
+++ sandbox/odeint/branches/karsten/libs/numeric/odeint/regression_test/dense_output_explicit.cpp 2011-01-28 04:29:22 EST (Fri, 28 Jan 2011)
@@ -0,0 +1,26 @@
+/*
+ * dense_output_explicit.cpp
+ *
+ * Created on: Jan 28, 2011
+ * Author: karsten
+ */
+
+#include <iostream>
+#include <vector>
+
+#include <boost/numeric/odeint/stepper/explicit_euler.hpp>
+#include <boost/numeric/odeint/stepper/dense_output_explicit.hpp>
+
+using namespace std;
+using namespace boost::numeric::odeint;
+
+typedef std::vector< double > state_type;
+typedef explicit_euler< state_type > explicit_stepper_type;
+typedef dense_output_explicit< stepper_type > stepper_type;
+
+int main( int argc , char **argv )
+{
+ stepper_type stepper;
+
+ 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