Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r65676 - in sandbox/odeint/branches/karsten: boost/numeric/odeint/stepper boost/numeric/odeint/stepper/base libs/numeric/odeint/test
From: mario.mulansky_at_[hidden]
Date: 2010-09-29 11:28:37


Author: mariomulansky
Date: 2010-09-29 11:28:33 EDT (Wed, 29 Sep 2010)
New Revision: 65676
URL: http://svn.boost.org/trac/boost/changeset/65676

Log:
implementation of dopri5
rearranged parameters of do_step: out now comes behind t to avoid ambiguities
Text files modified:
   sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/base/explicit_stepper_and_error_stepper_base.hpp | 25 +++++----
   sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/base/explicit_stepper_and_error_stepper_fsal_base.hpp | 39 ++++++++------
   sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/base/explicit_stepper_base.hpp | 12 ++--
   sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/controlled_error_stepper.hpp | 2
   sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/explicit_error_dopri5.hpp | 104 +++++++++++++++++++++++++++++++++++++--
   sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/explicit_error_rk54_ck.hpp | 7 +-
   sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/explicit_euler.hpp | 2
   sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/explicit_rk4.hpp | 2
   sandbox/odeint/branches/karsten/libs/numeric/odeint/test/check_stepper_concepts.cpp | 11 ++-
   9 files changed, 151 insertions(+), 53 deletions(-)

Modified: sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/base/explicit_stepper_and_error_stepper_base.hpp
==============================================================================
--- sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/base/explicit_stepper_and_error_stepper_base.hpp (original)
+++ sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/base/explicit_stepper_and_error_stepper_base.hpp 2010-09-29 11:28:33 EDT (Wed, 29 Sep 2010)
@@ -82,27 +82,27 @@
         {
                 m_size_adjuster.adjust_size_by_policy( x , adjust_size_policy() );
                 system( x , m_dxdt ,t );
- this->stepper().do_step_impl( system , x , m_dxdt , x , t , dt );
+ this->stepper().do_step_impl( system , x , m_dxdt , t , x , dt );
         }
 
         template< class System >
         void do_step( System &system , state_type &x , const state_type &dxdt , time_type t , time_type dt )
         {
- this->stepper().do_step_impl( system , x , dxdt , x , t , dt );
+ this->stepper().do_step_impl( system , x , dxdt , t , x , dt );
         }
 
         template< class System >
- void do_step( System &system , const state_type &in , state_type &out , time_type t , time_type dt )
+ void do_step( System &system , const state_type &in , time_type t , state_type &out , time_type dt )
         {
                 m_size_adjuster.adjust_size_by_policy( in , adjust_size_policy() );
                 system( in , m_dxdt ,t );
- this->stepper().do_step_impl( system , in , m_dxdt , out , t , dt );
+ this->stepper().do_step_impl( system , in , m_dxdt , t , out , dt );
         }
 
         template< class System >
- void do_step( System &system , const state_type &in , const state_type &dxdt , state_type &out , time_type t , time_type dt )
+ void do_step( System &system , const state_type &in , const state_type &dxdt , time_type t , state_type &out , time_type dt )
         {
- this->stepper().do_step_impl( system , in , dxdt , out , t , dt );
+ this->stepper().do_step_impl( system , in , dxdt , t , out , dt );
         }
 
 
@@ -112,27 +112,28 @@
         {
                 m_size_adjuster.adjust_size_by_policy( x , adjust_size_policy() );
                 system( x , m_dxdt ,t );
- this->stepper().do_step_impl( system , x , m_dxdt , x , t , dt , xerr );
+ this->stepper().do_step_impl( system , x , m_dxdt , t , x , dt , xerr );
         }
 
+
         template< class System >
         void do_step( System &system , state_type &x , const state_type &dxdt , time_type t , time_type dt , state_type &xerr )
         {
- this->stepper().do_step_impl( system , x , dxdt , x , t , dt , xerr );
+ this->stepper().do_step_impl( system , x , dxdt , t , x , dt , xerr );
         }
 
         template< class System >
