Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r68547 - in sandbox/odeint/branches/karsten: . boost/numeric 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/ideas libs/numeric/odeint/ideas/butcher libs/numeric/odeint/ideas/generic_stepper libs/numeric/odeint/ideas/rosenbrock4 libs/numeric/odeint/regression_test
From: karsten.ahnert_at_[hidden]
Date: 2011-01-29 13:16:25


Author: karsten
Date: 2011-01-29 13:16:20 EST (Sat, 29 Jan 2011)
New Revision: 68547
URL: http://svn.boost.org/trac/boost/changeset/68547

Log:
* dense output dopri refactored
* some small file renaming
* doc ideas
Added:
   sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/controlled_step_result.hpp (contents, props changed)
      - copied, changed from r68544, /sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/controlled_stepper_result.hpp
Removed:
   sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/controlled_stepper_result.hpp
   sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/dense_output_dopri5.hpp
   sandbox/odeint/branches/karsten/libs/numeric/odeint/ideas/dense_output.cpp
   sandbox/odeint/branches/karsten/libs/numeric/odeint/regression_test/dense_output_dopri5.cpp
Text files modified:
   sandbox/odeint/branches/karsten/TODO | 6 +-
   sandbox/odeint/branches/karsten/boost/numeric/odeint.hpp | 2
   sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/controlled_error_stepper.hpp | 2
   sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/controlled_step_result.hpp | 2
   sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/dense_output_controlled_explicit_fsal.hpp | 10 ++
   sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/explicit_error_dopri5.hpp | 5 -
   sandbox/odeint/branches/karsten/libs/numeric/odeint/doc/html/boost_sandbox_numeric_odeint/concepts.html | 19 ++++++
   sandbox/odeint/branches/karsten/libs/numeric/odeint/doc/html/boost_sandbox_numeric_odeint/reference.html | 2
   sandbox/odeint/branches/karsten/libs/numeric/odeint/doc/html/boost_sandbox_numeric_odeint/tutorial.html | 118 ++++++++++++++++++++++++++++++---------
   sandbox/odeint/branches/karsten/libs/numeric/odeint/doc/html/index.html | 19 +++---
   sandbox/odeint/branches/karsten/libs/numeric/odeint/doc/tutorial.qbk | 51 +++++++++++++++-
   sandbox/odeint/branches/karsten/libs/numeric/odeint/ideas/butcher/butcher_lorenz.cpp | 2
   sandbox/odeint/branches/karsten/libs/numeric/odeint/ideas/butcher/butcher_performance.cpp | 2
   sandbox/odeint/branches/karsten/libs/numeric/odeint/ideas/butcher/butcher_vdp.cpp | 2
   sandbox/odeint/branches/karsten/libs/numeric/odeint/ideas/generic_stepper/performance.cpp | 2
   sandbox/odeint/branches/karsten/libs/numeric/odeint/ideas/generic_stepper/performance_odeint.cpp | 2
   sandbox/odeint/branches/karsten/libs/numeric/odeint/ideas/generic_stepper/rk_test.cpp | 2
   sandbox/odeint/branches/karsten/libs/numeric/odeint/ideas/rosenbrock4/rosenbrock4.cpp | 3
   sandbox/odeint/branches/karsten/libs/numeric/odeint/ideas/rosenbrock4/rosenbrock4.hpp | 2
   sandbox/odeint/branches/karsten/libs/numeric/odeint/ideas/rosenbrock4/rosenbrock4_stepper.cpp | 2
   sandbox/odeint/branches/karsten/libs/numeric/odeint/regression_test/Jamfile | 4 -
   sandbox/odeint/branches/karsten/libs/numeric/odeint/regression_test/dense_output_controlled_explicit_fsal.cpp | 47 +++++++++++++++
   sandbox/odeint/branches/karsten/libs/numeric/odeint/regression_test/dense_output_stepper_evolution.cpp | 24 +++++--
   23 files changed, 255 insertions(+), 75 deletions(-)

Modified: sandbox/odeint/branches/karsten/TODO
==============================================================================
--- sandbox/odeint/branches/karsten/TODO (original)
+++ sandbox/odeint/branches/karsten/TODO 2011-01-29 13:16:20 EST (Sat, 29 Jan 2011)
@@ -22,11 +22,11 @@
   * check if rosenbrock controller and controlled_stepper can both be used with the explicit steppers
   OK * move error_checker into controlled_stepper
   * rename controlled_stepper to a more specific name
-DIFICULT * change dense_output to units
+OK * change dense_output to units
   OK * roll out dense_output_explicit_euler::calc_state() to explicit_euler::dense_output()
- * roll out dense_output_dopri5::calc_state() to explicit_error_dopri5::dense_output()
+ OK * roll out dense_output_dopri5::calc_state() to explicit_error_dopri5::dense_output()
   OK * create dense_output_explicit
- * create dense_output_explicit_controlled_fsal
+ OK * create dense_output_explicit_controlled_fsal
 * split check_concepts into check_stepper_concept, check_error_stepper_concept, check_controlled_stepper_concept
 * file cleanup
    * split resizing and copy/destruct/construct in different files

Modified: sandbox/odeint/branches/karsten/boost/numeric/odeint.hpp
==============================================================================
--- sandbox/odeint/branches/karsten/boost/numeric/odeint.hpp (original)
+++ sandbox/odeint/branches/karsten/boost/numeric/odeint.hpp 2011-01-29 13:16:20 EST (Sat, 29 Jan 2011)
@@ -26,7 +26,7 @@
 #include <boost/numeric/odeint/stepper/controlled_error_stepper.hpp>
 
 #include <boost/numeric/odeint/stepper/dense_output_explicit.hpp>