- void do_step( System &system , state_type &in , state_type &out , time_type t , time_type dt , state_type &xerr )
+ void do_step( System &system , const state_type &in , time_type t , state_type &out , time_type dt , state_type &xerr )
         {
                 m_size_adjuster.adjust_size_by_policy( in , adjust_size_policy() );
                 system( in , m_dxdt ,t );
- this->stepper().do_step_impl( system , in , m_dxdt , out , t , dt , xerr );
+ this->stepper().do_step_impl( system , in , m_dxdt , t , out , dt , xerr );
         }
 
         template< class System >
- void do_step( System &system , state_type &in , const state_type &dxdt , state_type &out , time_type t , time_type dt , state_type &xerr )
+ void do_step( System &system , const state_type &in , const state_type &dxdt , time_type t , state_type &out , time_type dt , state_type &xerr )
         {
- this->stepper().do_step_impl( system , in , dxdt , out , t , dt , xerr );
+ this->stepper().do_step_impl( system , in , dxdt , t , out , dt , xerr );
         }
 
         void adjust_size( const state_type &x )

Modified: sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/base/explicit_stepper_and_error_stepper_fsal_base.hpp
==============================================================================
--- sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/base/explicit_stepper_and_error_stepper_fsal_base.hpp (original)
+++ sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/base/explicit_stepper_and_error_stepper_fsal_base.hpp 2010-09-29 11:28:33 EDT (Wed, 29 Sep 2010)
@@ -66,7 +66,7 @@
                 m_size_adjuster.register_state( 0 , m_dxdt );
         }
 
- ~explicit_stepper_and_error_stepper_base( void )
+ ~explicit_stepper_and_error_stepper_fsal_base( void )
         {
                 boost::numeric::odeint::destruct( m_dxdt );
         }
@@ -82,27 +82,27 @@
         {
             m_size_adjuster.adjust_size_by_policy( x , adjust_size_policy() );
             system( x , m_dxdt ,t );
- this->stepper().do_step_impl( system , x , m_dxdt , x , t , dt );
+ this->stepper().do_step_impl( system , x , m_dxdt , t , x , dt );
         }
 
         template< class System >
         void do_step( System &system , state_type &x , const state_type &dxdt , time_type t , time_type dt )
         {
- this->stepper().do_step_impl( system , x , dxdt , x , t , dt );
+ this->stepper().do_step_impl( system , x , dxdt , t , x , dt );
         }
 
         template< class System >
- void do_step( System &system , const state_type &in , state_type &out , time_type t , time_type dt )
+ void do_step( System &system , const state_type &in , time_type t , state_type &out , time_type dt )
         {
- m_size_adjuster.adjust_size_by_policy( x , adjust_size_policy() );
+ m_size_adjuster.adjust_size_by_policy( in , adjust_size_policy() );
             system( in , m_dxdt ,t );
- this->stepper().do_step_impl( system , in , m_dxdt , out , t , dt );
+ this->stepper().do_step_impl( system , in , m_dxdt , t , out , dt );
         }
 
         template< class System >
- void do_step( System &system , const state_type &in , const state_type &dxdt , state_type &out , time_type t , time_type dt )
+ void do_step( System &system , const state_type &in , const state_type &dxdt , time_type t , state_type &out , time_type dt )
         {
- this->stepper().do_step_impl( system , in , dxdt , out , t , dt );
+ this->stepper().do_step_impl( system , in , dxdt , t , out , dt );
         }
 
 