-#include <boost/numeric/odeint/stepper/dense_output_dopri5.hpp>
+#include <boost/numeric/odeint/stepper/dense_output_controlled_explicit_fsal.hpp>
 
 /*
  * Including this algebra slows down the compilation time

Modified: sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/controlled_error_stepper.hpp
==============================================================================
--- sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/controlled_error_stepper.hpp (original)
+++ sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/controlled_error_stepper.hpp 2011-01-29 13:16:20 EST (Sat, 29 Jan 2011)
@@ -18,7 +18,7 @@
 #include <boost/ref.hpp>
 
 #include <boost/numeric/odeint/stepper/size_adjuster.hpp>
-#include <boost/numeric/odeint/stepper/controlled_stepper_result.hpp>
+#include <boost/numeric/odeint/stepper/controlled_step_result.hpp>
 #include <boost/numeric/odeint/stepper/stepper_categories.hpp>
 #include <boost/numeric/odeint/algebra/range_algebra.hpp>
 #include <boost/numeric/odeint/algebra/default_operations.hpp>

Copied: sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/controlled_step_result.hpp (from r68544, /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_step_result.hpp 2011-01-29 13:16:20 EST (Sat, 29 Jan 2011)
@@ -1,5 +1,5 @@
 /*
- * controlled_stepper_result.hpp
+ * controlled_step_result.hpp
  *
  * Created on: Jan 27, 2011
  * Author: karsten

Deleted: sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/controlled_stepper_result.hpp
==============================================================================
--- sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/controlled_stepper_result.hpp 2011-01-29 13:16:20 EST (Sat, 29 Jan 2011)
+++ (empty file)
@@ -1,27 +0,0 @@
-/*
- * controlled_stepper_result.hpp
- *
- * Created on: Jan 27, 2011
- * Author: karsten
- */
-
-#ifndef BOOST_NUMERIC_ODEINT_STEPPER_CONTROLLED_STEPPER_RESULT_HPP_
-#define BOOST_NUMERIC_ODEINT_STEPPER_CONTROLLED_STEPPER_RESULT_HPP_
-
-
-namespace boost {
-namespace numeric {
-namespace odeint {
-
-typedef enum
-{
- success_step_size_unchanged ,
- step_size_decreased ,
- success_step_size_increased
-} controlled_step_result;
-
-} // namespace odeint
-} // numeric
-} // boost
-
-#endif /* BOOST_NUMERIC_ODEINT_STEPPER_CONTROLLED_STEPPER_RESULT_HPP_ */

Modified: sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/dense_output_controlled_explicit_fsal.hpp
==============================================================================
--- sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/dense_output_controlled_explicit_fsal.hpp (original)
+++ sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/dense_output_controlled_explicit_fsal.hpp 2011-01-29 13:16:20 EST (Sat, 29 Jan 2011)
@@ -12,6 +12,7 @@
 #include <stdexcept>
 
 #include <boost/numeric/odeint/stepper/size_adjuster.hpp>
+#include <boost/numeric/odeint/stepper/controlled_step_result.hpp>
 
 namespace boost {
 namespace numeric {
@@ -34,8 +35,8 @@
                 boost::numeric::odeint::construct( m_dxdt2 );
                 m_state_adjuster.register_state( 0 , m_x1 );
                 m_state_adjuster.register_state( 1 , m_x2 );
- m_deriv_adjuster.register_state( 0 , m_x1 );
- m_deriv_adjuster.register_state( 1 , m_x2 );
+ m_deriv_adjuster.register_state( 0 , m_dxdt1 );
+ m_deriv_adjuster.register_state( 1 , m_dxdt2 );
         }
 
         void copy_variables( const dense_output_controlled_explicit_fsal &dense_output )
@@ -195,6 +196,11 @@
                 return m_t_old;
         }
 
+ const time_type& current_time_step( void ) const
+ {
+ return m_dt;
+ }
+
 
 private:
 

Deleted: sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/dense_output_dopri5.hpp
==============================================================================
--- sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/dense_output_dopri5.hpp 2011-01-29 13:16:20 EST (Sat, 29 Jan 2011)
+++ (empty file)
@@ -1,234 +0,0 @@
-/*
- boost header: boost/numeric/odeint/dense_output_dopri5.hpp
-
- Copyright 2009 Karsten Ahnert
- Copyright 2009 Mario Mulansky
-
- 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)
-*/
-
-#ifndef BOOST_BOOST_NUMERIC_ODEINT_DENSE_OUTPUT_DOPRI5_HPP_INCLUDED
-#define BOOST_BOOST_NUMERIC_ODEINT_DENSE_OUTPUT_DOPRI5_HPP_INCLUDED
-
-//#include <iostream>
-//#define tab "\t"
-//using std::cout;
-//using std::cerr;
-//using std::clog;
-//using std::endl;
-
-#include <stdexcept>
-
-#include <boost/static_assert.hpp>
-#include <boost/type_traits.hpp>
-#include <boost/ref.hpp>
-
-#include <boost/numeric/odeint/stepper/controlled_stepper_result.hpp>
-#include <boost/numeric/odeint/stepper/explicit_error_dopri5.hpp>
-
-namespace boost {
-namespace numeric {
-namespace odeint {
-
-
-template< class ControlledStepper >
-class dense_output_dopri5
-{
-public:
-
- typedef ControlledStepper stepper_type;
-
- typedef typename stepper_type::stepper_type dopri5_type;
- typedef typename dopri5_type::state_type state_type;
- typedef typename dopri5_type::value_type value_type;
- typedef typename dopri5_type::deriv_type deriv_type;
- typedef typename dopri5_type::time_type time_type;
- typedef typename dopri5_type::algebra_type algebra_type;
- typedef typename dopri5_type::operations_type operations_type;
- typedef typename dopri5_type::adjust_size_policy adjust_size_policy;
-
- BOOST_STATIC_ASSERT(( boost::is_same<
- dopri5_type ,
- explicit_error_dopri5< state_type , value_type , deriv_type , time_type , algebra_type , operations_type , adjust_size_policy >
- >::value ));
-
- dense_output_dopri5( stepper_type &stepper )
- : m_stepper( stepper ) , m_size_adjuster() ,
- m_x1() , m_x2() , m_dxdt1() , m_dxdt2() ,
- m_current_state( &m_x1 ) , m_old_state( &m_x2 ) ,
- m_current_deriv( &m_dxdt1 ) , m_old_deriv( &m_dxdt2 ) ,
- m_t( 0.0 ) , m_t_old( 0.0 ) , m_dt( 1.0 ) ,
- m_is_deriv_initialized( false )
- {
- boost::numeric::odeint::construct( m_x1 );
- boost::numeric::odeint::construct( m_x2 );
- boost::numeric::odeint::construct( m_dxdt1 );
- boost::numeric::odeint::construct( m_dxdt2 );
- m_size_adjuster.register_state( 0 , m_x1 );
- m_size_adjuster.register_state( 1 , m_x2 );
- m_size_adjuster.register_state( 1 , m_dxdt1);
- m_size_adjuster.register_state( 1 , m_dxdt2 );
- }
-
- ~dense_output_dopri5( void )
- {
- boost::numeric::odeint::destruct( m_x1 );
- boost::numeric::odeint::destruct( m_x2 );
- boost::numeric::odeint::destruct( m_dxdt1 );
- boost::numeric::odeint::destruct( m_dxdt2 );
- }
-
- void adjust_size( const state_type &x )
- {
- m_size_adjuster.adjust_size( x );
- m_stepper.adjust_size( x );
- m_is_deriv_initialized = false;
- }
-
- 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;
- m_is_deriv_initialized = false;
- }
-
- template< class System >
- std::pair< time_type , time_type > do_step( System system )
- {
- const size_t max_count = 1000;
-
- if( !m_is_deriv_initialized )
- {
- typename boost::unwrap_reference< System >::type &sys = system;
- sys( *m_current_state , *m_current_deriv , m_t );
- m_is_deriv_initialized = true;
- }
-
- controlled_step_result res = step_size_decreased;
- m_t_old = m_t;
- size_t count = 0;
- do
- {
- res = m_stepper.try_step( system , *m_current_state , *m_current_deriv , m_t , *m_old_state , *m_old_deriv , m_dt );
- if( count++ == max_count )
- throw std::overflow_error( "dense_output_dopri5 : too much iterations!");
- }
- while( res == step_size_decreased );
- std::swap( m_current_state , m_old_state );
- std::swap( m_current_deriv , m_old_deriv );
- return std::make_pair( m_t_old , m_t );
- }
-
- /*
- * Calculates Dense-Output for Dopri5
- *
- * See Hairer, Norsett, Wanner: Solving Ordinary Differential Equations, Nonstiff Problems. I, p.191/192
- *
- * y(t+theta) = y(t) + h * sum_i^7 b_i(theta) * k_i
- *
- * A = theta^2 * ( 3 - 2 theta )
- * B = theta^2 * ( theta - 1 )
- * C = theta^2 * ( theta - 1 )^2
- * D = theta * ( theta - 1 )^2
- *
- * b_1( theta ) = A * b_1 - C * X1( theta ) + D
- * b_2( theta ) = 0
- * b_3( theta ) = A * b_3 + C * X3( theta )
- * b_4( theta ) = A * b_4 - C * X4( theta )
- * b_5( theta ) = A * b_5 + C * X5( theta )
- * b_6( theta ) = A * b_6 - C * X6( theta )
- * b_7( theta ) = B + C * X7( theta )
- *
- * An alternative Method is described in:
- *
- * www-m2.ma.tum.de/homepages/simeon/numerik3/kap3.ps
- */
- void calc_state( time_type t , state_type &x )
- {
- const time_type b1 = static_cast<time_type> ( 35.0 ) / static_cast<time_type>( 384.0 );
- const time_type b3 = static_cast<time_type> ( 500.0 ) / static_cast<time_type>( 1113.0 );
- const time_type b4 = static_cast<time_type> ( 125.0 ) / static_cast<time_type>( 192.0 );
- const time_type b5 = static_cast<time_type> ( -2187.0 ) / static_cast<time_type>( 6784.0 );
- const time_type b6 = static_cast<time_type> ( 11.0 ) / static_cast<time_type>( 84.0 );
-
- time_type dt = ( m_t - m_t_old );
- time_type theta = ( t - m_t_old ) / dt;
- time_type X1 = static_cast< time_type >( 5.0 ) * ( static_cast< time_type >( 2558722523.0 ) - static_cast< time_type >( 31403016.0 ) * theta ) / static_cast< time_type >( 11282082432.0 );
- time_type X3 = static_cast< time_type >( 100.0 ) * ( static_cast< time_type >( 882725551.0 ) - static_cast< time_type >( 15701508.0 ) * theta ) / static_cast< time_type >( 32700410799.0 );
- time_type X4 = static_cast< time_type >( 25.0 ) * ( static_cast< time_type >( 443332067.0 ) - static_cast< time_type >( 31403016.0 ) * theta ) / static_cast< time_type >( 1880347072.0 ) ;
- time_type X5 = static_cast< time_type >( 32805.0 ) * ( static_cast< time_type >( 23143187.0 ) - static_cast< time_type >( 3489224.0 ) * theta ) / static_cast< time_type >( 199316789632.0 );
- time_type X6 = static_cast< time_type >( 55.0 ) * ( static_cast< time_type >( 29972135.0 ) - static_cast< time_type >( 7076736.0 ) * theta ) / static_cast< time_type >( 822651844.0 );
- time_type X7 = static_cast< time_type >( 10.0 ) * ( static_cast< time_type >( 7414447.0 ) - static_cast< time_type >( 829305.0 ) * theta ) / static_cast< time_type >( 29380423.0 );
-
- time_type theta_m_1 = theta - static_cast< time_type >( 1.0 );
- time_type theta_sq = theta * theta;
- time_type A = theta_sq * ( static_cast< time_type >( 3.0 ) - static_cast< time_type >( 2.0 ) * theta );
- time_type B = theta_sq * theta_m_1;
- time_type C = theta_sq * theta_m_1 * theta_m_1;
- time_type D = theta * theta_m_1 * theta_m_1;
-
- time_type b1_theta = A * b1 - C * X1 + D;
- time_type b3_theta = A * b3 + C * X3;
- time_type b4_theta = A * b4 - C * X4;
- time_type b5_theta = A * b5 + C * X5;
- time_type b6_theta = A * b6 - C * X6;
- time_type b7_theta = B + C * X7;
-
- const state_type &k1 = *m_old_deriv;
- const state_type &k3 = dopri5().m_k3;
- const state_type &k4 = dopri5().m_k4;
- const state_type &k5 = dopri5().m_k5;
- const state_type &k6 = dopri5().m_k6;
- const state_type &k7 = *m_current_deriv;
-
- typename algebra_type::for_each8()( x , *m_old_state , k1 , k3 , k4 , k5 , k6 , k7 ,
- typename operations_type::template scale_sum7< time_type , time_type , time_type , time_type , time_type , time_type , time_type >( 1.0 , dt * b1_theta , dt * b3_theta , dt * b4_theta , dt * b5_theta , dt * b6_theta , dt * b7_theta ) );
- }
-
- 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:
-
- dopri5_type& dopri5( void ) { return m_stepper.stepper(); }
- const dopri5_type& dopri5( void ) const { return m_stepper.stepper(); }
-
-
-
- stepper_type &m_stepper;
- size_adjuster< state_type , 4 > m_size_adjuster;
- state_type m_x1 , m_x2 , m_dxdt1 , m_dxdt2;
- state_type *m_current_state , *m_old_state;
- state_type *m_current_deriv , *m_old_deriv;
- time_type m_t , m_t_old , m_dt;
- bool m_is_deriv_initialized;
-
-
-};
-
-} // namespace odeint
-} // namespace numeric
-} // namespace boost
-
-#endif //BOOST_BOOST_NUMERIC_ODEINT_DENSE_OUTPUT_DOPRI5_HPP_INCLUDED