@@ -110,35 +110,40 @@
         template< class System >
         void do_step( System &system , state_type &x , time_type t , time_type dt , state_type &xerr )
         {
- if( m_first_call || m_size_adjuster.adjust_size_by_policy( x , adjust_size_policy() ) )
+ if( m_size_adjuster.adjust_size_by_policy( x , adjust_size_policy() ) || m_first_call )
             {
- system( in , m_dxdt ,t );
+ system( x , m_dxdt ,t );
                 m_first_call = false;
             }
- this->stepper().do_step_impl( system , x , m_dxdt , x , t , dt , xerr );
+ this->stepper().do_step_impl( system , x , m_dxdt , t , x , dt , xerr );
         }
 
         template< class System >
         void do_step( System &system , state_type &x , state_type &dxdt , time_type t , time_type dt , state_type &xerr )
         {
- this->stepper().do_step_impl( system , x , dxdt , x , t , dt , xerr );
+ this->stepper().do_step_impl( system , x , dxdt , t , x , dt , xerr );
         }
 
         template< class System >
- void do_step( System &system , state_type &in , state_type &out , time_type t , time_type dt , state_type &xerr )
+ void do_step( System &system , const state_type &in , time_type t , state_type &out , time_type dt , state_type &xerr )
         {
- if( m_first_call || m_size_adjuster.adjust_size_by_policy( x , adjust_size_policy() ) )
+ if( m_size_adjuster.adjust_size_by_policy( in , adjust_size_policy() ) || m_first_call )
             {
                 system( in , m_dxdt ,t );
                 m_first_call = false;
             }
- this->stepper().do_step_impl( system , in , m_dxdt , out , t , dt , xerr );
+ this->stepper().do_step_impl( system , in , m_dxdt , t , out , dt , xerr );
         }
 
         template< class System >
- void do_step( System &system , state_type &in , state_type &dxdt , state_type &out , time_type t , time_type dt , state_type &xerr )
+ void do_step( System &system , const state_type &in , state_type &dxdt , time_type t , state_type &out , time_type dt , state_type &xerr )
+ {
+ this->stepper().do_step_impl( system , in , dxdt , t , out , dt , xerr );
+ }
+
+ void reset_dxdt( state_type &dxdt )
         {
- this->stepper().do_step_impl( system , in , dxdt , out , t , dt , xerr );
+ this->stepper().reset_dxdt_impl( dxdt );
         }
 
         void adjust_size( const state_type &x )

Modified: sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/base/explicit_stepper_base.hpp
==============================================================================
--- sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/base/explicit_stepper_base.hpp (original)
+++ sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/base/explicit_stepper_base.hpp 2010-09-29 11:28:33 EDT (Wed, 29 Sep 2010)
@@ -78,27 +78,27 @@
         {
                 m_size_adjuster.adjust_size_by_policy( x , adjust_size_policy() );
                 system( x , m_dxdt ,t );
- this->stepper().do_step_impl( system , x , m_dxdt , x , t , dt );
+ this->stepper().do_step_impl( system , x , m_dxdt , t , x , dt );
         }
 
         template< class System >
         void do_step( System &system , state_type &x , const state_type dxdt , time_type t , time_type dt )
         {
- this->stepper().do_step_impl( system , x , dxdt , x , t , dt );
+ this->stepper().do_step_impl( system , x , dxdt , t , x , dt );
         }
 
         template< class System >
- void do_step( System &system , const state_type &in , state_type &out , time_type t , time_type dt )
+ void do_step( System &system , const state_type &in , time_type t , state_type &out , time_type dt )
         {
                 m_size_adjuster.adjust_size_by_policy( in , adjust_size_policy() );
                 system( in , m_dxdt ,t );
- this->stepper().do_step_impl( system , in , m_dxdt , out , t , dt );
+ this->stepper().do_step_impl( system , in , m_dxdt , t , out , dt );
         }
 
         template< class System >
- void do_step( System &system , const state_type &in , const state_type &dxdt , state_type &out , time_type t , time_type dt )
+ void do_step( System &system , const state_type &in , const state_type &dxdt , time_type t , state_type &out , time_type dt )
         {
- this->stepper().do_step_impl( system , in , dxdt , out , t , dt );
+ this->stepper().do_step_impl( system , in , dxdt , t , out , dt );
         }
 
 

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 2010-09-29 11:28:33 EDT (Wed, 29 Sep 2010)
@@ -79,7 +79,7 @@
 
 
         template< class System >
- controlled_step_result try_step( System &sys , state_type &x , const state_type &dxdt , time_type &t , time_type &dt )
+ controlled_step_result try_step( System &sys , state_type &x , state_type &dxdt , time_type &t , time_type &dt )
         {
                 using std::max;
                 using std::min;

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 2010-09-29 11:28:33 EDT (Wed, 29 Sep 2010)
@@ -16,7 +16,7 @@
 #include <boost/numeric/odeint/algebra/standard_operations.hpp>
 #include <boost/numeric/odeint/algebra/standard_resize.hpp>
 
-#include <boost/numeric/odeint/stepper/base/explicit_error_stepper_base.hpp>
+#include <boost/numeric/odeint/stepper/base/explicit_stepper_and_error_stepper_fsal_base.hpp>
 #include <boost/numeric/odeint/stepper/detail/macros.hpp>
 
 namespace boost {
@@ -34,14 +34,14 @@
         class AdjustSizePolicy = adjust_size_initially_tag
>
 class explicit_error_dopri5
-: public explicit_error_stepper_base<
+: public explicit_stepper_and_error_stepper_fsal_base<
           explicit_error_dopri5< State , Time , Algebra , Operations , AdjustSizePolicy > ,
- 5 , 4 , State , Time , Algebra , Operations , AdjustSizePolicy >
+ 5 , 5 , 4 , State , Time , Algebra , Operations , AdjustSizePolicy >
 {
 
 public :
 
- BOOST_ODEINT_EXPLICIT_ERROR_STEPPERS_TYPEDEFS( explicit_error_dopri5 , 5 , 4 );
+ BOOST_ODEINT_EXPLICIT_STEPPERS_AND_ERROR_STEPPERS_TYPEDEFS( explicit_error_dopri5 , 5 , 5 , 4 );
 
         explicit_error_dopri5( void )
         : m_size_adjuster() , m_x1() , m_x2() , m_x3() , m_x4() , m_x5() , m_x6()
@@ -72,15 +72,105 @@
 
 
         template< class System >
- void do_step_impl( System system , const state_type &in , const state_type &dxdt , state_type &out , time_type t , time_type dt , state_type &xerr )
+ void do_step_impl( System system , const state_type &in , state_type &dxdt , time_type t , state_type &out , time_type dt , state_type &xerr )
         {
+
+ const time_type c1 = static_cast<time_type> ( 35.0 ) / static_cast<time_type>( 384.0 );
+ const time_type c3 = static_cast<time_type> ( 500.0 ) / static_cast<time_type>( 1113.0 );
+ const time_type c4 = static_cast<time_type> ( 125.0 ) / static_cast<time_type>( 192.0 );
+ const time_type c5 = static_cast<time_type> ( -2187.0 ) / static_cast<time_type>( 6784.0 );
+ const time_type c6 = static_cast<time_type> ( 11.0 ) / static_cast<time_type>( 84.0 );
+
+ const time_type dc1 = c1 - static_cast<time_type> ( 5179.0 ) / static_cast<time_type>( 57600.0 );
+ const time_type dc3 = c3 - static_cast<time_type> ( 7571.0 ) / static_cast<time_type>( 16695.0 );
+ const time_type dc4 = c4 - static_cast<time_type> ( 393.0 ) / static_cast<time_type>( 640.0 );
+ const time_type dc5 = c5 - static_cast<time_type> ( -92097.0 ) / static_cast<time_type>( 339200.0 );
+ const time_type dc6 = c6 - static_cast<time_type> ( 187.0 ) / static_cast<time_type>( 2100.0 );
+ const time_type dc7 = static_cast<time_type>( -0.025 );
+
+ do_step_impl( system , in , dxdt , t , out , dt );
+
+ // we need to copy the old dxdt
+ boost::numeric::odeint::copy( dxdt , m_x1 );
+
+ // store the new result in dxdt
+ system( out , dxdt , t + dt );
+
+ //error estimate
+ algebra_type::for_each7( xerr , m_x1 , m_x3 , m_x4 , m_x5 , m_x6 , dxdt ,
+ typename operations_type::scale_sum6( dt*dc1 , dt*dc3 , dt*dc4 , dt*dc5 , dt*dc6 , dt*dc7 ) );
+
+
         }
 
 
 
         template< class System >
- void do_step_impl( System system , const state_type &in , const state_type &dxdt , state_type &out , time_type t , time_type dt )
+ void do_step_impl( System system , const state_type &in , const state_type &dxdt , time_type t , state_type &out , time_type dt )
+ {
+ m_size_adjuster.adjust_size_by_policy( in , adjust_size_policy() );
+
+ const time_type a2 = static_cast<time_type> ( 0.2 );
+ const time_type a3 = static_cast<time_type> ( 0.3 );
+ const time_type a4 = static_cast<time_type> ( 0.8 );
+ const time_type a5 = static_cast<time_type> ( 8.0 )/static_cast<time_type> ( 9.0 );
+
+ const time_type b21 = static_cast<time_type> ( 0.2 );
+
+ const time_type b31 = static_cast<time_type> ( 3.0 ) / static_cast<time_type>( 40.0 );
+ const time_type b32 = static_cast<time_type> ( 9.0 ) / static_cast<time_type>( 40.0 );
+
+ const time_type b41 = static_cast<time_type> ( 44.0 ) / static_cast<time_type> ( 45.0 );
+ const time_type b42 = static_cast<time_type> ( -56.0 ) / static_cast<time_type> ( 15.0 );
+ const time_type b43 = static_cast<time_type> ( 32.0 ) / static_cast<time_type> ( 9.0 );
+
+ const time_type b51 = static_cast<time_type> ( 19372.0 ) / static_cast<time_type>( 6561.0 );
+ const time_type b52 = static_cast<time_type> ( -25360.0 ) / static_cast<time_type> ( 2187.0 );
+ const time_type b53 = static_cast<time_type> ( 64448.0 ) / static_cast<time_type>( 6561.0 );
+ const time_type b54 = static_cast<time_type> ( -212.0 ) / static_cast<time_type>( 729.0 );
+
+ const time_type b61 = static_cast<time_type> ( 9017.0 ) / static_cast<time_type>( 3168.0 );
+ const time_type b62 = static_cast<time_type> ( -355.0 ) / static_cast<time_type>( 33.0 );
+ const time_type b63 = static_cast<time_type> ( 46732.0 ) / static_cast<time_type>( 5247.0 );
+ const time_type b64 = static_cast<time_type> ( 49.0 ) / static_cast<time_type>( 176.0 );
+ const time_type b65 = static_cast<time_type> ( -5103.0 ) / static_cast<time_type>( 18656.0 );
+
+ const time_type c1 = static_cast<time_type> ( 35.0 ) / static_cast<time_type>( 384.0 );
+ const time_type c3 = static_cast<time_type> ( 500.0 ) / static_cast<time_type>( 1113.0 );
+ const time_type c4 = static_cast<time_type> ( 125.0 ) / static_cast<time_type>( 192.0 );
+ const time_type c5 = static_cast<time_type> ( -2187.0 ) / static_cast<time_type>( 6784.0 );
+ const time_type c6 = static_cast<time_type> ( 11.0 ) / static_cast<time_type>( 84.0 );
+
+ //m_x1 = x + dt*b21*dxdt
+ algebra_type::for_each3( m_x1 , in , dxdt ,
+ typename operations_type::scale_sum2( 1.0 , dt*b21 ) );
+
+ system( m_x1 , m_x2 , t + dt*a2 );
+ // m_x1 = x + dt*b31*dxdt + dt*b32*m_x2
+ algebra_type::for_each4( m_x1 , in , dxdt , m_x2 ,
+ typename operations_type::scale_sum3( 1.0 , dt*b31 , dt*b32 ));
+
+ system( m_x1 , m_x3 , t + dt*a3 );
+ // m_x1 = x + dt * (b41*dxdt + b42*m_x2 + b43*m_x3)
+ algebra_type::for_each5( m_x1 , in , dxdt , m_x2 , m_x3 ,
+ typename operations_type::scale_sum4( 1.0 , dt*b41 , dt*b42 , dt*b43 ));
+
+ system( m_x1, m_x4 , t + dt*a4 );
+ algebra_type::for_each6( m_x1 , in , dxdt , m_x2 , m_x3 , m_x4 ,
+ typename operations_type::scale_sum5( 1.0 , dt*b51 , dt*b52 , dt*b53 , dt*b54 ));
+
+ system( m_x1 , m_x5 , t + dt*a5 );
+ algebra_type::for_each7( m_x1 , in , dxdt , m_x2 , m_x3 , m_x4 , m_x5 ,
+ typename operations_type::scale_sum6( 1.0 , dt*b61 , dt*b62 , dt*b63 , dt*b64 , dt*b65 ));
+
+ system( m_x1 , m_x6 , t + dt );
+ algebra_type::for_each7( out , in , dxdt , m_x3 , m_x4 , m_x5 , m_x6 ,
+ typename operations_type::scale_sum6( 1.0 , dt*c1 , dt*c3 , dt*c4 , dt*c5 , dt*c6 ));
+ }
+
+ void reset_dxdt_impl( state_type &dxdt )
         {
+ boost::numeric::odeint::copy( m_x1 , dxdt );
         }
 
 
@@ -94,7 +184,7 @@
 private:
 
     size_adjuster< state_type , 6 > m_size_adjuster;
- state_type m_x1, m_x2, m_x3, m_x4, m_x5, m_x6;
+ state_type m_x1, m_x2, m_x3, m_x4, m_x5, m_x6 ;
 
 };
 

Modified: sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/explicit_error_rk54_ck.hpp
==============================================================================
--- sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/explicit_error_rk54_ck.hpp (original)
+++ sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/explicit_error_rk54_ck.hpp 2010-09-29 11:28:33 EDT (Wed, 29 Sep 2010)
@@ -77,7 +77,7 @@
 
 
         template< class System >
- void do_step_impl( System system , const state_type &in , const state_type &dxdt , state_type &out , time_type t , time_type dt , state_type &xerr )
+ void do_step_impl( System system , const state_type &in , const state_type &dxdt , time_type t , state_type &out , time_type dt , state_type &xerr )
         {
 
                 const time_type c1 = static_cast<time_type> ( 37.0 ) / static_cast<time_type>( 378.0 );
@@ -91,7 +91,7 @@
                 const time_type dc5 = static_cast<time_type> ( -277.0 ) / static_cast<time_type>( 14336.0 );
                 const time_type dc6 = c6 - static_cast<time_type> ( 0.25 );
 
- do_step_impl( system , in , dxdt , out , t , dt );
+ do_step_impl( system , in , dxdt , t , out , dt );
 
                 //error estimate
                 algebra_type::for_each6( xerr , dxdt , m_x3 , m_x4 , m_x5 , m_x6 ,
@@ -102,9 +102,8 @@
 
 
         template< class System >
- void do_step_impl( System system , const state_type &in , const state_type &dxdt , state_type &out , time_type t , time_type dt )
+ void do_step_impl( System system , const state_type &in , const state_type &dxdt , time_type t , state_type &out , time_type dt )
         {
- /* ToDo: separate resize m_dxdt and m_x1..6 */
                 m_size_adjuster.adjust_size_by_policy( in , adjust_size_policy() );
 
                 const time_type a2 = static_cast<time_type> ( 0.2 );

Modified: sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/explicit_euler.hpp
==============================================================================
--- sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/explicit_euler.hpp (original)
+++ sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/explicit_euler.hpp 2010-09-29 11:28:33 EDT (Wed, 29 Sep 2010)
@@ -41,7 +41,7 @@
         BOOST_ODEINT_EXPLICIT_STEPPERS_TYPEDEFS( explicit_euler , 1 );
 
         template< class System >
- void do_step_impl( System &system , const state_type &in , const state_type &dxdt , state_type & out , time_type t , time_type dt )
+ void do_step_impl( System &system , const state_type &in , const state_type &dxdt , time_type t , state_type & out , time_type dt )
         {
                 algebra_type::for_each3( out , in , dxdt , typename operations_type::scale_sum2( 1.0 , dt ) );
         }

Modified: sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/explicit_rk4.hpp
==============================================================================
--- sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/explicit_rk4.hpp (original)
+++ sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/explicit_rk4.hpp 2010-09-29 11:28:33 EDT (Wed, 29 Sep 2010)
@@ -65,7 +65,7 @@
         }
 
         template< class System >
- void do_step_impl( System &system , const state_type &in , const state_type &dxdt , state_type &out , time_type t , time_type dt )
+ void do_step_impl( System &system , const state_type &in , const state_type &dxdt , time_type t , state_type &out , time_type dt )
         {
                 m_size_adjuster.adjust_size_by_policy( in , adjust_size_policy() );
                 // ToDo : check if size of in,dxdt,out are equal?

Modified: sandbox/odeint/branches/karsten/libs/numeric/odeint/test/check_stepper_concepts.cpp
==============================================================================
--- sandbox/odeint/branches/karsten/libs/numeric/odeint/test/check_stepper_concepts.cpp (original)
+++ sandbox/odeint/branches/karsten/libs/numeric/odeint/test/check_stepper_concepts.cpp 2010-09-29 11:28:33 EDT (Wed, 29 Sep 2010)
@@ -98,7 +98,7 @@
 
     time_type t = 0.0 , dt = 0.1;
     controlled_step_result step_result = stepper.try_step( system , x , t , dt );
- BOOST_CHECK( step_result == success_step_size_increased ); // error = 0 for constant system -> step size is always too small
+ BOOST_CHECK_MESSAGE( step_result == success_step_size_increased , "step result: " << step_result ); // error = 0 for constant system -> step size is always too small
 }
 
 
@@ -151,7 +151,8 @@
 template< class State > class stepper_methods : public mpl::vector<
         explicit_euler< State , double , typename algebra_dispatcher< State >::type > ,
         explicit_rk4< State , double , typename algebra_dispatcher< State >::type > ,
- explicit_error_rk54_ck< State , double , typename algebra_dispatcher< State >::type >
+ explicit_error_rk54_ck< State , double , typename algebra_dispatcher< State >::type > ,
+ explicit_error_dopri5< State , double , typename algebra_dispatcher< State >::type >
> { };
 
 
@@ -244,7 +245,8 @@
 
 
 template< class State > class error_stepper_methods : public mpl::vector<
- explicit_error_rk54_ck< State , double , typename algebra_dispatcher< State >::type >
+ explicit_error_rk54_ck< State , double , typename algebra_dispatcher< State >::type > ,
+ explicit_error_dopri5< State , double , typename algebra_dispatcher< State >::type >
> { };
 
 
@@ -340,7 +342,8 @@
 
 
 template< class State > class controlled_stepper_methods : public mpl::vector<
- controlled_error_stepper< explicit_error_rk54_ck< State , double , typename algebra_dispatcher< State >::type > >
+ controlled_error_stepper< explicit_error_rk54_ck< State , double , typename algebra_dispatcher< State >::type > > ,
+ controlled_error_stepper< explicit_error_dopri5< State , double , typename algebra_dispatcher< State >::type > >
> { };
 
 typedef mpl::copy


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