Modified: sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/explicit_error_dopri5.hpp
==============================================================================
--- sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/explicit_error_dopri5.hpp (original)
+++ sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/explicit_error_dopri5.hpp 2011-01-29 13:16:20 EST (Sat, 29 Jan 2011)
@@ -74,9 +74,6 @@
 
 public :
 
- template< class ControlledStepper >
- friend class dense_output_dopri5;
-
         BOOST_ODEINT_EXPLICIT_STEPPERS_AND_ERROR_STEPPERS_FSAL_TYPEDEFS( explicit_error_dopri5 , 5 , 5 , 4 );
 
         typedef explicit_error_stepper_fsal_tag stepper_category;
@@ -277,7 +274,7 @@
 // const state_type &k6 = dopri5().m_k6;
 // const state_type &k7 = *m_current_deriv;
 
- typename algebra_type::for_each8()( x , *x_old , *deriv_old , m_k3 , m_k4 , m_k5 , m_k6 , deriv_new ,
+ typename algebra_type::for_each8()( x , x_old , deriv_old , m_k3 , m_k4 , m_k5 , m_k6 , deriv_new ,
                         typename operations_type::template scale_sum7< value_type , time_type , time_type , time_type , time_type , time_type , time_type >( 1.0 , dt * b1_theta , dt * b3_theta , dt * b4_theta , dt * b5_theta , dt * b6_theta , dt * b7_theta ) );
         }
 

Modified: sandbox/odeint/branches/karsten/libs/numeric/odeint/doc/html/boost_sandbox_numeric_odeint/concepts.html
==============================================================================
--- sandbox/odeint/branches/karsten/libs/numeric/odeint/doc/html/boost_sandbox_numeric_odeint/concepts.html (original)
+++ sandbox/odeint/branches/karsten/libs/numeric/odeint/doc/html/boost_sandbox_numeric_odeint/concepts.html 2011-01-29 13:16:20 EST (Sat, 29 Jan 2011)
@@ -26,6 +26,11 @@
       stepper</a></span></dt>
 <dt><span class="section"><a href="concepts.html#boost_sandbox_numeric_odeint.concepts.controlled_stepper">Controlled
       stepper</a></span></dt>
+<dt><span class="section"><a href="concepts.html#boost_sandbox_numeric_odeint.concepts.dense_ouput_stepper">Dense
+ ouput stepper</a></span></dt>
+<dt><span class="section"><a href="concepts.html#boost_sandbox_numeric_odeint.concepts.size_adjusting_stepper">Size
+ adjusting stepper</a></span></dt>
+<dt><span class="section">CompositeStepper</span></dt>
 </dl></div>
 <p>
       The odeint library defines three concepts for stepping objects.
@@ -728,6 +733,20 @@
           </li>
 </ul></div>
 </div>
+<div class="section"><div class="titlepage"><div><div><h3 class="title">
+<a name="boost_sandbox_numeric_odeint.concepts.dense_ouput_stepper"></a><a class="link" href="concepts.html#boost_sandbox_numeric_odeint.concepts.dense_ouput_stepper" title="Dense ouput stepper">Dense
+ ouput stepper</a>
+</h3></div></div></div></div>
+<div class="section"><div class="titlepage"><div><div><h3 class="title">
+<a name="boost_sandbox_numeric_odeint.concepts.size_adjusting_stepper"></a><a class="link" href="concepts.html#boost_sandbox_numeric_odeint.concepts.size_adjusting_stepper" title="Size adjusting stepper">Size
+ adjusting stepper</a>
+</h3></div></div></div></div>
+<div class="section"><div class="titlepage"><div><div><h3 class="title">
+<a name="boost_sandbox_numeric_odeint.concepts.compositestepper"></a><a class="link" href="concepts.html#boost_sandbox_numeric_odeint.concepts.compositestepper" title="CompositeStepper">CompositeStepper</a>
+</h3></div></div></div></div>
+<p>
+ see the wiki
+ </p>
 </div>
 <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
 <td align="left"></td>

Modified: sandbox/odeint/branches/karsten/libs/numeric/odeint/doc/html/boost_sandbox_numeric_odeint/reference.html
==============================================================================
--- sandbox/odeint/branches/karsten/libs/numeric/odeint/doc/html/boost_sandbox_numeric_odeint/reference.html (original)
+++ sandbox/odeint/branches/karsten/libs/numeric/odeint/doc/html/boost_sandbox_numeric_odeint/reference.html 2011-01-29 13:16:20 EST (Sat, 29 Jan 2011)
@@ -33,7 +33,7 @@
       classes</a>
 </h3></div></div></div>
 <div class="table">
-<a name="id578246"></a><p class="title"><b>Table&#160;1.3.&#160;Stepper Algorithms</b></p>
+<a name="id578400"></a><p class="title"><b>Table&#160;1.3.&#160;Stepper Algorithms</b></p>
 <div class="table-contents"><table class="table" summary="Stepper Algorithms">
 <colgroup>
 <col>

Modified: sandbox/odeint/branches/karsten/libs/numeric/odeint/doc/html/boost_sandbox_numeric_odeint/tutorial.html
==============================================================================
--- sandbox/odeint/branches/karsten/libs/numeric/odeint/doc/html/boost_sandbox_numeric_odeint/tutorial.html (original)
+++ sandbox/odeint/branches/karsten/libs/numeric/odeint/doc/html/boost_sandbox_numeric_odeint/tutorial.html 2011-01-29 13:16:20 EST (Sat, 29 Jan 2011)
@@ -24,16 +24,12 @@
       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.chaotic_systems_and_lyapunov_exponents">Chaotic
+ systems and Lyapunov exponents</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.different_steppers">Different
+ steppers</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>
@@ -506,8 +502,8 @@
 </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>
+<a name="boost_sandbox_numeric_odeint.tutorial.chaotic_systems_and_lyapunov_exponents"></a><a class="link" href="tutorial.html#boost_sandbox_numeric_odeint.tutorial.chaotic_systems_and_lyapunov_exponents" title="Chaotic systems and Lyapunov exponents">Chaotic
+ systems and Lyapunov exponents</a>
 </h3></div></div></div>
 <p>
         blah blah
@@ -515,8 +511,8 @@
 </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>
+<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
@@ -524,29 +520,23 @@
 </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>
+<a name="boost_sandbox_numeric_odeint.tutorial.different_steppers"></a><a class="link" href="tutorial.html#boost_sandbox_numeric_odeint.tutorial.different_steppers" title="Different steppers">Different
+ steppers</a>
 </h3></div></div></div>
 <p>
- blah blah
+ Explicit steppers
       </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
+ Implicit steppers
+ </p>
+<p>
+ Step size controll
       </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
+ dense output
+ </p>
+<p>
+ Overview and table
       </p>
 </div>
 <div class="section">
@@ -556,6 +546,76 @@
 </h3></div></div></div>
 <div class="section">
 <div class="titlepage"><div><div><h4 class="title">
+<a name="boost_sandbox_numeric_odeint.tutorial.special_topics.complex_state_types"></a><a class="link" href="tutorial.html#boost_sandbox_numeric_odeint.tutorial.special_topics.complex_state_types" title="Complex state types">Complex
+ state types</a>
+</h4></div></div></div>
+<p>
+ typedef vector&lt; complex&lt; double &gt; &gt; state_type;
+ </p>
+<p>
+ Stuart landau
+ </p>
+<p>
+ DNLS
+ </p>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="boost_sandbox_numeric_odeint.tutorial.special_topics.lattice_systems"></a><a class="link" href="tutorial.html#boost_sandbox_numeric_odeint.tutorial.special_topics.lattice_systems" title="Lattice systems">Lattice
+ systems</a>
+</h4></div></div></div>
+<p>
+ Fermi-Pasta-Ulam system
+ </p>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="boost_sandbox_numeric_odeint.tutorial.special_topics.partial_differential_equations"></a><a class="link" href="tutorial.html#boost_sandbox_numeric_odeint.tutorial.special_topics.partial_differential_equations" title="Partial differential equations">Partial
+ differential equations</a>
+</h4></div></div></div>
+<p>
+ Wave equation
+ </p>
+<p>
+ KdV
+ </p>
+<p>
+ Ginzburg-Landau
+ </p>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="boost_sandbox_numeric_odeint.tutorial.special_topics.using_boost__units"></a><a class="link" href="tutorial.html#boost_sandbox_numeric_odeint.tutorial.special_topics.using_boost__units" title="Using boost::units">Using
+ boost::units</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_cuda_and_thrust"></a><a class="link" href="tutorial.html#boost_sandbox_numeric_odeint.tutorial.special_topics.using_cuda_and_thrust" title="Using Cuda and Thrust">Using
+ Cuda and Thrust</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_matrices_as_state_types"></a><a class="link" href="tutorial.html#boost_sandbox_numeric_odeint.tutorial.special_topics.using_matrices_as_state_types" title="Using matrices as state types">Using
+ matrices as state types</a>
+</h4></div></div></div>
+<p>
+ Expanding resizing
+ </p>
+</div>
+<div class="section"><div class="titlepage"><div><div><h4 class="title">
+<a name="boost_sandbox_numeric_odeint.tutorial.special_topics.ordinary_differential_equations_on_networks"></a><a class="link" href="tutorial.html#boost_sandbox_numeric_odeint.tutorial.special_topics.ordinary_differential_equations_on_networks" title="Ordinary differential equations on networks">Ordinary
+ differential equations on networks</a>
+</h4></div></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>

Modified: sandbox/odeint/branches/karsten/libs/numeric/odeint/doc/html/index.html
==============================================================================
--- sandbox/odeint/branches/karsten/libs/numeric/odeint/doc/html/index.html (original)
+++ sandbox/odeint/branches/karsten/libs/numeric/odeint/doc/html/index.html 2011-01-29 13:16:20 EST (Sat, 29 Jan 2011)
@@ -40,16 +40,12 @@
       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.chaotic_systems_and_lyapunov_exponents">Chaotic
+ systems and Lyapunov exponents</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.different_steppers">Different
+ steppers</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>
@@ -71,6 +67,11 @@
       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>
+<dt><span class="section"><a href="boost_sandbox_numeric_odeint/concepts.html#boost_sandbox_numeric_odeint.concepts.dense_ouput_stepper">Dense
+ ouput stepper</a></span></dt>
+<dt><span class="section"><a href="boost_sandbox_numeric_odeint/concepts.html#boost_sandbox_numeric_odeint.concepts.size_adjusting_stepper">Size
+ adjusting stepper</a></span></dt>
+<dt><span class="section">CompositeStepper</span></dt>
 </dl></dd>
 <dt><span class="section">Reference</span></dt>
 <dd><dl>
@@ -86,7 +87,7 @@
 </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="left"><p><small>Last revised: January 29, 2011 at 16:20:42 GMT</small></p></td>
 <td align="right"><div class="copyright-footer"></div></td>
 </tr></table>
 <hr>

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-29 13:16:20 EST (Sat, 29 Jan 2011)
@@ -4,18 +4,61 @@
 
 [include tutorial_solar_system.qbk]
 
-[section Stiff systems]
+[section Chaotic systems and Lyapunov exponents]
 
 blah blah
 
 [endsect]
 
-[section Lyapunov exponents]
+[section Stiff systems]
 
 blah blah
 
 [endsect]
 
+[section Different steppers]
+
+Explicit steppers
+
+Implicit steppers
+
+Step size controll
+
+dense output
+
+Overview and table
+
+[endsect]
+
+[section Special topics]
+
+[section Complex state types]
+
+typedef vector< complex< double > > state_type;
+
+Stuart landau
+
+DNLS
+
+[endsect]
+
+[section Lattice systems]
+
+Fermi-Pasta-Ulam system
+
+[endsect]
+
+[section Partial differential equations]
+
+Wave equation
+
+KdV
+
+Ginzburg-Landau
+
+[endsect]
+
+
 [section Using boost::units]
 
 blah blah
@@ -34,9 +77,9 @@
 
 [endsect]
 
+[section Ordinary differential equations on networks]
 
-
-[section Special topics]
+[endsect]
 
 [section Pass by value or by reference]
 

Modified: sandbox/odeint/branches/karsten/libs/numeric/odeint/ideas/butcher/butcher_lorenz.cpp
==============================================================================
--- sandbox/odeint/branches/karsten/libs/numeric/odeint/ideas/butcher/butcher_lorenz.cpp (original)
+++ sandbox/odeint/branches/karsten/libs/numeric/odeint/ideas/butcher/butcher_lorenz.cpp 2011-01-29 13:16:20 EST (Sat, 29 Jan 2011)
@@ -10,7 +10,7 @@
 
 #include <tr1/array>
 
-#include <boost/numeric/odeint.hpp>
+#include <boost/numeric/odeint/stepper/explicit_rk4.hpp>
 
 #include "predefined_steppers.hpp"
 

Modified: sandbox/odeint/branches/karsten/libs/numeric/odeint/ideas/butcher/butcher_performance.cpp
==============================================================================
--- sandbox/odeint/branches/karsten/libs/numeric/odeint/ideas/butcher/butcher_performance.cpp (original)
+++ sandbox/odeint/branches/karsten/libs/numeric/odeint/ideas/butcher/butcher_performance.cpp 2011-01-29 13:16:20 EST (Sat, 29 Jan 2011)
@@ -10,7 +10,7 @@
 
 #include <tr1/array>
 
-#include <boost/numeric/odeint.hpp>
+#include <boost/numeric/odeint/stepper/explicit_euler.hpp>
 #include <boost/accumulators/accumulators.hpp>
 #include <boost/accumulators/statistics.hpp>
 #include <boost/timer.hpp>

Modified: sandbox/odeint/branches/karsten/libs/numeric/odeint/ideas/butcher/butcher_vdp.cpp
==============================================================================
--- sandbox/odeint/branches/karsten/libs/numeric/odeint/ideas/butcher/butcher_vdp.cpp (original)
+++ sandbox/odeint/branches/karsten/libs/numeric/odeint/ideas/butcher/butcher_vdp.cpp 2011-01-29 13:16:20 EST (Sat, 29 Jan 2011)
@@ -10,7 +10,7 @@
 
 #include <tr1/array>
 
-#include <boost/numeric/odeint.hpp>
+#include <boost/numeric/odeint/stepper/explicit_rk4.hpp>
 
 #include "predefined_steppers.hpp"
 

Deleted: sandbox/odeint/branches/karsten/libs/numeric/odeint/ideas/dense_output.cpp
==============================================================================
--- sandbox/odeint/branches/karsten/libs/numeric/odeint/ideas/dense_output.cpp 2011-01-29 13:16:20 EST (Sat, 29 Jan 2011)
+++ (empty file)
@@ -1,33 +0,0 @@
-/*
- * dense_output.cpp
- *
- * Created on: Sep 29, 2010
- * Author: karsten
- */
-
-class dopri5_dense_output
-{
-public:
-
- template< class System >
- std::pair< time_type , time_type > do_step( System &system );
-
- state_type get_state( double t );
- void calc_state( double t , state_type &x );
- state_type& get_current_state( void );
-};
-
-
-void test_dense_output
-{
- dopri_dense_output dopri;
-
- dopri.initialize( x0 , t0 , dt0 );
-
- while( t < tend )
- {
- std::pair< double , double > time_range = dopri.do_step( system );
- state_type x = dopri.get_state( time_range.first + 0.1 );
- dopri.calc_state( time_range.first + 0.1 , x );
- }
-}

Modified: sandbox/odeint/branches/karsten/libs/numeric/odeint/ideas/generic_stepper/performance.cpp
==============================================================================
--- sandbox/odeint/branches/karsten/libs/numeric/odeint/ideas/generic_stepper/performance.cpp (original)
+++ sandbox/odeint/branches/karsten/libs/numeric/odeint/ideas/generic_stepper/performance.cpp 2011-01-29 13:16:20 EST (Sat, 29 Jan 2011)
@@ -17,7 +17,7 @@
 
 #include <tr1/array>
 
-#include <boost/numeric/odeint.hpp>
+#include <boost/numeric/odeint/stepper/explicit_rk4.hpp>
 #include <boost/accumulators/accumulators.hpp>
 #include <boost/accumulators/statistics.hpp>
 #include <boost/timer.hpp>

Modified: sandbox/odeint/branches/karsten/libs/numeric/odeint/ideas/generic_stepper/performance_odeint.cpp
==============================================================================
--- sandbox/odeint/branches/karsten/libs/numeric/odeint/ideas/generic_stepper/performance_odeint.cpp (original)
+++ sandbox/odeint/branches/karsten/libs/numeric/odeint/ideas/generic_stepper/performance_odeint.cpp 2011-01-29 13:16:20 EST (Sat, 29 Jan 2011)
@@ -17,7 +17,7 @@
 
 #include <tr1/array>
 
-#include <boost/numeric/odeint.hpp>
+#include <boost/numeric/odeint/stepper/explicit_rk4.hpp>
 #include <boost/accumulators/accumulators.hpp>
 #include <boost/accumulators/statistics.hpp>
 #include <boost/timer.hpp>

Modified: sandbox/odeint/branches/karsten/libs/numeric/odeint/ideas/generic_stepper/rk_test.cpp
==============================================================================
--- sandbox/odeint/branches/karsten/libs/numeric/odeint/ideas/generic_stepper/rk_test.cpp (original)
+++ sandbox/odeint/branches/karsten/libs/numeric/odeint/ideas/generic_stepper/rk_test.cpp 2011-01-29 13:16:20 EST (Sat, 29 Jan 2011)
@@ -1,7 +1,7 @@
 #include <iostream>
 #include <boost/array.hpp>
 
-#include <boost/numeric/odeint.hpp>
+#include <boost/numeric/odeint/stepper/explicit_rk4.hpp>
 
 #include "runge_kutta_stepper.hpp"
 

Modified: sandbox/odeint/branches/karsten/libs/numeric/odeint/ideas/rosenbrock4/rosenbrock4.cpp
==============================================================================
--- sandbox/odeint/branches/karsten/libs/numeric/odeint/ideas/rosenbrock4/rosenbrock4.cpp (original)
+++ sandbox/odeint/branches/karsten/libs/numeric/odeint/ideas/rosenbrock4/rosenbrock4.cpp 2011-01-29 13:16:20 EST (Sat, 29 Jan 2011)
@@ -10,7 +10,8 @@
 #include <tr1/array>
 
 #include "rosenbrock4.hpp"
-#include <boost/numeric/odeint.hpp>
+#include <boost/numeric/odeint/stepper/explicit_error_rk54_ck.hpp>
+#include <boost/numeric/odeint/stepper/controlled_error_stepper.hpp>
 
 using namespace std;
 using namespace boost::numeric::odeint;

Modified: sandbox/odeint/branches/karsten/libs/numeric/odeint/ideas/rosenbrock4/rosenbrock4.hpp
==============================================================================
--- sandbox/odeint/branches/karsten/libs/numeric/odeint/ideas/rosenbrock4/rosenbrock4.hpp (original)
+++ sandbox/odeint/branches/karsten/libs/numeric/odeint/ideas/rosenbrock4/rosenbrock4.hpp 2011-01-29 13:16:20 EST (Sat, 29 Jan 2011)
@@ -12,7 +12,7 @@
 #include <boost/numeric/ublas/matrix.hpp>
 #include <boost/numeric/ublas/lu.hpp>
 
-#include <boost/numeric/odeint/stepper/controlled_error_stepper.hpp>
+#include <boost/numeric/odeint/stepper/controlled_step_result.hpp>
 
 
 namespace boost {

Modified: sandbox/odeint/branches/karsten/libs/numeric/odeint/ideas/rosenbrock4/rosenbrock4_stepper.cpp
==============================================================================
--- sandbox/odeint/branches/karsten/libs/numeric/odeint/ideas/rosenbrock4/rosenbrock4_stepper.cpp (original)
+++ sandbox/odeint/branches/karsten/libs/numeric/odeint/ideas/rosenbrock4/rosenbrock4_stepper.cpp 2011-01-29 13:16:20 EST (Sat, 29 Jan 2011)
@@ -10,7 +10,7 @@
 #include <tr1/array>
 
 #include "rosenbrock4.hpp"
-#include <boost/numeric/odeint.hpp>
+#include <boost/numeric/odeint/stepper/explicit_error_rk54_ck.hpp>
 
 using namespace std;
 using namespace boost::numeric::odeint;

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-29 13:16:20 EST (Sat, 29 Jan 2011)
@@ -13,10 +13,6 @@
         : controlled_stepper_evolution.cpp
          ;
 
-exe dense_output_dopri5
- : dense_output_dopri5.cpp
- ;
-
 exe dense_output_stepper_evolution
         : dense_output_stepper_evolution.cpp
         ;

Modified: sandbox/odeint/branches/karsten/libs/numeric/odeint/regression_test/dense_output_controlled_explicit_fsal.cpp
==============================================================================
--- sandbox/odeint/branches/karsten/libs/numeric/odeint/regression_test/dense_output_controlled_explicit_fsal.cpp (original)
+++ sandbox/odeint/branches/karsten/libs/numeric/odeint/regression_test/dense_output_controlled_explicit_fsal.cpp 2011-01-29 13:16:20 EST (Sat, 29 Jan 2011)
@@ -6,6 +6,8 @@
  */
 
 #include <iostream>
+#include <fstream>
+#include <stdexcept>
 
 #include <boost/numeric/odeint/stepper/explicit_error_dopri5.hpp>
 #include <boost/numeric/odeint/stepper/controlled_error_stepper.hpp>
@@ -40,5 +42,50 @@
 int main( int argc , char **argv )
 {
         stepper_type stepper;
+
+ state_type x_start( 3 );
+ x_start[0] = 10.0 , x_start[1] = 10.0 ; x_start[2] = 20.0;
+
+ const double dt1 = 0.025 , dt2 = 0.01;
+ stepper.initialize( x_start , 0.0 , dt1 );
+
+ ofstream fout( "test.dat" );
+ ofstream fout2( "test2.dat" );
+ state_type x( 3 );
+ double t = 0.0;
+ while( stepper.current_time() < 10.0 )
+ {
+ while( t < stepper.current_time() )
+ {
+ stepper.calc_state( t , x );
+ fout << t << " " << x[0] << " " << x[1] << " " << x[2] << endl;
+ t += dt2;
+ }
+ stepper.do_step( lorenz() );
+ const state_type &current = stepper.current_state();
+ fout2 << stepper.current_time() << " " << stepper.current_time_step() << " " << current[0] << " " << current[1] << " " << current[2] << " " << endl;
+ }
+
+
+ // compare with the controlled dopri5
+ {
+ controlled_error_stepper_type controlled_stepper;
+ ofstream fout3( "test3.dat" );
+ double t = 0.0 , dt = 0.025;
+ while( t < 10.0 )
+ {
+ controlled_step_result res = controlled_stepper.try_step( lorenz() , x_start , t , dt );
+ size_t count = 0;
+ while( ( res == step_size_decreased ) && ( count < 1000 ) )
+ {
+ res = controlled_stepper.try_step( lorenz() , x_start , t , dt );
+ }
+ if( count == 1000 )
+ throw std::runtime_error( "Maximal iterations reached!" );
+
+ fout3 << t << " " << dt << " " << x_start[0] << " " << x_start[1] << " " << x_start[2] << endl;
+ }
+ }
+
         return 0;
 }

Deleted: sandbox/odeint/branches/karsten/libs/numeric/odeint/regression_test/dense_output_dopri5.cpp
==============================================================================
--- sandbox/odeint/branches/karsten/libs/numeric/odeint/regression_test/dense_output_dopri5.cpp 2011-01-29 13:16:20 EST (Sat, 29 Jan 2011)
+++ (empty file)
@@ -1,75 +0,0 @@
-/*
- * check_dense_output_dopri5.cpp
- *
- * Created on: Nov 1, 2010
- * Author: karsten
- */
-
-#include <tr1/array>
-#include <fstream>
-#include <iostream>
-
-#include <boost/numeric/odeint/stepper/explicit_error_dopri5.hpp>
-#include <boost/numeric/odeint/stepper/dense_output_dopri5.hpp>
-#include <boost/numeric/odeint/stepper/controlled_error_stepper.hpp>
-
-using namespace boost::numeric::odeint;
-
-typedef double value_type;
-typedef std::tr1::array< double , 2 > state_type;
-
-inline std::ostream& operator<<( std::ostream &out , const state_type &x )
-{
- out << x[0] << "\t" << x[1];
- return out;
-}
-
-inline void sys( const state_type &x , state_type &dxdt , const value_type t )
-{
- dxdt[0] = x[1];
- dxdt[1] = -x[0];
-}
-
-
-int main( int argc , char **argv )
-{
- using std::abs;
-
- typedef explicit_error_dopri5< state_type > dopri5_type;
- typedef controlled_error_stepper< dopri5_type > controlled_stepper_type;
- dopri5_type dopri5;
- controlled_stepper_type controlled_stepper( dopri5 );
- dense_output_dopri5< controlled_stepper_type > stepper( controlled_stepper );
-
- state_type x0;
- x0[0] = 0.0;
- x0[1] = 1.0;
-
- stepper.initialize( x0 , 0.0 , 0.1 );
-// stepper.do_step( sys );
-
- std::ofstream stepper_out( "dopri5_stepper_states.dat" );
- std::ofstream states_out( "dopri5_states.dat" );
-
-
- double t = stepper.current_time();
- double t_end = 10.0;
- double dt = 0.02;
- state_type x;
- while( t < t_end )
- {
- if( t < stepper.current_time() )
- {
- stepper.calc_state( t , x );
- states_out << t << "\t" << x << std::endl;
- }
- else
- {
- stepper.do_step( sys );
- stepper_out << stepper.current_time() << "\t" << stepper.current_state() << std::endl;
- continue;
- }
- t += dt;
- }
-}
-

Modified: sandbox/odeint/branches/karsten/libs/numeric/odeint/regression_test/dense_output_stepper_evolution.cpp
==============================================================================
--- sandbox/odeint/branches/karsten/libs/numeric/odeint/regression_test/dense_output_stepper_evolution.cpp (original)
+++ sandbox/odeint/branches/karsten/libs/numeric/odeint/regression_test/dense_output_stepper_evolution.cpp 2011-01-29 13:16:20 EST (Sat, 29 Jan 2011)
@@ -10,9 +10,12 @@
 #include <iostream>
 #include <tr1/array>
 
+#include <boost/timer.hpp>
+
 #include <boost/numeric/odeint/stepper/explicit_euler.hpp>
-#include <boost/numeric/odeint/stepper/dense_output_dopri5.hpp>
+#include <boost/numeric/odeint/stepper/explicit_error_dopri5.hpp>
 #include <boost/numeric/odeint/stepper/dense_output_explicit.hpp>
+#include <boost/numeric/odeint/stepper/dense_output_controlled_explicit_fsal.hpp>
 #include <boost/numeric/odeint/stepper/controlled_error_stepper.hpp>
 
 #define tab "\t"
@@ -21,6 +24,7 @@
 using namespace boost::numeric::odeint;
 
 typedef std::tr1::array< double , 2 > state_type;
+typedef boost::timer timer_type;
 
 ostream& operator<<( ostream &out , const state_type &x )
 {
@@ -86,14 +90,20 @@
         typedef explicit_error_dopri5< state_type > dopri5_type;
         typedef controlled_error_stepper< dopri5_type > controlled_dopri5_type;
 
- dopri5_type dopri5;
- controlled_dopri5_type controlled_dopri5( dopri5 );
-
         dense_output_explicit< explicit_euler< state_type > > dense_euler;
- dense_output_dopri5< controlled_dopri5_type > dense_dopri5( controlled_dopri5 );
+ dense_output_controlled_explicit_fsal< controlled_dopri5_type > dense_dopri5;
 
         state_type x0 = {{ 1.25 , 0.43 }};
- evolution( dense_euler , 100.0 , x0 , "dense_euler_stepper.dat" , "dense_euler_state.dat" );
- evolution( dense_dopri5 , 100.0 , x0 , "dense_dopri5_stepper.dat" , "dense_dopri5_state.dat" );
+
+ timer_type timer;
+ const double t_max = 100.0;
+
+ timer.restart();
+ evolution( dense_euler , t_max , x0 , "dense_euler_stepper.dat" , "dense_euler_state.dat" );
+ clog << timer.elapsed() << endl;
+
+ timer.restart();
+ evolution( dense_dopri5 , t_max , x0 , "dense_dopri5_stepper.dat" , "dense_dopri5_state.dat" );
+ clog << timer.elapsed() << endl;
 
 }


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