Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r81754 - in trunk: boost/numeric boost/numeric/odeint/integrate boost/numeric/odeint/iterator boost/numeric/odeint/stepper boost/numeric/odeint/stepper/base libs/numeric/odeint/doc libs/numeric/odeint/examples libs/numeric/odeint/performance libs/numeric/odeint/test
From: karsten.ahnert_at_[hidden]
Date: 2012-12-07 07:27:01


Author: karsten
Date: 2012-12-07 07:26:55 EST (Fri, 07 Dec 2012)
New Revision: 81754
URL: http://svn.boost.org/trac/boost/changeset/81754

Log:
removing iterators from odeint, updating the documentation for odeint
Added:
   trunk/boost/numeric/odeint.hpp (contents, props changed)
Removed:
   trunk/boost/numeric/odeint/iterator/
   trunk/libs/numeric/odeint/doc/details_iterators.qbk
   trunk/libs/numeric/odeint/examples/adaptive_iterator.cpp
   trunk/libs/numeric/odeint/examples/const_step_iterator.cpp
   trunk/libs/numeric/odeint/performance/const_step_iterator.cpp
   trunk/libs/numeric/odeint/test/adaptive_iterator.cpp
   trunk/libs/numeric/odeint/test/adaptive_time_iterator.cpp
   trunk/libs/numeric/odeint/test/const_step_iterator.cpp
   trunk/libs/numeric/odeint/test/const_step_time_iterator.cpp
Text files modified:
   trunk/boost/numeric/odeint/integrate/integrate.hpp | 55 ++-
   trunk/boost/numeric/odeint/integrate/integrate_adaptive.hpp | 36 ++
   trunk/boost/numeric/odeint/integrate/integrate_const.hpp | 38 ++
   trunk/boost/numeric/odeint/integrate/integrate_n_steps.hpp | 43 ++
   trunk/boost/numeric/odeint/integrate/integrate_times.hpp | 44 ++
   trunk/boost/numeric/odeint/stepper/adams_bashforth.hpp | 167 +++++++++-
   trunk/boost/numeric/odeint/stepper/adams_bashforth_moulton.hpp | 116 +++++++
   trunk/boost/numeric/odeint/stepper/base/algebra_stepper_base.hpp | 54 ++-
   trunk/boost/numeric/odeint/stepper/base/explicit_error_stepper_base.hpp | 493 ++++++++++++++++---------------
   trunk/boost/numeric/odeint/stepper/base/explicit_error_stepper_fsal_base.hpp | 613 ++++++++++++++++++++-------------------
   trunk/boost/numeric/odeint/stepper/base/explicit_stepper_base.hpp | 328 +++++++++++----------
   trunk/boost/numeric/odeint/stepper/base/symplectic_rkn_stepper_base.hpp | 231 ++++++++-------
   trunk/boost/numeric/odeint/stepper/bulirsch_stoer.hpp | 190 +++++++++--
   trunk/boost/numeric/odeint/stepper/bulirsch_stoer_dense_out.hpp | 296 +++++++++----------
   trunk/boost/numeric/odeint/stepper/controlled_runge_kutta.hpp | 358 ++++++++++++++++++++++
   trunk/boost/numeric/odeint/stepper/controlled_step_result.hpp | 8
   trunk/boost/numeric/odeint/stepper/dense_output_runge_kutta.hpp | 79 ++++
   trunk/boost/numeric/odeint/stepper/euler.hpp | 106 +++---
   trunk/boost/numeric/odeint/stepper/explicit_error_generic_rk.hpp | 153 +++++----
   trunk/boost/numeric/odeint/stepper/explicit_generic_rk.hpp | 111 ++++---
   trunk/boost/numeric/odeint/stepper/modified_midpoint.hpp | 29 +
   trunk/boost/numeric/odeint/stepper/runge_kutta4.hpp | 64 ++-
   trunk/boost/numeric/odeint/stepper/runge_kutta4_classic.hpp | 102 +++---
   trunk/boost/numeric/odeint/stepper/runge_kutta_cash_karp54.hpp | 68 ++-
   trunk/boost/numeric/odeint/stepper/runge_kutta_cash_karp54_classic.hpp | 121 ++++---
   trunk/boost/numeric/odeint/stepper/runge_kutta_dopri5.hpp | 158 +++++----
   trunk/boost/numeric/odeint/stepper/runge_kutta_fehlberg78.hpp | 67 ++-
   trunk/boost/numeric/odeint/stepper/symplectic_euler.hpp | 55 ++-
   trunk/boost/numeric/odeint/stepper/symplectic_rkn_sb3a_m4_mclachlan.hpp | 62 ++-
   trunk/boost/numeric/odeint/stepper/symplectic_rkn_sb3a_mclachlan.hpp | 62 ++-
   trunk/libs/numeric/odeint/doc/Jamfile.v2 | 2
   trunk/libs/numeric/odeint/doc/details.qbk | 2
   trunk/libs/numeric/odeint/doc/tutorial_harmonic_oscillator.qbk | 8
   trunk/libs/numeric/odeint/examples/Jamfile.v2 | 2
   trunk/libs/numeric/odeint/examples/harmonic_oscillator.cpp | 6
   trunk/libs/numeric/odeint/performance/Jamfile.v2 | 4
   trunk/libs/numeric/odeint/test/Jamfile.v2 | 5
   37 files changed, 2721 insertions(+), 1615 deletions(-)

Added: trunk/boost/numeric/odeint.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/numeric/odeint.hpp 2012-12-07 07:26:55 EST (Fri, 07 Dec 2012)
@@ -0,0 +1,75 @@
+/*
+ [auto_generated]
+ boost/numeric/odeint.hpp
+
+ [begin_description]
+ Forward include for odeint. Includes nearly everything.
+ [end_description]
+
+ Copyright 2009-2011 Karsten Ahnert
+ Copyright 2009-2011 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_NUMERIC_ODEINT_HPP_INCLUDED
+#define BOOST_NUMERIC_ODEINT_HPP_INCLUDED
+
+#include <boost/numeric/odeint/version.hpp>
+#include <boost/numeric/odeint/config.hpp>
+
+// start with ublas wrapper because we need its specializations before including state_wrapper.hpp
+#include <boost/numeric/odeint/util/ublas_wrapper.hpp>
+
+#include <boost/numeric/odeint/stepper/euler.hpp>
+#include <boost/numeric/odeint/stepper/runge_kutta4_classic.hpp>
+#include <boost/numeric/odeint/stepper/runge_kutta4.hpp>
+#include <boost/numeric/odeint/stepper/runge_kutta_cash_karp54.hpp>
+#include <boost/numeric/odeint/stepper/runge_kutta_cash_karp54_classic.hpp>
+#include <boost/numeric/odeint/stepper/runge_kutta_dopri5.hpp>
+#include <boost/numeric/odeint/stepper/runge_kutta_fehlberg78.hpp>
+
+#include <boost/numeric/odeint/stepper/controlled_runge_kutta.hpp>
+
+#include <boost/numeric/odeint/stepper/dense_output_runge_kutta.hpp>
+
+#include <boost/numeric/odeint/stepper/bulirsch_stoer.hpp>
+
+#ifndef __CUDACC__
+/* Bulirsch Stoer with Dense Output does not compile with nvcc
+ * because of the binomial library used there which relies on unsupported SSE functions
+ */
+#include <boost/numeric/odeint/stepper/bulirsch_stoer_dense_out.hpp>
+#endif
+
+#include <boost/numeric/odeint/stepper/symplectic_euler.hpp>
+#include <boost/numeric/odeint/stepper/symplectic_rkn_sb3a_mclachlan.hpp>
+
+#include <boost/numeric/odeint/stepper/adams_bashforth_moulton.hpp>
+
+#include <boost/numeric/odeint/stepper/implicit_euler.hpp>
+#include <boost/numeric/odeint/stepper/rosenbrock4.hpp>
+#include <boost/numeric/odeint/stepper/rosenbrock4_controller.hpp>
+#include <boost/numeric/odeint/stepper/rosenbrock4_dense_output.hpp>
+
+/*
+ * Including this algebra slows down the compilation time
+ */
+// #include <boost/numeric/odeint/algebra/fusion_algebra.hpp>
+#include <boost/numeric/odeint/algebra/vector_space_algebra.hpp>
+
+#include <boost/numeric/odeint/integrate/integrate.hpp>
+#include <boost/numeric/odeint/integrate/integrate_adaptive.hpp>
+#include <boost/numeric/odeint/integrate/integrate_const.hpp>
+#include <boost/numeric/odeint/integrate/integrate_n_steps.hpp>
+#include <boost/numeric/odeint/integrate/integrate_times.hpp>
+
+#include <boost/numeric/odeint/integrate/observer_collection.hpp>
+
+#include <boost/numeric/odeint/stepper/generation.hpp>
+
+
+#endif // BOOST_NUMERIC_ODEINT_HPP_INCLUDED

Modified: trunk/boost/numeric/odeint/integrate/integrate.hpp
==============================================================================
--- trunk/boost/numeric/odeint/integrate/integrate.hpp (original)
+++ trunk/boost/numeric/odeint/integrate/integrate.hpp 2012-12-07 07:26:55 EST (Fri, 07 Dec 2012)
@@ -35,7 +35,6 @@
  *
  * determine type of dxdt for units
  *
- * the two overloads are needed in order to solve the forwarding problem
  */
 template< class System , class State , class Time , class Observer >
 size_t integrate( System system , State &start_state , Time start_time , Time end_time , Time dt , Observer observer )
@@ -43,16 +42,6 @@
     return integrate_adaptive( controlled_runge_kutta< runge_kutta_dopri5< State > >() , system , start_state , start_time , end_time , dt , observer );
 }
 
-template< class System , class State , class Time , class Observer >
-size_t integrate( System system , const State &start_state , Time start_time , Time end_time , Time dt , Observer observer )
-{
- return integrate_adaptive( controlled_runge_kutta< runge_kutta_dopri5< State > >() , system , start_state , start_time , end_time , dt , observer );
-}
-
-
-
-
-
 
 
 /*
@@ -64,14 +53,48 @@
     return integrate( system , start_state , start_time , end_time , dt , null_observer() );
 }
 
-template< class System , class State , class Time >
-size_t integrate( System system , const State &start_state , Time start_time , Time end_time , Time dt )
-{
- return integrate( system , start_state , start_time , end_time , dt , null_observer() );
-}
 
+/**
+ * \fn integrate( System system , State &start_state , Time start_time , Time end_time , Time dt , Observer observer )
+ * \brief Integrates the ODE.
+ *
+ * Integrates the ODE given by system from start_time to end_time starting
+ * with start_state as initial condtition and dt as initial time step.
+ * This function uses a dense output dopri5 stepper and performs an adaptive
+ * integration with step size control, thus dt changes during the integration.
+ * This method uses standard error bounds of 1E-6.
+ * After each step, the observer is called.
+ *
+ * \param system The system function to solve, hence the r.h.s. of the
+ * ordinary differential equation.
+ * \param start_state The initial state.
+ * \param start_time Start time of the integration.
+ * \param end_time End time of the integration.
+ * \param dt Initial step size, will be adjusted durinf the integration.
+ * \param observer Observer that will be called after each time step.
+ * \return The number of steps performed.
+ */
 
 
+/**
+ * \fn integrate( System system , State &start_state , Time start_time , Time end_time , Time dt )
+ * \brief Integrates the ODE without observer calls.
+ *
+ * Integrates the ODE given by system from start_time to end_time starting
+ * with start_state as initial condtition and dt as initial time step.
+ * This function uses a dense output dopri5 stepper and performs an adaptive
+ * integration with step size control, thus dt changes during the integration.
+ * This method uses standard error bounds of 1E-6.
+ * No observer is called.
+ *
+ * \param system The system function to solve, hence the r.h.s. of the
+ * ordinary differential equation.
+ * \param start_state The initial state.
+ * \param start_time Start time of the integration.
+ * \param end_time End time of the integration.
+ * \param dt Initial step size, will be adjusted durinf the integration.
+ * \return The number of steps performed.
+ */
 
 } // namespace odeint
 } // namespace numeric

Modified: trunk/boost/numeric/odeint/integrate/integrate_adaptive.hpp
==============================================================================
--- trunk/boost/numeric/odeint/integrate/integrate_adaptive.hpp (original)
+++ trunk/boost/numeric/odeint/integrate/integrate_adaptive.hpp 2012-12-07 07:26:55 EST (Fri, 07 Dec 2012)
@@ -51,6 +51,10 @@
      */
 }
 
+/**
+ * \brief Second version to solve the forwarding problem,
+ * can be called with Boost.Range as start_state.
+ */
 template< class Stepper , class System , class State , class Time , class Observer >
 size_t integrate_adaptive(
         Stepper stepper , System system , const State &start_state ,
@@ -66,8 +70,8 @@
 
 
 
-/*
- * the two overloads are needed in order to solve the forwarding problem
+/**
+ * \brief integrate_adaptive without an observer.
  */
 template< class Stepper , class System , class State , class Time >
 size_t integrate_adaptive(
@@ -77,6 +81,10 @@
     return integrate_adaptive( stepper , system , start_state , start_time , end_time , dt , null_observer() );
 }
 
+/**
+ * \brief Second version to solve the forwarding problem,
+ * can be called with Boost.Range as start_state.
+ */
 template< class Stepper , class System , class State , class Time >
 size_t integrate_adaptive(
         Stepper stepper , System system , const State &start_state ,
@@ -86,6 +94,30 @@
 }
 
 
+/************* DOXYGEN ************/
+
+ /**
+ * \fn integrate_adaptive( Stepper stepper , System system , State &start_state , Time start_time , Time end_time , Time dt , Observer observer )
+ * \brief Integrates the ODE with adaptive step size.
+ *
+ * This function integrates the ODE given by system with the given stepper.
+ * The observer is called after each step. If the stepper has no error
+ * control, the step size remains constant and the observer is calleda at
+ * equidistant time points t0+n*dt. If the stepper is a ControlledStepper,
+ * the step size is adjusted and the observer is called in non-equidistant
+ * intervals.
+ *
+ * \param stepper The stepper to be used for numerical integration.
+ * \param system Function/Functor defining the rhs of the ODE.
+ * \param start_state The initial condition x0.
+ * \param start_time The initial time t0.
+ * \param end_time The final integration time tend.
+ * \param dt The time step between observer calls, _not_ neccessarily the
+ * time step of the integration.
+ * \param observer Function/Functor called at equidistant time intervals.
+ * \return The number of steps performed.
+ */
+
 } // namespace odeint
 } // namespace numeric
 } // namespace boost

Modified: trunk/boost/numeric/odeint/integrate/integrate_const.hpp
==============================================================================
--- trunk/boost/numeric/odeint/integrate/integrate_const.hpp (original)
+++ trunk/boost/numeric/odeint/integrate/integrate_const.hpp 2012-12-07 07:26:55 EST (Fri, 07 Dec 2012)
@@ -60,7 +60,10 @@
       }
 }
 
-
+/**
+ * \brief Second version to solve the forwarding problem,
+ * can be called with Boost.Range as start_state.
+ */
 template< class Stepper , class System , class State , class Time , class Observer >
 size_t integrate_const(
         Stepper stepper , System system , const State &start_state ,
@@ -88,8 +91,8 @@
 
 
 
-/*
- * Without observers
+/**
+ * \brief integrate_const without observer calls
  */
 template< class Stepper , class System , class State , class Time >
 size_t integrate_const(
@@ -100,6 +103,10 @@
     return integrate_const( stepper , system , start_state , start_time , end_time , dt , null_observer() );
 }
 
+/**
+ * \brief Second version to solve the forwarding problem,
+ * can be called with Boost.Range as start_state.
+ */
 template< class Stepper , class System , class State , class Time >
 size_t integrate_const(
         Stepper stepper , System system , const State &start_state ,
@@ -114,6 +121,31 @@
 
 
 
+/********* DOXYGEN *********/
+ /**
+ * \fn integrate_const( Stepper stepper , System system , State &start_state , Time start_time , Time end_time , Time dt , Observer observer )
+ * \brief Integrates the ODE with constant step size.
+ *
+ * Integrates the ODE defined by system using the given stepper.
+ * This method ensures that the observer is called at constant intervals dt.
+ * If the Stepper is a normal stepper without step size control, dt is also
+ * used for the numerical scheme. If a ControlledStepper is provided, the
+ * algorithm might reduce the step size to meet the error bounds, but it is
+ * ensured that the observer is always called at equidistant time points
+ * t0 + n*dt. If a DenseOutputStepper is used, the step size also may vary
+ * and the dense output is used to call the observer at equidistant time
+ * points.
+ *
+ * \param stepper The stepper to be used for numerical integration.
+ * \param system Function/Functor defining the rhs of the ODE.
+ * \param start_state The initial condition x0.
+ * \param start_time The initial time t0.
+ * \param end_time The final integration time tend.
+ * \param dt The time step between observer calls, _not_ neccessarily the
+ * time step of the integration.
+ * \param observer Function/Functor called at equidistant time intervals.
+ * \return The number of steps performed.
+ */
 
 } // namespace odeint
 } // namespace numeric

Modified: trunk/boost/numeric/odeint/integrate/integrate_n_steps.hpp
==============================================================================
--- trunk/boost/numeric/odeint/integrate/integrate_n_steps.hpp (original)
+++ trunk/boost/numeric/odeint/integrate/integrate_n_steps.hpp 2012-12-07 07:26:55 EST (Fri, 07 Dec 2012)
@@ -47,6 +47,9 @@
                 observer , typename Stepper::stepper_category() );
 }
 
+/**
+ * \brief Solves the forwarding problem, can be called with Boost.Range as start_state.
+ */
 template< class Stepper , class System , class State , class Time , class Observer >
 Time integrate_n_steps(
         Stepper stepper , System system , const State &start_state ,
@@ -60,14 +63,8 @@
 }
 
 
-
-
-
-
-
-
-/*
- * the two overloads are needed in order to solve the forwarding problem
+/**
+ * \brief The same function as above, but without observer calls.
  */
 template< class Stepper , class System , class State , class Time >
 Time integrate_n_steps(
@@ -77,6 +74,9 @@
     return integrate_n_steps( stepper , system , start_state , start_time , dt , num_of_steps , null_observer() );
 }
 
+/**
+ * \brief Solves the forwarding problem, can be called with Boost.Range as start_state.
+ */
 template< class Stepper , class System , class State , class Time >
 Time integrate_n_steps(
         Stepper stepper , System system , const State &start_state ,
@@ -87,6 +87,33 @@
 
 
 
+/************* DOXYGEN *************/
+ /**
+ * \fn Time integrate_n_steps( Stepper stepper , System system , State &start_state , Time start_time , Time dt , size_t num_of_steps , Observer observer )
+ * \brief Integrates the ODE with constant step size.
+ *
+ * This function is similar to integrate_const. The observer is called at
+ * equidistant time intervals t0 + n*dt.
+ * If the Stepper is a normal stepper without step size control, dt is also
+ * used for the numerical scheme. If a ControlledStepper is provided, the
+ * algorithm might reduce the step size to meet the error bounds, but it is
+ * ensured that the observer is always called at equidistant time points
+ * t0 + n*dt. If a DenseOutputStepper is used, the step size also may vary
+ * and the dense output is used to call the observer at equidistant time
+ * points. The final integration time is always t0 + num_of_steps*dt.
+ *
+ * \param stepper The stepper to be used for numerical integration.
+ * \param system Function/Functor defining the rhs of the ODE.
+ * \param start_state The initial condition x0.
+ * \param start_time The initial time t0.
+ * \param dt The time step between observer calls, _not_ neccessarily the
+ * time step of the integration.
+ * \param num_of_steps Number of steps to be performed
+ * \param observer Function/Functor called at equidistant time intervals.
+ * \return The number of steps performed.
+ */
+
+
 
 } // namespace odeint
 } // namespace numeric

Modified: trunk/boost/numeric/odeint/integrate/integrate_times.hpp
==============================================================================
--- trunk/boost/numeric/odeint/integrate/integrate_times.hpp (original)
+++ trunk/boost/numeric/odeint/integrate/integrate_times.hpp 2012-12-07 07:26:55 EST (Fri, 07 Dec 2012)
@@ -46,6 +46,9 @@
             observer , typename Stepper::stepper_category() );
 }
 
+/**
+ * \brief Solves the forwarding problem, can be called with Boost.Range as start_state.
+ */
 template< class Stepper , class System , class State , class TimeIterator , class Time , class Observer >
 size_t integrate_times(
         Stepper stepper , System system , const State &start_state ,
@@ -58,9 +61,8 @@
             observer , typename Stepper::stepper_category() );
 }
 
-/*
- * Range Version:
- * the two overloads are needed in order to solve the forwarding problem
+/**
+ * \brief The same function as above, but without observer calls.
  */
 template< class Stepper , class System , class State , class TimeRange , class Time , class Observer >
 size_t integrate_times(
@@ -73,6 +75,9 @@
             boost::begin( times ) , boost::end( times ) , dt , observer );
 }
 
+/**
+ * \brief Solves the forwarding problem, can be called with Boost.Range as start_state.
+ */
 template< class Stepper , class System , class State , class TimeRange , class Time , class Observer >
 size_t integrate_times(
         Stepper stepper , System system , const State &start_state ,
@@ -84,6 +89,39 @@
             boost::begin( times ) , boost::end( times ) , dt , observer );
 }
 
+
+
+
+/********* DOXYGEN ***********/
+
+ /**
+ * \fn size_t integrate_times( Stepper stepper , System system , State &start_state , TimeIterator times_start , TimeIterator times_end , Time dt , Observer observer )
+ * \brief Integrates the ODE with observer calls at given time points.
+ *
+ * Integrates the ODE given by system using the given stepper. This function
+ * does observer calls at the subsequent time points given by the range
+ * times_start, times_end. If the stepper has not step size control, the
+ * step size might be reduced occasionally to ensure observer calls exactly
+ * at the time points from the given sequence. If the stepper is a
+ * ControlledStepper, the step size is adjusted to meet the error bounds,
+ * but also might be reduced occasionally to ensure correct observer calls.
+ * If a DenseOutputStepper is provided, the dense output functionality is
+ * used to call the observer at the given times. The end time of the
+ * integration is always *(end_time-1).
+ *
+ * \param stepper The stepper to be used for numerical integration.
+ * \param system Function/Functor defining the rhs of the ODE.
+ * \param start_state The initial condition x0.
+ * \param times_start Iterator to the start time
+ * \param times_end Iterator to the end time
+ * \param dt The time step between observer calls, _not_ neccessarily the
+ * time step of the integration.
+ * \param observer Function/Functor called at equidistant time intervals.
+ * \return The number of steps performed.
+ */
+
+
+
 } // namespace odeint
 } // namespace numeric
 } // namespace boost

Modified: trunk/boost/numeric/odeint/stepper/adams_bashforth.hpp
==============================================================================
--- trunk/boost/numeric/odeint/stepper/adams_bashforth.hpp (original)
+++ trunk/boost/numeric/odeint/stepper/adams_bashforth.hpp 2012-12-07 07:26:55 EST (Fri, 07 Dec 2012)
@@ -47,9 +47,6 @@
 namespace odeint {
 
 
-/*
- * Static explicit Adams-Bashforth multistep-solver without step size control and without dense output.
- */
 template<
 size_t Steps ,
 class State ,
@@ -63,7 +60,11 @@
>
 class adams_bashforth : public algebra_stepper_base< Algebra , Operations >
 {
+
+#ifndef DOXYGEN_SKIP
     BOOST_STATIC_ASSERT(( Steps > 0 ));
+ BOOST_STATIC_ASSERT(( Steps < 9 ));
+#endif
 
 public :
 
@@ -76,11 +77,13 @@
     typedef Resizer resizer_type;
     typedef stepper_tag stepper_category;
 
+ typedef InitializingStepper initializing_stepper_type;
+
     typedef typename algebra_stepper_base< Algebra , Operations >::algebra_type algebra_type;
     typedef typename algebra_stepper_base< Algebra , Operations >::operations_type operations_type;
+#ifndef DOXYGEN_SKIP
     typedef adams_bashforth< Steps , State , Value , Deriv , Time , Algebra , Operations , Resizer , InitializingStepper > stepper_type;
- typedef InitializingStepper initializing_stepper_type;
-
+#endif
     static const size_t steps = Steps;
 
 
@@ -91,9 +94,9 @@
     typedef detail::rotating_buffer< wrapped_deriv_type , steps > step_storage_type;
 
 
+
     order_type order( void ) const { return order_value; }
 
-
     adams_bashforth( const algebra_type &algebra = algebra_type() )
     : m_step_storage() , m_resizer() , m_coefficients() ,
       m_steps_initialized( 0 ) , m_initializing_stepper() ,
@@ -126,6 +129,9 @@
         do_step( system , x , t , x , dt );
     }
 
+ /**
+ * \brief Second version to solve the forwarding problem, can be called with Boost.Range as StateInOut.
+ */
     template< class System , class StateInOut >
     void do_step( System system , const StateInOut &x , time_type t , time_type dt )
     {
@@ -139,12 +145,16 @@
      *
      * solves the forwarding problem
      */
+
     template< class System , class StateIn , class StateOut >
     void do_step( System system , const StateIn &in , time_type t , StateOut &out , time_type dt )
     {
         do_step_impl( system , in , t , out , dt );
     }
 
+ /**
+ * \brief Second version to solve the forwarding problem, can be called with Boost.Range as StateOut.
+ */
     template< class System , class StateIn , class StateOut >
     void do_step( System system , const StateIn &in , time_type t , const StateOut &out , time_type dt )
     {
@@ -152,18 +162,6 @@
     }
 
 
-
-
-
-
-
-
-
-
-
-
-
-
     template< class StateType >
     void adjust_size( const StateType &x )
     {
@@ -274,7 +272,140 @@
 };
 
 
+/***** DOXYGEN *****/
+
+/**
+ * \class adams_bashforth
+ * \brief The Adams-Bashforth multistep algorithm.
+ *
+ * The Adams-Bashforth method is a multi-step algorithm with configurable step
+ * number. The step number is specified as template parameter Steps and it
+ * then uses the result from the previous Steps steps. See also
+ * en.wikipedia.org/wiki/Linear_multistep_method.
+ * Currently, a maximum of Steps=8 is supported.
+ * The method is explicit and fullfils the Stepper concept. Step size control
+ * or continous output are not provided.
+ *
+ * This class derives from algebra_base and inherits its interface via
+ * CRTP (current recurring template pattern). For more details see
+ * algebra_stepper_base.
+ *
+ * \tparam Steps The number of steps (maximal 8).
+ * \tparam State The state type.
+ * \tparam Value The value type.
+ * \tparam Deriv The type representing the time derivative of the state.
+ * \tparam Time The time representing the independent variable - the time.
+ * \tparam Algebra The algebra type.
+ * \tparam Operations The operations type.
+ * \tparam Resizer The resizer policy type.
+ * \tparam InitializingStepper The stepper for the first two steps.
+ */
+
+ /**
+ * \fn adams_bashforth::adams_bashforth( const algebra_type &algebra )
+ * \brief Constructs the adams_bashforth class. This constructor can be used as a default
+ * constructor if the algebra has a default constructor.
+ * \param algebra A copy of algebra is made and stored.
+ */
+
+ /**
+ * \fn order_type adams_bashforth::order( void ) const
+ * \brief Returns the order of the algorithm, which is equal to the number of steps.
+ * \return order of the method.
+ */
+
+ /**
+ * \fn void adams_bashforth::do_step( System system , StateInOut &x , time_type t , time_type dt )
+ * \brief This method performs one step. It transforms the result in-place.
+ *
+ * \param system The system function to solve, hence the r.h.s. of the ordinary differential equation. It must fullfil the
+ * Simple System concept.
+ * \param x The state of the ODE which should be solved. After calling do_step the result is updated in x.
+ * \param t The value of the time, at which the step should be performed.
+ * \param dt The step size.
+ */
+
+ /**
+ * \fn void adams_bashforth::do_step( System system , const StateIn &in , time_type t , StateOut &out , time_type dt )
+ * \brief The method performs one step with the stepper passed by Stepper. The state of the ODE is updated out-of-place.
+ *
+ * \param system The system function to solve, hence the r.h.s. of the ODE. It must fullfil the
+ * Simple System concept.
+ * \param in The state of the ODE which should be solved. in is not modified in this method
+ * \param t The value of the time, at which the step should be performed.
+ * \param out The result of the step is written in out.
+ * \param dt The step size.
+ */
+
+ /**
+ * \fn void adams_bashforth::adjust_size( const StateType &x )
+ * \brief Adjust the size of all temporaries in the stepper manually.
+ * \param x A state from which the size of the temporaries to be resized is deduced.
+ */
+
+
+ /**
+ * \fn const step_storage_type& adams_bashforth::step_storage( void ) const
+ * \brief Returns the storage of intermediate results.
+ * \return The storage of intermediate results.
+ */
+
+ /**
+ * \fn step_storage_type& adams_bashforth::step_storage( void )
+ * \brief Returns the storage of intermediate results.
+ * \return The storage of intermediate results.
+ */
 
+ /**
+ * \fn void adams_bashforth::initialize( ExplicitStepper explicit_stepper , System system , StateIn &x , time_type &t , time_type dt )
+ * \brief Initialized the stepper. Does Steps-1 steps with the explicit_stepper to fill the buffer.
+ * \param explicit_stepper the stepper used to fill the buffer of previous step results
+ * \param system The system function to solve, hence the r.h.s. of the ordinary differential equation. It must fullfil the
+ * Simple System concept.
+ * \param x The state of the ODE which should be solved. After calling do_step the result is updated in x.
+ * \param t The value of the time, at which the step should be performed.
+ * \param dt The step size.
+ */
+
+ /**
+ * \fn void adams_bashforth::initialize( System system , StateIn &x , time_type &t , time_type dt )
+ * \brief Initialized the stepper. Does Steps-1 steps with an internal instance of InitializingStepper to fill the buffer.
+ * \note The state x and time t are updated to the values after Steps-1 initial steps.
+ * \param system The system function to solve, hence the r.h.s. of the ordinary differential equation. It must fullfil the
+ * Simple System concept.
+ * \param x The initial state of the ODE which should be solved, updated in this method.
+ * \param t The initial value of the time, updated in this method.
+ * \param dt The step size.
+ */
+
+ /**
+ * \fn void adams_bashforth::reset( void )
+ * \brief Resets the internal buffer of the stepper.
+ */
+
+ /**
+ * \fn bool adams_bashforth::is_initialized( void ) const
+ * \brief Returns true if the stepper has been initialized.
+ * \return bool true if stepper is initialized, false otherwise
+ */
+
+ /**
+ * \fn const initializing_stepper_type& adams_bashforth::initializing_stepper( void ) const
+ * \brief Returns the internal initializing stepper instance.
+ * \return initializing_stepper
+ */
+
+ /**
+ * \fn const initializing_stepper_type& adams_bashforth::initializing_stepper( void ) const
+ * \brief Returns the internal initializing stepper instance.
+ * \return initializing_stepper
+ */
+
+ /**
+ * \fn initializing_stepper_type& adams_bashforth::initializing_stepper( void )
+ * \brief Returns the internal initializing stepper instance.
+ * \return initializing_stepper
+ */
 
 } // odeint
 } // numeric

Modified: trunk/boost/numeric/odeint/stepper/adams_bashforth_moulton.hpp
==============================================================================
--- trunk/boost/numeric/odeint/stepper/adams_bashforth_moulton.hpp (original)
+++ trunk/boost/numeric/odeint/stepper/adams_bashforth_moulton.hpp 2012-12-07 07:26:55 EST (Fri, 07 Dec 2012)
@@ -37,9 +37,6 @@
 namespace odeint {
 
 
-/*
- * Static Adams-Bashforth-Moulton multistep-solver without step size control and without dense output.
- */
 template<
 size_t Steps ,
 class State ,
@@ -53,6 +50,11 @@
 class adams_bashforth_moulton
 {
 
+#ifndef DOXYGEN_SKIP
+ BOOST_STATIC_ASSERT(( Steps > 0 ));
+ BOOST_STATIC_ASSERT(( Steps < 9 ));
+#endif
+
 public :
 
     typedef State state_type;
@@ -67,13 +69,14 @@
     typedef stepper_tag stepper_category;
 
     static const size_t steps = Steps;
-
+#ifndef DOXYGEN_SKIP
     typedef adams_bashforth< steps , state_type , value_type , deriv_type , time_type , algebra_type , operations_type , resizer_type > adams_bashforth_type;
     typedef adams_moulton< steps , state_type , value_type , deriv_type , time_type , algebra_type , operations_type , resizer_type > adams_moulton_type;
-
+#endif //DOXYGEN_SKIP
     typedef unsigned short order_type;
     static const order_type order_value = steps + 1;
 
+ /** \brief Constructs the adams_bashforth class. */
     adams_bashforth_moulton( void )
     : m_adams_bashforth() , m_adams_moulton( m_adams_bashforth.algebra() )
     { }
@@ -91,6 +94,9 @@
         m_adams_moulton.do_step( system , x , t , dt , m_adams_bashforth.step_storage() );
     }
 
+ /**
+ * \brief Second version to solve the forwarding problem, can be called with Boost.Range as StateInOut.
+ */
     template< class System , class StateInOut >
     void do_step( System system , const StateInOut &x , time_type t , time_type dt )
     {
@@ -105,6 +111,9 @@
         m_adams_moulton.do_step( system , out , t , dt , m_adams_bashforth.step_storage() );
     }
 
+ /**
+ * \brief Second version to solve the forwarding problem, can be called with Boost.Range as StateOut.
+ */
     template< class System , class StateIn , class StateOut >
     void do_step( System system , const StateIn &in , time_type t , StateOut &out , time_type dt )
     {
@@ -112,6 +121,7 @@
         m_adams_moulton.do_step( system , out , t , dt , m_adams_bashforth.step_storage() );
     }
 
+
     template< class StateType >
     void adjust_size( const StateType &x )
     {
@@ -126,6 +136,7 @@
         m_adams_bashforth.initialize( explicit_stepper , system , x , t , dt );
     }
 
+
     template< class System , class StateIn >
     void initialize( System system , StateIn &x , time_type &t , time_type dt )
     {
@@ -141,6 +152,101 @@
 };
 
 
+/********* DOXYGEN ********/
+
+/**
+ * \class adams_bashforth_moulton
+ * \brief The Adams-Bashforth-Moulton multistep algorithm.
+ *
+ * The Adams-Bashforth method is a multi-step predictor-corrector algorithm
+ * with configurable step number. The step number is specified as template
+ * parameter Steps and it then uses the result from the previous Steps steps.
+ * See also
+ * en.wikipedia.org/wiki/Linear_multistep_method.
+ * Currently, a maximum of Steps=8 is supported.
+ * The method is explicit and fullfils the Stepper concept. Step size control
+ * or continous output are not provided.
+ *
+ * This class derives from algebra_base and inherits its interface via
+ * CRTP (current recurring template pattern). For more details see
+ * algebra_stepper_base.
+ *
+ * \tparam Steps The number of steps (maximal 8).
+ * \tparam State The state type.
+ * \tparam Value The value type.
+ * \tparam Deriv The type representing the time derivative of the state.
+ * \tparam Time The time representing the independent variable - the time.
+ * \tparam Algebra The algebra type.
+ * \tparam Operations The operations type.
+ * \tparam Resizer The resizer policy type.
+ * \tparam InitializingStepper The stepper for the first two steps.
+ */
+
+ /**
+ * \fn adams_bashforth_moulton::adams_bashforth_moulton( const algebra_type &algebra )
+ * \brief Constructs the adams_bashforth class. This constructor can be used as a default
+ * constructor if the algebra has a default constructor.
+ * \param algebra A copy of algebra is made and stored.
+ */
+
+ /**
+ * \fn adams_bashforth_moulton::order( void ) const
+ * \brief Returns the order of the algorithm, which is equal to the number of steps+1.
+ * \return order of the method.
+ */
+
+ /**
+ * \fn adams_bashforth_moulton::do_step( System system , StateInOut &x , time_type t , time_type dt )
+ * \brief This method performs one step. It transforms the result in-place.
+ *
+ * \param system The system function to solve, hence the r.h.s. of the ordinary differential equation. It must fullfil the
+ * Simple System concept.
+ * \param x The state of the ODE which should be solved. After calling do_step the result is updated in x.
+ * \param t The value of the time, at which the step should be performed.
+ * \param dt The step size.
+ */
+
+
+ /**
+ * \fn adams_bashforth_moulton::do_step( System system , const StateIn &in , time_type t , const StateOut &out , time_type dt )
+ * \brief The method performs one step with the stepper passed by Stepper. The state of the ODE is updated out-of-place.
+ *
+ * \param system The system function to solve, hence the r.h.s. of the ODE. It must fullfil the
+ * Simple System concept.
+ * \param in The state of the ODE which should be solved. in is not modified in this method
+ * \param t The value of the time, at which the step should be performed.
+ * \param out The result of the step is written in out.
+ * \param dt The step size.
+ */
+
+ /**
+ * \fn adams_bashforth_moulton::adjust_size( const StateType &x )
+ * \brief Adjust the size of all temporaries in the stepper manually.
+ * \param x A state from which the size of the temporaries to be resized is deduced.
+ */
+
+ /**
+ * \fn adams_bashforth_moulton::initialize( ExplicitStepper explicit_stepper , System system , StateIn &x , time_type &t , time_type dt )
+ * \brief Initialized the stepper. Does Steps-1 steps with the explicit_stepper to fill the buffer.
+ * \note The state x and time t are updated to the values after Steps-1 initial steps.
+ * \param explicit_stepper the stepper used to fill the buffer of previous step results
+ * \param system The system function to solve, hence the r.h.s. of the ordinary differential equation. It must fullfil the
+ * Simple System concept.
+ * \param x The initial state of the ODE which should be solved, updated after in this method.
+ * \param t The initial time, updated in this method.
+ * \param dt The step size.
+ */
+
+ /**
+ * \fn adams_bashforth_moulton::initialize( System system , StateIn &x , time_type &t , time_type dt )
+ * \brief Initialized the stepper. Does Steps-1 steps using the standard initializing stepper
+ * of the underlying adams_bashforth stepper.
+ * \param system The system function to solve, hence the r.h.s. of the ordinary differential equation. It must fullfil the
+ * Simple System concept.
+ * \param x The state of the ODE which should be solved. After calling do_step the result is updated in x.
+ * \param t The value of the time, at which the step should be performed.
+ * \param dt The step size.
+ */
 
 
 } // odeint

Modified: trunk/boost/numeric/odeint/stepper/base/algebra_stepper_base.hpp
==============================================================================
--- trunk/boost/numeric/odeint/stepper/base/algebra_stepper_base.hpp (original)
+++ trunk/boost/numeric/odeint/stepper/base/algebra_stepper_base.hpp 2012-12-07 07:26:55 EST (Fri, 07 Dec 2012)
@@ -23,6 +23,35 @@
 namespace numeric {
 namespace odeint {
 
+template< class Algebra , class Operations >
+class algebra_stepper_base
+{
+public:
+
+ typedef Algebra algebra_type;
+ typedef Operations operations_type;
+
+ algebra_stepper_base( const algebra_type &algebra = algebra_type() )
+ : m_algebra( algebra ) { }
+
+ algebra_type& algebra()
+ {
+ return m_algebra;
+ }
+
+ const algebra_type& algebra() const
+ {
+ return m_algebra;
+ }
+
+protected:
+
+ algebra_type m_algebra;
+};
+
+
+/******* DOXYGEN *******/
+
 /**
  * \class algebra_stepper_base
  * \brief Base class for all steppers with algebra and operations.
@@ -36,42 +65,23 @@
  * \tparam Operations The type of the operations. Must fullfil the Operations Concept, at least partially
  * to work with the stepper.
  */
-template< class Algebra , class Operations >
-class algebra_stepper_base
-{
-public:
-
- typedef Algebra algebra_type;
- typedef Operations operations_type;
 
     /**
+ * \fn algebra_stepper_base::algebra_stepper_base( const algebra_type &algebra = algebra_type() )
      * \brief Constructs a algebra_stepper_base and creates the algebra. This constructor can be used as a default
      * constructor if the algebra has a default constructor.
      * \param algebra The algebra_stepper_base stores and uses a copy of algebra.
      */
- algebra_stepper_base( const algebra_type &algebra = algebra_type() )
- : m_algebra( algebra ) { }
 
     /**
+ * \fn algebra_type& algebra_stepper_base::algebra()
      * \return A reference to the algebra which is held by this class.
      */
- algebra_type& algebra()
- {
- return m_algebra;
- }
 
     /**
+ * \fn const algebra_type& algebra_stepper_base::algebra() const
      * \return A const reference to the algebra which is held by this class.
      */
- const algebra_type& algebra() const
- {
- return m_algebra;
- }
-
-protected:
-
- algebra_type m_algebra;
-};
 
 } // odeint
 } // numeric

Modified: trunk/boost/numeric/odeint/stepper/base/explicit_error_stepper_base.hpp
==============================================================================
--- trunk/boost/numeric/odeint/stepper/base/explicit_error_stepper_base.hpp (original)
+++ trunk/boost/numeric/odeint/stepper/base/explicit_error_stepper_base.hpp 2012-12-07 07:26:55 EST (Fri, 07 Dec 2012)
@@ -51,72 +51,6 @@
     * do_step( sys , in , t , out , dt , xerr )
     * do_step( sys , in , dxdt , t , out , dt , xerr )
  */
-/**
- * \class explicit_error_stepper_base
- * \brief Base class for explicit steppers with error estimation. This class can used with
- * controlled steppers for step size control.
- *
- * This class serves as the base class for all explicit steppers with algebra and operations. In contrast to
- * explicit_stepper_base it also estimates the error and can be used in a controlled stepper to provide
- * step size control.
- *
- * \note This stepper provides `do_step` methods with and without error estimation. It has therefore three orders,
- * one for the order of a step if the error is not estimated. The other two orders are the orders of the step and
- * the error step if the error estimation is performed.
- *
- * explicit_error_stepper_base is used as the interface in a CRTP (currently recurring template
- * pattern). In order to work correctly the parent class needs to have a method
- * `do_step_impl( system , in , dxdt_in , t , out , dt , xerr )`.
- * explicit_error_stepper_base derives from algebra_stepper_base.
- *
- * explicit_error_stepper_base provides several overloaded `do_step` methods, see the list below. Only two of them
- * are needed to fullfil the Error Stepper concept. The other ones are for convenience and for performance. Some
- * of them simply update the state out-of-place, while other expect that the first derivative at `t` is passed to the
- * stepper.
- *
- * - `do_step( sys , x , t , dt )` - The classical `do_step` method needed to fullfil the Error Stepper concept. The
- * state is updated in-place. A type modelling a Boost.Range can be used for x.
- * - `do_step( sys , x , dxdt , t , dt )` - This method updates the state in-place, but the derivative at the point `t`
- * must be explicitely passed in `dxdt`.
- * - `do_step( sys , in , t , out , dt )` - This method updates the state out-of-place, hence the result of the step
- * is stored in `out`.
- * - `do_step( sys , in , dxdt , t , out , dt )` - This method update the state out-of-place and expects that the
- * derivative at the point `t` is explicitely passed in `dxdt`. It is a combination of the two `do_step` methods
- * above.
- * - `do_step( sys , x , t , dt , xerr )` - This `do_step` method is needed to fullfil the Error Stepper concept. The
- * state is updated in-place and an error estimate is calculated. A type modelling a Boost.Range can be used for x.
- * - `do_step( sys , x , dxdt , t , dt , xerr )` - This method updates the state in-place, but the derivative at the
- * point `t` must be passed in `dxdt`. An error estimate is calculated.
- * - `do_step( sys , in , t , out , dt , xerr )` - This method updates the state out-of-place and estimates the error
- * during the step.
- * - `do_step( sys , in , dxdt , t , out , dt , xerr )` - This methods updates the state out-of-place and estimates
- * the error during the step. Furthermore, the derivative at `t` must be passed in `dxdt`.
- *
- * \note The system is always passed as value, which might result in poor performance if it contains data. In this
- * case it can be used with `boost::ref` or `std::ref`, for example `stepper.do_step( boost::ref( sys ) , x , t , dt );`
- *
- * \note The time `t` is not advanced by the stepper. This has to done manually, or by the appropriate `integrate`
- * routines or `iterator`s.
- *
- * \tparam Stepper The stepper on which this class should work. It is used via CRTP, hence explicit_stepper_base
- * provides the interface for the Stepper.
- * \tparam Order The order of a stepper if the stepper is used without error estimation.
- * \tparam StepperOrder The order of a step if the stepper is used with error estimation. Usually Order and StepperOrder have
- * the same value.
- * \tparam ErrorOrder The order of the error step if the stepper is used with error estimation.
- * \tparam State The state type for the stepper.
- * \tparam Value The value type for the stepper. This should be a floating point type, like float,
- * double, or a multiprecision type. It must not neccessary be the value_type of the State. For example
- * the State can be a `vector< complex< double > >` in this case the Value must be double.
- * The default value is double.
- * \tparam Deriv The type representing time derivatives of the state type. It is usually the same type as the
- * state type, only if used with Boost.Units both types differ.
- * \tparam Time The type representing the time. Usually the same type as the value type. When Boost.Units is
- * used, this type has usually a unit.
- * \tparam Algebra The algebra type which must fullfil the Algebra Concept.
- * \tparam Operations The type for the operations wich must fullfil the Operations Concept.
- * \tparam Resizer The resizer policy class.
- */
 template<
 class Stepper ,
 unsigned short Order ,
@@ -158,34 +92,20 @@
     static const order_type error_order_value = ErrorOrder;
 
 
- /**
- * \brief Constructs a explicit_stepper_base class. This constructor can be used as a default
- * constructor if the algebra has a default constructor.
- * \param algebra A copy of algebra is made and stored inside explicit_stepper_base.
- */
     explicit_error_stepper_base( const algebra_type &algebra = algebra_type() )
     : algebra_stepper_base_type( algebra )
     { }
 
- /**
- * \return Returns the order of the stepper if it used without error estimation.
- */
     order_type order( void ) const
     {
         return order_value;
     }
 
- /**
- * \return Returns the order of a step if the stepper is used without error estimation.
- */
     order_type stepper_order( void ) const
     {
         return stepper_order_value;
     }
 
- /**
- * \return Returns the order of an error step if the stepper is used without error estimation.
- */
     order_type error_order( void ) const
     {
         return error_order_value;
@@ -198,15 +118,6 @@
      *
      * the two overloads are needed in order to solve the forwarding problem
      */
- /**
- * \brief This method performs one step. It transforms the result in-place.
- *
- * \param system The system function to solve, hence the r.h.s. of the ordinary differential equation. It must fullfil the
- * Simple System concept.
- * \param x The state of the ODE which should be solved. After calling do_step the result is updated in x.
- * \param t The value of the time, at which the step should be performed.
- * \param dt The step size.
- */
     template< class System , class StateInOut >
     void do_step( System system , StateInOut &x , time_type t , time_type dt )
     {
@@ -214,16 +125,7 @@
     }
 
     /**
- * \brief This method performs one step with the stepper passed by Stepper.
- * It transforms the result in-place. This method is needed in order to solve the forwarding problem.
- * The difference to the other version is that it can be used like
- * `stepper.do_step( sys , make_range( iter1 , iter2 ) , t , dt )`
- *
- * \param system The system function to solve, hence the r.h.s. of the ordinary differential equation. It must fullfil the
- * Simple System concept.
- * \param x The state of the ODE which should be solved. After calling do_step the result is updated in x.
- * \param t The value of the time, at which the step should be performed.
- * \param dt The step size.
+ * \brief Second version to solve the forwarding problem, can be called with Boost.Range as StateInOut.
      */
     template< class System , class StateInOut >
     void do_step( System system , const StateInOut &x , time_type t , time_type dt )
@@ -240,27 +142,6 @@
      *
      * the disable is needed to avoid ambiguous overloads if state_type = time_type
      */
- /**
- * \brief The method performs one step with the stepper passed by Stepper. Additionally to the other method
- * the derivative of x is also passed to this method. It is equivalent to
- *
- * \code
- * sys( x , dxdt , t );
- * stepper.do_step( sys , x , dxdt , t , dt );
- * \endcode
- *
- * The result is updated in place in x. This method is disabled if Time and Deriv are of the same type. In this
- * case the method could not be distinguished from other `do_step` versions.
- *
- * \note This method does not solve the forwarding problem.
- *
- * \param system The system function to solve, hence the r.h.s. of the ODE. It must fullfil the
- * Simple System concept.
- * \param x The state of the ODE which should be solved. After calling do_step the result is updated in x.
- * \param dxdt The derivative of x at t.
- * \param t The value of the time, at which the step should be performed.
- * \param dt The step size.
- */
     template< class System , class StateInOut , class DerivIn >
     typename boost::disable_if< boost::is_same< DerivIn , time_type > , void >::type
     do_step( System system , StateInOut &x , const DerivIn &dxdt , time_type t , time_type dt )
@@ -276,19 +157,6 @@
      *
      * the disable is needed to avoid ambiguous overloads if state_type = time_type
      */
- /**
- * \brief The method performs one step with the stepper passed by Stepper. The state of the ODE is updated out-of-place.
- * This method is disabled if StateIn and Time are the same type. In this case the method can not be distinguished from
- * other `do_step` variants.
- * \note This method does not solve the forwarding problem.
- *
- * \param system The system function to solve, hence the r.h.s. of the ODE. It must fullfil the
- * Simple System concept.
- * \param in The state of the ODE which should be solved. in is not modified in this method
- * \param t The value of the time, at which the step should be performed.
- * \param out The result of the step is written in out.
- * \param dt The step size.
- */
     template< class System , class StateIn , class StateOut >
     typename boost::disable_if< boost::is_same< StateIn , time_type > , void >::type
     do_step( System system , const StateIn &in , time_type t , StateOut &out , time_type dt )
@@ -306,27 +174,6 @@
      *
      * the disable is needed to avoid ambiguous overloads if state_type = time_type
      */
- /**
- * \brief The method performs one step with the stepper passed by Stepper. The state of the ODE is updated out-of-place.
- * Furthermore, the derivative of x at t is passed to the stepper. It is equivalent to:
- *
- * \code
- * sys( in , dxdt , t );
- * stepper.do_step( sys , in , dxdt , t , out , dt );
- * \endcode
- *
- * This method is disabled if DerivIn and Time are of same type.
- *
- * \note This method does not solve the forwarding problem.
- *
- * \param system The system function to solve, hence the r.h.s. of the ODE. It must fullfil the
- * Simple System concept.
- * \param in The state of the ODE which should be solved. in is not modified in this method
- * \param dxdt The derivative of x at t.
- * \param t The value of the time, at which the step should be performed.
- * \param out The result of the step is written in out.
- * \param dt The step size.
- */
     template< class System , class StateIn , class DerivIn , class StateOut >
     typename boost::disable_if< boost::is_same< DerivIn , time_type > , void >::type
     do_step( System system , const StateIn &in , const DerivIn &dxdt , time_type t , StateOut &out , time_type dt )
@@ -343,17 +190,6 @@
      *
      * the two overloads are needed in order to solve the forwarding problem
      */
- /**
- * \brief The method performs one step with the stepper passed by Stepper and estimates the error. The state of the ODE
- * is updated in-place.
- *
- * \param system The system function to solve, hence the r.h.s. of the ODE. It must fullfil the
- * Simple System concept.
- * \param x The state of the ODE which should be solved. x is updated by this method.
- * \param t The value of the time, at which the step should be performed.
- * \param dt The step size.
- * \param xerr The estimation of the error is stored in xerr.
- */
     template< class System , class StateInOut , class Err >
     void do_step( System system , StateInOut &x , time_type t , time_type dt , Err &xerr )
     {
@@ -361,17 +197,7 @@
     }
 
     /**
- * \brief The method performs one step with the stepper passed by Stepper and estimates the error. The state of the ODE
- * is updated in-place. This method is needed in order to solve the forwarding problem.
- * The difference to the other version is that it can be used like
- * `stepper.do_step( sys , make_range( iter1 , iter2 ) , t , dt )`
- *
- * \param system The system function to solve, hence the r.h.s. of the ODE. It must fullfil the
- * Simple System concept.
- * \param x The state of the ODE which should be solved. x is updated by this method.
- * \param t The value of the time, at which the step should be performed.
- * \param dt The step size.
- * \param xerr The estimation of the error is stored in xerr.
+ * \brief Second version to solve the forwarding problem, can be called with Boost.Range as StateInOut.
      */
     template< class System , class StateInOut , class Err >
     void do_step( System system , const StateInOut &x , time_type t , time_type dt , Err &xerr )
@@ -387,28 +213,6 @@
      *
      * the disable is needed to avoid ambiguous overloads if state_type = time_type
      */
- /**
- * \brief The method performs one step with the stepper passed by Stepper. Additionally to the other method
- * the derivative of x is also passed to this method. It is equivalent to
- *
- * \code
- * sys( x , dxdt , t );
- * stepper.do_step( sys , x , dxdt , t , dt , xerr );
- * \endcode
- *
- * The result is updated in place in x. This method is disabled if Time and DerivIn are of the same type. In this
- * case the method could not be distinguished from other `do_step` versions.
- *
- * \note This method does not solve the forwarding problem.
- *
- * \param system The system function to solve, hence the r.h.s. of the ODE. It must fullfil the
- * Simple System concept.
- * \param x The state of the ODE which should be solved. After calling do_step the result is updated in x.
- * \param dxdt The derivative of x at t.
- * \param t The value of the time, at which the step should be performed.
- * \param dt The step size.
- * \param xerr The error estimate is stored in xerr.
- */
     template< class System , class StateInOut , class DerivIn , class Err >
     typename boost::disable_if< boost::is_same< DerivIn , time_type > , void >::type
     do_step( System system , StateInOut &x , const DerivIn &dxdt , time_type t , time_type dt , Err &xerr )
@@ -422,20 +226,6 @@
      *
      * this version does not solve the forwarding problem, boost.range can not be used
      */
- /**
- * \brief The method performs one step with the stepper passed by Stepper. The state of the ODE is updated out-of-place.
- * Furthermore, the error is estimated.
- *
- * \note This method does not solve the forwarding problem.
- *
- * \param system The system function to solve, hence the r.h.s. of the ODE. It must fullfil the
- * Simple System concept.
- * \param in The state of the ODE which should be solved. in is not modified in this method
- * \param t The value of the time, at which the step should be performed.
- * \param out The result of the step is written in out.
- * \param dt The step size.
- * \param xerr The error estimate.
- */
     template< class System , class StateIn , class StateOut , class Err >
     void do_step( System system , const StateIn &in , time_type t , StateOut &out , time_type dt , Err &xerr )
     {
@@ -451,38 +241,12 @@
      *
      * this version does not solve the forwarding problem, boost.range can not be used
      */
- /**
- * \brief The method performs one step with the stepper passed by Stepper. The state of the ODE is updated out-of-place.
- * Furthermore, the derivative of x at t is passed to the stepper and the error is estimated. It is equivalent to:
- *
- * \code
- * sys( in , dxdt , t );
- * stepper.do_step( sys , in , dxdt , t , out , dt );
- * \endcode
- *
- * This method is disabled if DerivIn and Time are of same type.
- *
- * \note This method does not solve the forwarding problem.
- *
- * \param system The system function to solve, hence the r.h.s. of the ODE. It must fullfil the
- * Simple System concept.
- * \param in The state of the ODE which should be solved. in is not modified in this method
- * \param dxdt The derivative of x at t.
- * \param t The value of the time, at which the step should be performed.
- * \param out The result of the step is written in out.
- * \param dt The step size.
- * \param xerr The error estimate.
- */
     template< class System , class StateIn , class DerivIn , class StateOut , class Err >
     void do_step( System system , const StateIn &in , const DerivIn &dxdt , time_type t , StateOut &out , time_type dt , Err &xerr )
     {
         this->stepper().do_step_impl( system , in , dxdt , t , out , dt , xerr );
     }
 
- /**
- * \brief Adjust the size of all temporaries in the stepper manually.
- * \param x A state from which the size of the temporaries to be resized is deduced.
- */
     template< class StateIn >
     void adjust_size( const StateIn &x )
     {
@@ -536,6 +300,259 @@
 };
 
 
+
+
+/******** DOXYGEN *******/
+
+/**
+ * \class explicit_error_stepper_base
+ * \brief Base class for explicit steppers with error estimation. This class can used with
+ * controlled steppers for step size control.
+ *
+ * This class serves as the base class for all explicit steppers with algebra and operations. In contrast to
+ * explicit_stepper_base it also estimates the error and can be used in a controlled stepper to provide
+ * step size control.
+ *
+ * \note This stepper provides `do_step` methods with and without error estimation. It has therefore three orders,
+ * one for the order of a step if the error is not estimated. The other two orders are the orders of the step and
+ * the error step if the error estimation is performed.
+ *
+ * explicit_error_stepper_base is used as the interface in a CRTP (currently recurring template
+ * pattern). In order to work correctly the parent class needs to have a method
+ * `do_step_impl( system , in , dxdt_in , t , out , dt , xerr )`.
+ * explicit_error_stepper_base derives from algebra_stepper_base.
+ *
+ * explicit_error_stepper_base provides several overloaded `do_step` methods, see the list below. Only two of them
+ * are needed to fullfil the Error Stepper concept. The other ones are for convenience and for performance. Some
+ * of them simply update the state out-of-place, while other expect that the first derivative at `t` is passed to the
+ * stepper.
+ *
+ * - `do_step( sys , x , t , dt )` - The classical `do_step` method needed to fullfil the Error Stepper concept. The
+ * state is updated in-place. A type modelling a Boost.Range can be used for x.
+ * - `do_step( sys , x , dxdt , t , dt )` - This method updates the state in-place, but the derivative at the point `t`
+ * must be explicitely passed in `dxdt`.
+ * - `do_step( sys , in , t , out , dt )` - This method updates the state out-of-place, hence the result of the step
+ * is stored in `out`.
+ * - `do_step( sys , in , dxdt , t , out , dt )` - This method update the state out-of-place and expects that the
+ * derivative at the point `t` is explicitely passed in `dxdt`. It is a combination of the two `do_step` methods
+ * above.
+ * - `do_step( sys , x , t , dt , xerr )` - This `do_step` method is needed to fullfil the Error Stepper concept. The
+ * state is updated in-place and an error estimate is calculated. A type modelling a Boost.Range can be used for x.
+ * - `do_step( sys , x , dxdt , t , dt , xerr )` - This method updates the state in-place, but the derivative at the
+ * point `t` must be passed in `dxdt`. An error estimate is calculated.
+ * - `do_step( sys , in , t , out , dt , xerr )` - This method updates the state out-of-place and estimates the error
+ * during the step.
+ * - `do_step( sys , in , dxdt , t , out , dt , xerr )` - This methods updates the state out-of-place and estimates
+ * the error during the step. Furthermore, the derivative at `t` must be passed in `dxdt`.
+ *
+ * \note The system is always passed as value, which might result in poor performance if it contains data. In this
+ * case it can be used with `boost::ref` or `std::ref`, for example `stepper.do_step( boost::ref( sys ) , x , t , dt );`
+ *
+ * \note The time `t` is not advanced by the stepper. This has to done manually, or by the appropriate `integrate`
+ * routines or `iterator`s.
+ *
+ * \tparam Stepper The stepper on which this class should work. It is used via CRTP, hence explicit_stepper_base
+ * provides the interface for the Stepper.
+ * \tparam Order The order of a stepper if the stepper is used without error estimation.
+ * \tparam StepperOrder The order of a step if the stepper is used with error estimation. Usually Order and StepperOrder have
+ * the same value.
+ * \tparam ErrorOrder The order of the error step if the stepper is used with error estimation.
+ * \tparam State The state type for the stepper.
+ * \tparam Value The value type for the stepper. This should be a floating point type, like float,
+ * double, or a multiprecision type. It must not neccessary be the value_type of the State. For example
+ * the State can be a `vector< complex< double > >` in this case the Value must be double.
+ * The default value is double.
+ * \tparam Deriv The type representing time derivatives of the state type. It is usually the same type as the
+ * state type, only if used with Boost.Units both types differ.
+ * \tparam Time The type representing the time. Usually the same type as the value type. When Boost.Units is
+ * used, this type has usually a unit.
+ * \tparam Algebra The algebra type which must fullfil the Algebra Concept.
+ * \tparam Operations The type for the operations wich must fullfil the Operations Concept.
+ * \tparam Resizer The resizer policy class.
+ */
+
+
+ /**
+ * \fn explicit_error_stepper_base::explicit_error_stepper_base( const algebra_type &algebra = algebra_type() )
+ *
+ * \brief Constructs a explicit_error_stepper_base class. This constructor can be used as a default
+ * constructor if the algebra has a default constructor.
+ * \param algebra A copy of algebra is made and stored inside explicit_stepper_base.
+ */
+
+ /**
+ * \fn explicit_error_stepper_base::order( void ) const
+ * \return Returns the order of the stepper if it used without error estimation.
+ */
+
+ /**
+ * \fn explicit_error_stepper_base::stepper_order( void ) const
+ * \return Returns the order of a step if the stepper is used without error estimation.
+ */
+
+ /**
+ * \fn explicit_error_stepper_base::error_order( void ) const
+ * \return Returns the order of an error step if the stepper is used without error estimation.
+ */
+
+ /**
+ * \fn explicit_error_stepper_base::do_step( System system , StateInOut &x , time_type t , time_type dt )
+ * \brief This method performs one step. It transforms the result in-place.
+ *
+ * \param system The system function to solve, hence the r.h.s. of the ordinary differential equation. It must fullfil the
+ * Simple System concept.
+ * \param x The state of the ODE which should be solved. After calling do_step the result is updated in x.
+ * \param t The value of the time, at which the step should be performed.
+ * \param dt The step size.
+ */
+
+ /**
+ * \fn explicit_error_stepper_base::do_step( System system , StateInOut &x , const DerivIn &dxdt , time_type t , time_type dt )
+ * \brief The method performs one step with the stepper passed by Stepper. Additionally to the other method
+ * the derivative of x is also passed to this method. It is supposed to be used in the following way:
+ *
+ * \code
+ * sys( x , dxdt , t );
+ * stepper.do_step( sys , x , dxdt , t , dt );
+ * \endcode
+ *
+ * The result is updated in place in x. This method is disabled if Time and Deriv are of the same type. In this
+ * case the method could not be distinguished from other `do_step` versions.
+ *
+ * \note This method does not solve the forwarding problem.
+ *
+ * \param system The system function to solve, hence the r.h.s. of the ODE. It must fullfil the
+ * Simple System concept.
+ * \param x The state of the ODE which should be solved. After calling do_step the result is updated in x.
+ * \param dxdt The derivative of x at t.
+ * \param t The value of the time, at which the step should be performed.
+ * \param dt The step size.
+ */
+
+ /**
+ * \fn explicit_error_stepper_base::do_step( System system , const StateIn &in , time_type t , StateOut &out , time_type dt )
+ * \brief The method performs one step with the stepper passed by Stepper. The state of the ODE is updated out-of-place.
+ * This method is disabled if StateIn and Time are the same type. In this case the method can not be distinguished from
+ * other `do_step` variants.
+ * \note This method does not solve the forwarding problem.
+ *
+ * \param system The system function to solve, hence the r.h.s. of the ODE. It must fullfil the
+ * Simple System concept.
+ * \param in The state of the ODE which should be solved. in is not modified in this method
+ * \param t The value of the time, at which the step should be performed.
+ * \param out The result of the step is written in out.
+ * \param dt The step size.
+ */
+
+
+ /**
+ * \fn explicit_error_stepper_base::do_step( System system , const StateIn &in , const DerivIn &dxdt , time_type t , StateOut &out , time_type dt )
+ * \brief The method performs one step with the stepper passed by Stepper. The state of the ODE is updated out-of-place.
+ * Furthermore, the derivative of x at t is passed to the stepper. It is supposed to be used in the following way:
+ *
+ * \code
+ * sys( in , dxdt , t );
+ * stepper.do_step( sys , in , dxdt , t , out , dt );
+ * \endcode
+ *
+ * This method is disabled if DerivIn and Time are of same type.
+ *
+ * \note This method does not solve the forwarding problem.
+ *
+ * \param system The system function to solve, hence the r.h.s. of the ODE. It must fullfil the
+ * Simple System concept.
+ * \param in The state of the ODE which should be solved. in is not modified in this method
+ * \param dxdt The derivative of x at t.
+ * \param t The value of the time, at which the step should be performed.
+ * \param out The result of the step is written in out.
+ * \param dt The step size.
+ */
+
+ /**
+ * \fn explicit_error_stepper_base::do_step( System system , StateInOut &x , time_type t , time_type dt , Err &xerr )
+ * \brief The method performs one step with the stepper passed by Stepper and estimates the error. The state of the ODE
+ * is updated in-place.
+ *
+ * \param system The system function to solve, hence the r.h.s. of the ODE. It must fullfil the
+ * Simple System concept.
+ * \param x The state of the ODE which should be solved. x is updated by this method.
+ * \param t The value of the time, at which the step should be performed.
+ * \param dt The step size.
+ * \param xerr The estimation of the error is stored in xerr.
+ */
+
+ /**
+ * \fn explicit_error_stepper_base::do_step( System system , StateInOut &x , const DerivIn &dxdt , time_type t , time_type dt , Err &xerr )
+ * \brief The method performs one step with the stepper passed by Stepper. Additionally to the other method
+ * the derivative of x is also passed to this method. It is supposed to be used in the following way:
+ *
+ * \code
+ * sys( x , dxdt , t );
+ * stepper.do_step( sys , x , dxdt , t , dt , xerr );
+ * \endcode
+ *
+ * The result is updated in place in x. This method is disabled if Time and DerivIn are of the same type. In this
+ * case the method could not be distinguished from other `do_step` versions.
+ *
+ * \note This method does not solve the forwarding problem.
+ *
+ * \param system The system function to solve, hence the r.h.s. of the ODE. It must fullfil the
+ * Simple System concept.
+ * \param x The state of the ODE which should be solved. After calling do_step the result is updated in x.
+ * \param dxdt The derivative of x at t.
+ * \param t The value of the time, at which the step should be performed.
+ * \param dt The step size.
+ * \param xerr The error estimate is stored in xerr.
+ */
+
+ /**
+ * \fn explicit_error_stepper_base::do_step( System system , const StateIn &in , time_type t , StateOut &out , time_type dt , Err &xerr )
+ * \brief The method performs one step with the stepper passed by Stepper. The state of the ODE is updated out-of-place.
+ * Furthermore, the error is estimated.
+ *
+ * \note This method does not solve the forwarding problem.
+ *
+ * \param system The system function to solve, hence the r.h.s. of the ODE. It must fullfil the
+ * Simple System concept.
+ * \param in The state of the ODE which should be solved. in is not modified in this method
+ * \param t The value of the time, at which the step should be performed.
+ * \param out The result of the step is written in out.
+ * \param dt The step size.
+ * \param xerr The error estimate.
+ */
+
+
+ /**
+ * \fn explicit_error_stepper_base::do_step( System system , const StateIn &in , const DerivIn &dxdt , time_type t , StateOut &out , time_type dt , Err &xerr )
+ * \brief The method performs one step with the stepper passed by Stepper. The state of the ODE is updated out-of-place.
+ * Furthermore, the derivative of x at t is passed to the stepper and the error is estimated. It is supposed to be used in the following way:
+ *
+ * \code
+ * sys( in , dxdt , t );
+ * stepper.do_step( sys , in , dxdt , t , out , dt );
+ * \endcode
+ *
+ * This method is disabled if DerivIn and Time are of same type.
+ *
+ * \note This method does not solve the forwarding problem.
+ *
+ * \param system The system function to solve, hence the r.h.s. of the ODE. It must fullfil the
+ * Simple System concept.
+ * \param in The state of the ODE which should be solved. in is not modified in this method
+ * \param dxdt The derivative of x at t.
+ * \param t The value of the time, at which the step should be performed.
+ * \param out The result of the step is written in out.
+ * \param dt The step size.
+ * \param xerr The error estimate.
+ */
+
+
+ /**
+ * \fn explicit_error_stepper_base::adjust_size( const StateIn &x )
+ * \brief Adjust the size of all temporaries in the stepper manually.
+ * \param x A state from which the size of the temporaries to be resized is deduced.
+ */
+
 } // odeint
 } // numeric
 } // boost

Modified: trunk/boost/numeric/odeint/stepper/base/explicit_error_stepper_fsal_base.hpp
==============================================================================
--- trunk/boost/numeric/odeint/stepper/base/explicit_error_stepper_fsal_base.hpp (original)
+++ trunk/boost/numeric/odeint/stepper/base/explicit_error_stepper_fsal_base.hpp 2012-12-07 07:26:55 EST (Fri, 07 Dec 2012)
@@ -51,6 +51,293 @@
     * do_step( sys , in , t , out , dt , xerr )
     * do_step( sys , in , dxdt_in , t , out , dxdt_out , dt , xerr )
  */
+template<
+class Stepper ,
+unsigned short Order ,
+unsigned short StepperOrder ,
+unsigned short ErrorOrder ,
+class State ,
+class Value ,
+class Deriv ,
+class Time ,
+class Algebra ,
+class Operations ,
+class Resizer
+>
+class explicit_error_stepper_fsal_base : public algebra_stepper_base< Algebra , Operations >
+{
+public:
+
+ typedef algebra_stepper_base< Algebra , Operations > algebra_stepper_base_type;
+ typedef typename algebra_stepper_base_type::algebra_type algebra_type;
+
+ typedef State state_type;
+ typedef Value value_type;
+ typedef Deriv deriv_type;
+ typedef Time time_type;
+ typedef Resizer resizer_type;
+ typedef Stepper stepper_type;
+ typedef explicit_error_stepper_fsal_tag stepper_category;
+
+ #ifndef DOXYGEN_SKIP
+ typedef state_wrapper< state_type > wrapped_state_type;
+ typedef state_wrapper< deriv_type > wrapped_deriv_type;
+ typedef explicit_error_stepper_fsal_base< Stepper , Order , StepperOrder , ErrorOrder ,
+ State , Value , Deriv , Time , Algebra , Operations , Resizer > internal_stepper_base_type;
+ #endif
+
+
+ typedef unsigned short order_type;
+ static const order_type order_value = Order;
+ static const order_type stepper_order_value = StepperOrder;
+ static const order_type error_order_value = ErrorOrder;
+
+ explicit_error_stepper_fsal_base( const algebra_type &algebra = algebra_type() )
+ : algebra_stepper_base_type( algebra ) , m_first_call( true )
+ { }
+
+ order_type order( void ) const
+ {
+ return order_value;
+ }
+
+ order_type stepper_order( void ) const
+ {
+ return stepper_order_value;
+ }
+
+ order_type error_order( void ) const
+ {
+ return error_order_value;
+ }
+
+
+ /*
+ * version 1 : do_step( sys , x , t , dt )
+ *
+ * the two overloads are needed in order to solve the forwarding problem
+ */
+ template< class System , class StateInOut >
+ void do_step( System system , StateInOut &x , time_type t , time_type dt )
+ {
+ do_step_v1( system , x , t , dt );
+ }
+
+ /**
+ * \brief Second version to solve the forwarding problem, can be called with Boost.Range as StateInOut.
+ */
+ template< class System , class StateInOut >
+ void do_step( System system , const StateInOut &x , time_type t , time_type dt )
+ {
+ do_step_v1( system , x , t , dt );
+ }
+
+
+ /*
+ * version 2 : do_step( sys , x , dxdt , t , dt )
+ *
+ * this version does not solve the forwarding problem, boost.range can not be used
+ *
+ * the disable is needed to avoid ambiguous overloads if state_type = time_type
+ */
+ template< class System , class StateInOut , class DerivInOut >
+ typename boost::disable_if< boost::is_same< StateInOut , time_type > , void >::type
+ do_step( System system , StateInOut &x , DerivInOut &dxdt , time_type t , time_type dt )
+ {
+ m_first_call = true;
+ this->stepper().do_step_impl( system , x , dxdt , t , x , dxdt , dt );
+ }
+
+
+ /*
+ * version 3 : do_step( sys , in , t , out , dt )
+ *
+ * this version does not solve the forwarding problem, boost.range can not be used
+ *
+ * the disable is needed to avoid ambiguous overloads if state_type = time_type
+ */
+ template< class System , class StateIn , class StateOut >
+ typename boost::disable_if< boost::is_same< StateIn , time_type > , void >::type
+ do_step( System system , const StateIn &in , time_type t , StateOut &out , time_type dt )
+ {
+ if( m_resizer.adjust_size( in , detail::bind( &internal_stepper_base_type::template resize_impl< StateIn > , detail::ref( *this ) , detail::_1 ) ) || m_first_call )
+ {
+ initialize( system , in , t );
+ }
+ this->stepper().do_step_impl( system , in , m_dxdt.m_v , t , out , m_dxdt.m_v , dt );
+ }
+
+
+ /*
+ * version 4 : do_step( sys , in , dxdt_in , t , out , dxdt_out , dt )
+ *
+ * this version does not solve the forwarding problem, boost.range can not be used
+ */
+ template< class System , class StateIn , class DerivIn , class StateOut , class DerivOut >
+ void do_step( System system , const StateIn &in , const DerivIn &dxdt_in , time_type t ,
+ StateOut &out , DerivOut &dxdt_out , time_type dt )
+ {
+ m_first_call = true;
+ this->stepper().do_step_impl( system , in , dxdt_in , t , out , dxdt_out , dt );
+ }
+
+
+
+
+
+ /*
+ * version 5 : do_step( sys , x , t , dt , xerr )
+ *
+ * the two overloads are needed in order to solve the forwarding problem
+ */
+ template< class System , class StateInOut , class Err >
+ void do_step( System system , StateInOut &x , time_type t , time_type dt , Err &xerr )
+ {
+ do_step_v5( system , x , t , dt , xerr );
+ }
+
+ /**
+ * \brief Second version to solve the forwarding problem, can be called with Boost.Range as StateInOut.
+ */
+ template< class System , class StateInOut , class Err >
+ void do_step( System system , const StateInOut &x , time_type t , time_type dt , Err &xerr )
+ {
+ do_step_v5( system , x , t , dt , xerr );
+ }
+
+
+ /*
+ * version 6 : do_step( sys , x , dxdt , t , dt , xerr )
+ *
+ * this version does not solve the forwarding problem, boost.range can not be used
+ *
+ * the disable is needed to avoid ambiguous overloads if state_type = time_type
+ */
+ template< class System , class StateInOut , class DerivInOut , class Err >
+ typename boost::disable_if< boost::is_same< StateInOut , time_type > , void >::type
+ do_step( System system , StateInOut &x , DerivInOut &dxdt , time_type t , time_type dt , Err &xerr )
+ {
+ m_first_call = true;
+ this->stepper().do_step_impl( system , x , dxdt , t , x , dxdt , dt , xerr );
+ }
+
+
+
+
+ /*
+ * version 7 : do_step( sys , in , t , out , dt , xerr )
+ *
+ * this version does not solve the forwarding problem, boost.range can not be used
+ */
+ template< class System , class StateIn , class StateOut , class Err >
+ void do_step( System system , const StateIn &in , time_type t , StateOut &out , time_type dt , Err &xerr )
+ {
+ if( m_resizer.adjust_size( in , detail::bind( &internal_stepper_base_type::template resize_impl< StateIn > , detail::ref( *this ) , detail::_1 ) ) || m_first_call )
+ {
+ initialize( system , in , t );
+ }
+ this->stepper().do_step_impl( system , in , m_dxdt.m_v , t , out , m_dxdt.m_v , dt , xerr );
+ }
+
+
+ /*
+ * version 8 : do_step( sys , in , dxdt_in , t , out , dxdt_out , dt , xerr )
+ *
+ * this version does not solve the forwarding problem, boost.range can not be used
+ */
+ template< class System , class StateIn , class DerivIn , class StateOut , class DerivOut , class Err >
+ void do_step( System system , const StateIn &in , const DerivIn &dxdt_in , time_type t ,
+ StateOut &out , DerivOut &dxdt_out , time_type dt , Err &xerr )
+ {
+ m_first_call = true;
+ this->stepper().do_step_impl( system , in , dxdt_in , t , out , dxdt_out , dt , xerr );
+ }
+
+ template< class StateIn >
+ void adjust_size( const StateIn &x )
+ {
+ resize_impl( x );
+ }
+
+ void reset( void )
+ {
+ m_first_call = true;
+ }
+
+ template< class DerivIn >
+ void initialize( const DerivIn &deriv )
+ {
+ boost::numeric::odeint::copy( deriv , m_dxdt.m_v );
+ m_first_call = false;
+ }
+
+ template< class System , class StateIn >
+ void initialize( System system , const StateIn &x , time_type t )
+ {
+ typename odeint::unwrap_reference< System >::type &sys = system;
+ sys( x , m_dxdt.m_v , t );
+ m_first_call = false;
+ }
+
+ bool is_initialized( void ) const
+ {
+ return ! m_first_call;
+ }
+
+
+
+private:
+
+ template< class System , class StateInOut >
+ void do_step_v1( System system , StateInOut &x , time_type t , time_type dt )
+ {
+ if( m_resizer.adjust_size( x , detail::bind( &internal_stepper_base_type::template resize_impl< StateInOut > , detail::ref( *this ) , detail::_1 ) ) || m_first_call )
+ {
+ initialize( system , x , t );
+ }
+ this->stepper().do_step_impl( system , x , m_dxdt.m_v , t , x , m_dxdt.m_v , dt );
+ }
+
+ template< class System , class StateInOut , class Err >
+ void do_step_v5( System system , StateInOut &x , time_type t , time_type dt , Err &xerr )
+ {
+ if( m_resizer.adjust_size( x , detail::bind( &internal_stepper_base_type::template resize_impl< StateInOut > , detail::ref( *this ) , detail::_1 ) ) || m_first_call )
+ {
+ initialize( system , x , t );
+ }
+ this->stepper().do_step_impl( system , x , m_dxdt.m_v , t , x , m_dxdt.m_v , dt , xerr );
+ }
+
+ template< class StateIn >
+ bool resize_impl( const StateIn &x )
+ {
+ return adjust_size_by_resizeability( m_dxdt , x , typename is_resizeable<deriv_type>::type() );
+ }
+
+
+ stepper_type& stepper( void )
+ {
+ return *static_cast< stepper_type* >( this );
+ }
+
+ const stepper_type& stepper( void ) const
+ {
+ return *static_cast< const stepper_type* >( this );
+ }
+
+
+ resizer_type m_resizer;
+ bool m_first_call;
+
+protected:
+
+
+ wrapped_deriv_type m_dxdt;
+};
+
+
+/******* DOXYGEN *******/
+
 /**
  * \class explicit_error_stepper_fsal_base
  * \brief Base class for explicit steppers with error estimation and stepper fullfiling the FSAL (first-same-as-last)
@@ -126,95 +413,43 @@
  * double, or a multiprecision type. It must not neccessary be the value_type of the State. For example
  * the State can be a `vector< complex< double > >` in this case the Value must be double.
  * The default value is double.
- * \tparam Deriv The type representing time derivatives of the state type. It is usually the same type as the
- * state type, only if used with Boost.Units both types differ.
- * \tparam Time The type representing the time. Usually the same type as the value type. When Boost.Units is
- * used, this type has usually a unit.
- * \tparam Algebra The algebra type which must fullfil the Algebra Concept.
- * \tparam Operations The type for the operations wich must fullfil the Operations Concept.
- * \tparam Resizer The resizer policy class.
- */
-template<
-class Stepper ,
-unsigned short Order ,
-unsigned short StepperOrder ,
-unsigned short ErrorOrder ,
-class State ,
-class Value ,
-class Deriv ,
-class Time ,
-class Algebra ,
-class Operations ,
-class Resizer
->
-class explicit_error_stepper_fsal_base : public algebra_stepper_base< Algebra , Operations >
-{
-public:
-
- typedef algebra_stepper_base< Algebra , Operations > algebra_stepper_base_type;
- typedef typename algebra_stepper_base_type::algebra_type algebra_type;
-
- typedef State state_type;
- typedef Value value_type;
- typedef Deriv deriv_type;
- typedef Time time_type;
- typedef Resizer resizer_type;
- typedef Stepper stepper_type;
- typedef explicit_error_stepper_fsal_tag stepper_category;
-
- #ifndef DOXYGEN_SKIP
- typedef state_wrapper< state_type > wrapped_state_type;
- typedef state_wrapper< deriv_type > wrapped_deriv_type;
- typedef explicit_error_stepper_fsal_base< Stepper , Order , StepperOrder , ErrorOrder ,
- State , Value , Deriv , Time , Algebra , Operations , Resizer > internal_stepper_base_type;
- #endif
+ * \tparam Deriv The type representing time derivatives of the state type. It is usually the same type as the
+ * state type, only if used with Boost.Units both types differ.
+ * \tparam Time The type representing the time. Usually the same type as the value type. When Boost.Units is
+ * used, this type has usually a unit.
+ * \tparam Algebra The algebra type which must fullfil the Algebra Concept.
+ * \tparam Operations The type for the operations wich must fullfil the Operations Concept.
+ * \tparam Resizer The resizer policy class.
+ */
 
 
- typedef unsigned short order_type;
- static const order_type order_value = Order;
- static const order_type stepper_order_value = StepperOrder;
- static const order_type error_order_value = ErrorOrder;
 
     /**
+ * \fn explicit_error_stepper_fsal_base::explicit_error_stepper_fsal_base( const algebra_type &algebra )
      * \brief Constructs a explicit_stepper_fsal_base class. This constructor can be used as a default
      * constructor if the algebra has a default constructor.
      * \param algebra A copy of algebra is made and stored inside explicit_stepper_base.
      */
- explicit_error_stepper_fsal_base( const algebra_type &algebra = algebra_type() )
- : algebra_stepper_base_type( algebra ) , m_first_call( true )
- { }
+
 
     /**
+ * \fn explicit_error_stepper_fsal_base::order( void ) const
      * \return Returns the order of the stepper if it used without error estimation.
      */
- order_type order( void ) const
- {
- return order_value;
- }
 
     /**
+ * \fn explicit_error_stepper_fsal_base::stepper_order( void ) const
      * \return Returns the order of a step if the stepper is used without error estimation.
      */
- order_type stepper_order( void ) const
- {
- return stepper_order_value;
- }
+
 
     /**
+ * \fn explicit_error_stepper_fsal_base::error_order( void ) const
      * \return Returns the order of an error step if the stepper is used without error estimation.
      */
- order_type error_order( void ) const
- {
- return error_order_value;
- }
-
 
- /*
- * version 1 : do_step( sys , x , t , dt )
- *
- * the two overloads are needed in order to solve the forwarding problem
- */
     /**
+ * \fn explicit_error_stepper_fsal_base::do_step( System system , StateInOut &x , time_type t , time_type dt )
      * \brief This method performs one step. It transforms the result in-place.
      *
      * \note This method uses the internal state of the stepper.
@@ -225,41 +460,10 @@
      * \param t The value of the time, at which the step should be performed.
      * \param dt The step size.
      */
- template< class System , class StateInOut >
- void do_step( System system , StateInOut &x , time_type t , time_type dt )
- {
- do_step_v1( system , x , t , dt );
- }
-
- /**
- * \brief This method performs one step with the stepper passed by Stepper.
- * It transforms the result in-place. This method is needed in order to solve the forwarding problem.
- * The difference to the other version is that it can be used like
- * `stepper.do_step( sys , make_range( iter1 , iter2 ) , t , dt )`
- *
- * \note This method uses the internal state of the stepper.
- *
- * \param system The system function to solve, hence the r.h.s. of the ordinary differential equation. It must fullfil the
- * Simple System concept.
- * \param x The state of the ODE which should be solved. After calling do_step the result is updated in x.
- * \param t The value of the time, at which the step should be performed.
- * \param dt The step size.
- */
- template< class System , class StateInOut >
- void do_step( System system , const StateInOut &x , time_type t , time_type dt )
- {
- do_step_v1( system , x , t , dt );
- }
 
 
- /*
- * version 2 : do_step( sys , x , dxdt , t , dt )
- *
- * this version does not solve the forwarding problem, boost.range can not be used
- *
- * the disable is needed to avoid ambiguous overloads if state_type = time_type
- */
     /**
+ * \fn explicit_error_stepper_fsal_base::do_step( System system , StateInOut &x , DerivInOut &dxdt , time_type t , time_type dt )
      * \brief The method performs one step with the stepper passed by Stepper. Additionally to the other methods
      * the derivative of x is also passed to this method. Therefore, dxdt must be evaluated initially:
      *
@@ -287,23 +491,9 @@
      * \param t The value of the time, at which the step should be performed.
      * \param dt The step size.
      */
- template< class System , class StateInOut , class DerivInOut >
- typename boost::disable_if< boost::is_same< StateInOut , time_type > , void >::type
- do_step( System system , StateInOut &x , DerivInOut &dxdt , time_type t , time_type dt )
- {
- m_first_call = true;
- this->stepper().do_step_impl( system , x , dxdt , t , x , dxdt , dt );
- }
 
-
- /*
- * version 3 : do_step( sys , in , t , out , dt )
- *
- * this version does not solve the forwarding problem, boost.range can not be used
- *
- * the disable is needed to avoid ambiguous overloads if state_type = time_type
- */
     /**
+ * \fn explicit_error_stepper_fsal_base::do_step( System system , const StateIn &in , time_type t , StateOut &out , time_type dt )
      * \brief The method performs one step with the stepper passed by Stepper. The state of the ODE is updated out-of-place.
      * This method is disabled if StateIn and Time are the same type. In this case the method can not be distinguished from
      * other `do_step` variants.
@@ -319,24 +509,9 @@
      * \param out The result of the step is written in out.
      * \param dt The step size.
      */
- template< class System , class StateIn , class StateOut >
- typename boost::disable_if< boost::is_same< StateIn , time_type > , void >::type
- do_step( System system , const StateIn &in , time_type t , StateOut &out , time_type dt )
- {
- if( m_resizer.adjust_size( in , detail::bind( &internal_stepper_base_type::template resize_impl< StateIn > , detail::ref( *this ) , detail::_1 ) ) || m_first_call )
- {
- initialize( system , in , t );
- }
- this->stepper().do_step_impl( system , in , m_dxdt.m_v , t , out , m_dxdt.m_v , dt );
- }
 
-
- /*
- * version 4 : do_step( sys , in , dxdt_in , t , out , dxdt_out , dt )
- *
- * this version does not solve the forwarding problem, boost.range can not be used
- */
     /**
+ * \fn explicit_error_stepper_fsal_base::do_step( System system , const StateIn &in , const DerivIn &dxdt_in , time_type t , StateOut &out , DerivOut &dxdt_out , time_type dt )
      * \brief The method performs one step with the stepper passed by Stepper. The state of the ODE is updated out-of-place.
      * Furthermore, the derivative of x at t is passed to the stepper and updated by the stepper to its new value at
      * t+dt.
@@ -354,24 +529,9 @@
      * \param dxdt_out The updated derivative of `out` at `t+dt`.
      * \param dt The step size.
      */
- template< class System , class StateIn , class DerivIn , class StateOut , class DerivOut >
- void do_step( System system , const StateIn &in , const DerivIn &dxdt_in , time_type t ,
- StateOut &out , DerivOut &dxdt_out , time_type dt )
- {
- m_first_call = true;
- this->stepper().do_step_impl( system , in , dxdt_in , t , out , dxdt_out , dt );
- }
-
-
-
 
-
- /*
- * version 5 : do_step( sys , x , t , dt , xerr )
- *
- * the two overloads are needed in order to solve the forwarding problem
- */
     /**
+ * \fn explicit_error_stepper_fsal_base::do_step( System system , StateInOut &x , time_type t , time_type dt , Err &xerr )
      * \brief The method performs one step with the stepper passed by Stepper and estimates the error. The state of the ODE
      * is updated in-place.
      *
@@ -385,44 +545,9 @@
      * \param dt The step size.
      * \param xerr The estimation of the error is stored in xerr.
      */
- template< class System , class StateInOut , class Err >
- void do_step( System system , StateInOut &x , time_type t , time_type dt , Err &xerr )
- {
- do_step_v5( system , x , t , dt , xerr );
- }
 
     /**
- * \brief The method performs one step with the stepper passed by Stepper and estimates the error. The state of the ODE
- * is updated in-place. This method is needed in order to solve the forwarding problem.
- * The difference to the other version is that it can be used like
- * `stepper.do_step( sys , make_range( iter1 , iter2 ) , t , dt )`
- *
- * \note This method uses the internal state of the stepper.
- *
- * \param system The system function to solve, hence the r.h.s. of the ODE. It must fullfil the
- * Simple System concept.
- * \param x The state of the ODE which should be solved. x is updated by this method.
- * \param t The value of the time, at which the step should be performed.
- * \param dt The step size.
- * \param xerr The estimation of the error is stored in xerr.
- */
- template< class System , class StateInOut , class Err >
- void do_step( System system , const StateInOut &x , time_type t , time_type dt , Err &xerr )
- {
- do_step_v5( system , x , t , dt , xerr );
- }
-
-
- /*
- * version 6 : do_step( sys , x , dxdt , t , dt , xerr )
- *
- * this version does not solve the forwarding problem, boost.range can not be used
- *
- * the disable is needed to avoid ambiguous overloads if state_type = time_type
- *
- * the disable is needed to avoid ambiguous overloads if state_type = time_type
- */
- /**
+ * \fn explicit_error_stepper_fsal_base::do_step( System system , StateInOut &x , DerivInOut &dxdt , time_type t , time_type dt , Err &xerr )
      * \brief The method performs one step with the stepper passed by Stepper. Additionally to the other method
      * the derivative of x is also passed to this method and updated by this method.
      *
@@ -444,23 +569,10 @@
      * \param dt The step size.
      * \param xerr The error estimate is stored in xerr.
      */
- template< class System , class StateInOut , class DerivInOut , class Err >
- typename boost::disable_if< boost::is_same< StateInOut , time_type > , void >::type
- do_step( System system , StateInOut &x , DerivInOut &dxdt , time_type t , time_type dt , Err &xerr )
- {
- m_first_call = true;
- this->stepper().do_step_impl( system , x , dxdt , t , x , dxdt , dt , xerr );
- }
 
 
-
-
- /*
- * version 7 : do_step( sys , in , t , out , dt , xerr )
- *
- * this version does not solve the forwarding problem, boost.range can not be used
- */
     /**
+ * \fn explicit_error_stepper_fsal_base::do_step( System system , const StateIn &in , time_type t , StateOut &out , time_type dt , Err &xerr )
      * \brief The method performs one step with the stepper passed by Stepper. The state of the ODE is updated out-of-place.
      * Furthermore, the error is estimated.
      *
@@ -476,23 +588,9 @@
      * \param dt The step size.
      * \param xerr The error estimate.
      */
- template< class System , class StateIn , class StateOut , class Err >
- void do_step( System system , const StateIn &in , time_type t , StateOut &out , time_type dt , Err &xerr )
- {
- if( m_resizer.adjust_size( in , detail::bind( &internal_stepper_base_type::template resize_impl< StateIn > , detail::ref( *this ) , detail::_1 ) ) || m_first_call )
- {
- initialize( system , in , t );
- }
- this->stepper().do_step_impl( system , in , m_dxdt.m_v , t , out , m_dxdt.m_v , dt , xerr );
- }
 
-
- /*
- * version 8 : do_step( sys , in , dxdt_in , t , out , dxdt_out , dt , xerr )
- *
- * this version does not solve the forwarding problem, boost.range can not be used
- */
     /**
+ * \fn explicit_error_stepper_fsal_base::do_step( System system , const StateIn &in , const DerivIn &dxdt_in , time_type t , StateOut &out , DerivOut &dxdt_out , time_type dt , Err &xerr )
      * \brief The method performs one step with the stepper passed by Stepper. The state of the ODE is updated out-of-place.
      * Furthermore, the derivative of x at t is passed to the stepper and the error is estimated.
      *
@@ -510,47 +608,28 @@
      * \param dt The step size.
      * \param xerr The error estimate.
      */
- template< class System , class StateIn , class DerivIn , class StateOut , class DerivOut , class Err >
- void do_step( System system , const StateIn &in , const DerivIn &dxdt_in , time_type t ,
- StateOut &out , DerivOut &dxdt_out , time_type dt , Err &xerr )
- {
- m_first_call = true;
- this->stepper().do_step_impl( system , in , dxdt_in , t , out , dxdt_out , dt , xerr );
- }
 
     /**
+ * \fn explicit_error_stepper_fsal_base::adjust_size( const StateIn &x )
      * \brief Adjust the size of all temporaries in the stepper manually.
      * \param x A state from which the size of the temporaries to be resized is deduced.
      */
- template< class StateIn >
- void adjust_size( const StateIn &x )
- {
- resize_impl( x );
- }
-
 
     /**
+ * \fn explicit_error_stepper_fsal_base::reset( void )
      * \brief Resets the internal state of this stepper. After calling this method it is safe to use all
- * `do_step` method without explicitly initializing the stepper.
+ * `do_step` method without explicitly initializing the stepper.
      */
- void reset( void )
- {
- m_first_call = true;
- }
 
     /**
+ * \fn explicit_error_stepper_fsal_base::initialize( const DerivIn &deriv )
      * \brief Initializes the interal state of the stepper.
      * \param deriv The derivative of x. The next call of `do_step` expects that the derivative of `x` passed to `do_step`
      * has the value of `deriv`.
      */
- template< class DerivIn >
- void initialize( const DerivIn &deriv )
- {
- boost::numeric::odeint::copy( deriv , m_dxdt.m_v );
- m_first_call = false;
- }
 
     /**
+ * \fn explicit_error_stepper_fsal_base::initialize( System system , const StateIn &x , time_type t )
      * \brief Initializes the interal state of the stepper.
      *
      * This method is equivalent to
@@ -564,75 +643,13 @@
      * \param x The current state of the ODE.
      * \param t The current time of the ODE.
      */
- template< class System , class StateIn >
- void initialize( System system , const StateIn &x , time_type t )
- {
- typename odeint::unwrap_reference< System >::type &sys = system;
- sys( x , m_dxdt.m_v , t );
- m_first_call = false;
- }
 
     /**
+ * \fn explicit_error_stepper_fsal_base::is_initialized( void ) const
      * \brief Returns if the stepper is already initialized. If the stepper is not initialized, the first
      * call of `do_step` will initialize the state of the stepper. If the stepper is already initialized
      * the system function can not be safely exchanged between consecutive `do_step` calls.
      */
- bool is_initialized( void ) const
- {
- return ! m_first_call;
- }
-
-
-
-private:
-
- template< class System , class StateInOut >
- void do_step_v1( System system , StateInOut &x , time_type t , time_type dt )
- {
- if( m_resizer.adjust_size( x , detail::bind( &internal_stepper_base_type::template resize_impl< StateInOut > , detail::ref( *this ) , detail::_1 ) ) || m_first_call )
- {
- initialize( system , x , t );
- }
- this->stepper().do_step_impl( system , x , m_dxdt.m_v , t , x , m_dxdt.m_v , dt );
- }
-
- template< class System , class StateInOut , class Err >
- void do_step_v5( System system , StateInOut &x , time_type t , time_type dt , Err &xerr )
- {
- if( m_resizer.adjust_size( x , detail::bind( &internal_stepper_base_type::template resize_impl< StateInOut > , detail::ref( *this ) , detail::_1 ) ) || m_first_call )
- {
- initialize( system , x , t );
- }
- this->stepper().do_step_impl( system , x , m_dxdt.m_v , t , x , m_dxdt.m_v , dt , xerr );
- }
-
- template< class StateIn >
- bool resize_impl( const StateIn &x )
- {
- return adjust_size_by_resizeability( m_dxdt , x , typename is_resizeable<deriv_type>::type() );
- }
-
-
- stepper_type& stepper( void )
- {
- return *static_cast< stepper_type* >( this );
- }
-
- const stepper_type& stepper( void ) const
- {
- return *static_cast< const stepper_type* >( this );
- }
-
-
- resizer_type m_resizer;
- bool m_first_call;
-
-protected:
-
-
- wrapped_deriv_type m_dxdt;
-};
-
 
 } // odeint
 } // numeric

Modified: trunk/boost/numeric/odeint/stepper/base/explicit_stepper_base.hpp
==============================================================================
--- trunk/boost/numeric/odeint/stepper/base/explicit_stepper_base.hpp (original)
+++ trunk/boost/numeric/odeint/stepper/base/explicit_stepper_base.hpp 2012-12-07 07:26:55 EST (Fri, 07 Dec 2012)
@@ -48,82 +48,6 @@
     * do_step( sys , in , dxdt_in , t , out , dt )
  */
 
-/**
- * \class explicit_stepper_base
- * \brief Base class for explicit steppers without step size control and without dense output.
- *
- * This class serves as the base class for all explicit steppers with algebra and operations.
- * Step size control and error estimation as well as dense output are not provided. explicit_stepper_base
- * is used as the interface in a CRTP (currently recurring template pattern). In order to work
- * correctly the parent class needs to have a method `do_step_impl( system , in , dxdt_in , t , out , dt )`.
- * This is method is used by explicit_stepper_base. explicit_stepper_base derives from
- * algebra_stepper_base. An example how this class can be used is
- *
- * \code
- * template< class State , class Value , class Deriv , class Time , class Algebra , class Operations , class Resizer >
- * class custom_euler : public explicit_stepper_base< 1 , State , Value , Deriv , Time , Algebra , Operations , Resizer >
- * {
- * public:
- *
- * typedef explicit_stepper_base< 1 , State , Value , Deriv , Time , Algebra , Operations , Resizer > base_type;
- *
- * custom_euler( const Algebra &algebra = Algebra() ) { }
- *
- * template< class Sys , class StateIn , class DerivIn , class StateOut >
- * void do_step_impl( Sys sys , const StateIn &in , const DerivIn &dxdt , Time t , StateOut &out , Time dt )
- * {
- * m_algebra.for_each3( out , in , dxdt , Operations::scale_sum2< Value , Time >( 1.0 , dt );
- * }
- *
- * template< class State >
- * void adjust_size( const State &x )
- * {
- * base_type::adjust_size( x );
- * }
- * };
- * \endcode
- *
- * For the Stepper concept only the `do_step( sys , x , t , dt )` needs to be implemented. But this class
- * provides additional `do_step` variants since the stepper is explicit. These methods can be used to increase
- * the performance in some situation, for example if one needs to analyze `dxdt` during each step. In this case
- * one can use
- *
- * \code
- * sys( x , dxdt , t );
- * stepper.do_step( sys , x , dxdt , t , dt ); // the value of dxdt is used here
- * t += dt;
- * \endcode
- *
- * In detail explicit_stepper_base provides the following `do_step` variants
- * - `do_step( sys , x , t , dt )` - The classical `do_step` method needed to fullfil the Stepper concept. The state is updated in-place.
- * A type modelling a Boost.Range can be used for x.
- * - `do_step( sys , in , t , out , dt )` - This method updates the state out-of-place, hence the result of the step is stored in `out`.
- * - `do_step( sys , x , dxdt , t , dt )` - This method updates the state in-place, but the derivative at the point `t` must be
- * explicitely passed in `dxdt`. For an example see the code snippet above.
- * - `do_step( sys , in , dxdt , t , out , dt )` - This method update the state out-of-place and expects that the derivative at the point
- * `t` is explicitely passed in `dxdt`. It is a combination of the two `do_step` methods above.
- *
- * \note The system is always passed as value, which might result in poor performance if it contains data. In this case it can be used with `boost::ref`
- * or `std::ref`, for example `stepper.do_step( boost::ref( sys ) , x , t , dt );`
- *
- * \note The time `t` is not advanced by the stepper. This has to done manually, or by the appropriate `integrate` routines or `iterator`s.
- *
- * \tparam Stepper The stepper on which this class should work. It is used via CRTP, hence explicit_stepper_base
- * provides the interface for the Stepper.
- * \tparam Order The order of the stepper.
- * \tparam State The state type for the stepper.
- * \tparam Value The value type for the stepper. This should be a floating point type, like float,
- * double, or a multiprecision type. It must not neccessary be the value_type of the State. For example
- * the State can be a `vector< complex< double > >` in this case the Value must be double.
- * The default value is double.
- * \tparam Deriv The type representing time derivatives of the state type. It is usually the same type as the
- * state type, only if used with Boost.Units both types differ.
- * \tparam Time The type representing the time. Usually the same type as the value type. When Boost.Units is
- * used, this type has usually a unit.
- * \tparam Algebra The algebra type which must fullfil the Algebra Concept.
- * \tparam Operations The type for the operations wich must fullfil the Operations Concept.
- * \tparam Resizer The resizer policy class.
- */
 template<
 class Stepper ,
 unsigned short Order ,
@@ -165,11 +89,6 @@
     static const order_type order_value = Order;
 
 
- /**
- * \brief Constructs a explicit_stepper_base class. This constructor can be used as a default
- * constructor if the algebra has a default constructor.
- * \param algebra A copy of algebra is made and stored inside explicit_stepper_base.
- */
     explicit_stepper_base( const algebra_type &algebra = algebra_type() )
     : algebra_stepper_base_type( algebra )
     { }
@@ -188,16 +107,6 @@
      *
      * the two overloads are needed in order to solve the forwarding problem
      */
-
- /**
- * \brief This method performs one step. It transforms the result in-place.
- *
- * \param system The system function to solve, hence the r.h.s. of the ordinary differential equation. It must fullfil the
- * Simple System concept.
- * \param x The state of the ODE which should be solved. After calling do_step the result is updated in x.
- * \param t The value of the time, at which the step should be performed.
- * \param dt The step size.
- */
     template< class System , class StateInOut >
     void do_step( System system , StateInOut &x , time_type t , time_type dt )
     {
@@ -205,16 +114,7 @@
     }
 
     /**
- * \brief This method performs one step with the stepper passed by Stepper.
- * It transforms the result in-place. This method is needed in order to solve the forwarding problem.
- * The difference to the other version is that it can be used like
- * `stepper.do_step( sys , make_range( iter1 , iter2 ) , t , dt )`
- *
- * \param system The system function to solve, hence the r.h.s. of the ordinary differential equation. It must fullfil the
- * Simple System concept.
- * \param x The state of the ODE which should be solved. After calling do_step the result is updated in x.
- * \param t The value of the time, at which the step should be performed.
- * \param dt The step size.
+ * \brief Second version to solve the forwarding problem, can be called with Boost.Range as StateInOut.
      */
     template< class System , class StateInOut >
     void do_step( System system , const StateInOut &x , time_type t , time_type dt )
@@ -222,7 +122,6 @@
         do_step_v1( system , x , t , dt );
     }
 
-
     /*
      * Version 2 : do_step( sys , x , dxdt , t , dt )
      *
@@ -230,27 +129,6 @@
      *
      * the disable is needed to avoid ambiguous overloads if state_type = time_type
      */
- /**
- * \brief The method performs one step with the stepper passed by Stepper. Additionally to the other method
- * the derivative of x is also passed to this method. It is equivalent to
- *
- * \code
- * sys( x , dxdt , t );
- * stepper.do_step( sys , x , dxdt , t , dt );
- * \endcode
- *
- * The result is updated in place in x. This method is disabled if Time and Deriv are of the same type. In this
- * case the method could not be distinguished from other `do_step` versions.
- *
- * \note This method does not solve the forwarding problem.
- *
- * \param system The system function to solve, hence the r.h.s. of the ODE. It must fullfil the
- * Simple System concept.
- * \param x The state of the ODE which should be solved. After calling do_step the result is updated in x.
- * \param dxdt The derivative of x at t.
- * \param t The value of the time, at which the step should be performed.
- * \param dt The step size.
- */
     template< class System , class StateInOut , class DerivIn >
     typename boost::disable_if< boost::is_same< DerivIn , time_type > , void >::type
     do_step( System system , StateInOut &x , const DerivIn &dxdt , time_type t , time_type dt )
@@ -264,17 +142,6 @@
      *
      * this version does not solve the forwarding problem, boost.range can not be used
      */
- /**
- * \brief The method performs one step with the stepper passed by Stepper. The state of the ODE is updated out-of-place.
- * \note This method does not solve the forwarding problem.
- *
- * \param system The system function to solve, hence the r.h.s. of the ODE. It must fullfil the
- * Simple System concept.
- * \param in The state of the ODE which should be solved. in is not modified in this method
- * \param t The value of the time, at which the step should be performed.
- * \param out The result of the step is written in out.
- * \param dt The step size.
- */
     template< class System , class StateIn , class StateOut >
     void do_step( System system , const StateIn &in , time_type t , StateOut &out , time_type dt )
     {
@@ -290,36 +157,12 @@
      *
      * this version does not solve the forwarding problem, boost.range can not be used
      */
- /**
- * \brief The method performs one step with the stepper passed by Stepper. The state of the ODE is updated out-of-place.
- * Furthermore, the derivative of x at t is passed to the stepper. It is equivalent to:
- *
- * \code
- * sys( in , dxdt , t );
- * stepper.do_step( sys , in , dxdt , t , out , dt );
- * \endcode
- *
- * \note This method does not solve the forwarding problem.
- *
- * \param system The system function to solve, hence the r.h.s. of the ODE. It must fullfil the
- * Simple System concept.
- * \param in The state of the ODE which should be solved. in is not modified in this method
- * \param dxdt The derivative of x at t.
- * \param t The value of the time, at which the step should be performed.
- * \param out The result of the step is written in out.
- * \param dt The step size.
- */
     template< class System , class StateIn , class DerivIn , class StateOut >
     void do_step( System system , const StateIn &in , const DerivIn &dxdt , time_type t , StateOut &out , time_type dt )
     {
         this->stepper().do_step_impl( system , in , dxdt , t , out , dt );
     }
 
-
- /**
- * \brief Adjust the size of all temporaries in the stepper manually.
- * \param x A state from which the size of the temporaries to be resized is deduced.
- */
     template< class StateIn >
     void adjust_size( const StateIn &x )
     {
@@ -364,6 +207,175 @@
 };
 
 
+/******* DOXYGEN *********/
+
+/**
+ * \class explicit_stepper_base
+ * \brief Base class for explicit steppers without step size control and without dense output.
+ *
+ * This class serves as the base class for all explicit steppers with algebra and operations.
+ * Step size control and error estimation as well as dense output are not provided. explicit_stepper_base
+ * is used as the interface in a CRTP (currently recurring template pattern). In order to work
+ * correctly the parent class needs to have a method `do_step_impl( system , in , dxdt_in , t , out , dt )`.
+ * This is method is used by explicit_stepper_base. explicit_stepper_base derives from
+ * algebra_stepper_base. An example how this class can be used is
+ *
+ * \code
+ * template< class State , class Value , class Deriv , class Time , class Algebra , class Operations , class Resizer >
+ * class custom_euler : public explicit_stepper_base< 1 , State , Value , Deriv , Time , Algebra , Operations , Resizer >
+ * {
+ * public:
+ *
+ * typedef explicit_stepper_base< 1 , State , Value , Deriv , Time , Algebra , Operations , Resizer > base_type;
+ *
+ * custom_euler( const Algebra &algebra = Algebra() ) { }
+ *
+ * template< class Sys , class StateIn , class DerivIn , class StateOut >
+ * void do_step_impl( Sys sys , const StateIn &in , const DerivIn &dxdt , Time t , StateOut &out , Time dt )
+ * {
+ * m_algebra.for_each3( out , in , dxdt , Operations::scale_sum2< Value , Time >( 1.0 , dt );
+ * }
+ *
+ * template< class State >
+ * void adjust_size( const State &x )
+ * {
+ * base_type::adjust_size( x );
+ * }
+ * };
+ * \endcode
+ *
+ * For the Stepper concept only the `do_step( sys , x , t , dt )` needs to be implemented. But this class
+ * provides additional `do_step` variants since the stepper is explicit. These methods can be used to increase
+ * the performance in some situation, for example if one needs to analyze `dxdt` during each step. In this case
+ * one can use
+ *
+ * \code
+ * sys( x , dxdt , t );
+ * stepper.do_step( sys , x , dxdt , t , dt ); // the value of dxdt is used here
+ * t += dt;
+ * \endcode
+ *
+ * In detail explicit_stepper_base provides the following `do_step` variants
+ * - `do_step( sys , x , t , dt )` - The classical `do_step` method needed to fullfil the Stepper concept. The state is updated in-place.
+ * A type modelling a Boost.Range can be used for x.
+ * - `do_step( sys , in , t , out , dt )` - This method updates the state out-of-place, hence the result of the step is stored in `out`.
+ * - `do_step( sys , x , dxdt , t , dt )` - This method updates the state in-place, but the derivative at the point `t` must be
+ * explicitely passed in `dxdt`. For an example see the code snippet above.
+ * - `do_step( sys , in , dxdt , t , out , dt )` - This method update the state out-of-place and expects that the derivative at the point
+ * `t` is explicitely passed in `dxdt`. It is a combination of the two `do_step` methods above.
+ *
+ * \note The system is always passed as value, which might result in poor performance if it contains data. In this case it can be used with `boost::ref`
+ * or `std::ref`, for example `stepper.do_step( boost::ref( sys ) , x , t , dt );`
+ *
+ * \note The time `t` is not advanced by the stepper. This has to done manually, or by the appropriate `integrate` routines or `iterator`s.
+ *
+ * \tparam Stepper The stepper on which this class should work. It is used via CRTP, hence explicit_stepper_base
+ * provides the interface for the Stepper.
+ * \tparam Order The order of the stepper.
+ * \tparam State The state type for the stepper.
+ * \tparam Value The value type for the stepper. This should be a floating point type, like float,
+ * double, or a multiprecision type. It must not neccessary be the value_type of the State. For example
+ * the State can be a `vector< complex< double > >` in this case the Value must be double.
+ * The default value is double.
+ * \tparam Deriv The type representing time derivatives of the state type. It is usually the same type as the
+ * state type, only if used with Boost.Units both types differ.
+ * \tparam Time The type representing the time. Usually the same type as the value type. When Boost.Units is
+ * used, this type has usually a unit.
+ * \tparam Algebra The algebra type which must fullfil the Algebra Concept.
+ * \tparam Operations The type for the operations wich must fullfil the Operations Concept.
+ * \tparam Resizer The resizer policy class.
+ */
+
+
+ /**
+ * \fn explicit_stepper_base::explicit_stepper_base( const algebra_type &algebra )
+ * \brief Constructs a explicit_stepper_base class. This constructor can be used as a default
+ * constructor if the algebra has a default constructor.
+ * \param algebra A copy of algebra is made and stored inside explicit_stepper_base.
+ */
+
+ /**
+ * \fn explicit_stepper_base::order_type order( void ) const
+ * \return Returns the order of the stepper.
+ */
+
+ /**
+ * \fn explicit_stepper_base::do_step( System system , StateInOut &x , time_type t , time_type dt )
+ * \brief This method performs one step. It transforms the result in-place.
+ *
+ * \param system The system function to solve, hence the r.h.s. of the ordinary differential equation. It must fullfil the
+ * Simple System concept.
+ * \param x The state of the ODE which should be solved. After calling do_step the result is updated in x.
+ * \param t The value of the time, at which the step should be performed.
+ * \param dt The step size.
+ */
+
+
+ /**
+ * \fn explicit_stepper_base::do_step( System system , StateInOut &x , const DerivIn &dxdt , time_type t , time_type dt )
+
+ * \brief The method performs one step. Additionally to the other method
+ * the derivative of x is also passed to this method. It is supposed to be used in the following way:
+ *
+ * \code
+ * sys( x , dxdt , t );
+ * stepper.do_step( sys , x , dxdt , t , dt );
+ * \endcode
+ *
+ * The result is updated in place in x. This method is disabled if Time and Deriv are of the same type. In this
+ * case the method could not be distinguished from other `do_step` versions.
+ *
+ * \note This method does not solve the forwarding problem.
+ *
+ * \param system The system function to solve, hence the r.h.s. of the ODE. It must fullfil the
+ * Simple System concept.
+ * \param x The state of the ODE which should be solved. After calling do_step the result is updated in x.
+ * \param dxdt The derivative of x at t.
+ * \param t The value of the time, at which the step should be performed.
+ * \param dt The step size.
+ */
+
+ /**
+ * \fn void explicit_stepper_base::do_step( System system , const StateIn &in , time_type t , StateOut &out , time_type dt )
+ * \brief The method performs one step. The state of the ODE is updated out-of-place.
+ * \note This method does not solve the forwarding problem.
+ *
+ * \param system The system function to solve, hence the r.h.s. of the ODE. It must fullfil the
+ * Simple System concept.
+ * \param in The state of the ODE which should be solved. in is not modified in this method
+ * \param t The value of the time, at which the step should be performed.
+ * \param out The result of the step is written in out.
+ * \param dt The step size.
+ */
+
+ /**
+ * \fn void explicit_stepper_base::do_step( System system , const StateIn &in , const DerivIn &dxdt , time_type t , StateOut &out , time_type dt )
+ * \brief The method performs one step. The state of the ODE is updated out-of-place.
+ * Furthermore, the derivative of x at t is passed to the stepper.
+ * It is supposed to be used in the following way:
+ *
+ * \code
+ * sys( in , dxdt , t );
+ * stepper.do_step( sys , in , dxdt , t , out , dt );
+ * \endcode
+ *
+ * \note This method does not solve the forwarding problem.
+ *
+ * \param system The system function to solve, hence the r.h.s. of the ODE. It must fullfil the
+ * Simple System concept.
+ * \param in The state of the ODE which should be solved. in is not modified in this method
+ * \param dxdt The derivative of x at t.
+ * \param t The value of the time, at which the step should be performed.
+ * \param out The result of the step is written in out.
+ * \param dt The step size.
+ */
+
+ /**
+ * \fn void explicit_stepper_base::adjust_size( const StateIn &x )
+ * \brief Adjust the size of all temporaries in the stepper manually.
+ * \param x A state from which the size of the temporaries to be resized is deduced.
+ */
+
 } // odeint
 } // numeric
 } // boost

Modified: trunk/boost/numeric/odeint/stepper/base/symplectic_rkn_stepper_base.hpp
==============================================================================
--- trunk/boost/numeric/odeint/stepper/base/symplectic_rkn_stepper_base.hpp (original)
+++ trunk/boost/numeric/odeint/stepper/base/symplectic_rkn_stepper_base.hpp 2012-12-07 07:26:55 EST (Fri, 07 Dec 2012)
@@ -41,43 +41,6 @@
 namespace odeint {
 
 
-/**
- * \class symplectic_nystroem_stepper_base
- * \brief Base class for all symplectic steppers of Nystroem type.
- *
- * This class is the base class for the symplectic Runge-Kutta-Nystroem steppers. Symplectic steppers are usually
- * used to solve Hamiltonian systems and they conserve the phase space volume, see
- * en.wikipedia.org/wiki/Symplectic_integrator.
- * Furthermore, the energy is conserved
- * in average. In detail this class of steppers can be used to solve separable Hamiltonian systems which can be written
- * in the form H(q,p) = H1(p) + H2(q). q is usually called the coordinate, while p is the momentum. The equations of motion
- * are dq/dt = dH1/dp, dp/dt = -dH2/dq.
- *
- * ToDo : add formula for solver and explanation of the coefficients
- *
- * symplectic_nystroem_stepper_base uses odeints algebra and operation system. Step size and error estimation are not
- * provided for this class of solvers. It derives from algebra_stepper_base. Several `do_step` variants are provided:
- *
- * - `do_step( sys , x , t , dt )` - The classical `do_step` method. The sys can be either a pair of function objects
- * for the coordinate or the momentum part or one function object for the momentum part. `x` is a pair of coordinate
- * and momentum. The state is updated in-place.
- * - `do_step( sys , q , p , t , dt )` - This method is similar to the method above with the difference that the coordinate
- * and the momentum are passed explicitely and not packed into a pair.
- * - `do_step( sys , x_in , t , x_out , dt )` - This method transforms the state out-of-place. `x_in` and `x_out` are here pairs
- * of coordinate and momentum.
- *
- * \tparam NumOfStages Number of stages.
- * \tparam Order The order of the stepper.
- * \tparam Coor The type representing the coordinates q.
- * \tparam Momentum The type representing the coordinates p.
- * \tparam Value The basic value type. Should be somethink like float, double or a high-precision type.
- * \tparam CoorDeriv The type representing the time derivative of the coordinate dq/dt.
- * \tparam MomemtnumDeriv The type representing the time derivative of the momentum dp/dt.
- * \tparam Time The type representing the time t.
- * \tparam Algebra The algebra.
- * \tparam Operations The operations.
- * \tparam Resizer The resizer policy.
- */
 template<
 size_t NumOfStages ,
 unsigned short Order ,
@@ -124,22 +87,12 @@
 
     typedef boost::array< value_type , num_of_stages > coef_type;
 
- /**
- * \brief Constructs a symplectic_nystroem_stepper_base class. The parameters of the specific Nystroem method and the
- * algebra have to be passed.
- * \param coef_a The coefficients a.
- * \param coef_b The coefficients b.
- * \param algebra A copy of algebra is made and stored inside explicit_stepper_base.
- */
     symplectic_nystroem_stepper_base( const coef_type &coef_a , const coef_type &coef_b , const algebra_type &algebra = algebra_type() )
         : algebra_stepper_base_type( algebra ) , m_coef_a( coef_a ) , m_coef_b( coef_b ) ,
           m_dqdt_resizer() , m_dpdt_resizer() , m_dqdt() , m_dpdt()
     { }
 
 
- /**
- * \return Returns the order of the stepper.
- */
     order_type order( void ) const
     {
         return order_value;
@@ -150,23 +103,6 @@
      *
      * This version does not solve the forwarding problem, boost.range can not be used.
      */
- /**
- * \brief This method performs one step. The system can be either a pair of two function object
- * decribing the momentum part and the coordinate part or one function object describing only
- * the momentum part. In this case the coordinate is assumed to be trivial dq/dt = p. The state
- * is updated in-place.
- *
- * \note boost::ref or std::ref can be used for the system as well as for the state. So, it is correct
- * to write `stepper.do_step( make_pair( std::ref( fq ) , std::ref( fp ) ) , make_pair( std::ref( q ) , std::ref( p ) ) , t , dt )`.
- *
- * \note This method solves the forwarding problem.
- *
- * \param system The system, can be represented as a pair of two function object or one function object. See above.
- * \param state The state of the ODE. It is a pair of Coor and Momentum. The state is updated in-place, therefore, the
- * new value of the state will be written into this variable.
- * \param t The time of the ODE. It is not advanced by this method.
- * \param dt The time step.
- */
     template< class System , class StateInOut >
     void do_step( System system , const StateInOut &state , time_type t , time_type dt )
     {
@@ -175,8 +111,8 @@
     }
 
     /**
- * \brief Same function as do_step( system , x , t , dt ). It differs only in a different const specifier in order
- * to solve the forwarding problem.
+ * \brief Same function as above. It differs only in a different const specifier in order
+ * to solve the forwarding problem, can be used with Boost.Range.
      */
     template< class System , class StateInOut >
     void do_step( System system , StateInOut &state , time_type t , time_type dt )
@@ -195,25 +131,6 @@
      *
      * The two overloads are needed in order to solve the forwarding problem.
      */
- /**
- * \brief This method performs one step. The system can be either a pair of two function object
- * decribing the momentum part and the coordinate part or one function object describing only
- * the momentum part. In this case the coordinate is assumed to be trivial dq/dt = p. The state
- * is updated in-place.
- *
- * \note boost::ref or std::ref can be used for the system. So, it is correct
- * to write `stepper.do_step( make_pair( std::ref( fq ) , std::ref( fp ) ) , q , p , t , dt )`.
- *
- * \note This method solves the forwarding problem.
- *
- * \param system The system, can be represented as a pair of two function object or one function object. See above.
- * \param q The coordinate of the ODE. It is updated in-place. Therefore, the new value of the coorindate will be written
- * into this variable.
- * \param p The momentum of the ODE. It is updated in-place. Therefore, the new value of the momentum will be written info
- * this variable.
- * \param t The time of the ODE. It is not advanced by this method.
- * \param dt The time step.
- */
     template< class System , class CoorInOut , class MomentumInOut >
     void do_step( System system , CoorInOut &q , MomentumInOut &p , time_type t , time_type dt )
     {
@@ -222,7 +139,7 @@
 
     /**
      * \brief Same function as do_step( system , q , p , t , dt ). It differs only in a different const specifier in order
- * to solve the forwarding problem.
+ * to solve the forwarding problem, can be called with Boost.Range.
      */
     template< class System , class CoorInOut , class MomentumInOut >
     void do_step( System system , const CoorInOut &q , const MomentumInOut &p , time_type t , time_type dt )
@@ -239,24 +156,6 @@
      *
      * The forwarding problem is not solved in this version
      */
- /**
- * \brief This method performs one step. The system can be either a pair of two function object
- * decribing the momentum part and the coordinate part or one function object describing only
- * the momentum part. In this case the coordinate is assumed to be trivial dq/dt = p. The state
- * is updated out-of-place.
- *
- * \note boost::ref or std::ref can be used for the system. So, it is correct
- * to write `stepper.do_step( make_pair( std::ref( fq ) , std::ref( fp ) ) , x_in , t , x_out , dt )`.
- *
- * \note This method NOT solve the forwarding problem.
- *
- * \param system The system, can be represented as a pair of two function object or one function object. See above.
- * \param in The state of the ODE, which is a pair of coordinate and momentum. The state is updated out-of-place, therefore the
- * new value is written into out
- * \param t The time of the ODE. It is not advanced by this method.
- * \param out The new state of the ODE.
- * \param dt The time step.
- */
     template< class System , class StateIn , class StateOut >
     void do_step( System system , const StateIn &in , time_type t , StateOut &out , time_type dt )
     {
@@ -265,10 +164,6 @@
     }
 
 
- /**
- * \brief Adjust the size of all temporaries in the stepper manually.
- * \param x A state from which the size of the temporaries to be resized is deduced.
- */
     template< class StateType >
     void adjust_size( const StateType &x )
     {
@@ -410,6 +305,126 @@
 
 };
 
+/********* DOXYGEN *********/
+
+/**
+ * \class symplectic_nystroem_stepper_base
+ * \brief Base class for all symplectic steppers of Nystroem type.
+ *
+ * This class is the base class for the symplectic Runge-Kutta-Nystroem steppers. Symplectic steppers are usually
+ * used to solve Hamiltonian systems and they conserve the phase space volume, see
+ * en.wikipedia.org/wiki/Symplectic_integrator.
+ * Furthermore, the energy is conserved
+ * in average. In detail this class of steppers can be used to solve separable Hamiltonian systems which can be written
+ * in the form H(q,p) = H1(p) + H2(q). q is usually called the coordinate, while p is the momentum. The equations of motion
+ * are dq/dt = dH1/dp, dp/dt = -dH2/dq.
+ *
+ * ToDo : add formula for solver and explanation of the coefficients
+ *
+ * symplectic_nystroem_stepper_base uses odeints algebra and operation system. Step size and error estimation are not
+ * provided for this class of solvers. It derives from algebra_stepper_base. Several `do_step` variants are provided:
+ *
+ * - `do_step( sys , x , t , dt )` - The classical `do_step` method. The sys can be either a pair of function objects
+ * for the coordinate or the momentum part or one function object for the momentum part. `x` is a pair of coordinate
+ * and momentum. The state is updated in-place.
+ * - `do_step( sys , q , p , t , dt )` - This method is similar to the method above with the difference that the coordinate
+ * and the momentum are passed explicitely and not packed into a pair.
+ * - `do_step( sys , x_in , t , x_out , dt )` - This method transforms the state out-of-place. `x_in` and `x_out` are here pairs
+ * of coordinate and momentum.
+ *
+ * \tparam NumOfStages Number of stages.
+ * \tparam Order The order of the stepper.
+ * \tparam Coor The type representing the coordinates q.
+ * \tparam Momentum The type representing the coordinates p.
+ * \tparam Value The basic value type. Should be somethink like float, double or a high-precision type.
+ * \tparam CoorDeriv The type representing the time derivative of the coordinate dq/dt.
+ * \tparam MomemtnumDeriv The type representing the time derivative of the momentum dp/dt.
+ * \tparam Time The type representing the time t.
+ * \tparam Algebra The algebra.
+ * \tparam Operations The operations.
+ * \tparam Resizer The resizer policy.
+ */
+
+ /**
+ * \fn symplectic_nystroem_stepper_base::symplectic_nystroem_stepper_base( const coef_type &coef_a , const coef_type &coef_b , const algebra_type &algebra )
+ * \brief Constructs a symplectic_nystroem_stepper_base class. The parameters of the specific Nystroem method and the
+ * algebra have to be passed.
+ * \param coef_a The coefficients a.
+ * \param coef_b The coefficients b.
+ * \param algebra A copy of algebra is made and stored inside explicit_stepper_base.
+ */
+
+ /**
+ * \fn symplectic_nystroem_stepper_base::order( void ) const
+ * \return Returns the order of the stepper.
+ */
+
+ /**
+ * \fn symplectic_nystroem_stepper_base::do_step( System system , const StateInOut &state , time_type t , time_type dt )
+ * \brief This method performs one step. The system can be either a pair of two function object
+ * decribing the momentum part and the coordinate part or one function object describing only
+ * the momentum part. In this case the coordinate is assumed to be trivial dq/dt = p. The state
+ * is updated in-place.
+ *
+ * \note boost::ref or std::ref can be used for the system as well as for the state. So, it is correct
+ * to write `stepper.do_step( make_pair( std::ref( fq ) , std::ref( fp ) ) , make_pair( std::ref( q ) , std::ref( p ) ) , t , dt )`.
+ *
+ * \note This method solves the forwarding problem.
+ *
+ * \param system The system, can be represented as a pair of two function object or one function object. See above.
+ * \param state The state of the ODE. It is a pair of Coor and Momentum. The state is updated in-place, therefore, the
+ * new value of the state will be written into this variable.
+ * \param t The time of the ODE. It is not advanced by this method.
+ * \param dt The time step.
+ */
+
+ /**
+ * \fn symplectic_nystroem_stepper_base::do_step( System system , CoorInOut &q , MomentumInOut &p , time_type t , time_type dt )
+ * \brief This method performs one step. The system can be either a pair of two function object
+ * decribing the momentum part and the coordinate part or one function object describing only
+ * the momentum part. In this case the coordinate is assumed to be trivial dq/dt = p. The state
+ * is updated in-place.
+ *
+ * \note boost::ref or std::ref can be used for the system. So, it is correct
+ * to write `stepper.do_step( make_pair( std::ref( fq ) , std::ref( fp ) ) , q , p , t , dt )`.
+ *
+ * \note This method solves the forwarding problem.
+ *
+ * \param system The system, can be represented as a pair of two function object or one function object. See above.
+ * \param q The coordinate of the ODE. It is updated in-place. Therefore, the new value of the coorindate will be written
+ * into this variable.
+ * \param p The momentum of the ODE. It is updated in-place. Therefore, the new value of the momentum will be written info
+ * this variable.
+ * \param t The time of the ODE. It is not advanced by this method.
+ * \param dt The time step.
+ */
+
+ /**
+ * \fn symplectic_nystroem_stepper_base::do_step( System system , const StateIn &in , time_type t , StateOut &out , time_type dt )
+ * \brief This method performs one step. The system can be either a pair of two function object
+ * decribing the momentum part and the coordinate part or one function object describing only
+ * the momentum part. In this case the coordinate is assumed to be trivial dq/dt = p. The state
+ * is updated out-of-place.
+ *
+ * \note boost::ref or std::ref can be used for the system. So, it is correct
+ * to write `stepper.do_step( make_pair( std::ref( fq ) , std::ref( fp ) ) , x_in , t , x_out , dt )`.
+ *
+ * \note This method NOT solve the forwarding problem.
+ *
+ * \param system The system, can be represented as a pair of two function object or one function object. See above.
+ * \param in The state of the ODE, which is a pair of coordinate and momentum. The state is updated out-of-place, therefore the
+ * new value is written into out
+ * \param t The time of the ODE. It is not advanced by this method.
+ * \param out The new state of the ODE.
+ * \param dt The time step.
+ */
+
+ /**
+ * \fn symplectic_nystroem_stepper_base::adjust_size( const StateType &x )
+ * \brief Adjust the size of all temporaries in the stepper manually.
+ * \param x A state from which the size of the temporaries to be resized is deduced.
+ */
+
 } // namespace odeint
 } // namespace numeric
 } // namespace boost

Modified: trunk/boost/numeric/odeint/stepper/bulirsch_stoer.hpp
==============================================================================
--- trunk/boost/numeric/odeint/stepper/bulirsch_stoer.hpp (original)
+++ trunk/boost/numeric/odeint/stepper/bulirsch_stoer.hpp 2012-12-07 07:26:55 EST (Fri, 07 Dec 2012)
@@ -3,7 +3,7 @@
   boost/numeric/odeint/stepper/bulirsch_stoer.hpp
 
   [begin_description]
- Implementaiton of the Burlish-Stoer method. As described in
+ Implementation of the Burlish-Stoer method. As described in
   Ernst Hairer, Syvert Paul Norsett, Gerhard Wanner
   Solving Ordinary Differential Equations I. Nonstiff Problems.
   Springer Series in Comput. Mathematics, Vol. 8, Springer-Verlag 1987, Second revised edition 1993.
@@ -47,8 +47,6 @@
 namespace numeric {
 namespace odeint {
 
-/** ToDo try_step stepsize changed return values doesn't make too much sense here as we have order control as well */
-
 template<
     class State ,
     class Value = double ,
@@ -69,6 +67,7 @@
     typedef Algebra algebra_type;
     typedef Operations operations_type;
     typedef Resizer resizer_type;
+#ifndef DOXYGEN_SKIP
     typedef state_wrapper< state_type > wrapped_state_type;
     typedef state_wrapper< deriv_type > wrapped_deriv_type;
     typedef controlled_stepper_tag stepper_category;
@@ -83,20 +82,14 @@
     typedef std::vector< value_vector > value_matrix;
     typedef std::vector< size_t > int_vector;
     typedef std::vector< wrapped_state_type > state_table_type;
-
+#endif //DOXYGEN_SKIP
     const static size_t m_k_max = 8;
 
-
     bulirsch_stoer(
         value_type eps_abs = 1E-6 , value_type eps_rel = 1E-6 ,
         value_type factor_x = 1.0 , value_type factor_dxdt = 1.0 )
         : m_error_checker( eps_abs , eps_rel , factor_x, factor_dxdt ) , m_midpoint() ,
           m_last_step_rejected( false ) , m_first( true ) ,
- /* , m_t_last() ,
- m_current_k_opt() ,
- m_algebra() ,
- m_dxdt_resizer() , m_xnew_resizer() , m_resizer() ,
- m_xnew() , m_err() , m_dxdt() ,*/
           m_interval_sequence( m_k_max+1 ) ,
           m_coeff( m_k_max+1 ) ,
           m_cost( m_k_max+1 ) ,
@@ -105,7 +98,7 @@
     {
         BOOST_USING_STD_MIN();
         BOOST_USING_STD_MAX();
- //m_dt_last = 1.0E30;
+ /* initialize sequence of stage numbers and work */
         for( unsigned short i = 0; i < m_k_max+1; i++ )
         {
             m_interval_sequence[i] = 2 * (i+1);
@@ -118,14 +111,15 @@
             {
                 const value_type r = static_cast< value_type >( m_interval_sequence[i] ) / static_cast< value_type >( m_interval_sequence[k] );
                 m_coeff[i][k] = 1.0 / ( r*r - static_cast< value_type >( 1.0 ) ); // coefficients for extrapolation
- //std::cout << i << "," << k << " " << m_coeff[i][k] << '\t' ;
             }
- //std ::cout << std::endl;
+
             // crude estimate of optimal order
- const value_type logfact( -log10( max BOOST_PREVENT_MACRO_SUBSTITUTION( eps_rel , 1.0E-12 ) ) * 0.6 + 0.5 );
- m_current_k_opt = max BOOST_PREVENT_MACRO_SUBSTITUTION( 1 , min BOOST_PREVENT_MACRO_SUBSTITUTION( static_cast<int>( m_k_max-1 ) , static_cast<int>( logfact ) ));
- //m_current_k_opt = m_k_max - 1;
- //std::cout << m_cost[i] << std::endl;
+
+ m_current_k_opt = 4;
+ /* no calculation because log10 might not exist for value_type!
+ const value_type logfact( -log10( max BOOST_PREVENT_MACRO_SUBSTITUTION( eps_rel , static_cast< value_type >(1.0E-12) ) ) * 0.6 + 0.5 );
+ m_current_k_opt = max BOOST_PREVENT_MACRO_SUBSTITUTION( static_cast<value_type>( 1 ) , min BOOST_PREVENT_MACRO_SUBSTITUTION( static_cast<value_type>( m_k_max-1 ) , logfact ));
+ */
         }
 
     }
@@ -142,6 +136,9 @@
         return try_step_v1( system , x , t, dt );
     }
 
+ /**
+ * \brief Second version to solve the forwarding problem, can be used with Boost.Range as StateInOut.
+ */
     template< class System , class StateInOut >
     controlled_step_result try_step( System system , const StateInOut &x , time_type &t , time_type &dt )
     {
@@ -171,7 +168,8 @@
      * this version does not solve the forwarding problem, boost.range can not be used
      */
     template< class System , class StateIn , class StateOut >
- controlled_step_result try_step( System system , const StateIn &in , time_type &t , StateOut &out , time_type &dt )
+ typename boost::disable_if< boost::is_same< StateIn , time_type > , controlled_step_result >::type
+ try_step( System system , const StateIn &in , time_type &t , StateOut &out , time_type &dt )
     {
         typename odeint::unwrap_reference< System >::type &sys = system;
         m_dxdt_resizer.adjust_size( in , detail::bind( &controlled_error_bs_type::template resize_m_dxdt< StateIn > , detail::ref( *this ) , detail::_1 ) );
@@ -180,6 +178,11 @@
     }
 
 
+ /*
+ * Full version : try_step( sys , in , dxdt_in , t , out , dt )
+ *
+ * contains the actual implementation
+ */
     template< class System , class StateIn , class DerivIn , class StateOut >
     controlled_step_result try_step( System system , const StateIn &in , const DerivIn &dxdt , time_type &t , StateOut &out , time_type &dt )
     {
@@ -204,17 +207,17 @@
         time_vector h_opt( m_k_max+1 );
         inv_time_vector work( m_k_max+1 );
 
- //std::cout << "t=" << t <<", dt=" << dt << "(" << m_dt_last << ")" << ", k_opt=" << m_current_k_opt << std::endl;
-
         time_type new_h = dt;
 
+ /* m_current_k_opt is the estimated current optimal stage number */
         for( size_t k = 0 ; k <= m_current_k_opt+1 ; k++ )
         {
- //std::cout << " k=" << k; //<<": " << ", first: " << m_first << std::endl;
+ /* the stage counts are stored in m_interval_sequence */
             m_midpoint.set_steps( m_interval_sequence[k] );
             if( k == 0 )
             {
                 m_midpoint.do_step( sys , in , dxdt , t , out , dt );
+ /* the first step, nothing more to do */
             }
             else
             {
@@ -226,8 +229,6 @@
                 const value_type error = m_error_checker.error( m_algebra , in , dxdt , m_err.m_v , dt );
                 h_opt[k] = calc_h_opt( dt , error , k );
                 work[k] = static_cast<value_type>( m_cost[k] ) / h_opt[k];
- //std::cout << '\t' << "h_opt=" << h_opt[k] << ", work=" << work[k] << std::endl;
- //std::cout << '\t' << "error: " << error << std::endl;
 
                 if( (k == m_current_k_opt-1) || m_first )
                 { // convergence before k_opt ?
@@ -270,7 +271,6 @@
                             m_current_k_opt = min BOOST_PREVENT_MACRO_SUBSTITUTION( static_cast<int>(m_k_max-1) , static_cast<int>(m_current_k_opt)+1 );
                             new_h = h_opt[k];
                             new_h *= m_cost[m_current_k_opt]/m_cost[k];
- //std::cout << new_h << std::endl;
                         } else
                             new_h = h_opt[m_current_k_opt];
                         break;
@@ -284,7 +284,6 @@
                 }
                 if( k == m_current_k_opt+1 )
                 { // convergence at k_opt+1 ?
- //std::cout << "convergence at k_opt+1 ?" << std::endl;
                     if( error < 1.0 )
                     { //convergence
                         reject = false;
@@ -306,8 +305,7 @@
         if( !reject )
         {
             t += dt;
- }// else
- // std::cout << "REJECT!" << std::endl;
+ }
 
         if( !m_last_step_rejected || boost::numeric::odeint::detail::less_with_sign(new_h, dt, dt) )
         {
@@ -324,9 +322,9 @@
             return success;
     }
 
+ /** \brief Resets the internal state of the stepper */
     void reset()
     {
- //std::cout << "reset" << std::endl;
         m_first = true;
         m_last_step_rejected = false;
     }
@@ -334,7 +332,6 @@
 
     /* Resizer methods */
 
-
     template< class StateIn >
     void adjust_size( const StateIn &x )
     {
@@ -382,27 +379,27 @@
 
     template< class StateInOut >
     void extrapolate( size_t k , state_table_type &table , const value_matrix &coeff , StateInOut &xest )
- //polynomial extrapolation, see http://www.nr.com/webnotes/nr3web21.pdf
+ /* polynomial extrapolation, see http://www.nr.com/webnotes/nr3web21.pdf
+ uses the obtained intermediate results to extrapolate to dt->0
+ */
     {
- //std::cout << "extrapolate k=" << k << ":" << std::endl;
         static const value_type val1 = static_cast< value_type >( 1.0 );
         for( int j=k-1 ; j>0 ; --j )
         {
- //std::cout << '\t' << m_coeff[k][j];
             m_algebra.for_each3( table[j-1].m_v , table[j].m_v , table[j-1].m_v ,
                                  typename operations_type::template scale_sum2< value_type , value_type >( val1 + coeff[k][j] , -coeff[k][j] ) );
         }
- //std::cout << std::endl << m_coeff[k][0] << std::endl;
         m_algebra.for_each3( xest , table[0].m_v , xest ,
                              typename operations_type::template scale_sum2< value_type , value_type >( val1 + coeff[k][0] , -coeff[k][0]) );
     }
 
     time_type calc_h_opt( time_type h , value_type error , size_t k ) const
+ /* calculates the optimal step size for a given error and stage number */
     {
         BOOST_USING_STD_MIN();
         BOOST_USING_STD_MAX();
         using std::pow;
- value_type expo=1.0/(2*k+1);
+ value_type expo( 1.0/(2*k+1) );
         value_type facmin = pow BOOST_PREVENT_MACRO_SUBSTITUTION( STEPFAC3 , expo );
         value_type fac;
         if (error == 0.0)
@@ -412,17 +409,15 @@
             fac = STEPFAC2 / pow BOOST_PREVENT_MACRO_SUBSTITUTION( error / STEPFAC1 , expo );
             fac = max BOOST_PREVENT_MACRO_SUBSTITUTION( facmin/STEPFAC4 , min BOOST_PREVENT_MACRO_SUBSTITUTION( 1.0/facmin , fac ) );
         }
- //return std::abs(h*fac);
         return h*fac;
     }
 
     controlled_step_result set_k_opt( size_t k , const inv_time_vector &work , const time_vector &h_opt , time_type &dt )
+ /* calculates the optimal stage number */
     {
- //std::cout << "finding k_opt..." << std::endl;
         if( k == 1 )
         {
             m_current_k_opt = 2;
- //dt = h_opt[ m_current_k_opt-1 ] * m_cost[ m_current_k_opt ] / m_cost[ m_current_k_opt-1 ] ;
             return success;
         }
         if( (work[k-1] < KFAC1*work[k]) || (k == m_k_max) )
@@ -500,6 +495,127 @@
 };
 
 
+/******** DOXYGEN ********/
+/**
+ * \class bulirsch_stoer
+ * \brief The Bulirsch-Stoer algorithm.
+ *
+ * The Bulirsch-Stoer is a controlled stepper that adjusts both step size
+ * and order of the method. The algorithm uses the modified midpoint and
+ * a polynomial extrapolation compute the solution.
+ *
+ * \tparam State The state type.
+ * \tparam Value The value type.
+ * \tparam Deriv The type representing the time derivative of the state.
+ * \tparam Time The time representing the independent variable - the time.
+ * \tparam Algebra The algebra type.
+ * \tparam Operations The operations type.
+ * \tparam Resizer The resizer policy type.
+ */
+
+ /**
+ * \fn bulirsch_stoer::bulirsch_stoer( value_type eps_abs , value_type eps_rel , value_type factor_x , value_type factor_dxdt )
+ * \brief Constructs the bulirsch_stoer class, including initialization of
+ * the error bounds.
+ *
+ * \param eps_abs Absolute tolerance level.
+ * \param eps_rel Relative tolerance level.
+ * \param factor_x Factor for the weight of the state.
+ * \param factor_dxdt Factor for the weight of the derivative.
+ */
+
+ /**
+ * \fn bulirsch_stoer::try_step( System system , StateInOut &x , time_type &t , time_type &dt )
+ * \brief Tries to perform one step.
+ *
+ * This method tries to do one step with step size dt. If the error estimate
+ * is to large, the step is rejected and the method returns fail and the
+ * step size dt is reduced. If the error estimate is acceptably small, the
+ * step is performed, success is returned and dt might be increased to make
+ * the steps as large as possible. This method also updates t if a step is
+ * performed. Also, the internal order of the stepper is adjusted if requried.
+ *
+ * \param system The system function to solve, hence the r.h.s. of the ODE.
+ * It must fullfil the Simple System concept.
+ * \param x The state of the ODE which should be solved. Overwritten if
+ * the step is successfull.
+ * \param t The value of the time. Updated if the step is successfull.
+ * \param dt The step size. Updated.
+ * \return success if the step was accepted, fail otherwise.
+ */
+
+ /**
+ * \fn bulirsch_stoer::try_step( System system , StateInOut &x , const DerivIn &dxdt , time_type &t , time_type &dt )
+ * \brief Tries to perform one step.
+ *
+ * This method tries to do one step with step size dt. If the error estimate
+ * is to large, the step is rejected and the method returns fail and the
+ * step size dt is reduced. If the error estimate is acceptably small, the
+ * step is performed, success is returned and dt might be increased to make
+ * the steps as large as possible. This method also updates t if a step is
+ * performed. Also, the internal order of the stepper is adjusted if requried.
+ *
+ * \param system The system function to solve, hence the r.h.s. of the ODE.
+ * It must fullfil the Simple System concept.
+ * \param x The state of the ODE which should be solved. Overwritten if
+ * the step is successfull.
+ * \param dxdt The derivative of state.
+ * \param t The value of the time. Updated if the step is successfull.
+ * \param dt The step size. Updated.
+ * \return success if the step was accepted, fail otherwise.
+ */
+
+ /**
+ * \fn bulirsch_stoer::try_step( System system , const StateIn &in , time_type &t , StateOut &out , time_type &dt )
+ * \brief Tries to perform one step.
+ *
+ * \note This method is disabled if state_type=time_type to avoid ambiguity.
+ *
+ * This method tries to do one step with step size dt. If the error estimate
+ * is to large, the step is rejected and the method returns fail and the
+ * step size dt is reduced. If the error estimate is acceptably small, the
+ * step is performed, success is returned and dt might be increased to make
+ * the steps as large as possible. This method also updates t if a step is
+ * performed. Also, the internal order of the stepper is adjusted if requried.
+ *
+ * \param system The system function to solve, hence the r.h.s. of the ODE.
+ * It must fullfil the Simple System concept.
+ * \param in The state of the ODE which should be solved.
+ * \param t The value of the time. Updated if the step is successfull.
+ * \param out Used to store the result of the step.
+ * \param dt The step size. Updated.
+ * \return success if the step was accepted, fail otherwise.
+ */
+
+
+ /**
+ * \fn bulirsch_stoer::try_step( System system , const StateIn &in , const DerivIn &dxdt , time_type &t , StateOut &out , time_type &dt )
+ * \brief Tries to perform one step.
+ *
+ * This method tries to do one step with step size dt. If the error estimate
+ * is to large, the step is rejected and the method returns fail and the
+ * step size dt is reduced. If the error estimate is acceptably small, the
+ * step is performed, success is returned and dt might be increased to make
+ * the steps as large as possible. This method also updates t if a step is
+ * performed. Also, the internal order of the stepper is adjusted if requried.
+ *
+ * \param system The system function to solve, hence the r.h.s. of the ODE.
+ * It must fullfil the Simple System concept.
+ * \param in The state of the ODE which should be solved.
+ * \param dxdt The derivative of state.
+ * \param t The value of the time. Updated if the step is successfull.
+ * \param out Used to store the result of the step.
+ * \param dt The step size. Updated.
+ * \return success if the step was accepted, fail otherwise.
+ */
+
+
+ /**
+ * \fn bulirsch_stoer::adjust_size( const StateIn &x )
+ * \brief Adjust the size of all temporaries in the stepper manually.
+ * \param x A state from which the size of the temporaries to be resized is deduced.
+ */
+
 }
 }
 }

Modified: trunk/boost/numeric/odeint/stepper/bulirsch_stoer_dense_out.hpp
==============================================================================
--- trunk/boost/numeric/odeint/stepper/bulirsch_stoer_dense_out.hpp (original)
+++ trunk/boost/numeric/odeint/stepper/bulirsch_stoer_dense_out.hpp 2012-12-07 07:26:55 EST (Fri, 07 Dec 2012)
@@ -47,22 +47,6 @@
 namespace numeric {
 namespace odeint {
 
-/*
-
-template< class T , size_t N >
-std::ostream& operator<<( std::ostream& output , const boost::array< T , N >& a ) {
- output << "[ " << a[0] ;
- for( size_t n = 1 ; n<N ; ++n )
- output << " , " << a[n];
- output << " ]";
- return output; // for multiple << operators.
-}
-
-*/
-
-
-
-
 template<
     class State ,
     class Value = double ,
@@ -84,9 +68,10 @@
     typedef Algebra algebra_type;
     typedef Operations operations_type;
     typedef Resizer resizer_type;
+ typedef dense_output_stepper_tag stepper_category;
+#ifndef DOXYGEN_SKIP
     typedef state_wrapper< state_type > wrapped_state_type;
     typedef state_wrapper< deriv_type > wrapped_deriv_type;
- typedef dense_output_stepper_tag stepper_category;
 
     typedef bulirsch_stoer_dense_out< State , Value , Deriv , Time , Algebra , Operations , Resizer > controlled_error_bs_type;
 
@@ -100,12 +85,12 @@
     typedef std::vector< wrapped_state_type > state_vector_type;
     typedef std::vector< wrapped_deriv_type > deriv_vector_type;
     typedef std::vector< deriv_vector_type > deriv_table_type;
+#endif //DOXYGEN_SKIP
 
     const static size_t m_k_max = 8;
 
 
 
-
     bulirsch_stoer_dense_out(
         value_type eps_abs = 1E-6 , value_type eps_rel = 1E-6 ,
         value_type factor_x = 1.0 , value_type factor_dxdt = 1.0 ,
@@ -129,6 +114,7 @@
 
         for( unsigned short i = 0; i < m_k_max+1; i++ )
         {
+ /* only this specific sequence allows for dense ouput */
             m_interval_sequence[i] = 2 + 4*i; // 2 6 10 14 ...
             m_derivs[i].resize( m_interval_sequence[i] );
             if( i == 0 )
@@ -140,40 +126,23 @@
             {
                 const value_type r = static_cast< value_type >( m_interval_sequence[i] ) / static_cast< value_type >( m_interval_sequence[k] );
                 m_coeff[i][k] = 1.0 / ( r*r - static_cast< value_type >( 1.0 ) ); // coefficients for extrapolation
- //std::cout << i << "," << k << " " << m_coeff[i][k] << '\t' ;
             }
- //std ::cout << std::endl;
             // crude estimate of optimal order
+
+ m_current_k_opt = 4;
+ /* no calculation because log10 might not exist for value_type!
             const value_type logfact( -log10( max BOOST_PREVENT_MACRO_SUBSTITUTION( eps_rel , static_cast< value_type >( 1.0E-12 ) ) ) * 0.6 + 0.5 );
             m_current_k_opt = max BOOST_PREVENT_MACRO_SUBSTITUTION( 1 , min BOOST_PREVENT_MACRO_SUBSTITUTION( static_cast<int>( m_k_max-1 ) , static_cast<int>( logfact ) ));
- //m_current_k_opt = m_k_max - 1;
- //std::cout << m_cost[i] << std::endl;
+ */
         }
         int num = 1;
         for( int i = 2*(m_k_max) ; i >=0 ; i-- )
         {
             m_diffs[i].resize( num );
- //std::cout << "m_diffs[" << i << "] size: " << num << std::endl;
             num += (i+1)%2;
         }
     }
 
-
-
-/*
- template< class System , class StateInOut >
- controlled_step_result try_step( System system , StateInOut &x , time_type &t , time_type &dt )
- {
- m_xnew_resizer.adjust_size( x , detail::bind( &controlled_error_bs_type::template resize_m_xnew< StateInOut > , detail::ref( *this ) , detail::_1 ) );
- controlled_step_result res = try_step( system , x , t , m_xnew.m_v , dt );
- if( ( res == success_step_size_increased ) || ( res == success_step_size_unchanged ) )
- {
- boost::numeric::odeint::copy( m_xnew.m_v , x );
- }
- return res;
- }
-*/
-
     template< class System , class StateIn , class DerivIn , class StateOut , class DerivOut >
     controlled_step_result try_step( System system , const StateIn &in , const DerivIn &dxdt , time_type &t , StateOut &out , DerivOut &dxdt_new , time_type &dt )
     {
@@ -184,10 +153,6 @@
         static const value_type val1( 1.0 );
 
         typename odeint::unwrap_reference< System >::type &sys = system;
-// if( m_resizer.adjust_size( in , detail::bind( &controlled_error_bs_type::template resize_impl< StateIn > , detail::ref( *this ) , detail::_1 ) ) )
-// reset(); // system resized -> reset
-// if( dt != m_dt_last )
-// reset(); // step size changed from outside -> reset
 
         bool reject( true );
 
@@ -201,7 +166,6 @@
 
         for( size_t k = 0 ; k <= m_current_k_opt+1 ; k++ )
         {
- //std::cout << "k=" << k <<" (steps=" << m_interval_sequence[k] << "): " << std::endl;
             m_midpoint.set_steps( m_interval_sequence[k] );
             if( k == 0 )
             {
@@ -217,8 +181,6 @@
                 const value_type error = m_error_checker.error( m_algebra , in , dxdt , m_err.m_v , dt );
                 h_opt[k] = calc_h_opt( dt , error , k );
                 work[k] = static_cast<value_type>( m_cost[k] ) / h_opt[k];
- //std::cout << '\t' << "h_opt=" << h_opt[k] << ", work=" << work[k] << std::endl;
- //std::cout << '\t' << "error: " << error << std::endl;
 
                 m_k_final = k;
 
@@ -305,14 +267,10 @@
             {
                 reject = true;
                 new_h = dt * pow BOOST_PREVENT_MACRO_SUBSTITUTION( error , static_cast<value_type>(-1)/(2*m_k_final+2) );
- //std::cout << "####### rejected #######! (t=" << t << ") interpolation error: " << error << " , new dt: " << new_h << std::endl;
             } else {
- //std::cout << "####### accepted ####### - new k: " << m_current_k_opt << ", new stepsize: " << new_h << std::endl;
- //increase time
                 t += dt;
             }
- }// else std::cout << "####### rejected #######!" << std::endl;
-
+ }
         //set next stepsize
         if( !m_last_step_rejected || (new_h < dt) )
             dt = new_h;
@@ -367,12 +325,9 @@
     template< class StateOut >
     void calc_state( time_type t , StateOut &x ) const
     {
- //std::cout << "===========" << std::endl << "doing interpolation for t=" << t << std::endl;
         do_interpolation( t , x );
- //std::cout << "===========" << std::endl;
     }
 
-
     const state_type& current_state( void ) const
     {
         return get_current_state();
@@ -398,14 +353,13 @@
         return m_dt;
     }
 
-
+ /** \brief Resets the internal state of the stepper. */
     void reset()
     {
         m_first = true;
         m_last_step_rejected = false;
     }
 
-
     template< class StateIn >
     void adjust_size( const StateIn &x )
     {
@@ -438,16 +392,13 @@
     //polynomial extrapolation, see http://www.nr.com/webnotes/nr3web21.pdf
     {
         // result is written into table[0]
- //std::cout << "extrapolate k=" << k << ":" << std::endl;
         static const value_type val1( 1.0 );
         for( int j=k ; j>1 ; --j )
         {
- //std::cout << '\t' << coeff[k + order_start_index][j + order_start_index - 1];
             m_algebra.for_each3( table[j-1].m_v , table[j].m_v , table[j-1].m_v ,
                                  typename operations_type::template scale_sum2< value_type , value_type >( val1 + coeff[k + order_start_index][j + order_start_index - 1] ,
                                                                                                            -coeff[k + order_start_index][j + order_start_index - 1] ) );
         }
- //std::cout << std::endl << coeff[k + order_start_index][order_start_index] << std::endl;
         m_algebra.for_each3( table[0].m_v , table[1].m_v , table[0].m_v ,
                              typename operations_type::template scale_sum2< value_type , value_type >( val1 + coeff[k + order_start_index][order_start_index] ,
                                                                                                        -coeff[k + order_start_index][order_start_index]) );
@@ -469,7 +420,6 @@
             fac = STEPFAC2 / pow BOOST_PREVENT_MACRO_SUBSTITUTION( error / STEPFAC1 , expo );
             fac = max BOOST_PREVENT_MACRO_SUBSTITUTION( facmin/STEPFAC4 , min BOOST_PREVENT_MACRO_SUBSTITUTION( 1.0/facmin , fac ) );
         }
- //return std::abs(h*fac); //std::min( 0.1 , std::abs(h*fac) );
         return h*fac;
     }
 
@@ -499,15 +449,17 @@
 
     template< class StateIn1 , class DerivIn1 , class StateIn2 , class DerivIn2 >
     value_type prepare_dense_output( int k , const StateIn1 &x_start , const DerivIn1 &dxdt_start ,
- const StateIn2 & /* x_end */ , const DerivIn2 & /*dxdt_end */ , time_type dt ) // k is the order to which the result was approximated
+ const StateIn2 & /* x_end */ , const DerivIn2 & /*dxdt_end */ , time_type dt )
+ /* k is the order to which the result was approximated */
     {
 
- // compute the coefficients of the interpolation polynomial
- // we parametrize the interval t .. t+dt by theta = -1 .. 1
- // we use 2k+3 values at the interval center theta=0 to obtain the interpolation coefficients
- // the values are x(t+dt/2) and the derivatives dx/dt , ... d^(2k+2) x / dt^(2k+2) at the midpoints
- // the derivatives are approximated via finite differences
- // all values are obtained from interpolation of the results from the increasing orders of the midpoint calls
+ /* compute the coefficients of the interpolation polynomial
+ * we parametrize the interval t .. t+dt by theta = -1 .. 1
+ * we use 2k+3 values at the interval center theta=0 to obtain the interpolation coefficients
+ * the values are x(t+dt/2) and the derivatives dx/dt , ... d^(2k+2) x / dt^(2k+2) at the midpoints
+ * the derivatives are approximated via finite differences
+ * all values are obtained from interpolation of the results from the increasing orders of the midpoint calls
+ */
 
         // calculate finite difference approximations to derivatives at the midpoint
         for( int j = 0 ; j<=k ; j++ )
@@ -520,14 +472,11 @@
                 calculate_finite_difference( j , kappa , f , dxdt_start );
                 f *= d;
             }
- //std::cout << "x_mp[" << j << "] = " << m_mp_states[j].m_v << std::endl;
 
             if( j > 0 )
                 extrapolate_dense_out( j , m_mp_states , m_coeff );
         }
 
- //std::cout << "a_0 = " << m_mp_states[0].m_v << std::endl;
-
         time_type d = dt/2;
 
         // extrapolate finite differences
@@ -537,14 +486,11 @@
                 extrapolate_dense_out( j , m_diffs[kappa] , m_coeff , kappa/2 );
 
             // extrapolation results are now stored in m_diffs[kappa][0]
- //std::cout << "extrapolation result: " << m_diffs[kappa][0].m_v << std::endl;
 
             // divide kappa-th derivative by kappa because we need these terms for dense output interpolation
             m_algebra.for_each1( m_diffs[kappa][0].m_v , typename operations_type::template scale< time_type >( static_cast<time_type>(d) ) );
 
             d *= dt/(2*(kappa+2));
-
- //std::cout << "a_" << kappa+1 << " = " << m_diffs[kappa][0].m_v << std::endl;
         }
 
         // dense output coefficients a_0 is stored in m_mp_states[0], a_i for i = 1...2k are stored in m_diffs[i-1][0]
@@ -560,64 +506,6 @@
         }
 
         return error;
-
- // calculate coefficient a_{2k+1} = (2k+5)/4 * x_end - (2k+5)/4 * x_start - 1/4 * dxdt_end - 1/4 * dxdt_start + sum_i=0...k-1 (i-k-2)*a_{2i+1}
-
-
- //std::cout << std::endl << x_start << std::endl << x_end << std::endl;
- //std::cout << std::endl << dxdt_start << std::endl << dxdt_end << std::endl << std::endl;
-
- // we don't use additional terms in the polynomial, the following calculations are thus not required
-
-/*
- m_algebra.for_each5( m_a1.m_v , x_end , x_start , dxdt_end , dxdt_start ,
- typename operations_type::template scale_sum4< value_type >( static_cast<value_type>(2*k+5)/static_cast<value_type>(4),
- static_cast<value_type>(-2*k-5)/static_cast<value_type>(4),
- static_cast<value_type>(-dt)/static_cast<value_type>(8) ,
- static_cast<value_type>(-dt)/static_cast<value_type>(8) ) );
- for( int i = 0 ; i<k ; ++i )
- m_algebra.for_each3( m_a1.m_v , m_a1.m_v , m_diffs[2*i][0].m_v ,
- typename operations_type::template scale_sum2< value_type >( 1 , i-k-2 ) );
-
- //std::cout << "a_" << 2*k+1 << " = " << m_a1.m_v << std::endl;
-
- // calculate coefficient a_{2k+2} = (k+2)/2 * x_end + (k+2)/2 * x_start - 1/4 * dxdt_end + 1/4 * dxdt_start + (k+2)/2 * x_mp + sum_i=1...k (i-k-2)*a_{2i}
- m_algebra.for_each6( m_a2.m_v , x_end , x_start , dxdt_end , dxdt_start , m_mp_states[0].m_v ,
- typename operations_type::template scale_sum5< value_type >( static_cast<value_type>(k+2)/static_cast<value_type>(2),
- static_cast<value_type>(k+2)/static_cast<value_type>(2),
- static_cast<value_type>(-dt)/static_cast<value_type>(8) ,
- static_cast<value_type>(dt)/static_cast<value_type>(8) ,
- static_cast<value_type>(-k-2) ) );
- for( int i = 1 ; i<=k ; ++i )
- m_algebra.for_each3( m_a2.m_v , m_a2.m_v , m_diffs[2*i-1][0].m_v ,
- typename operations_type::template scale_sum2< value_type >( 1 , i-k-2 ) );
-
- //std::cout << "a_" << 2*k+2 << " = " << m_a2.m_v << std::endl;
-
- // calculate coefficient a_{2k+3} = -(2k+3)/4 * x_end + (2k+3)/4 * x_start + 1/4 * dxdt_end + 1/4 * dxdt_start + sum_i=0...k-1 (k+1-i)*a_{2i+1}
- m_algebra.for_each5( m_a3.m_v , x_end , x_start , dxdt_end , dxdt_start ,
- typename operations_type::template scale_sum4< value_type >( static_cast<value_type>(-2*k-3)/static_cast<value_type>(4),
- static_cast<value_type>(2*k+3)/static_cast<value_type>(4),
- static_cast<value_type>(dt)/static_cast<value_type>(8) ,
- static_cast<value_type>(dt)/static_cast<value_type>(8) ) );
- for( int i = 0 ; i<k ; ++i )
- m_algebra.for_each3( m_a3.m_v , m_a3.m_v , m_diffs[2*i][0].m_v ,
- typename operations_type::template scale_sum2< value_type >( 1 , k+1-i ) );
-
- //std::cout << "a_" << 2*k+3 << " = " << m_a3.m_v << std::endl;
-
- // calculate coefficient a_{2k+4} = -(k+1)/2 * x_end - (k+1)/2 * x_start + 1/4 * dxdt_end - 1/4 * dxdt_start - (k+1)/2 * x_mp + sum_i=0...k-1 (k+1-i)*a_{2i}
- m_algebra.for_each6( m_a4.m_v , x_end , x_start , dxdt_end , dxdt_start , m_mp_states[0].m_v ,
- typename operations_type::template scale_sum5< value_type >( static_cast<value_type>(-k-1)/static_cast<value_type>(2),
- static_cast<value_type>(-k-1)/static_cast<value_type>(2),
- static_cast<value_type>(dt)/static_cast<value_type>(8) ,
- static_cast<value_type>(-dt)/static_cast<value_type>(8),
- static_cast<value_type>(k+1) ) );
- for( int i = 1 ; i<=k ; ++i )
- m_algebra.for_each3( m_a4.m_v , m_a4.m_v , m_diffs[2*i-1][0].m_v ,
- typename operations_type::template scale_sum2< value_type >( 1 , k+1-i ) );
-*/
- //std::cout << "a_" << 2*k+4 << " = " << m_a4.m_v << std::endl;
     }
 
     template< class DerivIn >
@@ -628,20 +516,12 @@
         {
             m_algebra.for_each2( m_diffs[0][j].m_v , m_derivs[j][m].m_v ,
                                  typename operations_type::template scale_sum1< value_type >( fac ) );
- //std::cout << "j=" << j << ", kappa=" << kappa << ", m=" << m;
- //std::cout << ": m_diffs[" << kappa << "][" << j << "] = " << fac << " * f[" << m << "] ";
- //std::cout << "(size(f)=" << m_derivs[j].size() << ") = " << m_diffs[0][j].m_v << std::endl;
-
         }
         else
         {
- //std::cout << m_derivs[j][1].m_v << " , " << dxdt << std::endl;
-
             // calculate the index of m_diffs for this kappa-j-combination
             const int j_diffs = j - kappa/2;
 
- //std::cout << "j=" << j << ", kappa=" << kappa << ", m=" << m << ": m_diffs[" << kappa << "][" << j_diffs << "] = " << fac << " ( 1*f[" << m+kappa << "]";
-
             m_algebra.for_each2( m_diffs[kappa][j_diffs].m_v , m_derivs[j][m+kappa].m_v ,
                                  typename operations_type::template scale_sum1< value_type >( fac ) );
             value_type sign = -1.0;
@@ -654,19 +534,15 @@
                     m_algebra.for_each3( m_diffs[kappa][j_diffs].m_v , m_diffs[kappa][j_diffs].m_v , m_derivs[j][i].m_v ,
                                          typename operations_type::template scale_sum2< value_type , value_type >( 1.0 ,
                                                                                                                    sign * fac * boost::math::binomial_coefficient< value_type >( kappa , c ) ) );
- //std::cout << ( (sign > 0.0) ? " + " : " - " ) <<
- // boost::math::binomial_coefficient< double >( kappa , c ) << "*f[" << i << "]";
                 }
                 else
                 {
                     m_algebra.for_each3( m_diffs[kappa][j_diffs].m_v , m_diffs[kappa][j_diffs].m_v , dxdt ,
                                          typename operations_type::template scale_sum2< value_type , value_type >( 1.0 , sign * fac ) );
- //std::cout << ( (sign > 0.0) ? " + " : " - " ) << "dxdt";
                 }
                 sign *= -1;
                 ++c;
             }
- //std::cout << " ) = " << m_diffs[kappa][j_diffs].m_v << std::endl;
         }
     }
 
@@ -676,19 +552,6 @@
         // interpolation polynomial is defined for theta = -1 ... 1
         // m_k_final is the number of order-iterations done for the last step - it governs the order of the interpolation polynomial
         const value_type theta = 2 * get_unit_value( (t - m_t_last) / (m_t - m_t_last) ) - 1;
- //std::cout << "theta=" << theta << std::endl;
- //start with x = a0 + a_{2k+1} theta^{2k+1} + a_{2k+2} theta^{2k+2} + a_{2k+3} theta^{2k+3} + a_{2k+4} theta^{2k+4}
- //std::cout << "x = a_0 + ";
-
-/* m_algebra.for_each6( out , m_mp_states[0].m_v , m_a1.m_v , m_a2.m_v , m_a3.m_v , m_a4.m_v ,
- typename operations_type::template scale_sum5< time_type >(
- static_cast<time_type>( 1 ) ,
- std::pow( theta , 2*m_k_final+1 ) ,
- std::pow( theta , 2*m_k_final+2 ) ,
- std::pow( theta , 2*m_k_final+3 ) ,
- std::pow( theta , 2*m_k_final+4 ) ) );
-*/
-
         // we use only values at interval center, that is theta=0, for interpolation
         // our interpolation polynomial is thus of order 2k+2, hence we have 2k+3 terms
 
@@ -697,7 +560,6 @@
         value_type theta_pow( theta );
         for( size_t i=0 ; i<=2*m_k_final+1 ; ++i )
         {
- //std::cout << "a_" << i+1 << " theta^" << i+1 << " = " << m_diffs[i][0].m_v[0] * std::pow( theta , i+1 ) << std::endl;
             m_algebra.for_each3( out , out , m_diffs[i][0].m_v ,
                                  typename operations_type::template scale_sum2< value_type >( static_cast<value_type>(1) , theta_pow ) );
             theta_pow *= theta;
@@ -823,6 +685,126 @@
     const value_type STEPFAC1 , STEPFAC2 , STEPFAC3 , STEPFAC4 , KFAC1 , KFAC2;
 };
 
+
+
+/********** DOXYGEN **********/
+
+/**
+ * \class bulirsch_stoer_dense_out
+ * \brief The Bulirsch-Stoer algorithm.
+ *
+ * The Bulirsch-Stoer is a controlled stepper that adjusts both step size
+ * and order of the method. The algorithm uses the modified midpoint and
+ * a polynomial extrapolation compute the solution. This class also provides
+ * dense outout facility.
+ *
+ * \tparam State The state type.
+ * \tparam Value The value type.
+ * \tparam Deriv The type representing the time derivative of the state.
+ * \tparam Time The time representing the independent variable - the time.
+ * \tparam Algebra The algebra type.
+ * \tparam Operations The operations type.
+ * \tparam Resizer The resizer policy type.
+ */
+
+ /**
+ * \fn bulirsch_stoer_dense_out::bulirsch_stoer_dense_out( value_type eps_abs , value_type eps_rel , value_type factor_x , value_type factor_dxdt , bool control_interpolation )
+ * \brief Constructs the bulirsch_stoer class, including initialization of
+ * the error bounds.
+ *
+ * \param eps_abs Absolute tolerance level.
+ * \param eps_rel Relative tolerance level.
+ * \param factor_x Factor for the weight of the state.
+ * \param factor_dxdt Factor for the weight of the derivative.
+ * \param control_interpolation Set true to additionally control the error of
+ * the interpolation.
+ */
+
+ /**
+ * \fn bulirsch_stoer_dense_out::try_step( System system , const StateIn &in , const DerivIn &dxdt , time_type &t , StateOut &out , DerivOut &dxdt_new , time_type &dt )
+ * \brief Tries to perform one step.
+ *
+ * This method tries to do one step with step size dt. If the error estimate
+ * is to large, the step is rejected and the method returns fail and the
+ * step size dt is reduced. If the error estimate is acceptably small, the
+ * step is performed, success is returned and dt might be increased to make
+ * the steps as large as possible. This method also updates t if a step is
+ * performed. Also, the internal order of the stepper is adjusted if requried.
+ *
+ * \param system The system function to solve, hence the r.h.s. of the ODE.
+ * It must fullfil the Simple System concept.
+ * \param in The state of the ODE which should be solved.
+ * \param dxdt The derivative of state.
+ * \param t The value of the time. Updated if the step is successfull.
+ * \param out Used to store the result of the step.
+ * \param dt The step size. Updated.
+ * \return success if the step was accepted, fail otherwise.
+ */
+
+ /**
+ * \fn bulirsch_stoer_dense_out::initialize( const StateType &x0 , const time_type &t0 , const time_type &dt0 )
+ * \brief Initializes the dense output stepper.
+ *
+ * \param x0 The initial state.
+ * \param t0 The initial time.
+ * \param dt0 The initial time step.
+ */
+
+ /**
+ * \fn bulirsch_stoer_dense_out::do_step( System system )
+ * \brief Does one time step. This is the main method that should be used to
+ * integrate an ODE with this stepper.
+ * \note initialize has to be called before using this method to set the
+ * inital conditions x,t and the stepsize.
+ * \param system The system function to solve, hence the r.h.s. of the
+ * ordinary differential equation. It must fullfil the Simple System concept.
+ * \return Pair with start and end time of the integration step.
+ */
+
+ /**
+ * \fn bulirsch_stoer_dense_out::calc_state( time_type t , StateOut &x ) const
+ * \brief Calculates the solution at an intermediate point within the las step
+ * \param t The time at which the solution should be calculated, has to be
+ * in the current time interval.
+ * \param x The output variable where the result is written into.
+ */
+
+ /**
+ * \fn bulirsch_stoer_dense_out::current_state( void ) const
+ * \brief Returns the current state of the solution.
+ * \return The current state of the solution x(t).
+ */
+
+ /**
+ * \fn bulirsch_stoer_dense_out::current_time( void ) const
+ * \brief Returns the current time of the solution.
+ * \return The current time of the solution t.
+ */
+
+ /**
+ * \fn bulirsch_stoer_dense_out::previous_state( void ) const
+ * \brief Returns the last state of the solution.
+ * \return The last state of the solution x(t-dt).
+ */
+
+ /**
+ * \fn bulirsch_stoer_dense_out::previous_time( void ) const
+ * \brief Returns the last time of the solution.
+ * \return The last time of the solution t-dt.
+ */
+
+ /**
+ * \fn bulirsch_stoer_dense_out::current_time_step( void ) const
+ * \brief Returns the current step size.
+ * \return The current step size.
+ */
+
+ /**
+ * \fn bulirsch_stoer_dense_out::adjust_size( const StateIn &x )
+ * \brief Adjust the size of all temporaries in the stepper manually.
+ * \param x A state from which the size of the temporaries to be resized is deduced.
+ */
+
 }
 }
 }

Modified: trunk/boost/numeric/odeint/stepper/controlled_runge_kutta.hpp
==============================================================================
--- trunk/boost/numeric/odeint/stepper/controlled_runge_kutta.hpp (original)
+++ trunk/boost/numeric/odeint/stepper/controlled_runge_kutta.hpp 2012-12-07 07:26:55 EST (Fri, 07 Dec 2012)
@@ -44,9 +44,6 @@
 namespace odeint {
 
 
-/*
- * Error checker for controlled_error_stepper
- */
 template
 <
 class Value ,
@@ -61,7 +58,6 @@
     typedef Algebra algebra_type;
     typedef Operations operations_type;
 
-
     default_error_checker(
             value_type eps_abs = static_cast< value_type >( 1.0e-6 ) ,
             value_type eps_rel = static_cast< value_type >( 1.0e-6 ) ,
@@ -120,7 +116,6 @@
 
 
 
-
 /*
  * explicit stepper version
  *
@@ -130,6 +125,17 @@
     * try_step( sys , in , t , out , dt )
     * try_step( sys , in , dxdt , t , out , dt )
  */
+/**
+ * \brief Implements step size control for Runge-Kutta steppers with error
+ * estimation.
+ *
+ * This class implements the step size control for standard Runge-Kutta
+ * steppers with error estimation.
+ *
+ * \tparam ErrorStepper The stepper type with error estimation, has to fullfill the ErrorStepper concept.
+ * \tparam ErrorChecker The error checker
+ * \tparam Resizer The resizer policy type.
+ */
 template<
 class ErrorStepper ,
 class ErrorChecker ,
@@ -150,13 +156,20 @@
     typedef Resizer resizer_type;
     typedef ErrorChecker error_checker_type;
     typedef explicit_controlled_stepper_tag stepper_category;
+
+#ifndef DOXYGEN_SKIP
     typedef typename stepper_type::wrapped_state_type wrapped_state_type;
     typedef typename stepper_type::wrapped_deriv_type wrapped_deriv_type;
 
     typedef controlled_runge_kutta< ErrorStepper , ErrorChecker , Resizer , explicit_error_stepper_tag > controlled_stepper_type;
+#endif //DOXYGEN_SKIP
 
 
-
+ /**
+ * \brief Constructs the controlled Runge-Kutta stepper.
+ * \param error_checker An instance of the error checker.
+ * \param stepper An instance of the underlying stepper.
+ */
     controlled_runge_kutta(
             const error_checker_type &error_checker = error_checker_type( ) ,
             const stepper_type &stepper = stepper_type( )
@@ -171,12 +184,49 @@
      *
      * The overloads are needed to solve the forwarding problem
      */
+ /**
+ * \brief Tries to perform one step.
+ *
+ * This method tries to do one step with step size dt. If the error estimate
+ * is to large, the step is rejected and the method returns fail and the
+ * step size dt is reduced. If the error estimate is acceptably small, the
+ * step is performed, success is returned and dt might be increased to make
+ * the steps as large as possible. This method also updates t if a step is
+ * performed.
+ *
+ * \param system The system function to solve, hence the r.h.s. of the ODE. It must fullfil the
+ * Simple System concept.
+ * \param x The state of the ODE which should be solved. Overwritten if
+ * the step is successfull.
+ * \param t The value of the time. Updated if the step is successfull.
+ * \param dt The step size. Updated.
+ * \return success if the step was accepted, fail otherwise.
+ */
     template< class System , class StateInOut >
     controlled_step_result try_step( System system , StateInOut &x , time_type &t , time_type &dt )
     {
         return try_step_v1( system , x , t, dt );
     }
 
+ /**
+ * \brief Tries to perform one step. Solves the forwarding problem and
+ * allows for using boost range as state_type.
+ *
+ * This method tries to do one step with step size dt. If the error estimate
+ * is to large, the step is rejected and the method returns fail and the
+ * step size dt is reduced. If the error estimate is acceptably small, the
+ * step is performed, success is returned and dt might be increased to make
+ * the steps as large as possible. This method also updates t if a step is
+ * performed.
+ *
+ * \param system The system function to solve, hence the r.h.s. of the ODE. It must fullfil the
+ * Simple System concept.
+ * \param x The state of the ODE which should be solved. Overwritten if
+ * the step is successfull. Can be a boost range.
+ * \param t The value of the time. Updated if the step is successfull.
+ * \param dt The step size. Updated.
+ * \return success if the step was accepted, fail otherwise.
+ */
     template< class System , class StateInOut >
     controlled_step_result try_step( System system , const StateInOut &x , time_type &t , time_type &dt )
     {
@@ -190,6 +240,25 @@
      *
      * this version does not solve the forwarding problem, boost.range can not be used
      */
+ /**
+ * \brief Tries to perform one step.
+ *
+ * This method tries to do one step with step size dt. If the error estimate
+ * is to large, the step is rejected and the method returns fail and the
+ * step size dt is reduced. If the error estimate is acceptably small, the
+ * step is performed, success is returned and dt might be increased to make
+ * the steps as large as possible. This method also updates t if a step is
+ * performed.
+ *
+ * \param system The system function to solve, hence the r.h.s. of the ODE. It must fullfil the
+ * Simple System concept.
+ * \param x The state of the ODE which should be solved. Overwritten if
+ * the step is successfull.
+ * \param dxdt The derivative of state.
+ * \param t The value of the time. Updated if the step is successfull.
+ * \param dt The step size. Updated.
+ * \return success if the step was accepted, fail otherwise.
+ */
     template< class System , class StateInOut , class DerivIn >
     controlled_step_result try_step( System system , StateInOut &x , const DerivIn &dxdt , time_type &t , time_type &dt )
     {
@@ -209,6 +278,26 @@
      *
      * the disable is needed to avoid ambiguous overloads if state_type = time_type
      */
+ /**
+ * \brief Tries to perform one step.
+ *
+ * \note This method is disabled if state_type=time_type to avoid ambiguity.
+ *
+ * This method tries to do one step with step size dt. If the error estimate
+ * is to large, the step is rejected and the method returns fail and the
+ * step size dt is reduced. If the error estimate is acceptably small, the
+ * step is performed, success is returned and dt might be increased to make
+ * the steps as large as possible. This method also updates t if a step is
+ * performed.
+ *
+ * \param system The system function to solve, hence the r.h.s. of the ODE. It must fullfil the
+ * Simple System concept.
+ * \param in The state of the ODE which should be solved.
+ * \param t The value of the time. Updated if the step is successfull.
+ * \param out Used to store the result of the step.
+ * \param dt The step size. Updated.
+ * \return success if the step was accepted, fail otherwise.
+ */
     template< class System , class StateIn , class StateOut >
     typename boost::disable_if< boost::is_same< StateIn , time_type > , controlled_step_result >::type
     try_step( System system , const StateIn &in , time_type &t , StateOut &out , time_type &dt )
@@ -225,6 +314,25 @@
      *
      * this version does not solve the forwarding problem, boost.range can not be used
      */
+ /**
+ * \brief Tries to perform one step.
+ *
+ * This method tries to do one step with step size dt. If the error estimate
+ * is to large, the step is rejected and the method returns fail and the
+ * step size dt is reduced. If the error estimate is acceptably small, the
+ * step is performed, success is returned and dt might be increased to make
+ * the steps as large as possible. This method also updates t if a step is
+ * performed.
+ *
+ * \param system The system function to solve, hence the r.h.s. of the ODE. It must fullfil the
+ * Simple System concept.
+ * \param in The state of the ODE which should be solved.
+ * \param dxdt The derivative of state.
+ * \param t The value of the time. Updated if the step is successfull.
+ * \param out Used to store the result of the step.
+ * \param dt The step size. Updated.
+ * \return success if the step was accepted, fail otherwise.
+ */
     template< class System , class StateIn , class DerivIn , class StateOut >
     controlled_step_result try_step( System system , const StateIn &in , const DerivIn &dxdt , time_type &t , StateOut &out , time_type &dt )
     {
@@ -251,11 +359,12 @@
         {
             if( m_max_rel_error < 0.5 )
             {
+ // error should be > 0
+ m_max_rel_error = max BOOST_PREVENT_MACRO_SUBSTITUTION ( pow( 5.0 , -m_stepper.stepper_order() ) , m_max_rel_error );
                 //error too small - increase dt and keep the evolution and limit scaling factor to 5.0
                 t += dt;
- dt *= min BOOST_PREVENT_MACRO_SUBSTITUTION ( static_cast<value_type>(9)/static_cast<value_type>(10) * pow( m_max_rel_error ,
- static_cast<value_type>(-1) / m_stepper.stepper_order() ) ,
- static_cast<value_type>(5) );
+ dt *= static_cast<value_type>(9)/static_cast<value_type>(10) * pow( m_max_rel_error ,
+ static_cast<value_type>(-1) / m_stepper.stepper_order() );
                 return success;
             }
             else
@@ -266,13 +375,21 @@
         }
     }
 
+ /**
+ * \brief Returns the error of the last step.
+ *
+ * returns The last error of the step.
+ */
     value_type last_error( void ) const
     {
         return m_max_rel_error;
     }
 
 
-
+ /**
+ * \brief Adjust the size of all temporaries in the stepper manually.
+ * \param x A state from which the size of the temporaries to be resized is deduced.
+ */
     template< class StateType >
     void adjust_size( const StateType &x )
     {
@@ -282,11 +399,19 @@
         m_stepper.adjust_size( x );
     }
 
+ /**
+ * \brief Returns the instance of the underlying stepper.
+ * \returns The instance of the underlying stepper.
+ */
     stepper_type& stepper( void )
     {
         return m_stepper;
     }
 
+ /**
+ * \brief Returns the instance of the underlying stepper.
+ * \returns The instance of the underlying stepper.
+ */
     const stepper_type& stepper( void ) const
     {
         return m_stepper;
@@ -355,6 +480,17 @@
     * try_step( sys , x , dxdt , t , dt )
     * try_step( sys , in , dxdt_in , t , out , dxdt_out , dt )
  */
+/**
+ * \brief Implements step size control for Runge-Kutta FSAL steppers with
+ * error estimation.
+ *
+ * This class implements the step size control for FSAL Runge-Kutta
+ * steppers with error estimation.
+ *
+ * \tparam ErrorStepper The stepper type with error estimation, has to fullfill the ErrorStepper concept.
+ * \tparam ErrorChecker The error checker
+ * \tparam Resizer The resizer policy type.
+ */
 template<
 class ErrorStepper ,
 class ErrorChecker ,
@@ -375,11 +511,19 @@
     typedef Resizer resizer_type;
     typedef ErrorChecker error_checker_type;
     typedef explicit_controlled_stepper_fsal_tag stepper_category;
+
+#ifndef DOXYGEN_SKIP
     typedef typename stepper_type::wrapped_state_type wrapped_state_type;
     typedef typename stepper_type::wrapped_deriv_type wrapped_deriv_type;
 
     typedef controlled_runge_kutta< ErrorStepper , ErrorChecker , Resizer , explicit_error_stepper_tag > controlled_stepper_type;
+#endif // DOXYGEN_SKIP
 
+ /**
+ * \brief Constructs the controlled Runge-Kutta stepper.
+ * \param error_checker An instance of the error checker.
+ * \param stepper An instance of the underlying stepper.
+ */
     controlled_runge_kutta(
             const error_checker_type &error_checker = error_checker_type() ,
             const stepper_type &stepper = stepper_type()
@@ -393,12 +537,50 @@
      *
      * The two overloads are needed in order to solve the forwarding problem
      */
+ /**
+ * \brief Tries to perform one step.
+ *
+ * This method tries to do one step with step size dt. If the error estimate
+ * is to large, the step is rejected and the method returns fail and the
+ * step size dt is reduced. If the error estimate is acceptably small, the
+ * step is performed, success is returned and dt might be increased to make
+ * the steps as large as possible. This method also updates t if a step is
+ * performed.
+ *
+ * \param system The system function to solve, hence the r.h.s. of the ODE. It must fullfil the
+ * Simple System concept.
+ * \param x The state of the ODE which should be solved. Overwritten if
+ * the step is successfull.
+ * \param t The value of the time. Updated if the step is successfull.
+ * \param dt The step size. Updated.
+ * \return success if the step was accepted, fail otherwise.
+ */
     template< class System , class StateInOut >
     controlled_step_result try_step( System system , StateInOut &x , time_type &t , time_type &dt )
     {
         return try_step_v1( system , x , t , dt );
     }
 
+
+ /**
+ * \brief Tries to perform one step. Solves the forwarding problem and
+ * allows for using boost range as state_type.
+ *
+ * This method tries to do one step with step size dt. If the error estimate
+ * is to large, the step is rejected and the method returns fail and the
+ * step size dt is reduced. If the error estimate is acceptably small, the
+ * step is performed, success is returned and dt might be increased to make
+ * the steps as large as possible. This method also updates t if a step is
+ * performed.
+ *
+ * \param system The system function to solve, hence the r.h.s. of the ODE. It must fullfil the
+ * Simple System concept.
+ * \param x The state of the ODE which should be solved. Overwritten if
+ * the step is successfull. Can be a boost range.
+ * \param t The value of the time. Updated if the step is successfull.
+ * \param dt The step size. Updated.
+ * \return success if the step was accepted, fail otherwise.
+ */
     template< class System , class StateInOut >
     controlled_step_result try_step( System system , const StateInOut &x , time_type &t , time_type &dt )
     {
@@ -414,6 +596,26 @@
      *
      * The disabler is needed to solve ambigous overloads
      */
+ /**
+ * \brief Tries to perform one step.
+ *
+ * \note This method is disabled if state_type=time_type to avoid ambiguity.
+ *
+ * This method tries to do one step with step size dt. If the error estimate
+ * is to large, the step is rejected and the method returns fail and the
+ * step size dt is reduced. If the error estimate is acceptably small, the
+ * step is performed, success is returned and dt might be increased to make
+ * the steps as large as possible. This method also updates t if a step is
+ * performed.
+ *
+ * \param system The system function to solve, hence the r.h.s. of the ODE. It must fullfil the
+ * Simple System concept.
+ * \param in The state of the ODE which should be solved.
+ * \param t The value of the time. Updated if the step is successfull.
+ * \param out Used to store the result of the step.
+ * \param dt The step size. Updated.
+ * \return success if the step was accepted, fail otherwise.
+ */
     template< class System , class StateIn , class StateOut >
     typename boost::disable_if< boost::is_same< StateIn , time_type > , controlled_step_result >::type
     try_step( System system , const StateIn &in , time_type &t , StateOut &out , time_type &dt )
@@ -431,6 +633,25 @@
      *
      * This version does not solve the forwarding problem, boost::range can not be used.
      */
+ /**
+ * \brief Tries to perform one step.
+ *
+ * This method tries to do one step with step size dt. If the error estimate
+ * is to large, the step is rejected and the method returns fail and the
+ * step size dt is reduced. If the error estimate is acceptably small, the
+ * step is performed, success is returned and dt might be increased to make
+ * the steps as large as possible. This method also updates t if a step is
+ * performed.
+ *
+ * \param system The system function to solve, hence the r.h.s. of the ODE. It must fullfil the
+ * Simple System concept.
+ * \param x The state of the ODE which should be solved. Overwritten if
+ * the step is successfull.
+ * \param dxdt The derivative of state.
+ * \param t The value of the time. Updated if the step is successfull.
+ * \param dt The step size. Updated.
+ * \return success if the step was accepted, fail otherwise.
+ */
     template< class System , class StateInOut , class DerivInOut >
     controlled_step_result try_step( System system , StateInOut &x , DerivInOut &dxdt , time_type &t , time_type &dt )
     {
@@ -451,6 +672,25 @@
      *
      * This version does not solve the forwarding problem, boost::range can not be used.
      */
+ /**
+ * \brief Tries to perform one step.
+ *
+ * This method tries to do one step with step size dt. If the error estimate
+ * is to large, the step is rejected and the method returns fail and the
+ * step size dt is reduced. If the error estimate is acceptably small, the
+ * step is performed, success is returned and dt might be increased to make
+ * the steps as large as possible. This method also updates t if a step is
+ * performed.
+ *
+ * \param system The system function to solve, hence the r.h.s. of the ODE. It must fullfil the
+ * Simple System concept.
+ * \param in The state of the ODE which should be solved.
+ * \param dxdt The derivative of state.
+ * \param t The value of the time. Updated if the step is successfull.
+ * \param out Used to store the result of the step.
+ * \param dt The step size. Updated.
+ * \return success if the step was accepted, fail otherwise.
+ */
     template< class System , class StateIn , class DerivIn , class StateOut , class DerivOut >
     controlled_step_result try_step( System system , const StateIn &in , const DerivIn &dxdt_in , time_type &t ,
             StateOut &out , DerivOut &dxdt_out , time_type &dt )
@@ -479,8 +719,10 @@
         {
             if( max_rel_err < 0.5 )
             { //error too small - increase dt and keep the evolution and limit scaling factor to 5.0
+ // error should be > 0
+ max_rel_err = max BOOST_PREVENT_MACRO_SUBSTITUTION ( pow( 5.0 , -m_stepper.stepper_order() ) , max_rel_err );
                 t += dt;
- dt *= min BOOST_PREVENT_MACRO_SUBSTITUTION ( static_cast<value_type>( static_cast<value_type>(9)/static_cast<value_type>(10) * pow( max_rel_err , static_cast<value_type>(-1) / m_stepper.stepper_order() ) ) , static_cast<value_type>(5) );
+ dt *= static_cast<value_type>( static_cast<value_type>(9)/static_cast<value_type>(10) * pow( max_rel_err , static_cast<value_type>(-1) / m_stepper.stepper_order() ) );
                 return success;
             }
             else
@@ -492,12 +734,19 @@
     }
 
 
-
+ /**
+ * \brief Resets the internal state of the underlying FSAL stepper.
+ */
     void reset( void )
     {
         m_first_call = true;
     }
 
+ /**
+ * \brief Initializes the internal state storing an internal copy of the derivative.
+ *
+ * \param deriv The initial derivative of the ODE.
+ */
     template< class DerivIn >
     void initialize( const DerivIn &deriv )
     {
@@ -505,6 +754,14 @@
         m_first_call = false;
     }
 
+ /**
+ * \brief Initializes the internal state storing an internal copy of the derivative.
+ *
+ * \param system The system function to solve, hence the r.h.s. of the ODE. It must fullfil the
+ * Simple System concept.
+ * \param x The initial state of the ODE which should be solved.
+ * \param t The initial time.
+ */
     template< class System , class StateIn >
     void initialize( System system , const StateIn &x , time_type t )
     {
@@ -513,13 +770,21 @@
         m_first_call = false;
     }
 
+ /**
+ * \brief Returns true if the stepper has been initialized, false otherwise.
+ *
+ * \return true, if the stepper has been initialized, false otherwise.
+ */
     bool is_initialized( void ) const
     {
         return ! m_first_call;
     }
 
 
-
+ /**
+ * \brief Adjust the size of all temporaries in the stepper manually.
+ * \param x A state from which the size of the temporaries to be resized is deduced.
+ */
     template< class StateType >
     void adjust_size( const StateType &x )
     {
@@ -530,11 +795,19 @@
     }
 
 
+ /**
+ * \brief Returns the instance of the underlying stepper.
+ * \returns The instance of the underlying stepper.
+ */
     stepper_type& stepper( void )
     {
         return m_stepper;
     }
 
+ /**
+ * \brief Returns the instance of the underlying stepper.
+ * \returns The instance of the underlying stepper.
+ */
     const stepper_type& stepper( void ) const
     {
         return m_stepper;
@@ -597,6 +870,65 @@
 };
 
 
+/********** DOXYGEN **********/
+
+/**** DEFAULT ERROR CHECKER ****/
+
+/**
+ * \class default_error_checker
+ * \brief The default error checker to be used with Runge-Kutta error steppers
+ *
+ * This class provides the default mechanism to compare the error estimates
+ * reported by Runge-Kutta error steppers with user defined error bounds.
+ * It is used by the controlled_runge_kutta steppers.
+ *
+ * \tparam Value The value type.
+ * \tparam Algebra The algebra type.
+ * \tparam Operations The operations type.
+ */
+
+ /**
+ * \fn default_error_checker( value_type eps_abs , value_type eps_rel , value_type a_x , value_type a_dxdt )
+ * \brief Constructs the error checker.
+ *
+ * The error is calculated as follows: ????
+ *
+ * \param eps_abs Absolute tolerance level.
+ * \param eps_rel Relative tolerance level.
+ * \param a_x Factor for the weight of the state.
+ * \param a_dxdt Factor for the weight of the derivative.
+ */
+
+ /**
+ * \fn error( const State &x_old , const Deriv &dxdt_old , Err &x_err , Time dt ) const
+ * \brief Calculates the error level.
+ *
+ * If the returned error level is greater than 1, the estimated error was
+ * larger than the permitted error bounds and the step should be repeated
+ * with a smaller step size.
+ *
+ * \param x_old State at the beginning of the step.
+ * \param dxdt_old Derivative at the beginning of the step.
+ * \param x_err Error estimate.
+ * \param dt Time step.
+ * \return error
+ */
+
+ /**
+ * \fn error( algebra_type &algebra , const State &x_old , const Deriv &dxdt_old , Err &x_err , Time dt ) const
+ * \brief Calculates the error level using a given algebra.
+ *
+ * If the returned error level is greater than 1, the estimated error was
+ * larger than the permitted error bounds and the step should be repeated
+ * with a smaller step size.
+ *
+ * \param algebra The algebra used for calculation of the error.
+ * \param x_old State at the beginning of the step.
+ * \param dxdt_old Derivative at the beginning of the step.
+ * \param x_err Error estimate.
+ * \param dt Time step.
+ * \return error
+ */
 
 
 } // odeint

Modified: trunk/boost/numeric/odeint/stepper/controlled_step_result.hpp
==============================================================================
--- trunk/boost/numeric/odeint/stepper/controlled_step_result.hpp (original)
+++ trunk/boost/numeric/odeint/stepper/controlled_step_result.hpp 2012-12-07 07:26:55 EST (Fri, 07 Dec 2012)
@@ -24,12 +24,14 @@
 namespace odeint {
 
 /**
- * \enum Enum representing the return values of the controlled steppers.
+ * \enum controlled_step_result
+ *
+ * \brief Enum representing the return values of the controlled steppers.
  */
 typedef enum
 {
- success , /** <The trial step war successful, hence the state and the time have been advanced. */
- fail /** <The step was not succesful and might possibly be repeated with a small step size. */
+ success , /**< The trial step was successful, hence the state and the time have been advanced. */
+ fail /**< The step was not succesful and might possibly be repeated with a small step size. */
 } controlled_step_result;
 
 } // namespace odeint

Modified: trunk/boost/numeric/odeint/stepper/dense_output_runge_kutta.hpp
==============================================================================
--- trunk/boost/numeric/odeint/stepper/dense_output_runge_kutta.hpp (original)
+++ trunk/boost/numeric/odeint/stepper/dense_output_runge_kutta.hpp 2012-12-07 07:26:55 EST (Fri, 07 Dec 2012)
@@ -42,8 +42,19 @@
 class dense_output_runge_kutta;
 
 
-
-
+/**
+ * \brief The class representing dense-output Runge-Kutta steppers.
+ * \note In this stepper, the initialize method has to be called before using
+ * the do_step method.
+ *
+ * The dense-output functionality allows to interpolate the solution between
+ * subsequent integration points using intermediate results obtained during the
+ * computation. This version works based on a normal stepper without step-size
+ * control.
+ *
+ *
+ * \tparam Stepper The stepper type of the underlying algorithm.
+ */
 template< class Stepper >
 class dense_output_runge_kutta< Stepper , stepper_tag >
 {
@@ -67,7 +78,11 @@
     typedef dense_output_runge_kutta< Stepper > dense_output_stepper_type;
 
 
-
+ /**
+ * \brief Constructs the dense_output_runge_kutta class. An instance of the
+ * underlying stepper can be provided.
+ * \param stepper An instance of the underlying stepper.
+ */
     dense_output_runge_kutta( const stepper_type &stepper = stepper_type() )
     : m_stepper( stepper ) , m_resizer() ,
       m_x1() , m_x2() , m_current_state_x1( true ) ,
@@ -75,6 +90,13 @@
     { }
 
 
+ /**
+ * \brief Initializes the stepper. Has to be called before do_step can be
+ * used to set the initial conditions and the step size.
+ * \param x0 The inital state of the ODE which should be solved.
+ * \param t0 The initial time, at which the step should be performed.
+ * \param dt0 The step size.
+ */
     template< class StateType >
     void initialize( const StateType &x0 , time_type t0 , time_type dt0 )
     {
@@ -84,6 +106,14 @@
         m_dt = dt0;
     }
 
+ /**
+ * \brief Does one time step.
+ * \note initialize has to be called before using this method to set the
+ * inital conditions x,t and the stepsize.
+ * \param system The system function to solve, hence the r.h.s. of the ordinary differential equation. It must fullfil the
+ * Simple System concept.
+ * \return Pair with start and end time of the integration step.
+ */
     template< class System >
     std::pair< time_type , time_type > do_step( System system )
     {
@@ -97,18 +127,35 @@
     /*
      * The next two overloads are needed to solve the forwarding problem
      */
+
+ /**
+ * \brief Calculates the solution at an intermediate point.
+ * \param t The time at which the solution should be calculated, has to be
+ * in the current time interval.
+ * \param x The output variable where the result is written into.
+ */
     template< class StateOut >
     void calc_state( time_type t , StateOut &x ) const
     {
         m_stepper.calc_state( x , t , get_old_state() , m_t_old , get_current_state() , m_t );
     }
 
+ /**
+ * \brief Calculates the solution at an intermediate point. Solves the forwarding problem
+ * \param t The time at which the solution should be calculated, has to be
+ * in the current time interval.
+ * \param x The output variable where the result is written into, can be a boost range.
+ */
     template< class StateOut >
     void calc_state( time_type t , const StateOut &x ) const
     {
         m_stepper.calc_state( x , t , get_old_state() , m_t_old , get_current_state() , m_t );
     }
 
+ /**
+ * \brief Adjust the size of all temporaries in the stepper manually.
+ * \param x A state from which the size of the temporaries to be resized is deduced.
+ */
     template< class StateType >
     void adjust_size( const StateType &x )
     {
@@ -116,21 +163,37 @@
         m_stepper.stepper().resize( x );
     }
 
+ /**
+ * \brief Returns the current state of the solution.
+ * \return The current state of the solution x(t).
+ */
     const state_type& current_state( void ) const
     {
         return get_current_state();
     }
 
+ /**
+ * \brief Returns the current time of the solution.
+ * \return The current time of the solution t.
+ */
     time_type current_time( void ) const
     {
         return m_t;
     }
 
+ /**
+ * \brief Returns the last state of the solution.
+ * \return The last state of the solution x(t-dt).
+ */
     const state_type& previous_state( void ) const
     {
         return get_old_state();
     }
 
+ /**
+ * \brief Returns the last time of the solution.
+ * \return The last time of the solution t-dt.
+ */
     time_type previous_time( void ) const
     {
         return m_t_old;
@@ -187,7 +250,15 @@
 
 
 
-
+/**
+ * \brief The class representing dense-output Runge-Kutta steppers with FSAL property.
+ *
+ * The interface is the same as for dense_output_runge_kutta< Stepper , stepper_tag >.
+ * This class provides dense output functionality based on methods with step size controlled
+ *
+ *
+ * \tparam Stepper The stepper type of the underlying algorithm.
+ */
 template< class Stepper >
 class dense_output_runge_kutta< Stepper , explicit_controlled_stepper_fsal_tag >
 {

Modified: trunk/boost/numeric/odeint/stepper/euler.hpp
==============================================================================
--- trunk/boost/numeric/odeint/stepper/euler.hpp (original)
+++ trunk/boost/numeric/odeint/stepper/euler.hpp 2012-12-07 07:26:55 EST (Fri, 07 Dec 2012)
@@ -30,26 +30,6 @@
 namespace odeint {
 
 
-
-/**
- * \class euler
- * \brief An implementation of the Euler method.
- *
- * The Euler method is a very simply solver for ordinary differential equations. This method should not be used
- * for real applications. It is only useful for demonstration purposes. Step size control is not provided but
- * trivial continous output is available.
- *
- * This class derives from explicit_stepper_base and inherits its interface via CRTP (current recurring template pattern),
- * see explicit_stepper_base
- *
- * \tparam State The state type.
- * \tparam Value The value type.
- * \tparam Deriv The type representing the time derivative of the state.
- * \tparam Time The time representing the independent variable - the time.
- * \tparam Algebra The algebra type.
- * \tparam Operations The operations type.
- * \tparam Resizer The resizer policy type.
- */
 template<
 class State ,
 class Value = double ,
@@ -65,7 +45,7 @@
   euler< State , Value , Deriv , Time , Algebra , Operations , Resizer > ,
   1 , State , Value , Deriv , Time , Algebra , Operations , Resizer >
 #else
-class euler : public explicit_stepper_base< euler< ... > , ... >
+class euler : public explicit_stepper_base
 #endif
 {
 public :
@@ -90,27 +70,9 @@
     #endif
 
 
- /**
- * \brief Constructs the euler class. This constructor can be used as a default
- * constructor of the algebra has a default constructor.
- * \param algebra A copy of algebra is made and stored inside explicit_stepper_base.
- */
     euler( const algebra_type &algebra = algebra_type() ) : stepper_base_type( algebra )
     { }
 
- /**
- * \brief This method performs one step. The derivative `dxdt` of `in` at the time `t` is passed to the method.
- * The result is updated out of place, hence the input is in `in` and the output in `out`. `do_step_impl` is
- * used by explicit_stepper_base.
- *
- * \param system The system function to solve, hence the r.h.s. of the ODE. It must fullfil the
- * Simple System concept.
- * \param in The state of the ODE which should be solved. in is not modified in this method
- * \param dxdt The derivative of x at t.
- * \param t The value of the time, at which the step should be performed.
- * \param out The result of the step is written in out.
- * \param dt The step size.
- */
     template< class System , class StateIn , class DerivIn , class StateOut >
     void do_step_impl( System system , const StateIn &in , const DerivIn &dxdt , time_type t , StateOut &out , time_type dt )
     {
@@ -119,11 +81,6 @@
 
     }
 
-
- /**
- * \brief This method is used for continous output and it calculates the state `x` at a time `t` from the
- * knowledge of two states `old_state` and `current_state` at time points `t_old` and `t_new`.
- */
     template< class StateOut , class StateIn1 , class StateIn2 >
     void calc_state( StateOut &x , time_type t , const StateIn1 &old_state , time_type t_old , const StateIn2 &current_state , time_type t_new ) const
     {
@@ -132,10 +89,6 @@
                 typename operations_type::template scale_sum2< value_type , time_type >( 1.0 , delta ) );
     }
 
- /**
- * \brief Adjust the size of all temporaries in the stepper manually.
- * \param x A state from which the size of the temporaries to be resized is deduced.
- */
     template< class StateType >
     void adjust_size( const StateType &x )
     {
@@ -145,6 +98,63 @@
 
 
 
+/********** DOXYGEN ***********/
+
+/**
+ * \class euler
+ * \brief An implementation of the Euler method.
+ *
+ * The Euler method is a very simply solver for ordinary differential equations. This method should not be used
+ * for real applications. It is only useful for demonstration purposes. Step size control is not provided but
+ * trivial continous output is available.
+ *
+ * This class derives from explicit_stepper_base and inherits its interface via CRTP (current recurring template pattern),
+ * see explicit_stepper_base
+ *
+ * \tparam State The state type.
+ * \tparam Value The value type.
+ * \tparam Deriv The type representing the time derivative of the state.
+ * \tparam Time The time representing the independent variable - the time.
+ * \tparam Algebra The algebra type.
+ * \tparam Operations The operations type.
+ * \tparam Resizer The resizer policy type.
+ */
+
+ /**
+ * \fn euler::euler( const algebra_type &algebra )
+ * \brief Constructs the euler class. This constructor can be used as a default
+ * constructor of the algebra has a default constructor.
+ * \param algebra A copy of algebra is made and stored inside explicit_stepper_base.
+ */
+
+ /**
+ * \fn euler::do_step_impl( System system , const StateIn &in , const DerivIn &dxdt , time_type t , StateOut &out , time_type dt )
+ * \brief This method performs one step. The derivative `dxdt` of `in` at the time `t` is passed to the method.
+ * The result is updated out of place, hence the input is in `in` and the output in `out`.
+ * Access to this step functionality is provided by explicit_stepper_base and
+ * `do_step_impl` should not be called directly.
+ *
+ * \param system The system function to solve, hence the r.h.s. of the ODE. It must fullfil the
+ * Simple System concept.
+ * \param in The state of the ODE which should be solved. in is not modified in this method
+ * \param dxdt The derivative of x at t.
+ * \param t The value of the time, at which the step should be performed.
+ * \param out The result of the step is written in out.
+ * \param dt The step size.
+ */
+
+
+ /**
+ * \fn euler::calc_state( StateOut &x , time_type t , const StateIn1 &old_state , time_type t_old , const StateIn2 &current_state , time_type t_new ) const
+ * \brief This method is used for continous output and it calculates the state `x` at a time `t` from the
+ * knowledge of two states `old_state` and `current_state` at time points `t_old` and `t_new`.
+ */
+
+ /**
+ * \fn euler::adjust_size( const StateType &x )
+ * \brief Adjust the size of all temporaries in the stepper manually.
+ * \param x A state from which the size of the temporaries to be resized is deduced.
+ */
 
 } // odeint
 } // numeric

Modified: trunk/boost/numeric/odeint/stepper/explicit_error_generic_rk.hpp
==============================================================================
--- trunk/boost/numeric/odeint/stepper/explicit_error_generic_rk.hpp (original)
+++ trunk/boost/numeric/odeint/stepper/explicit_error_generic_rk.hpp 2012-12-07 07:26:55 EST (Fri, 07 Dec 2012)
@@ -37,29 +37,6 @@
 namespace odeint {
 
 
-/**
- * \class explicit_error_generic_rk
- * \brief A generic implementation of explicit Runge-Kutta algorithms with error estimation. This class is as a
- * base class for all explicit Runge-Kutta steppers with error estimateion.
- *
- * This class implements the explicit Runge-Kutta algorithms with error estimation in a generic way.
- * The Butcher tableau is passed to the stepper which constructs the stepper scheme with the help of a
- * template-metaprogramming algorithm. ToDo : Add example!
- *
- * This class derives explicit_error_stepper_base which provides the stepper interface.
- *
- * \tparam StageCount The number of stages of the Runge-Kutta algorithm.
- * \tparam Order The order of a stepper if the stepper is used without error estimation.
- * \tparam StepperOrder The order of a step if the stepper is used with error estimation. Usually Order and StepperOrder have
- * the same value.
- * \tparam ErrorOrder The order of the error step if the stepper is used with error estimation.
- * \tparam State The type representing the state of the ODE.
- * \tparam Value The floating point type which is used in the computations.
- * \tparam Time The type representing the independent variable - the time - of the ODE.
- * \tparam Algebra The algebra type.
- * \tparam Operations The operations type.
- * \tparam Resizer The resizer policy type.
- */
 template<
 size_t StageCount,
 size_t Order,
@@ -73,22 +50,28 @@
 class Operations = default_operations ,
 class Resizer = initially_resizer
>
+#ifndef DOXYGEN_SKIP
 class explicit_error_generic_rk
 : public explicit_error_stepper_base<
   explicit_error_generic_rk< StageCount , Order , StepperOrder , ErrorOrder , State ,
   Value , Deriv , Time , Algebra , Operations , Resizer > ,
   Order , StepperOrder , ErrorOrder , State , Value , Deriv , Time , Algebra ,
   Operations , Resizer >
+#else
+class explicit_error_generic_rk : public explicit_error_stepper_base
+#endif
 {
 
 public:
-
+#ifndef DOXYGEN_SKIP
     typedef explicit_error_stepper_base<
             explicit_error_generic_rk< StageCount , Order , StepperOrder , ErrorOrder , State ,
             Value , Deriv , Time , Algebra , Operations , Resizer > ,
             Order , StepperOrder , ErrorOrder , State , Value , Deriv , Time , Algebra ,
             Operations , Resizer > stepper_base_type;
-
+#else
+ typedef explicit_stepper_base< ... > stepper_base_type;
+#endif
     typedef typename stepper_base_type::state_type state_type;
     typedef typename stepper_base_type::wrapped_state_type wrapped_state_type;
     typedef typename stepper_base_type::value_type value_type;
@@ -98,10 +81,10 @@
     typedef typename stepper_base_type::algebra_type algebra_type;
     typedef typename stepper_base_type::operations_type operations_type;
     typedef typename stepper_base_type::resizer_type resizer_type;
- //typedef typename stepper_base_type::stepper_type stepper_type;
+#ifndef DOXYGEN_SKIP
     typedef explicit_error_generic_rk< StageCount , Order , StepperOrder , ErrorOrder , State ,
             Value , Deriv , Time , Algebra , Operations , Resizer > stepper_type;
-
+#endif
     typedef detail::generic_rk_algorithm< StageCount , Value , Algebra , Operations > rk_algorithm_type;
 
     typedef typename rk_algorithm_type::coef_a_type coef_a_type;
@@ -126,21 +109,6 @@
     { }
 
 
- /**
- * \brief This method performs one step. The derivative `dxdt` of `in` at the time `t` is passed to the method.
- * The result is updated out-of-place, hence the input is in `in` and the output in `out`. Futhermore, an
- * estimation of the error is stored in `xerr`. `do_step_impl` is used by explicit_error_stepper_base.
- *
- * \param system The system function to solve, hence the r.h.s. of the ODE. It must fullfil the
- * Simple System concept.
- * \param in The state of the ODE which should be solved. in is not modified in this method
- * \param dxdt The derivative of x at t.
- * \param t The value of the time, at which the step should be performed.
- * \param out The result of the step is written in out.
- * \param dt The step size.
- * \param xerr The result of the error estimation is written in xerr.
- */
-
     template< class System , class StateIn , class DerivIn , class StateOut , class Err >
     void do_step_impl( System system , const StateIn &in , const DerivIn &dxdt ,
             time_type t , StateOut &out , time_type dt , Err &xerr )
@@ -154,19 +122,6 @@
     }
 
 
- /**
- * \brief This method performs one step. The derivative `dxdt` of `in` at the time `t` is passed to the method.
- * The result is updated out-of-place, hence the input is in `in` and the output in `out`. `do_step_impl` is
- * used by explicit_error_stepper_base.
- *
- * \param system The system function to solve, hence the r.h.s. of the ODE. It must fullfil the
- * Simple System concept.
- * \param in The state of the ODE which should be solved. in is not modified in this method
- * \param dxdt The derivative of x at t.
- * \param t The value of the time, at which the step should be performed.
- * \param out The result of the step is written in out.
- * \param dt The step size.
- */
     template< class System , class StateIn , class DerivIn , class StateOut >
     void do_step_impl( System system , const StateIn &in , const DerivIn &dxdt ,
             time_type t , StateOut &out , time_type dt )
@@ -178,13 +133,8 @@
     }
 
 
-
- /**
- * \brief Adjust the size of all temporaries in the stepper manually.
- * \param x A state from which the size of the temporaries to be resized is deduced.
- */
- template< class StateType >
- void adjust_size( const StateType &x )
+ template< class StateIn >
+ void adjust_size( const StateIn &x )
     {
         resize_impl( x );
         stepper_base_type::adjust_size( x );
@@ -214,9 +164,86 @@
     wrapped_state_type m_x_tmp;
     wrapped_deriv_type m_F[StageCount-1];
 
-
 };
 
+
+/********* DOXYGEN *********/
+
+/**
+ * \class explicit_error_generic_rk
+ * \brief A generic implementation of explicit Runge-Kutta algorithms with error estimation. This class is as a
+ * base class for all explicit Runge-Kutta steppers with error estimateion.
+ *
+ * This class implements the explicit Runge-Kutta algorithms with error estimation in a generic way.
+ * The Butcher tableau is passed to the stepper which constructs the stepper scheme with the help of a
+ * template-metaprogramming algorithm. ToDo : Add example!
+ *
+ * This class derives explicit_error_stepper_base which provides the stepper interface.
+ *
+ * \tparam StageCount The number of stages of the Runge-Kutta algorithm.
+ * \tparam Order The order of a stepper if the stepper is used without error estimation.
+ * \tparam StepperOrder The order of a step if the stepper is used with error estimation. Usually Order and StepperOrder have
+ * the same value.
+ * \tparam ErrorOrder The order of the error step if the stepper is used with error estimation.
+ * \tparam State The type representing the state of the ODE.
+ * \tparam Value The floating point type which is used in the computations.
+ * \tparam Time The type representing the independent variable - the time - of the ODE.
+ * \tparam Algebra The algebra type.
+ * \tparam Operations The operations type.
+ * \tparam Resizer The resizer policy type.
+ */
+
+
+ /**
+ * \fn explicit_error_generic_rk::explicit_error_generic_rk( const coef_a_type &a , const coef_b_type &b , const coef_b_type &b2 , const coef_c_type &c , const algebra_type &algebra )
+ * \brief Constructs the explicit_error_generik_rk class with the given parameters a, b, b2 and c. See examples section for details on the coefficients.
+ *
+ * \param a Triangular matrix of parameters b in the Butcher tableau.
+ * \param b Last row of the butcher tableau.
+ * \param b2 Parameters for lower-order evaluation to estimate the error.
+ * \param c Parameters to calculate the time points in the Butcher tableau.
+ * \param algebra A copy of algebra is made and stored inside explicit_stepper_base.
+ */
+
+
+ /**
+ * \fn explicit_error_generic_rk::do_step_impl( System system , const StateIn &in , const DerivIn &dxdt , time_type t , StateOut &out , time_type dt , Err &xerr )
+ * \brief This method performs one step. The derivative `dxdt` of `in` at the time `t` is passed to the method.
+ * The result is updated out-of-place, hence the input is in `in` and the output in `out`. Futhermore, an
+ * estimation of the error is stored in `xerr`. `do_step_impl` is used by explicit_error_stepper_base.
+ *
+ * \param system The system function to solve, hence the r.h.s. of the ODE. It must fullfil the
+ * Simple System concept.
+ * \param in The state of the ODE which should be solved. in is not modified in this method
+ * \param dxdt The derivative of x at t.
+ * \param t The value of the time, at which the step should be performed.
+ * \param out The result of the step is written in out.
+ * \param dt The step size.
+ * \param xerr The result of the error estimation is written in xerr.
+ */
+
+ /**
+ * \fn explicit_error_generic_rk::do_step_impl( System system , const StateIn &in , const DerivIn &dxdt , time_type t , StateOut &out , time_type dt )
+ * \brief This method performs one step. The derivative `dxdt` of `in` at the time `t` is passed to the method.
+ * The result is updated out-of-place, hence the input is in `in` and the output in `out`.
+ * Access to this step functionality is provided by explicit_stepper_base and
+ * `do_step_impl` should not be called directly.
+ *
+ * \param system The system function to solve, hence the r.h.s. of the ODE. It must fullfil the
+ * Simple System concept.
+ * \param in The state of the ODE which should be solved. in is not modified in this method
+ * \param dxdt The derivative of x at t.
+ * \param t The value of the time, at which the step should be performed.
+ * \param out The result of the step is written in out.
+ * \param dt The step size.
+ */
+
+ /**
+ * \fn explicit_error_generic_rk::adjust_size( const StateIn &x )
+ * \brief Adjust the size of all temporaries in the stepper manually.
+ * \param x A state from which the size of the temporaries to be resized is deduced.
+ */
+
 }
 }
 }

Modified: trunk/boost/numeric/odeint/stepper/explicit_generic_rk.hpp
==============================================================================
--- trunk/boost/numeric/odeint/stepper/explicit_generic_rk.hpp (original)
+++ trunk/boost/numeric/odeint/stepper/explicit_generic_rk.hpp 2012-12-07 07:26:55 EST (Fri, 07 Dec 2012)
@@ -76,26 +76,6 @@
 #endif
 
 
-/**
- * \class explicit_generic_rk
- * \brief A generic implementation of explicit Runge-Kutta algorithms. This class is as a base class
- * for all explicit Runge-Kutta steppers.
- *
- * This class implements the explicit Runge-Kutta algorithms without error estimation in a generic way.
- * The Butcher tableau is passed to the stepper which constructs the stepper scheme with the help of a
- * template-metaprogramming algorithm. ToDo : Add example!
- *
- * This class derives explicit_stepper_base which provides the stepper interface.
- *
- * \tparam StageCount The number of stages of the Runge-Kutta algorithm.
- * \tparam Order The order of the stepper.
- * \tparam State The type representing the state of the ODE.
- * \tparam Value The floating point type which is used in the computations.
- * \tparam Time The type representing the independent variable - the time - of the ODE.
- * \tparam Algebra The algebra type.
- * \tparam Operations The operations type.
- * \tparam Resizer The resizer policy type.
- */
 template<
 size_t StageCount,
 size_t Order,
@@ -107,9 +87,13 @@
 class Operations ,
 class Resizer
>
+#ifndef DOXYGEN_SKIP
 class explicit_generic_rk : public explicit_stepper_base<
 explicit_generic_rk< StageCount , Order , State , Value , Deriv , Time , Algebra , Operations , Resizer > ,
 Order , State , Value , Deriv , Time , Algebra , Operations , Resizer >
+#else
+class explicit_generic_rk : public explicit_stepper_base
+#endif
 {
 
 public:
@@ -147,36 +131,14 @@
     static const size_t stage_count = StageCount;
     #endif
 
-private:
-
 public:
 
- /**
- * \brief Constructs the explicit_generic_rk class.
- * \param a The coefficients a in the butcher tableau, see the details section for an example.
- * \param b The coefficients b in the butcher tableau, see the details section for an example.
- * \param c The coefficients c in the butcher tableau, see the details section for an example.
- * \param algebra A copy of algebra is made and stored inside explicit_stepper_base.
- */
     explicit_generic_rk( const coef_a_type &a , const coef_b_type &b , const coef_c_type &c ,
             const algebra_type &algebra = algebra_type() )
     : stepper_base_type( algebra ) , m_rk_algorithm( a , b , c )
     { }
 
 
- /**
- * \brief This method performs one step. The derivative `dxdt` of `in` at the time `t` is passed to the method.
- * The result is updated out of place, hence the input is in `in` and the output in `out`. `do_step_impl` is
- * used by explicit_stepper_base.
- *
- * \param system The system function to solve, hence the r.h.s. of the ODE. It must fullfil the
- * Simple System concept.
- * \param in The state of the ODE which should be solved. in is not modified in this method
- * \param dxdt The derivative of x at t.
- * \param t The value of the time, at which the step should be performed.
- * \param out The result of the step is written in out.
- * \param dt The step size.
- */
     template< class System , class StateIn , class DerivIn , class StateOut >
     void do_step_impl( System system , const StateIn &in , const DerivIn &dxdt ,
             time_type t , StateOut &out , time_type dt )
@@ -187,12 +149,8 @@
         m_rk_algorithm.do_step( stepper_base_type::m_algebra , system , in , dxdt , t , out , dt , m_x_tmp.m_v , m_F );
     }
 
- /**
- * \brief Adjust the size of all temporaries in the stepper manually.
- * \param x A state from which the size of the temporaries to be resized is deduced.
- */
- template< class StateType >
- void adjust_size( const StateType &x )
+ template< class StateIn >
+ void adjust_size( const StateIn &x )
     {
         resize_impl( x );
         stepper_base_type::adjust_size( x );
@@ -222,6 +180,63 @@
 
 };
 
+
+
+/*********** DOXYGEN *************/
+
+/**
+ * \class explicit_generic_rk
+ * \brief A generic implementation of explicit Runge-Kutta algorithms. This class is as a base class
+ * for all explicit Runge-Kutta steppers.
+ *
+ * This class implements the explicit Runge-Kutta algorithms without error estimation in a generic way.
+ * The Butcher tableau is passed to the stepper which constructs the stepper scheme with the help of a
+ * template-metaprogramming algorithm. ToDo : Add example!
+ *
+ * This class derives explicit_stepper_base which provides the stepper interface.
+ *
+ * \tparam StageCount The number of stages of the Runge-Kutta algorithm.
+ * \tparam Order The order of the stepper.
+ * \tparam State The type representing the state of the ODE.
+ * \tparam Value The floating point type which is used in the computations.
+ * \tparam Time The type representing the independent variable - the time - of the ODE.
+ * \tparam Algebra The algebra type.
+ * \tparam Operations The operations type.
+ * \tparam Resizer The resizer policy type.
+ */
+
+ /**
+ * \fn explicit_generic_rk::explicit_generic_rk( const coef_a_type &a , const coef_b_type &b , const coef_c_type &c , const algebra_type &algebra )
+ * \brief Constructs the explicit_generic_rk class. See examples section for details on the coefficients.
+ * \param a Triangular matrix of parameters b in the Butcher tableau.
+ * \param b Last row of the butcher tableau.
+ * \param c Parameters to calculate the time points in the Butcher tableau.
+ * \param algebra A copy of algebra is made and stored inside explicit_stepper_base.
+ */
+
+ /**
+ * \fn explicit_generic_rk::do_step_impl( System system , const StateIn &in , const DerivIn &dxdt , time_type t , StateOut &out , time_type dt )
+ * \brief This method performs one step. The derivative `dxdt` of `in` at the time `t` is passed to the method.
+ * The result is updated out of place, hence the input is in `in` and the output in `out`.
+ * Access to this step functionality is provided by explicit_stepper_base and
+ * `do_step_impl` should not be called directly.
+ *
+ * \param system The system function to solve, hence the r.h.s. of the ODE. It must fullfil the
+ * Simple System concept.
+ * \param in The state of the ODE which should be solved. in is not modified in this method
+ * \param dxdt The derivative of x at t.
+ * \param t The value of the time, at which the step should be performed.
+ * \param out The result of the step is written in out.
+ * \param dt The step size.
+ */
+
+
+ /**
+ * \fn explicit_generic_rk::adjust_size( const StateIn &x )
+ * \brief Adjust the size of all temporaries in the stepper manually.
+ * \param x A state from which the size of the temporaries to be resized is deduced.
+ */
+
 }
 }
 }

Modified: trunk/boost/numeric/odeint/stepper/modified_midpoint.hpp
==============================================================================
--- trunk/boost/numeric/odeint/stepper/modified_midpoint.hpp (original)
+++ trunk/boost/numeric/odeint/stepper/modified_midpoint.hpp 2012-12-07 07:26:55 EST (Fri, 07 Dec 2012)
@@ -40,10 +40,14 @@
 class Operations = default_operations ,
 class Resizer = initially_resizer
>
+#ifndef DOXYGEN_SKIP
 class modified_midpoint
 : public explicit_stepper_base<
   modified_midpoint< State , Value , Deriv , Time , Algebra , Operations , Resizer > ,
   2 , State , Value , Deriv , Time , Algebra , Operations , Resizer >
+#else
+class modified_midpoint : public explicit_stepper_base
+#endif
 {
 
 public :
@@ -152,7 +156,6 @@
 /* Modified midpoint which stores derivatives and state at dt/2 in some external storage for later usage in dense output calculation
  * This Stepper is for use in Bulirsch Stoer only. It DOES NOT meet any stepper concept.
  */
-
 template<
 class State ,
 class Value = double ,
@@ -278,6 +281,30 @@
 
 };
 
+
+
+/********** DOXYGEN ***********/
+
+/**
+ * \class modified_midpoint
+ *
+ * Implementation of the modified midpoint method with a configurable
+ * number of intermediate steps. This class is used by the Bulirsch-Stoer
+ * algorithm and is not meant for direct usage.
+ */
+
+
+/**
+ * \class modified_midpoint_dense_out
+ *
+ * Implementation of the modified midpoint method with a configurable
+ * number of intermediate steps. This class is used by the dense ouput
+ * Bulirsch-Stoer algorithm and is not meant for direct usage.
+ * \note This stepper is for internal use only and does not meet
+ * any stepper concept.
+ */
+
+
 }
 }
 }

Modified: trunk/boost/numeric/odeint/stepper/runge_kutta4.hpp
==============================================================================
--- trunk/boost/numeric/odeint/stepper/runge_kutta4.hpp (original)
+++ trunk/boost/numeric/odeint/stepper/runge_kutta4.hpp 2012-12-07 07:26:55 EST (Fri, 07 Dec 2012)
@@ -97,28 +97,6 @@
 
 
 
-/**
- * \class runge_kutta4
- * \brief The classical Runge-Kutta stepper of fourth order.
- *
- * The Runge-Kutta method of fourth order is one standard method for
- * solving ordinary differential equations and is widely used, see also
- * en.wikipedia.org/wiki/Runge-Kutta_methods
- * The method is explicit and fullfils the Stepper concept. Step size control
- * or continous output are not provided.
- *
- * This class derives from explicit_stepper_base and inherits its interface via CRTP (current recurring template pattern).
- * Furthermore, it derivs from explicit_generic_rk which is a generic Runge-Kutta algorithm. For more details see
- * explicit_stepper_base and explicit_generic_rk.
- *
- * \tparam State The state type.
- * \tparam Value The value type.
- * \tparam Deriv The type representing the time derivative of the state.
- * \tparam Time The time representing the independent variable - the time.
- * \tparam Algebra The algebra type.
- * \tparam Operations The operations type.
- * \tparam Resizer The resizer policy type.
- */
 template<
 class State ,
 class Value = double ,
@@ -128,14 +106,20 @@
 class Operations = default_operations ,
 class Resizer = initially_resizer
>
+#ifndef DOXYGEN_SKIP
 class runge_kutta4 : public explicit_generic_rk< 4 , 4 , State , Value , Deriv , Time ,
 Algebra , Operations , Resizer >
+#else
+class runge_kutta4 : public explicit_generic_rk
+#endif
 {
 
 public:
 
+#ifndef DOXYGEN_SKIP
     typedef explicit_generic_rk< 4 , 4 , State , Value , Deriv , Time ,
             Algebra , Operations , Resizer > stepper_base_type;
+#endif
     typedef typename stepper_base_type::state_type state_type;
     typedef typename stepper_base_type::value_type value_type;
     typedef typename stepper_base_type::deriv_type deriv_type;
@@ -150,12 +134,6 @@
     typedef typename stepper_base_type::stepper_type stepper_type;
     #endif
 
-
- /**
- * \brief Constructs the runge_kutta4 class. This constructor can be used as a default
- * constructor if the algebra has a default constructor.
- * \param algebra A copy of algebra is made and stored inside explicit_stepper_base.
- */
     runge_kutta4( const algebra_type &algebra = algebra_type() ) : stepper_base_type(
             boost::fusion::make_vector( rk4_coefficients_a1<Value>() , rk4_coefficients_a2<Value>() , rk4_coefficients_a3<Value>() ) ,
             rk4_coefficients_b<Value>() , rk4_coefficients_c<Value>() , algebra )
@@ -163,6 +141,36 @@
 
 };
 
+/**
+ * \class runge_kutta4
+ * \brief The classical Runge-Kutta stepper of fourth order.
+ *
+ * The Runge-Kutta method of fourth order is one standard method for
+ * solving ordinary differential equations and is widely used, see also
+ * en.wikipedia.org/wiki/Runge-Kutta_methods
+ * The method is explicit and fullfils the Stepper concept. Step size control
+ * or continous output are not provided.
+ *
+ * This class derives from explicit_stepper_base and inherits its interface via CRTP (current recurring template pattern).
+ * Furthermore, it derivs from explicit_generic_rk which is a generic Runge-Kutta algorithm. For more details see
+ * explicit_stepper_base and explicit_generic_rk.
+ *
+ * \tparam State The state type.
+ * \tparam Value The value type.
+ * \tparam Deriv The type representing the time derivative of the state.
+ * \tparam Time The time representing the independent variable - the time.
+ * \tparam Algebra The algebra type.
+ * \tparam Operations The operations type.
+ * \tparam Resizer The resizer policy type.
+ */
+
+/**
+ * \fn runge_kutta4::runge_kutta4( const algebra_type &algebra = algebra_type() )
+ * \brief Constructs the runge_kutta4 class. This constructor can be used as a default
+ * constructor if the algebra has a default constructor.
+ * \param algebra A copy of algebra is made and stored inside explicit_stepper_base.
+ */
+
 }
 }
 }

Modified: trunk/boost/numeric/odeint/stepper/runge_kutta4_classic.hpp
==============================================================================
--- trunk/boost/numeric/odeint/stepper/runge_kutta4_classic.hpp (original)
+++ trunk/boost/numeric/odeint/stepper/runge_kutta4_classic.hpp 2012-12-07 07:26:55 EST (Fri, 07 Dec 2012)
@@ -32,29 +32,6 @@
 namespace numeric {
 namespace odeint {
 
-/**
- * \class runge_kutta4_classic
- * \brief The classical Runge-Kutta stepper of fourth order.
- *
- * The Runge-Kutta method of fourth order is one standard method for
- * solving ordinary differential equations and is widely used, see also
- * en.wikipedia.org/wiki/Runge-Kutta_methods
- * The method is explicit and fullfils the Stepper concept. Step size control
- * or continous output are not provided. This class implements the method directly, hence the
- * generic Runge-Kutta algorithm is not used.
- *
- * This class derives from explicit_stepper_base and inherits its interface via
- * CRTP (current recurring template pattern). For more details see
- * explicit_stepper_base.
- *
- * \tparam State The state type.
- * \tparam Value The value type.
- * \tparam Deriv The type representing the time derivative of the state.
- * \tparam Time The time representing the independent variable - the time.
- * \tparam Algebra The algebra type.
- * \tparam Operations The operations type.
- * \tparam Resizer The resizer policy type.
- */
 template<
 class State ,
 class Value = double ,
@@ -70,8 +47,7 @@
   runge_kutta4_classic< State , Value , Deriv , Time , Algebra , Operations , Resizer > ,
   4 , State , Value , Deriv , Time , Algebra , Operations , Resizer >
 #else
-class runge_kutta4_classic
- : public explicit_stepper_base< runge_kutta4_classic< ... > , ... >
+class runge_kutta4_classic : public explicit_stepper_base
 #endif
 {
 
@@ -101,28 +77,10 @@
 
 
 
- /**
- * \brief Constructs the runge_kutta4_classic class. This constructor can be used as a default
- * constructor if the algebra has a default constructor.
- * \param algebra A copy of algebra is made and stored inside explicit_stepper_base.
- */
     runge_kutta4_classic( const algebra_type &algebra = algebra_type() ) : stepper_base_type( algebra )
     { }
 
 
- /**
- * \brief This method performs one step. The derivative `dxdt` of `in` at the time `t` is passed to the method.
- * The result is updated out of place, hence the input is in `in` and the output in `out`. `do_step_impl` is
- * used by explicit_stepper_base.
- *
- * \param system The system function to solve, hence the r.h.s. of the ODE. It must fullfil the
- * Simple System concept.
- * \param in The state of the ODE which should be solved. in is not modified in this method
- * \param dxdt The derivative of x at t.
- * \param t The value of the time, at which the step should be performed.
- * \param out The result of the step is written in out.
- * \param dt The step size.
- */
     template< class System , class StateIn , class DerivIn , class StateOut >
     void do_step_impl( System system , const StateIn &in , const DerivIn &dxdt , time_type t , StateOut &out , time_type dt )
     {
@@ -167,10 +125,6 @@
                 typename operations_type::template scale_sum5< value_type , time_type , time_type , time_type , time_type >( 1.0 , dt6 , dt3 , dt3 , dt6 ) );
     }
 
- /**
- * \brief Adjust the size of all temporaries in the stepper manually.
- * \param x A state from which the size of the temporaries to be resized is deduced.
- */
     template< class StateType >
     void adjust_size( const StateType &x )
     {
@@ -202,7 +156,61 @@
 };
 
 
+/********* DOXYGEN *********/
 
+/**
+ * \class runge_kutta4_classic
+ * \brief The classical Runge-Kutta stepper of fourth order.
+ *
+ * The Runge-Kutta method of fourth order is one standard method for
+ * solving ordinary differential equations and is widely used, see also
+ * en.wikipedia.org/wiki/Runge-Kutta_methods
+ * The method is explicit and fullfils the Stepper concept. Step size control
+ * or continous output are not provided. This class implements the method directly, hence the
+ * generic Runge-Kutta algorithm is not used.
+ *
+ * This class derives from explicit_stepper_base and inherits its interface via
+ * CRTP (current recurring template pattern). For more details see
+ * explicit_stepper_base.
+ *
+ * \tparam State The state type.
+ * \tparam Value The value type.
+ * \tparam Deriv The type representing the time derivative of the state.
+ * \tparam Time The time representing the independent variable - the time.
+ * \tparam Algebra The algebra type.
+ * \tparam Operations The operations type.
+ * \tparam Resizer The resizer policy type.
+ */
+
+ /**
+ * \fn runge_kutta4_classic::runge_kutta4_classic( const algebra_type &algebra )
+ * \brief Constructs the runge_kutta4_classic class. This constructor can be used as a default
+ * constructor if the algebra has a default constructor.
+ * \param algebra A copy of algebra is made and stored inside explicit_stepper_base.
+ */
+
+
+ /**
+ * \fn runge_kutta4_classic::do_step_impl( System system , const StateIn &in , const DerivIn &dxdt , time_type t , StateOut &out , time_type dt )
+ * \brief This method performs one step. The derivative `dxdt` of `in` at the time `t` is passed to the method.
+ * The result is updated out of place, hence the input is in `in` and the output in `out`.
+ * Access to this step functionality is provided by explicit_stepper_base and
+ * `do_step_impl` should not be called directly.
+ *
+ * \param system The system function to solve, hence the r.h.s. of the ODE. It must fullfil the
+ * Simple System concept.
+ * \param in The state of the ODE which should be solved. in is not modified in this method
+ * \param dxdt The derivative of x at t.
+ * \param t The value of the time, at which the step should be performed.
+ * \param out The result of the step is written in out.
+ * \param dt The step size.
+ */
+
+ /**
+ * \fn runge_kutta4_classic::adjust_size( const StateType &x )
+ * \brief Adjust the size of all temporaries in the stepper manually.
+ * \param x A state from which the size of the temporaries to be resized is deduced.
+ */
 
 } // odeint
 } // numeric

Modified: trunk/boost/numeric/odeint/stepper/runge_kutta_cash_karp54.hpp
==============================================================================
--- trunk/boost/numeric/odeint/stepper/runge_kutta_cash_karp54.hpp (original)
+++ trunk/boost/numeric/odeint/stepper/runge_kutta_cash_karp54.hpp 2012-12-07 07:26:55 EST (Fri, 07 Dec 2012)
@@ -141,28 +141,6 @@
 #endif
 
 
-/**
- * \class runge_kutta_cash_karp54
- * \brief The Runge-Kutta Cash-Karp method.
- *
- * The Runge-Kutta Cash-Karp method is one of the standard methods for
- * solving ordinary differential equations, see
- * en.wikipedia.org/wiki/Cash-Karp_methods.
- * The method is explicit and fullfils the Error Stepper concept. Step size control
- * is provided but continous output is not available for this method.
- *
- * This class derives from explicit_error_stepper_base and inherits its interface via CRTP (current recurring template pattern).
- * Furthermore, it derivs from explicit_error_generic_rk which is a generic Runge-Kutta algorithm with error estimation.
- * For more details see explicit_error_stepper_base and explicit_error_generic_rk.
- *
- * \tparam State The state type.
- * \tparam Value The value type.
- * \tparam Deriv The type representing the time derivative of the state.
- * \tparam Time The time representing the independent variable - the time.
- * \tparam Algebra The algebra type.
- * \tparam Operations The operations type.
- * \tparam Resizer The resizer policy type.
- */
 template<
     class State ,
     class Value = double ,
@@ -172,15 +150,19 @@
     class Operations = default_operations ,
     class Resizer = initially_resizer
>
+#ifndef DOXYGEN_SKIP
 class runge_kutta_cash_karp54 : public explicit_error_generic_rk< 6 , 5 , 5 , 4 ,
         State , Value , Deriv , Time , Algebra , Operations , Resizer >
+#else
+class runge_kutta_cash_karp54 : public explicit_error_generic_rk
+#endif
 {
 
 public:
-
+#ifndef DOXYGEN_SKIP
     typedef explicit_error_generic_rk< 6 , 5 , 5 , 4 , State , Value , Deriv , Time ,
                                Algebra , Operations , Resizer > stepper_base_type;
-
+#endif
     typedef typename stepper_base_type::state_type state_type;
     typedef typename stepper_base_type::value_type value_type;
     typedef typename stepper_base_type::deriv_type deriv_type;
@@ -196,11 +178,6 @@
     #endif
 
 
- /**
- * \brief Constructs the runge_kutta_cash_karp54 class. This constructor can be used as a default
- * constructor if the algebra has a default constructor.
- * \param algebra A copy of algebra is made and stored inside explicit_stepper_base.
- */
     runge_kutta_cash_karp54( const algebra_type &algebra = algebra_type() ) : stepper_base_type(
         boost::fusion::make_vector( rk54_ck_coefficients_a1<Value>() ,
                                  rk54_ck_coefficients_a2<Value>() ,
@@ -212,6 +189,39 @@
     { }
 };
 
+
+/********** DOXYGEN **********/
+
+/**
+ * \class runge_kutta_cash_karp54
+ * \brief The Runge-Kutta Cash-Karp method.
+ *
+ * The Runge-Kutta Cash-Karp method is one of the standard methods for
+ * solving ordinary differential equations, see
+ * en.wikipedia.org/wiki/Cash-Karp_methods.
+ * The method is explicit and fullfils the Error Stepper concept. Step size control
+ * is provided but continous output is not available for this method.
+ *
+ * This class derives from explicit_error_stepper_base and inherits its interface via CRTP (current recurring template pattern).
+ * Furthermore, it derivs from explicit_error_generic_rk which is a generic Runge-Kutta algorithm with error estimation.
+ * For more details see explicit_error_stepper_base and explicit_error_generic_rk.
+ *
+ * \tparam State The state type.
+ * \tparam Value The value type.
+ * \tparam Deriv The type representing the time derivative of the state.
+ * \tparam Time The time representing the independent variable - the time.
+ * \tparam Algebra The algebra type.
+ * \tparam Operations The operations type.
+ * \tparam Resizer The resizer policy type.
+ */
+
+
+ /**
+ * \fn runge_kutta_cash_karp54::runge_kutta_cash_karp54( const algebra_type &algebra )
+ * \brief Constructs the runge_kutta_cash_karp54 class. This constructor can be used as a default
+ * constructor if the algebra has a default constructor.
+ * \param algebra A copy of algebra is made and stored inside explicit_stepper_base.
+ */
 }
 }
 }

Modified: trunk/boost/numeric/odeint/stepper/runge_kutta_cash_karp54_classic.hpp
==============================================================================
--- trunk/boost/numeric/odeint/stepper/runge_kutta_cash_karp54_classic.hpp (original)
+++ trunk/boost/numeric/odeint/stepper/runge_kutta_cash_karp54_classic.hpp 2012-12-07 07:26:55 EST (Fri, 07 Dec 2012)
@@ -36,27 +36,6 @@
 
 
 
-/**
- * \class runge_kutta_cash_karp54_classic
- * \brief The Runge-Kutta Cash-Karp method implemented without the generic Runge-Kutta algorithm.
- *
- * The Runge-Kutta Cash-Karp method is one of the standard methods for
- * solving ordinary differential equations, see
- * en.wikipedia.org/wiki/Cash-Karp_method.
- * The method is explicit and fullfils the Error Stepper concept. Step size control
- * is provided but continous output is not available for this method.
- *
- * This class derives from explicit_error_stepper_base and inherits its interface via CRTP (current recurring
- * template pattern). This class implements the method directly, hence the generic Runge-Kutta algorithm is not used.
- *
- * \tparam State The state type.
- * \tparam Value The value type.
- * \tparam Deriv The type representing the time derivative of the state.
- * \tparam Time The time representing the independent variable - the time.
- * \tparam Algebra The algebra type.
- * \tparam Operations The operations type.
- * \tparam Resizer The resizer policy type.
- */
 template<
 class State ,
 class Value = double ,
@@ -72,8 +51,7 @@
   runge_kutta_cash_karp54_classic< State , Value , Deriv , Time , Algebra , Operations , Resizer > ,
   5 , 5 , 4 , State , Value , Deriv , Time , Algebra , Operations , Resizer >
 #else
-class runge_kutta_cash_karp54_classic
- : public explicit_error_stepper_base< runge_kutta_cash_karp54_classic< ... > , ... >
+class runge_kutta_cash_karp54_classic : public explicit_error_stepper_base
 #endif
 {
 
@@ -103,30 +81,11 @@
     #endif
 
 
- /**
- * \brief Constructs the runge_kutta_cash_karp54_classic class. This constructor can be used as a default
- * constructor if the algebra has a default constructor.
- * \param algebra A copy of algebra is made and stored inside explicit_stepper_base.
- */
     runge_kutta_cash_karp54_classic( const algebra_type &algebra = algebra_type() ) : stepper_base_type( algebra )
     { }
 
 
 
- /**
- * \brief This method performs one step. The derivative `dxdt` of `in` at the time `t` is passed to the method.
- * The result is updated out-of-place, hence the input is in `in` and the output in `out`. Futhermore, an
- * estimation of the error is stored in `xerr`. `do_step_impl` is used by explicit_error_stepper_base.
- *
- * \param system The system function to solve, hence the r.h.s. of the ODE. It must fullfil the
- * Simple System concept.
- * \param in The state of the ODE which should be solved. in is not modified in this method
- * \param dxdt The derivative of x at t.
- * \param t The value of the time, at which the step should be performed.
- * \param out The result of the step is written in out.
- * \param dt The step size.
- * \param xerr The result of the error estimation is written in xerr.
- */
     template< class System , class StateIn , class DerivIn , class StateOut , class Err >
     void do_step_impl( System system , const StateIn &in , const DerivIn &dxdt , time_type t , StateOut &out , time_type dt , Err &xerr )
     {
@@ -151,19 +110,6 @@
 
 
 
- /**
- * \brief This method performs one step. The derivative `dxdt` of `in` at the time `t` is passed to the method.
- * The result is updated out-of-place, hence the input is in `in` and the output in `out`. `do_step_impl` is
- * used by explicit_error_stepper_base.
- *
- * \param system The system function to solve, hence the r.h.s. of the ODE. It must fullfil the
- * Simple System concept.
- * \param in The state of the ODE which should be solved. in is not modified in this method
- * \param dxdt The derivative of x at t.
- * \param t The value of the time, at which the step should be performed.
- * \param out The result of the step is written in out.
- * \param dt The step size.
- */
     template< class System , class StateIn , class DerivIn , class StateOut >
     void do_step_impl( System system , const StateIn &in , const DerivIn &dxdt , time_type t , StateOut &out , time_type dt )
     {
@@ -261,9 +207,74 @@
 
 
 
+/************ DOXYGEN *************/
+
+/**
+ * \class runge_kutta_cash_karp54_classic
+ * \brief The Runge-Kutta Cash-Karp method implemented without the generic Runge-Kutta algorithm.
+ *
+ * The Runge-Kutta Cash-Karp method is one of the standard methods for
+ * solving ordinary differential equations, see
+ * en.wikipedia.org/wiki/Cash-Karp_method.
+ * The method is explicit and fullfils the Error Stepper concept. Step size control
+ * is provided but continous output is not available for this method.
+ *
+ * This class derives from explicit_error_stepper_base and inherits its interface via CRTP (current recurring
+ * template pattern). This class implements the method directly, hence the generic Runge-Kutta algorithm is not used.
+ *
+ * \tparam State The state type.
+ * \tparam Value The value type.
+ * \tparam Deriv The type representing the time derivative of the state.
+ * \tparam Time The time representing the independent variable - the time.
+ * \tparam Algebra The algebra type.
+ * \tparam Operations The operations type.
+ * \tparam Resizer The resizer policy type.
+ */
+
 
+ /**
+ * \fn runge_kutta_cash_karp54_classic::runge_kutta_cash_karp54_classic( const algebra_type &algebra )
+ * \brief Constructs the runge_kutta_cash_karp54_classic class. This constructor can be used as a default
+ * constructor if the algebra has a default constructor.
+ * \param algebra A copy of algebra is made and stored inside explicit_stepper_base.
+ */
 
 
+ /**
+ * \fn runge_kutta_cash_karp54_classic::do_step_impl( System system , const StateIn &in , const DerivIn &dxdt , time_type t , StateOut &out , time_type dt , Err &xerr )
+ * \brief This method performs one step. The derivative `dxdt` of `in` at the time `t` is passed to the method.
+ *
+ * The result is updated out-of-place, hence the input is in `in` and the output in `out`. Futhermore, an
+ * estimation of the error is stored in `xerr`.
+ * Access to this step functionality is provided by explicit_error_stepper_base and
+ * `do_step_impl` should not be called directly.
+
+ *
+ * \param system The system function to solve, hence the r.h.s. of the ODE. It must fullfil the
+ * Simple System concept.
+ * \param in The state of the ODE which should be solved. in is not modified in this method
+ * \param dxdt The derivative of x at t.
+ * \param t The value of the time, at which the step should be performed.
+ * \param out The result of the step is written in out.
+ * \param dt The step size.
+ * \param xerr The result of the error estimation is written in xerr.
+ */
+
+ /**
+ * \fn runge_kutta_cash_karp54_classic::do_step_impl( System system , const StateIn &in , const DerivIn &dxdt , time_type t , StateOut &out , time_type dt )
+ * \brief This method performs one step. The derivative `dxdt` of `in` at the time `t` is passed to the method.
+ * The result is updated out-of-place, hence the input is in `in` and the output in `out`.
+ * Access to this step functionality is provided by explicit_error_stepper_base and
+ * `do_step_impl` should not be called directly.
+ *
+ * \param system The system function to solve, hence the r.h.s. of the ODE. It must fullfil the
+ * Simple System concept.
+ * \param in The state of the ODE which should be solved. in is not modified in this method
+ * \param dxdt The derivative of x at t.
+ * \param t The value of the time, at which the step should be performed.
+ * \param out The result of the step is written in out.
+ * \param dt The step size.
+ */
 
 } // odeint
 } // numeric

Modified: trunk/boost/numeric/odeint/stepper/runge_kutta_dopri5.hpp
==============================================================================
--- trunk/boost/numeric/odeint/stepper/runge_kutta_dopri5.hpp (original)
+++ trunk/boost/numeric/odeint/stepper/runge_kutta_dopri5.hpp 2012-12-07 07:26:55 EST (Fri, 07 Dec 2012)
@@ -37,27 +37,6 @@
 
 
 
-/**
- * \class runge_kutta_dopri5
- * \brief The Runge-Kutta Dormand-Prince 5 method.
- *
- * The Runge-Kutta Dormand-Prince 5 method is a very popular method for solving ODEs, see
- * .
- * The method is explicit and fullfils the Error Stepper concept. Step size control
- * is provided but continous output is available which make this method favourable for many applications.
- *
- * This class derives from explicit_error_stepper_fsal_base and inherits its interface via CRTP (current recurring
- * template pattern). The method possesses the FSAL (first-same-as-last) property. See
- * explicit_error_stepper_fsal_base for more details.
- *
- * \tparam State The state type.
- * \tparam Value The value type.
- * \tparam Deriv The type representing the time derivative of the state.
- * \tparam Time The time representing the independent variable - the time.
- * \tparam Algebra The algebra type.
- * \tparam Operations The operations type.
- * \tparam Resizer The resizer policy type.
- */
 template<
 class State ,
 class Value = double ,
@@ -73,7 +52,7 @@
   runge_kutta_dopri5< State , Value , Deriv , Time , Algebra , Operations , Resizer > ,
   5 , 5 , 4 , State , Value , Deriv , Time , Algebra , Operations , Resizer >
 #else
-: public explicit_error_stepper_fsal_base< runge_kutta_dopri5< ... > , ... >
+: public explicit_error_stepper_fsal_base
 #endif
 {
 
@@ -102,30 +81,10 @@
     #endif // DOXYGEN_SKIP
 
 
- /**
- * \brief Constructs the runge_kutta_dopri5 class. This constructor can be used as a default
- * constructor if the algebra has a default constructor.
- * \param algebra A copy of algebra is made and stored inside explicit_stepper_base.
- */
     runge_kutta_dopri5( const algebra_type &algebra = algebra_type() ) : stepper_base_type( algebra )
     { }
 
 
- /**
- * \brief This method performs one step. The derivative `dxdt_in` of `in` at the time `t` is passed to the
- * method. The result is updated out-of-place, hence the input is in `in` and the output in `out`. Furthermore,
- * the derivative is update out-of-place, hence the input is assumed to be in `dxdt_in` and the output in
- * `dxdt_out`. `do_step_impl` is used by explicit_error_stepper_fsalbase.
- *
- * \param system The system function to solve, hence the r.h.s. of the ODE. It must fullfil the
- * Simple System concept.
- * \param in The state of the ODE which should be solved. in is not modified in this method
- * \param dxdt_in The derivative of x at t. dxdt_in is not modified by this method
- * \param t The value of the time, at which the step should be performed.
- * \param out The result of the step is written in out.
- * \param dxdt_out The result of the new derivative at time t+dt.
- * \param dt The step size.
- */
     template< class System , class StateIn , class DerivIn , class StateOut , class DerivOut >
     void do_step_impl( System system , const StateIn &in , const DerivIn &dxdt_in , time_type t ,
             StateOut &out , DerivOut &dxdt_out , time_type dt )
@@ -197,23 +156,6 @@
 
 
 
- /**
- * \brief This method performs one step. The derivative `dxdt_in` of `in` at the time `t` is passed to the
- * method. The result is updated out-of-place, hence the input is in `in` and the output in `out`. Furthermore,
- * the derivative is update out-of-place, hence the input is assumed to be in `dxdt_in` and the output in
- * `dxdt_out`. `do_step_impl` is used by explicit_error_stepper_fsalbase. An estimation of the error is
- * calculated.
- *
- * \param system The system function to solve, hence the r.h.s. of the ODE. It must fullfil the
- * Simple System concept.
- * \param in The state of the ODE which should be solved. in is not modified in this method
- * \param dxdt_in The derivative of x at t. dxdt_in is not modified by this method
- * \param t The value of the time, at which the step should be performed.
- * \param out The result of the step is written in out.
- * \param dxdt_out The result of the new derivative at time t+dt.
- * \param dt The step size.
- * \param xerr An estimation of the error.
- */
     template< class System , class StateIn , class DerivIn , class StateOut , class DerivOut , class Err >
     void do_step_impl( System system , const StateIn &in , const DerivIn &dxdt_in , time_type t ,
             StateOut &out , DerivOut &dxdt_out , time_type dt , Err &xerr )
@@ -278,12 +220,6 @@
      *
      * www-m2.ma.tum.de/homepages/simeon/numerik3/kap3.ps
      */
- /**
- * \brief This method is used for continous output and it calculates the state `x` at a time `t` from the
- * knowledge of two states `old_state` and `current_state` at time points `t_old` and `t_new`. It also uses
- * internal variables to calculate the result. Hence this method must be called after two successful `do_step`
- * calls.
- */
     template< class StateOut , class StateIn1 , class DerivIn1 , class StateIn2 , class DerivIn2 >
     void calc_state( time_type t , StateOut &x ,
                      const StateIn1 &x_old , const DerivIn1 &deriv_old , time_type t_old ,
@@ -330,12 +266,6 @@
     }
 
 
-
-
- /**
- * \brief Adjust the size of all temporaries in the stepper manually.
- * \param x A state from which the size of the temporaries to be resized is deduced.
- */
     template< class StateIn >
     void adjust_size( const StateIn &x )
     {
@@ -376,6 +306,92 @@
 };
 
 
+
+/************* DOXYGEN ************/
+/**
+ * \class runge_kutta_dopri5
+ * \brief The Runge-Kutta Dormand-Prince 5 method.
+ *
+ * The Runge-Kutta Dormand-Prince 5 method is a very popular method for solving ODEs, see
+ * .
+ * The method is explicit and fullfils the Error Stepper concept. Step size control
+ * is provided but continous output is available which make this method favourable for many applications.
+ *
+ * This class derives from explicit_error_stepper_fsal_base and inherits its interface via CRTP (current recurring
+ * template pattern). The method possesses the FSAL (first-same-as-last) property. See
+ * explicit_error_stepper_fsal_base for more details.
+ *
+ * \tparam State The state type.
+ * \tparam Value The value type.
+ * \tparam Deriv The type representing the time derivative of the state.
+ * \tparam Time The time representing the independent variable - the time.
+ * \tparam Algebra The algebra type.
+ * \tparam Operations The operations type.
+ * \tparam Resizer The resizer policy type.
+ */
+
+
+ /**
+ * \fn runge_kutta_dopri5::runge_kutta_dopri5( const algebra_type &algebra )
+ * \brief Constructs the runge_kutta_dopri5 class. This constructor can be used as a default
+ * constructor if the algebra has a default constructor.
+ * \param algebra A copy of algebra is made and stored inside explicit_stepper_base.
+ */
+
+ /**
+ * \fn runge_kutta_dopri5::do_step_impl( System system , const StateIn &in , const DerivIn &dxdt_in , time_type t , StateOut &out , DerivOut &dxdt_out , time_type dt )
+ * \brief This method performs one step. The derivative `dxdt_in` of `in` at the time `t` is passed to the
+ * method. The result is updated out-of-place, hence the input is in `in` and the output in `out`. Furthermore,
+ * the derivative is update out-of-place, hence the input is assumed to be in `dxdt_in` and the output in
+ * `dxdt_out`.
+ * Access to this step functionality is provided by explicit_error_stepper_fsal_base and
+ * `do_step_impl` should not be called directly.
+ *
+ * \param system The system function to solve, hence the r.h.s. of the ODE. It must fullfil the
+ * Simple System concept.
+ * \param in The state of the ODE which should be solved. in is not modified in this method
+ * \param dxdt_in The derivative of x at t. dxdt_in is not modified by this method
+ * \param t The value of the time, at which the step should be performed.
+ * \param out The result of the step is written in out.
+ * \param dxdt_out The result of the new derivative at time t+dt.
+ * \param dt The step size.
+ */
+
+ /**
+ * \fn runge_kutta_dopri5::do_step_impl( System system , const StateIn &in , const DerivIn &dxdt_in , time_type t , StateOut &out , DerivOut &dxdt_out , time_type dt , Err &xerr )
+ * \brief This method performs one step. The derivative `dxdt_in` of `in` at the time `t` is passed to the
+ * method. The result is updated out-of-place, hence the input is in `in` and the output in `out`. Furthermore,
+ * the derivative is update out-of-place, hence the input is assumed to be in `dxdt_in` and the output in
+ * `dxdt_out`.
+ * Access to this step functionality is provided by explicit_error_stepper_fsal_base and
+ * `do_step_impl` should not be called directly.
+ * An estimation of the error is calculated.
+ *
+ * \param system The system function to solve, hence the r.h.s. of the ODE. It must fullfil the
+ * Simple System concept.
+ * \param in The state of the ODE which should be solved. in is not modified in this method
+ * \param dxdt_in The derivative of x at t. dxdt_in is not modified by this method
+ * \param t The value of the time, at which the step should be performed.
+ * \param out The result of the step is written in out.
+ * \param dxdt_out The result of the new derivative at time t+dt.
+ * \param dt The step size.
+ * \param xerr An estimation of the error.
+ */
+
+ /**
+ * \fn runge_kutta_dopri5::calc_state( time_type t , StateOut &x , const StateIn1 &x_old , const DerivIn1 &deriv_old , time_type t_old , const StateIn2 & , const DerivIn2 &deriv_new , time_type t_new ) const
+ * \brief This method is used for continous output and it calculates the state `x` at a time `t` from the
+ * knowledge of two states `old_state` and `current_state` at time points `t_old` and `t_new`. It also uses
+ * internal variables to calculate the result. Hence this method must be called after two successful `do_step`
+ * calls.
+ */
+
+ /**
+ * \fn runge_kutta_dopri5::adjust_size( const StateIn &x )
+ * \brief Adjust the size of all temporaries in the stepper manually.
+ * \param x A state from which the size of the temporaries to be resized is deduced.
+ */
+
 } // odeint
 } // numeric
 } // boost

Modified: trunk/boost/numeric/odeint/stepper/runge_kutta_fehlberg78.hpp
==============================================================================
--- trunk/boost/numeric/odeint/stepper/runge_kutta_fehlberg78.hpp (original)
+++ trunk/boost/numeric/odeint/stepper/runge_kutta_fehlberg78.hpp 2012-12-07 07:26:55 EST (Fri, 07 Dec 2012)
@@ -286,26 +286,6 @@
 
 
 
-/**
- * \class runge_kutta_fehlberg78
- * \brief The Runge-Kutta Fehlberg 78 method.
- *
- * The Runge-Kutta Fehlberg 78 method is a standard method for high-precision applications.
- * The method is explicit and fullfils the Error Stepper concept. Step size control
- * is provided but continous output is not available for this method.
- *
- * This class derives from explicit_error_stepper_base and inherits its interface via CRTP (current recurring template pattern).
- * Furthermore, it derivs from explicit_error_generic_rk which is a generic Runge-Kutta algorithm with error estimation.
- * For more details see explicit_error_stepper_base and explicit_error_generic_rk.
- *
- * \tparam State The state type.
- * \tparam Value The value type.
- * \tparam Deriv The type representing the time derivative of the state.
- * \tparam Time The time representing the independent variable - the time.
- * \tparam Algebra The algebra type.
- * \tparam Operations The operations type.
- * \tparam Resizer The resizer policy type.
- */
 template<
 class State ,
 class Value = double ,
@@ -315,15 +295,19 @@
 class Operations = default_operations ,
 class Resizer = initially_resizer
>
+#ifndef DOXYGEN_SKIP
 class runge_kutta_fehlberg78 : public explicit_error_generic_rk< 13 , 8 , 8 , 7 , State , Value , Deriv , Time ,
 Algebra , Operations , Resizer >
+#else
+class runge_kutta_fehlberg78 : public explicit_error_generic_rk
+#endif
 {
 
 public:
-
+#ifndef DOXYGEN_SKIP
     typedef explicit_error_generic_rk< 13 , 8 , 8 , 7 , State , Value , Deriv , Time ,
             Algebra , Operations , Resizer > stepper_base_type;
-
+#endif
     typedef typename stepper_base_type::state_type state_type;
     typedef typename stepper_base_type::value_type value_type;
     typedef typename stepper_base_type::deriv_type deriv_type;
@@ -338,11 +322,7 @@
     typedef typename stepper_base_type::wrapped_deriv_type wrapped_deriv_type;
     #endif // DOXYGEN_SKIP
 
- /**
- * \brief Constructs the runge_kutta_cash_fehlberg78 class. This constructor can be used as a default
- * constructor if the algebra has a default constructor.
- * \param algebra A copy of algebra is made and stored inside explicit_stepper_base.
- */
+
     runge_kutta_fehlberg78( const algebra_type &algebra = algebra_type() ) : stepper_base_type(
             boost::fusion::make_vector( rk78_coefficients_a1<Value>() , rk78_coefficients_a2<Value>() , rk78_coefficients_a3<Value>() ,
                     rk78_coefficients_a4<Value>() , rk78_coefficients_a5<Value>() , rk78_coefficients_a6<Value>() ,
@@ -352,6 +332,39 @@
     { }
 };
 
+
+
+/************* DOXYGEN *************/
+
+/**
+ * \class runge_kutta_fehlberg78
+ * \brief The Runge-Kutta Fehlberg 78 method.
+ *
+ * The Runge-Kutta Fehlberg 78 method is a standard method for high-precision applications.
+ * The method is explicit and fullfils the Error Stepper concept. Step size control
+ * is provided but continous output is not available for this method.
+ *
+ * This class derives from explicit_error_stepper_base and inherits its interface via CRTP (current recurring template pattern).
+ * Furthermore, it derivs from explicit_error_generic_rk which is a generic Runge-Kutta algorithm with error estimation.
+ * For more details see explicit_error_stepper_base and explicit_error_generic_rk.
+ *
+ * \tparam State The state type.
+ * \tparam Value The value type.
+ * \tparam Deriv The type representing the time derivative of the state.
+ * \tparam Time The time representing the independent variable - the time.
+ * \tparam Algebra The algebra type.
+ * \tparam Operations The operations type.
+ * \tparam Resizer The resizer policy type.
+ */
+
+
+ /**
+ * \fn runge_kutta_fehlberg78::runge_kutta_fehlberg78( const algebra_type &algebra )
+ * \brief Constructs the runge_kutta_cash_fehlberg78 class. This constructor can be used as a default
+ * constructor if the algebra has a default constructor.
+ * \param algebra A copy of algebra is made and stored inside explicit_stepper_base.
+ */
+
 }
 }
 }

Modified: trunk/boost/numeric/odeint/stepper/symplectic_euler.hpp
==============================================================================
--- trunk/boost/numeric/odeint/stepper/symplectic_euler.hpp (original)
+++ trunk/boost/numeric/odeint/stepper/symplectic_euler.hpp 2012-12-07 07:26:55 EST (Fri, 07 Dec 2012)
@@ -59,23 +59,6 @@
 
 
 
-/**
- * \class symplectic_euler
- * \brief Implementation of the symplectic Euler method.
- *
- * The method is of first order and has one stage. It is described HERE.
- *
- * \tparam Order The order of the stepper.
- * \tparam Coor The type representing the coordinates q.
- * \tparam Momentum The type representing the coordinates p.
- * \tparam Value The basic value type. Should be somethink like float, double or a high-precision type.
- * \tparam CoorDeriv The type representing the time derivative of the coordinate dq/dt.
- * \tparam MomemtnumDeriv The type representing the time derivative of the momentum dp/dt.
- * \tparam Time The type representing the time t.
- * \tparam Algebra The algebra.
- * \tparam Operations The operations.
- * \tparam Resizer The resizer policy.
- */
 template<
 class Coor ,
 class Momentum = Coor ,
@@ -87,27 +70,27 @@
 class Operations = default_operations ,
 class Resizer = initially_resizer
>
+#ifndef DOXYGEN_SKIP
 class symplectic_euler :
 public symplectic_nystroem_stepper_base
 <
 1 , 1 ,
 Coor , Momentum , Value , CoorDeriv , MomentumDeriv , Time , Algebra , Operations , Resizer
>
+#else
+class symplectic_euler : public symplectic_nystroem_stepper_base
+#endif
 {
 public:
 
+#ifndef DOXYGEN_SKIP
     typedef symplectic_nystroem_stepper_base<
     1 , 1 , Coor , Momentum , Value , CoorDeriv , MomentumDeriv , Time , Algebra , Operations , Resizer > stepper_base_type;
-
+#endif
     typedef typename stepper_base_type::algebra_type algebra_type;
     typedef typename stepper_base_type::value_type value_type;
 
 
- /**
- * \brief Constructs the symplectic_euler. This constructor can be used as a default
- * constructor if the algebra has a default constructor.
- * \param algebra A copy of algebra is made and stored inside explicit_stepper_base.
- */
     symplectic_euler( const algebra_type &algebra = algebra_type() )
     : stepper_base_type( detail::symplectic_euler_coef::coef_a_type< value_type >() ,
             detail::symplectic_euler_coef::coef_b_type< value_type >() ,
@@ -116,6 +99,32 @@
 };
 
 
+/*************** DOXYGEN ***************/
+
+/**
+ * \class symplectic_euler
+ * \brief Implementation of the symplectic Euler method.
+ *
+ * The method is of first order and has one stage. It is described HERE.
+ *
+ * \tparam Order The order of the stepper.
+ * \tparam Coor The type representing the coordinates q.
+ * \tparam Momentum The type representing the coordinates p.
+ * \tparam Value The basic value type. Should be somethink like float, double or a high-precision type.
+ * \tparam CoorDeriv The type representing the time derivative of the coordinate dq/dt.
+ * \tparam MomemtnumDeriv The type representing the time derivative of the momentum dp/dt.
+ * \tparam Time The type representing the time t.
+ * \tparam Algebra The algebra.
+ * \tparam Operations The operations.
+ * \tparam Resizer The resizer policy.
+ */
+
+ /**
+ * \fn symplectic_euler::symplectic_euler( const algebra_type &algebra )
+ * \brief Constructs the symplectic_euler. This constructor can be used as a default
+ * constructor if the algebra has a default constructor.
+ * \param algebra A copy of algebra is made and stored inside explicit_stepper_base.
+ */
 
 } // namespace odeint
 } // namespace numeric

Modified: trunk/boost/numeric/odeint/stepper/symplectic_rkn_sb3a_m4_mclachlan.hpp
==============================================================================
--- trunk/boost/numeric/odeint/stepper/symplectic_rkn_sb3a_m4_mclachlan.hpp (original)
+++ trunk/boost/numeric/odeint/stepper/symplectic_rkn_sb3a_m4_mclachlan.hpp 2012-12-07 07:26:55 EST (Fri, 07 Dec 2012)
@@ -73,26 +73,6 @@
 
 
 
-/**
- * \class symplectic_rkn_sb3a_m4_mclachlan
- * \brief Implementation of the symmetric B3A Runge-Kutta Nystroem method of fifth order.
- *
- * The method is of fourth order and has five stages. It is described HERE. This method can be used
- * with multiprecision types since the coefficients are defined analytically.
- *
- * ToDo: add reference to paper.
- *
- * \tparam Order The order of the stepper.
- * \tparam Coor The type representing the coordinates q.
- * \tparam Momentum The type representing the coordinates p.
- * \tparam Value The basic value type. Should be somethink like float, double or a high-precision type.
- * \tparam CoorDeriv The type representing the time derivative of the coordinate dq/dt.
- * \tparam MomemtnumDeriv The type representing the time derivative of the momentum dp/dt.
- * \tparam Time The type representing the time t.
- * \tparam Algebra The algebra.
- * \tparam Operations The operations.
- * \tparam Resizer The resizer policy.
- */
 template<
     class Coor ,
     class Momentum = Coor ,
@@ -104,30 +84,29 @@
     class Operations = default_operations ,
     class Resizer = initially_resizer
>
+#ifndef DOXYGEN_SKIP
 class symplectic_rkn_sb3a_m4_mclachlan :
         public symplectic_nystroem_stepper_base
 <
     5 , 4 ,
     Coor , Momentum , Value , CoorDeriv , MomentumDeriv , Time , Algebra , Operations , Resizer
>
+#else
+class symplectic_rkn_sb3a_m4_mclachlan : public symplectic_nystroem_stepper_base
+#endif
 {
 public:
-
+#ifndef DOXYGEN_SKIP
     typedef symplectic_nystroem_stepper_base
     <
     5 , 4 ,
     Coor , Momentum , Value , CoorDeriv , MomentumDeriv , Time , Algebra , Operations , Resizer
> stepper_base_type;
-
+#endif
     typedef typename stepper_base_type::algebra_type algebra_type;
     typedef typename stepper_base_type::value_type value_type;
 
 
- /**
- * \brief Constructs the symplectic_rkn_sb3a_m4_mclachlan. This constructor can be used as a default
- * constructor if the algebra has a default constructor.
- * \param algebra A copy of algebra is made and stored inside explicit_stepper_base.
- */
     symplectic_rkn_sb3a_m4_mclachlan( const algebra_type &algebra = algebra_type() )
         : stepper_base_type(
             detail::symplectic_rkn_sb3a_m4_mclachlan::coef_a_type< value_type >() ,
@@ -137,6 +116,35 @@
 };
 
 
+/***************** DOXYGEN ***************/
+
+/**
+ * \class symplectic_rkn_sb3a_m4_mclachlan
+ * \brief Implementation of the symmetric B3A Runge-Kutta Nystroem method of fifth order.
+ *
+ * The method is of fourth order and has five stages. It is described HERE. This method can be used
+ * with multiprecision types since the coefficients are defined analytically.
+ *
+ * ToDo: add reference to paper.
+ *
+ * \tparam Order The order of the stepper.
+ * \tparam Coor The type representing the coordinates q.
+ * \tparam Momentum The type representing the coordinates p.
+ * \tparam Value The basic value type. Should be somethink like float, double or a high-precision type.
+ * \tparam CoorDeriv The type representing the time derivative of the coordinate dq/dt.
+ * \tparam MomemtnumDeriv The type representing the time derivative of the momentum dp/dt.
+ * \tparam Time The type representing the time t.
+ * \tparam Algebra The algebra.
+ * \tparam Operations The operations.
+ * \tparam Resizer The resizer policy.
+ */
+
+ /**
+ * \fn symplectic_rkn_sb3a_m4_mclachlan::symplectic_rkn_sb3a_m4_mclachlan( const algebra_type &algebra )
+ * \brief Constructs the symplectic_rkn_sb3a_m4_mclachlan. This constructor can be used as a default
+ * constructor if the algebra has a default constructor.
+ * \param algebra A copy of algebra is made and stored inside explicit_stepper_base.
+ */
 
 } // namespace odeint
 } // namespace numeric

Modified: trunk/boost/numeric/odeint/stepper/symplectic_rkn_sb3a_mclachlan.hpp
==============================================================================
--- trunk/boost/numeric/odeint/stepper/symplectic_rkn_sb3a_mclachlan.hpp (original)
+++ trunk/boost/numeric/odeint/stepper/symplectic_rkn_sb3a_mclachlan.hpp 2012-12-07 07:26:55 EST (Fri, 07 Dec 2012)
@@ -78,26 +78,6 @@
 
 
 
-/**
- * \class symplectic_rkn_sb3a_mclachlan
- * \brief Implement of the symetric B3A method of Runge-Kutta-Nystroem method of sixth order.
- *
- * The method is of fourth order and has six stages. It is described HERE. This method cannot be used
- * with multiprecision types since the coefficients are not defined analytically.
- *
- * ToDo Add reference to the paper.
- *
- * \tparam Order The order of the stepper.
- * \tparam Coor The type representing the coordinates q.
- * \tparam Momentum The type representing the coordinates p.
- * \tparam Value The basic value type. Should be somethink like float, double or a high-precision type.
- * \tparam CoorDeriv The type representing the time derivative of the coordinate dq/dt.
- * \tparam MomemtnumDeriv The type representing the time derivative of the momentum dp/dt.
- * \tparam Time The type representing the time t.
- * \tparam Algebra The algebra.
- * \tparam Operations The operations.
- * \tparam Resizer The resizer policy.
- */
 template<
     class Coor ,
     class Momentum = Coor ,
@@ -109,30 +89,29 @@
     class Operations = default_operations ,
     class Resizer = initially_resizer
>
+#ifndef DOXYGEN_SKIP
 class symplectic_rkn_sb3a_mclachlan :
         public symplectic_nystroem_stepper_base
 <
     6 , 4 ,
     Coor , Momentum , Value , CoorDeriv , MomentumDeriv , Time , Algebra , Operations , Resizer
>
+#else
+class symplectic_rkn_sb3a_mclachlan : public symplectic_nystroem_stepper_base
+#endif
 {
 public:
-
+#ifndef DOXYGEN_SKIP
     typedef symplectic_nystroem_stepper_base
     <
     6 , 4 ,
     Coor , Momentum , Value , CoorDeriv , MomentumDeriv , Time , Algebra , Operations , Resizer
> stepper_base_type;
-
+#endif
     typedef typename stepper_base_type::algebra_type algebra_type;
     typedef typename stepper_base_type::value_type value_type;
 
 
- /**
- * \brief Constructs the symplectic_rkn_sb3a_mclachlan. This constructor can be used as a default
- * constructor if the algebra has a default constructor.
- * \param algebra A copy of algebra is made and stored inside explicit_stepper_base.
- */
     symplectic_rkn_sb3a_mclachlan( const algebra_type &algebra = algebra_type() )
         : stepper_base_type(
             detail::symplectic_rkn_sb3a_mclachlan::coef_a_type< value_type >() ,
@@ -142,6 +121,35 @@
 };
 
 
+/************* DOXYGEN ***********/
+
+/**
+ * \class symplectic_rkn_sb3a_mclachlan
+ * \brief Implement of the symetric B3A method of Runge-Kutta-Nystroem method of sixth order.
+ *
+ * The method is of fourth order and has six stages. It is described HERE. This method cannot be used
+ * with multiprecision types since the coefficients are not defined analytically.
+ *
+ * ToDo Add reference to the paper.
+ *
+ * \tparam Order The order of the stepper.
+ * \tparam Coor The type representing the coordinates q.
+ * \tparam Momentum The type representing the coordinates p.
+ * \tparam Value The basic value type. Should be somethink like float, double or a high-precision type.
+ * \tparam CoorDeriv The type representing the time derivative of the coordinate dq/dt.
+ * \tparam MomemtnumDeriv The type representing the time derivative of the momentum dp/dt.
+ * \tparam Time The type representing the time t.
+ * \tparam Algebra The algebra.
+ * \tparam Operations The operations.
+ * \tparam Resizer The resizer policy.
+ */
+
+ /**
+ * \fn symplectic_rkn_sb3a_mclachlan::symplectic_rkn_sb3a_mclachlan( const algebra_type &algebra )
+ * \brief Constructs the symplectic_rkn_sb3a_mclachlan. This constructor can be used as a default
+ * constructor if the algebra has a default constructor.
+ * \param algebra A copy of algebra is made and stored inside explicit_stepper_base.
+ */
 
 } // namespace odeint
 } // namespace numeric

Modified: trunk/libs/numeric/odeint/doc/Jamfile.v2
==============================================================================
--- trunk/libs/numeric/odeint/doc/Jamfile.v2 (original)
+++ trunk/libs/numeric/odeint/doc/Jamfile.v2 2012-12-07 07:26:55 EST (Fri, 07 Dec 2012)
@@ -53,7 +53,7 @@
     [ glob ../../../../boost/numeric/odeint/stepper/*.hpp ]
     [ glob ../../../../boost/numeric/odeint/stepper/base/*.hpp ]
 # [ glob ../../../../boost/numeric/odeint/stepper/generation/*.hpp ]
-# [ glob ../../../../boost/numeric/odeint/integrate/*.hpp ]
+ [ glob ../../../../boost/numeric/odeint/integrate/*.hpp ]
 # [ glob ../../../../boost/numeric/odeint/iterator/*.hpp ]
 # [ glob ../../../../boost/numeric/odeint/algebra/*.hpp ]
 # [ glob ../../../../boost/numeric/odeint/util/*.hpp ]

Modified: trunk/libs/numeric/odeint/doc/details.qbk
==============================================================================
--- trunk/libs/numeric/odeint/doc/details.qbk (original)
+++ trunk/libs/numeric/odeint/doc/details.qbk 2012-12-07 07:26:55 EST (Fri, 07 Dec 2012)
@@ -17,8 +17,6 @@
 
 [include details_integrate_functions.qbk]
 
-[include details_iterators.qbk]
-
 [include details_state_types_algebras_operations.qbk]
 
 [include details_boost_ref.qbk]

Deleted: trunk/libs/numeric/odeint/doc/details_iterators.qbk
==============================================================================
--- trunk/libs/numeric/odeint/doc/details_iterators.qbk 2012-12-07 07:26:55 EST (Fri, 07 Dec 2012)
+++ (empty file)
@@ -1,106 +0,0 @@
-[/============================================================================
- Boost.odeint
-
- Copyright (c) 2009-2012 Karsten Ahnert
- Copyright (c) 2009-2012 Mario Mulansky
-
- Use, modification and distribution is subject to 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)
-=============================================================================/]
-
-
-[section Iterators and Ranges]
-
-
-
-odeint supports iterators for iterating through an ordinary differential equation. They offer you an alternative to the integrate functions. Furthermore, many of the standard algorithms in the C++ standard library and Boost.Range can be used with the odeint's iterators.
-
-[import ../examples/const_step_iterator.cpp]
-
-Four iterators are provided. They are all single pass iterators. The first one is a iterator which solves the odeint with constant step size. An example is
-
-[const_step_iterator_accumulate]
-
-In this example all x-values of the solution are accumulated. The iterator itself does not occur directly in this example but it is generated by the factory functions `make_const_step_iterator_begin` and `make_const_step_iterator_end`. odeint also supports Boost.Range, that is you write the above example in a more succinct form with the factory function `make_const_step_range`
-
-[const_step_iterator_accumulate_range]
-
-The second iterator type is also a iterator with const step size. But the value type of this iterator consists here of a pair of the time and the state of the solution of the ODE. An example is
-
-[const_step_time_iterator_accumulate_range]
-
-The factory functions are now `make_const_step_time_iterator_begin`, `make_const_step_time_iterator_end` and `make_const_step_time_range`.
-
-
-[import ../examples/adaptive_iterator.cpp]
-
-The other two iterator types adaptive iterators which are completely analogous to the const step iterators. Examples are
-
-[adaptive_iterator_accumulate_range]
-
-[adaptive_time_iterator_accumulate_range]
-
-
-[section const_step_iterator]
-
-* Definition: `const_step_iterator< Stepper , System >`
-* `value_type` is `Stepper::state_type`
-* Factory functions
- * `make_const_step_iterator_begin( stepper , system , state , t_start , t_end , dt )`
- * `make_const_step_iterator_end( stepper , system , state )`
- * `make_const_step_range( stepper , system , state , t_start , t_end , dt )`
-* This stepper works with all steppers fulfilling the Stepper concept or the DenseOutputStepper concept.
-* This stepper updates the value of `state`. The value of `state` is the current state of the ODE during the iteration.
-
-[endsect]
-
-[section const_step_time_iterator]
-
-* Definition: `const_step_iterator< Stepper , System >`
-* `value_type` is `std::pair< Stepper::state_type& , Stepper::time_type >`
-* Factory functions
- * `make_const_step_time_iterator_begin( stepper , system , state , t_start , t_end , dt )`
- * `make_const_step_time_iterator_end( stepper , system , state )`
- * `make_const_step_time_range( stepper , system , state , t_start , t_end , dt )`
-* This stepper works with all steppers fulfilling the Stepper concept or the DenseOutputStepper concept.
-* This stepper updates the value of `state`. The value of `state` is the current state of the ODE during the iteration.
-
-
-[endsect]
-
-
-[section adaptive_step_iterator]
-
-* Definition: `adaptive_iterator< Stepper , System >`
-* `value_type` is `Stepper::state_type`
-* Factory functions
- * `make_adaptive_iterator_begin( stepper , system , state , t_start , t_end , dt )`
- * `make_adaptive_iterator_end( stepper , system , state )`
- * `make_adaptive_range( stepper , system , state , t_start , t_end , dt )`
-* This stepper works with all steppers fulfilling the ControlledStepper concept or the DenseOutputStepper concept.
-* For steppers fulfilling the ControlledStepper concept `state` is modified according to the current state of the ODE. For DenseOutputStepper the state is not modified due to performance optimizations.
-
-
-[endsect]
-
-[section adaptive_step_time_iterator]
-
-* Definition: `adaptive_iterator< Stepper , System >`
-* `value_type` is `std::pair< Stepper::state_type& , Stepper::time_type >`
-* Factory functions
- * `make_adaptive_time_iterator_begin( stepper , system , state , t_start , t_end , dt )`
- * `make_adaptive_time_iterator_end( stepper , system , state )`
- * `make_adaptive_time_range( stepper , system , state , t_start , t_end , dt )`
-* This stepper works with all steppers fulfilling the ControlledStepper concept or the DenseOutputStepper concept.
-* This stepper updates the value of `state`. The value of `state` is the current state of the ODE during the iteration.
-
-
-[endsect]
-
-
-
-
-
-
-[endsect]

Modified: trunk/libs/numeric/odeint/doc/tutorial_harmonic_oscillator.qbk
==============================================================================
--- trunk/libs/numeric/odeint/doc/tutorial_harmonic_oscillator.qbk (original)
+++ trunk/libs/numeric/odeint/doc/tutorial_harmonic_oscillator.qbk 2012-12-07 07:26:55 EST (Fri, 07 Dec 2012)
@@ -108,14 +108,6 @@
 
 [endsect]
 
-[section Using iterators]
-
-odeint supports iterators for solving ODEs. That is you instantiate a pair of iterators and instead of using the integrate routines with an appropriate observer you put the iterators in one of the algorithm from the C++ standard library or from Boost.Range. An example is
-
-[harm_iterator_const_step]
-
-[endsect]
-
 The full source file for this example can be found here: [github_link libs/numeric/odeint/examples/harmonic_oscillator.cpp harmonic_oscillator.cpp]
 
 

Modified: trunk/libs/numeric/odeint/examples/Jamfile.v2
==============================================================================
--- trunk/libs/numeric/odeint/examples/Jamfile.v2 (original)
+++ trunk/libs/numeric/odeint/examples/Jamfile.v2 2012-12-07 07:26:55 EST (Fri, 07 Dec 2012)
@@ -33,8 +33,6 @@
 exe stochastic_euler : stochastic_euler.cpp ;
 exe generation_functions : generation_functions.cpp ;
 exe heun : heun.cpp ;
-exe const_step_iterator : const_step_iterator.cpp : <cxxflags>-std=c++0x ;
-exe adaptive_iterator : adaptive_iterator.cpp : <cxxflags>-std=c++0x ;
 exe bind_member_functions : bind_member_functions.cpp ;
 exe bind_member_functions_cpp11 : bind_member_functions_cpp11.cpp : <cxxflags>-std=c++0x ;
 

Deleted: trunk/libs/numeric/odeint/examples/adaptive_iterator.cpp
==============================================================================
--- trunk/libs/numeric/odeint/examples/adaptive_iterator.cpp 2012-12-07 07:26:55 EST (Fri, 07 Dec 2012)
+++ (empty file)
@@ -1,361 +0,0 @@
-/*
- * adaptive_iterator.cpp
- *
- * Copyright 2009-2012 Karsten Ahnert
- * Copyright 2009-2012 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)
- */
-
-
-
-#include <iostream>
-#include <iterator>
-#include <utility>
-#include <algorithm>
-#include <cassert>
-
-#include <boost/array.hpp>
-
-#include <boost/range/algorithm.hpp>
-#include <boost/range/adaptor/filtered.hpp>
-#include <boost/range/numeric.hpp>
-
-#include <boost/numeric/odeint/stepper/runge_kutta4.hpp>
-#include <boost/numeric/odeint/stepper/runge_kutta_dopri5.hpp>
-#include <boost/numeric/odeint/stepper/runge_kutta_cash_karp54.hpp>
-#include <boost/numeric/odeint/stepper/generation.hpp>
-
-#include <boost/numeric/odeint/iterator/adaptive_iterator.hpp>
-#include <boost/numeric/odeint/iterator/adaptive_time_iterator.hpp>
-
-#define tab "\t"
-
-using namespace std;
-using namespace boost::numeric::odeint;
-
-const double sigma = 10.0;
-const double R = 28.0;
-const double b = 8.0 / 3.0;
-
-struct lorenz
-{
- template< class State , class Deriv >
- void operator()( const State &x , Deriv &dxdt , double t ) const
- {
- dxdt[0] = sigma * ( x[1] - x[0] );
- dxdt[1] = R * x[0] - x[1] - x[0] * x[2];
- dxdt[2] = -b * x[2] + x[0] * x[1];
- }
-};
-
-#include <typeinfo>
-
-int main( int argc , char **argv )
-{
- typedef boost::array< double , 3 > state_type;
-
- /*
- * Controlled steppers with time iterator
- */
-
- // std::for_each
- {
- auto stepper = make_controlled( 1.0e-6 , 1.0e-6 , runge_kutta_cash_karp54< state_type >() );
- state_type x = {{ 10.0 , 10.0 , 10.0 }};
- std::for_each( make_adaptive_time_iterator_begin( stepper , lorenz() , x , 0.0 , 1.0 , 0.01 ) ,
- make_adaptive_time_iterator_end( stepper , lorenz() , x ) ,
- []( const std::pair< state_type&, double > &x ) {
- std::cout << x.second << tab << x.first[0] << tab << x.first[1] << tab << x.first[2] << "\n"; } );
- }
-
- // std::copy_if
- {
- std::vector< pair< state_type , double > > res;
- auto stepper = make_controlled( 1.0e-6 , 1.0e-6 , runge_kutta_cash_karp54< state_type >() );
- state_type x = {{ 10.0 , 10.0 , 10.0 }};
- std::copy_if( make_adaptive_time_iterator_begin( stepper , lorenz() , x , 0.0 , 1.0 , 0.01 ) ,
- make_adaptive_time_iterator_end( stepper , lorenz() , x ) ,
- std::back_inserter( res ) ,
- []( const pair< state_type& , double > &x ) {
- return ( x.first[0] > 0.0 ) ? true : false; } );
- for( size_t i=0 ; i<res.size() ; ++i )
- cout << res[i].first[0] << tab << res[i].first[1] << tab << res[i].first[2] << "\n";
- }
-
- // std::accumulate
- {
- auto stepper = make_controlled( 1.0e-6 , 1.0e-6 , runge_kutta_cash_karp54< state_type >() );
- state_type x = {{ 10.0 , 10.0 , 10.0 }};
- double res = std::accumulate( make_adaptive_time_iterator_begin( stepper , lorenz() , x , 0.0 , 1.0 , 0.01 ) ,
- make_adaptive_time_iterator_end( stepper , lorenz() , x ) ,
- 0.0 ,
- []( double sum , const pair< state_type& , double > &x ) {
- return sum + x.first[0]; } );
- cout << res << endl;
- }
-
-
- // std::transform
- {
- auto stepper = make_controlled( 1.0e-6 , 1.0e-6 , runge_kutta_cash_karp54< state_type >() );
- state_type x = {{ 10.0 , 10.0 , 10.0 }};
- vector< double > weights;
- std::transform( make_adaptive_time_iterator_begin( stepper , lorenz() , x , 0.0 , 1.0 , 0.01 ) ,
- make_adaptive_time_iterator_end( stepper , lorenz() , x ) ,
- back_inserter( weights ) ,
- []( const pair< state_type& , double > &x ) {
- return sqrt( x.first[0] * x.first[0] + x.first[1] * x.first[1] + x.first[2] * x.first[2] ); } );
- for( size_t i=0 ; i<weights.size() ; ++i )
- cout << weights[i] << "\n";
- }
-
-
-
-
-
-
-
-
-
-
-
-
-
- /*
- * Boost.Range versions of controlled stepper with time iterator
- */
-
-
- // boost::range::for_each
- {
- auto stepper = make_controlled( 1.0e-6 , 1.0e-6 , runge_kutta_cash_karp54< state_type >() );
- state_type x = {{ 10.0 , 10.0 , 10.0 }};
- boost::range::for_each( make_adaptive_time_range( stepper , lorenz() , x , 0.0 , 1.0 , 0.01 ) ,
- []( const std::pair< state_type& , double > &x ) {
- std::cout << x.second << tab << x.first[0] << tab << x.first[1] << tab << x.first[2] << "\n"; } );
- }
-
-
- // boost::range::copy with filtered adaptor (simulating std::copy_if)
- {
- auto stepper = make_controlled( 1.0e-6 , 1.0e-6 , runge_kutta_cash_karp54< state_type >() );
- std::vector< std::pair< state_type , double > > res;
- state_type x = {{ 10.0 , 10.0 , 10.0 }};
- boost::range::copy( make_adaptive_time_range( stepper , lorenz() , x , 0.0 , 1.0 , 0.01 ) |
- boost::adaptors::filtered( [] ( const pair< state_type& , double > &x ) { return ( x.first[0] > 0.0 ); } ) ,
- std::back_inserter( res ) );
- for( size_t i=0 ; i<res.size() ; ++i )
- cout << res[i].first[0] << tab << res[i].first[1] << tab << res[i].first[2] << "\n";
- }
-
- // boost::range::accumulate
- {
- //[adaptive_time_iterator_accumulate_range
- auto stepper = make_controlled( 1.0e-6 , 1.0e-6 , runge_kutta_cash_karp54< state_type >() );
- state_type x = {{ 10.0 , 10.0 , 10.0 }};
- double res = boost::accumulate( make_adaptive_time_range( stepper , lorenz() , x , 0.0 , 1.0 , 0.01 ) , 0.0 ,
- []( double sum , const pair< state_type& , double > &x ) {
- return sum + x.first[0]; } );
- cout << res << endl;
- //]
- }
-
-
- // boost::range::transform
- {
- auto stepper = make_controlled( 1.0e-6 , 1.0e-6 , runge_kutta_cash_karp54< state_type >() );
- state_type x = {{ 10.0 , 10.0 , 10.0 }};
- vector< double > weights;
- boost::transform( make_adaptive_time_range( stepper , lorenz() , x , 0.0 , 1.0 , 0.01 ) , back_inserter( weights ) ,
- []( const pair< state_type& , double > &x ) {
- return sqrt( x.first[0] * x.first[0] + x.first[1] * x.first[1] + x.first[2] * x.first[2] ); } );
- for( size_t i=0 ; i<weights.size() ; ++i )
- cout << weights[i] << "\n";
- }
-
-
- // boost::range::find with time iterator
- {
- auto stepper = make_controlled( 1.0e-6 , 1.0e-6 , runge_kutta_cash_karp54< state_type >() );
- state_type x = {{ 10.0 , 10.0 , 10.0 }};
- auto iter = boost::find_if( make_adaptive_time_range( stepper , lorenz() , x , 0.0 , 1.0 , 0.01 ) ,
- []( const std::pair< state_type & , double > &x ) {
- return ( x.first[0] < 0.0 ); } );
- cout << iter->second << "\t" << iter->first[0] << "\t" << iter->first[1] << "\t" << iter->first[2] << "\n";
- }
-
-
-
-
-
-
-
-
-
-
-
-
- // /*
- // * Boost.Range versions for dense output steppers
- // */
-
- // // boost::range::for_each
- // {
- // runge_kutta_dopri5< state_type > stepper;
- // state_type x = {{ 10.0 , 10.0 , 10.0 }};
- // boost::range::for_each( make_adaptive_range( make_dense_output( 1.0e-6 , 1.0e-6 , stepper ) , lorenz() , x , 0.0 , 1.0 , 0.01 ) ,
- // []( const state_type &x ) {
- // std::cout << x[0] << tab << x[1] << tab << x[2] << "\n"; } );
- // }
-
-
- // // boost::range::for_each with time iterator
- // {
- // runge_kutta_dopri5< state_type > stepper;
- // state_type x = {{ 10.0 , 10.0 , 10.0 }};
- // boost::range::for_each( make_adaptive_time_range( make_dense_output( 1.0e-6 , 1.0e-6 , stepper ) , lorenz() , x , 0.0 , 1.0 , 0.01 ) ,
- // []( const std::pair< state_type& , double > &x ) {
- // std::cout << x.second << tab << x.first[0] << tab << x.first[1] << tab << x.first[2] << "\n"; } );
-
- // }
-
-
-
-
-
- /*
- * Pure iterators for controlled stepper without time iterator
- */
-
- // std::for_each
- {
- auto stepper = make_controlled( 1.0e-6 , 1.0e-6 , runge_kutta_cash_karp54< state_type >() );
- state_type x = {{ 10.0 , 10.0 , 10.0 }};
- std::for_each( make_adaptive_iterator_begin( stepper , lorenz() , x , 0.0 , 1.0 , 0.01 ) ,
- make_adaptive_iterator_end( stepper , lorenz() , x ) ,
- []( const state_type& x ) {
- std::cout << x[0] << tab << x[1] << tab << x[2] << "\n"; } );
- }
-
- // std::copy_if
- {
- std::vector< state_type > res;
- auto stepper = make_controlled( 1.0e-6 , 1.0e-6 , runge_kutta_cash_karp54< state_type >() );
- state_type x = {{ 10.0 , 10.0 , 10.0 }};
- std::copy_if( make_adaptive_iterator_begin( stepper , lorenz() , x , 0.0 , 1.0 , 0.01 ) ,
- make_adaptive_iterator_end( stepper , lorenz() , x ) ,
- std::back_inserter( res ) ,
- []( const state_type& x ) {
- return ( x[0] > 0.0 ) ? true : false; } );
- for( size_t i=0 ; i<res.size() ; ++i )
- cout << res[i][0] << tab << res[i][1] << tab << res[i][2] << "\n";
- }
-
- // std::accumulate
- {
- auto stepper = make_controlled( 1.0e-6 , 1.0e-6 , runge_kutta_cash_karp54< state_type >() );
- state_type x = {{ 10.0 , 10.0 , 10.0 }};
- double res = std::accumulate( make_adaptive_iterator_begin( stepper , lorenz() , x , 0.0 , 1.0 , 0.01 ) ,
- make_adaptive_iterator_end( stepper , lorenz() , x ) ,
- 0.0 ,
- []( double sum , const state_type& x ) {
- return sum + x[0]; } );
- cout << res << endl;
- }
-
-
- // std::transform
- {
- auto stepper = make_controlled( 1.0e-6 , 1.0e-6 , runge_kutta_cash_karp54< state_type >() );
- state_type x = {{ 10.0 , 10.0 , 10.0 }};
- vector< double > weights;
- std::transform( make_adaptive_iterator_begin( stepper , lorenz() , x , 0.0 , 1.0 , 0.01 ) ,
- make_adaptive_iterator_end( stepper , lorenz() , x ) ,
- back_inserter( weights ) ,
- []( const state_type& x ) {
- return sqrt( x[0] * x[0] + x[1] * x[1] + x[2] * x[2] ); } );
- for( size_t i=0 ; i<weights.size() ; ++i )
- cout << weights[i] << "\n";
- }
-
-
-
-
-
-
-
-
-
-
- /*
- * Boost.Range versions of controlled stepper WITHOUT time iterator
- */
-
-
- // boost::range::for_each
- {
- auto stepper = make_controlled( 1.0e-6 , 1.0e-6 , runge_kutta_cash_karp54< state_type >() );
- state_type x = {{ 10.0 , 10.0 , 10.0 }};
- boost::range::for_each( make_adaptive_range( stepper , lorenz() , x , 0.0 , 1.0 , 0.01 ) ,
- []( const state_type &x ) {
- std::cout << x[0] << tab << x[1] << tab << x[2] << "\n"; } );
- }
-
-
- // boost::range::copy with filtered adaptor (simulating std::copy_if)
- {
- auto stepper = make_controlled( 1.0e-6 , 1.0e-6 , runge_kutta_cash_karp54< state_type >() );
- std::vector< state_type > res;
- state_type x = {{ 10.0 , 10.0 , 10.0 }};
- boost::range::copy( make_adaptive_range( stepper , lorenz() , x , 0.0 , 1.0 , 0.01 ) |
- boost::adaptors::filtered( [] ( const state_type& x ) { return ( x[0] > 0.0 ); } ) ,
- std::back_inserter( res ) );
- for( size_t i=0 ; i<res.size() ; ++i )
- cout << res[i][0] << tab << res[i][1] << tab << res[i][2] << "\n";
- }
-
- // boost::range::accumulate
- {
- //[adaptive_iterator_accumulate_range
- auto stepper = make_controlled( 1.0e-6 , 1.0e-6 , runge_kutta_cash_karp54< state_type >() );
- state_type x = {{ 10.0 , 10.0 , 10.0 }};
- double res = boost::accumulate( make_adaptive_range( stepper , lorenz() , x , 0.0 , 1.0 , 0.01 ) , 0.0 ,
- []( double sum , const state_type& x ) {
- return sum + x[0]; } );
- cout << res << endl;
- //]
- }
-
-
- // boost::range::transform
- {
- auto stepper = make_controlled( 1.0e-6 , 1.0e-6 , runge_kutta_cash_karp54< state_type >() );
- state_type x = {{ 10.0 , 10.0 , 10.0 }};
- vector< double > weights;
- boost::transform( make_adaptive_range( stepper , lorenz() , x , 0.0 , 1.0 , 0.01 ) , back_inserter( weights ) ,
- []( const state_type& x ) {
- return sqrt( x[0] * x[0] + x[1] * x[1] + x[2] * x[2] ); } );
- for( size_t i=0 ; i<weights.size() ; ++i )
- cout << weights[i] << "\n";
- }
-
-
- // boost::range::find
- {
- auto stepper = make_controlled( 1.0e-6 , 1.0e-6 , runge_kutta_cash_karp54< state_type >() );
- state_type x = {{ 10.0 , 10.0 , 10.0 }};
- auto iter = boost::find_if( make_adaptive_range( stepper , lorenz() , x , 0.0 , 1.0 , 0.01 ) ,
- []( const state_type &x ) {
- return ( x[0] < 0.0 ); } );
- cout << (*iter)[0] << "\t" << (*iter)[1] << "\t" << (*iter)[2] << "\n";
- }
-
-
-
-
-
- return 0;
-}

Deleted: trunk/libs/numeric/odeint/examples/const_step_iterator.cpp
==============================================================================
--- trunk/libs/numeric/odeint/examples/const_step_iterator.cpp 2012-12-07 07:26:55 EST (Fri, 07 Dec 2012)
+++ (empty file)
@@ -1,294 +0,0 @@
-/*
- * const_step_iterator.cpp
- *
- * Copyright 2009-2012 Karsten Ahnert
- * Copyright 2009-2012 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)
- */
-
-
-#include <iostream>
-#include <iterator>
-#include <utility>
-#include <algorithm>
-#include <array>
-#include <cassert>
-
-#include <boost/range/algorithm.hpp>
-#include <boost/range/adaptor/filtered.hpp>
-#include <boost/range/numeric.hpp>
-
-#include <boost/numeric/odeint/stepper/runge_kutta4.hpp>
-#include <boost/numeric/odeint/stepper/runge_kutta_dopri5.hpp>
-#include <boost/numeric/odeint/stepper/generation.hpp>
-#include <boost/numeric/odeint/iterator/const_step_iterator.hpp>
-#include <boost/numeric/odeint/iterator/const_step_time_iterator.hpp>
-
-#define tab "\t"
-
-using namespace std;
-using namespace boost::numeric::odeint;
-
-const double sigma = 10.0;
-const double R = 28.0;
-const double b = 8.0 / 3.0;
-
-struct lorenz
-{
- template< class State , class Deriv >
- void operator()( const State &x , Deriv &dxdt , double t ) const
- {
- dxdt[0] = sigma * ( x[1] - x[0] );
- dxdt[1] = R * x[0] - x[1] - x[0] * x[2];
- dxdt[2] = -b * x[2] + x[0] * x[1];
- }
-};
-
-
-
-int main( int argc , char **argv )
-{
- typedef std::array< double , 3 > state_type;
-
- // std::for_each
- {
- runge_kutta4< state_type > stepper;
- state_type x = {{ 10.0 , 10.0 , 10.0 }};
- std::for_each( make_const_step_time_iterator_begin( stepper , lorenz() , x , 0.0 , 1.0 , 0.01 ) ,
- make_const_step_time_iterator_end( stepper , lorenz() , x ) ,
- []( const std::pair< state_type&, double > &x ) {
- std::cout << x.second << tab << x.first[0] << tab << x.first[1] << tab << x.first[2] << "\n"; } );
- }
-
- // std::copy_if
- {
- std::vector< state_type > res;
- runge_kutta4< state_type > stepper;
- state_type x = {{ 10.0 , 10.0 , 10.0 }};
- std::copy_if( make_const_step_iterator_begin( stepper , lorenz() , x , 0.0 , 1.0 , 0.01 ) ,
- make_const_step_iterator_end( stepper , lorenz() , x ) ,
- std::back_inserter( res ) ,
- []( const state_type& x ) {
- return ( x[0] > 0.0 ) ? true : false; } );
- for( size_t i=0 ; i<res.size() ; ++i )
- cout << res[i][0] << tab << res[i][1] << tab << res[i][2] << "\n";
- }
-
- // std::accumulate
- {
- //[ const_step_iterator_accumulate
- runge_kutta4< state_type > stepper;
- state_type x = {{ 10.0 , 10.0 , 10.0 }};
- double res = std::accumulate( make_const_step_iterator_begin( stepper , lorenz() , x , 0.0 , 1.0 , 0.01 ) ,
- make_const_step_iterator_end( stepper , lorenz() , x ) ,
- 0.0 ,
- []( double sum , const state_type &x ) {
- return sum + x[0]; } );
- cout << res << endl;
- //]
- }
-
-
- // std::transform
- {
- runge_kutta4< state_type > stepper;
- state_type x = {{ 10.0 , 10.0 , 10.0 }};
- vector< double > weights;
- std::transform( make_const_step_iterator_begin( stepper , lorenz() , x , 0.0 , 1.0 , 0.01 ) ,
- make_const_step_iterator_end( stepper , lorenz() , x ) ,
- back_inserter( weights ) ,
- []( const state_type &x ) {
- return sqrt( x[0] * x[0] + x[1] * x[1] + x[2] * x[2] ); } );
- for( size_t i=0 ; i<weights.size() ; ++i )
- cout << weights[i] << "\n";
- }
-
-
-
- // std::transform with time_iterator
- {
- runge_kutta4< state_type > stepper;
- state_type x = {{ 10.0 , 10.0 , 10.0 }};
- vector< double > weights;
- std::transform( make_const_step_time_iterator_begin( stepper , lorenz() , x , 0.0 , 1.0 , 0.01 ) ,
- make_const_step_time_iterator_end( stepper , lorenz() , x ) ,
- back_inserter( weights ) ,
- []( const std::pair< state_type &, double > &x ) {
- return sqrt( x.first[0] * x.first[0] + x.first[1] * x.first[1] + x.first[2] * x.first[2] ); } );
- for( size_t i=0 ; i<weights.size() ; ++i )
- cout << weights[i] << "\n";
- }
-
-
-
-
-
-
-
-
-
-
- // /*
- // * Boost.Range versions
- // */
-
-
- // boost::range::for_each
- {
- runge_kutta4< state_type > stepper;
- state_type x = {{ 10.0 , 10.0 , 10.0 }};
- boost::range::for_each( make_const_step_range( stepper , lorenz() , x , 0.0 , 1.0 , 0.01 ) ,
- []( const state_type &x ) {
- std::cout << x[0] << tab << x[1] << tab << x[2] << "\n"; } );
- }
-
- // boost::range::for_each with time iterator
- {
- runge_kutta4< state_type > stepper;
- state_type x = {{ 10.0 , 10.0 , 10.0 }};
- boost::range::for_each( make_const_step_time_range( stepper , lorenz() , x , 0.0 , 1.0 , 0.01 ) ,
- []( const std::pair< state_type& , double > &x ) {
- std::cout << x.second << tab << x.first[0] << tab << x.first[1] << tab << x.first[2] << "\n"; } );
- }
-
-
- // boost::range::copy with filtered adaptor (simulating std::copy_if)
- {
- std::vector< state_type > res;
- runge_kutta4< state_type > stepper;
- state_type x = {{ 10.0 , 10.0 , 10.0 }};
- boost::range::copy( make_const_step_range( stepper , lorenz() , x , 0.0 , 1.0 , 0.01 ) |
- boost::adaptors::filtered( [] ( const state_type &x ) { return ( x[0] > 0.0 ); } ) ,
- std::back_inserter( res ) );
- for( size_t i=0 ; i<res.size() ; ++i )
- cout << res[i][0] << tab << res[i][1] << tab << res[i][2] << "\n";
- }
-
- // boost::range::accumulate
- {
- //[const_step_iterator_accumulate_range
- runge_kutta4< state_type > stepper;
- state_type x = {{ 10.0 , 10.0 , 10.0 }};
- double res = boost::accumulate( make_const_step_range( stepper , lorenz() , x , 0.0 , 1.0 , 0.01 ) , 0.0 ,
- []( double sum , const state_type &x ) {
- return sum + x[0]; } );
- cout << res << endl;
- //]
- }
-
- // boost::range::accumulate with time iterator
- {
- //[const_step_time_iterator_accumulate_range
- runge_kutta4< state_type > stepper;
- state_type x = {{ 10.0 , 10.0 , 10.0 }};
- double res = boost::accumulate( make_const_step_time_range( stepper , lorenz() , x , 0.0 , 1.0 , 0.01 ) , 0.0 ,
- []( double sum , const std::pair< state_type &, double > &x ) {
- return sum + x.first[0]; } );
- cout << res << endl;
- //]
- }
-
-
- // boost::range::transform
- {
- runge_kutta4< state_type > stepper;
- state_type x = {{ 10.0 , 10.0 , 10.0 }};
- vector< double > weights;
- boost::transform( make_const_step_range( stepper , lorenz() , x , 0.0 , 1.0 , 0.01 ) , back_inserter( weights ) ,
- []( const state_type &x ) {
- return sqrt( x[0] * x[0] + x[1] * x[1] + x[2] * x[2] ); } );
- for( size_t i=0 ; i<weights.size() ; ++i )
- cout << weights[i] << "\n";
- }
-
-
- // boost::range::find with time iterator
- {
- runge_kutta4< state_type > stepper;
- state_type x = {{ 10.0 , 10.0 , 10.0 }};
- auto iter = boost::find_if( make_const_step_time_range( stepper , lorenz() , x , 0.0 , 1.0 , 0.01 ) ,
- []( const std::pair< state_type & , double > &x ) {
- return ( x.first[0] < 0.0 ); } );
- cout << iter->second << "\t" << iter->first[0] << "\t" << iter->first[1] << "\t" << iter->first[2] << "\n";
-
- }
-
-
-
-
-
-
-
-
-
-
-
-
- /*
- * Boost.Range versions for dense output steppers
- */
-
- // boost::range::for_each
- {
- runge_kutta_dopri5< state_type > stepper;
- state_type x = {{ 10.0 , 10.0 , 10.0 }};
- boost::range::for_each( make_const_step_range( make_dense_output( 1.0e-6 , 1.0e-6 , stepper ) , lorenz() , x , 0.0 , 1.0 , 0.01 ) ,
- []( const state_type &x ) {
- std::cout << x[0] << tab << x[1] << tab << x[2] << "\n"; } );
- }
-
-
- // boost::range::for_each with time iterator
- {
- runge_kutta_dopri5< state_type > stepper;
- state_type x = {{ 10.0 , 10.0 , 10.0 }};
- boost::range::for_each( make_const_step_time_range( make_dense_output( 1.0e-6 , 1.0e-6 , stepper ) , lorenz() , x , 0.0 , 1.0 , 0.01 ) ,
- []( const std::pair< state_type& , double > &x ) {
- std::cout << x.second << tab << x.first[0] << tab << x.first[1] << tab << x.first[2] << "\n"; } );
-
- }
-
-
-
-
-
- /*
- * Pure iterators
- */
- {
- runge_kutta4< state_type > stepper;
- state_type x = {{ 10.0 , 10.0 , 10.0 }};
- auto first = make_const_step_iterator_begin( stepper , lorenz() , x , 0.0 , 1.0 , 0.01 );
- auto last = make_const_step_iterator_end( stepper , lorenz() , x );
- while( first != last )
- {
- assert( last != first );
- cout << (*first)[0] << tab << (*first)[1] << tab << (*first)[2] << "\n";
- ++first;
- }
- }
-
- {
- runge_kutta4< state_type > stepper;
- state_type x = {{ 10.0 , 10.0 , 10.0 }};
- auto first = make_const_step_time_iterator_begin( stepper , lorenz() , x , 0.0 , 1.0 , 0.01 );
- auto last = make_const_step_time_iterator_end( stepper , lorenz() , x );
- while( first != last )
- {
- assert( last != first );
- cout << first->second << tab << first->first[0] << tab << first->first[1] << tab << first->first[2] << "\n";
- ++first;
- }
- }
-
-
-
-
-
-
-
- return 0;
-}

Modified: trunk/libs/numeric/odeint/examples/harmonic_oscillator.cpp
==============================================================================
--- trunk/libs/numeric/odeint/examples/harmonic_oscillator.cpp (original)
+++ trunk/libs/numeric/odeint/examples/harmonic_oscillator.cpp 2012-12-07 07:26:55 EST (Fri, 07 Dec 2012)
@@ -194,10 +194,4 @@
     #endif
 
 
- //[harm_iterator_const_step
- std::for_each( make_adaptive_iterator_begin( controlled_stepper , harmonic_oscillator , x , 0.0 , 10.0 , 0.01 ) ,
- make_adaptive_iterator_end( controlled_stepper , harmonic_oscillator , x ) ,
- write_state() );
- //]
-
 }

Modified: trunk/libs/numeric/odeint/performance/Jamfile.v2
==============================================================================
--- trunk/libs/numeric/odeint/performance/Jamfile.v2 (original)
+++ trunk/libs/numeric/odeint/performance/Jamfile.v2 2012-12-07 07:26:55 EST (Fri, 07 Dec 2012)
@@ -69,7 +69,3 @@
     ;
 
 
-exe const_step_iterator
- : const_step_iterator.cpp
- : <cxxflags>-std=c++0x
- ;
\ No newline at end of file

Deleted: trunk/libs/numeric/odeint/performance/const_step_iterator.cpp
==============================================================================
--- trunk/libs/numeric/odeint/performance/const_step_iterator.cpp 2012-12-07 07:26:55 EST (Fri, 07 Dec 2012)
+++ (empty file)
@@ -1,164 +0,0 @@
-/*
- * odeint_rk4_lorenz.cpp
- *
- * Copyright 2009-2012 Karsten Ahnert
- * Copyright 2009-2012 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)
- */
-
-#include <algorithm>
-#include <array>
-
-#include <boost/range/algorithm.hpp>
-#include <boost/range/adaptor/filtered.hpp>
-#include <boost/range/numeric.hpp>
-#include <boost/timer.hpp>
-
-#include <boost/numeric/odeint/stepper/runge_kutta4.hpp>
-#include <boost/numeric/odeint/stepper/runge_kutta_dopri5.hpp>
-#include <boost/numeric/odeint/stepper/generation.hpp>
-#include <boost/numeric/odeint/iterator/const_step_iterator.hpp>
-#include <boost/numeric/odeint/iterator/const_step_time_iterator.hpp>
-#include <boost/numeric/odeint/integrate/integrate_const.hpp>
-
-using namespace std;
-using namespace boost::numeric::odeint;
-
-typedef std::array< double , 3 > state_type;
-typedef std::vector< double > state_type2;
-
-std::ostream& operator<<( std::ostream &out , const state_type &x )
-{
- out << x[0] << "\t" << x[1] << "\t" << x[2];
- return out;
-}
-
-std::ostream& operator<<( std::ostream &out , const state_type2 &x )
-{
- if( !x.empty() ) out << x[0];
- for( size_t i=1 ; i<x.size() ; ++i ) out << "\t" << x[i];
- return out;
-}
-
-
-const double sigma = 10.0;
-const double R = 28.0;
-const double b = 8.0 / 3.0;
-
-struct lorenz
-{
- template< class State , class Deriv >
- void operator()( const State &x , Deriv &dxdt , double t ) const
- {
- dxdt[0] = sigma * ( x[1] - x[0] );
- dxdt[1] = R * x[0] - x[1] - x[0] * x[2];
- dxdt[2] = -b * x[2] + x[0] * x[1];
- }
-};
-
-boost::timer timer;
-
-void test1_iterator( double t_end = 1000000.0 , double dt = 0.01 )
-{
- cout << "Test 1 Iterator with array : ";
- timer.restart();
-
- runge_kutta4< state_type > stepper;
- state_type x = {{ 10.0 , 10.0 , 10.0 }};
- auto first = make_const_step_iterator_begin( stepper , lorenz() , x , 0.0 , t_end , dt );
- auto last = make_const_step_iterator_end( stepper , lorenz() , x );
- for( ; first != last ; )
- ++first;
-
- cout << "\t" << x << " elapsed time : " << timer.elapsed() << " s" << endl;
-}
-
-void test1_time_iterator( double t_end = 1000000.0 , double dt = 0.01 )
-{
- cout << "Test 1 Time iterator with array : ";
- timer.restart();
-
- runge_kutta4< state_type > stepper;
- state_type x = {{ 10.0 , 10.0 , 10.0 }};
- auto first = make_const_step_time_iterator_begin( stepper , lorenz() , x , 0.0 , t_end , dt );
- auto last = make_const_step_time_iterator_end( stepper , lorenz() , x );
- for( ; first != last ; )
- ++first;
-
- cout << "\t" << x << " elapsed time : " << timer.elapsed() << " s" << endl;
-}
-
-void test1_integrate( double t_end = 1000000.0 , double dt = 0.01 )
-{
- cout << "Test 1 Integrate with array : ";
- timer.restart();
-
- runge_kutta4< state_type > stepper;
- state_type x = {{ 10.0 , 10.0 , 10.0 }};
- integrate_const( stepper , lorenz() , x , 0.0 , t_end , dt );
-
- cout << "\t" << x << " elapsed time : " << timer.elapsed() << " s" << endl;
-}
-
-
-
-
-void test2_iterator( double t_end = 1000000.0 , double dt = 0.01 )
-{
- cout << "Test 2 Iterator with vector : ";
- timer.restart();
-
- runge_kutta4< state_type2 > stepper;
- state_type2 x = { 10.0 , 10.0 , 10.0 };
- auto first = make_const_step_iterator_begin( stepper , lorenz() , x , 0.0 , t_end , dt );
- auto last = make_const_step_iterator_end( stepper , lorenz() , x );
- for( ; first != last ; )
- ++first;
-
- cout << "\t" << x << " elapsed time : " << timer.elapsed() << " s" << endl;
-}
-
-void test2_time_iterator( double t_end = 1000000.0 , double dt = 0.01 )
-{
- cout << "Test 2 Time iterator with vector : ";
- timer.restart();
-
- runge_kutta4< state_type2 > stepper;
- state_type2 x = { 10.0 , 10.0 , 10.0 };
- auto first = make_const_step_time_iterator_begin( stepper , lorenz() , x , 0.0 , t_end , dt );
- auto last = make_const_step_time_iterator_end( stepper , lorenz() , x );
- for( ; first != last ; )
- ++first;
-
- cout << "\t" << x << " elapsed time : " << timer.elapsed() << " s" << endl;
-}
-
-void test2_integrate( double t_end = 1000000.0 , double dt = 0.01 )
-{
- cout << "Test 2 Integrate with vector : ";
- timer.restart();
- runge_kutta4< state_type2 > stepper;
- state_type2 x = { 10.0 , 10.0 , 10.0 };
- integrate_const( stepper , lorenz() , x , 0.0 , t_end , dt );
- cout << "\t" << x << " elapsed time : " << timer.elapsed() << " s" << endl;
-}
-
-
-
-int main( int argc , char **argv )
-{
- test1_iterator( 1000000.0 );
- test1_time_iterator( 1000000.0 );
- test1_integrate( 1000000.0 );
-
- test2_iterator( 1000000.0 );
- test2_time_iterator( 1000000.0 );
- test2_integrate( 1000000.0 );
-
-
-
- return 0;
-}

Modified: trunk/libs/numeric/odeint/test/Jamfile.v2
==============================================================================
--- trunk/libs/numeric/odeint/test/Jamfile.v2 (original)
+++ trunk/libs/numeric/odeint/test/Jamfile.v2 2012-12-07 07:26:55 EST (Fri, 07 Dec 2012)
@@ -47,14 +47,9 @@
     [ run integrate_implicit.cpp ]
     [ run generation.cpp ]
     [ run trivial_state.cpp ]
- [ run const_step_iterator.cpp ]
- [ run const_step_time_iterator.cpp ]
- [ run adaptive_iterator.cpp ]
- [ run adaptive_time_iterator.cpp ]
     [ run is_resizeable.cpp ]
     [ run resize.cpp ]
     [ run same_size.cpp ]
     [ run symplectic_steppers.cpp ]
- # [ run custom_controller.cpp ]
     : <testing.launcher>valgrind
     ;

Deleted: trunk/libs/numeric/odeint/test/adaptive_iterator.cpp
==============================================================================
--- trunk/libs/numeric/odeint/test/adaptive_iterator.cpp 2012-12-07 07:26:55 EST (Fri, 07 Dec 2012)
+++ (empty file)
@@ -1,116 +0,0 @@
-/*
- [auto_generated]
- libs/numeric/odeint/test/adaptive_iterator.cpp
-
- [begin_description]
- This file tests the adaptive iterators.
- [end_description]
-
- Copyright 2009-2012 Karsten Ahnert
- Copyright 2009-2012 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)
- */
-
-
-#define BOOST_TEST_MODULE odeint_adaptive_iterator
-
-#include <iterator>
-#include <algorithm>
-#include <vector>
-
-#include <boost/numeric/odeint/config.hpp>
-#include <boost/array.hpp>
-#include <boost/range/algorithm/copy.hpp>
-#include <boost/mpl/vector.hpp>
-
-#include <boost/test/unit_test.hpp>
-#include <boost/test/floating_point_comparison.hpp>
-
-#include <boost/numeric/odeint/iterator/adaptive_iterator.hpp>
-#include "dummy_steppers.hpp"
-
-namespace mpl = boost::mpl;
-using namespace boost::numeric::odeint;
-
-struct dummy_system { };
-
-typedef dummy_stepper::state_type state_type;
-typedef dummy_stepper::value_type value_type;
-
-BOOST_AUTO_TEST_SUITE( adaptive_iterator_test )
-
-typedef mpl::vector<
- dummy_controlled_stepper
- , dummy_dense_output_stepper
- > dummy_steppers;
-
-
-BOOST_AUTO_TEST_CASE_TEMPLATE( transitivity1 , Stepper , dummy_steppers )
-{
- typedef adaptive_iterator< Stepper , dummy_system > stepper_iterator;
-
- state_type x = {{ 1.0 }};
- stepper_iterator first1( Stepper() , dummy_system() , x , 2.5 , 2.0 , 0.1 );
- stepper_iterator last1( Stepper() , dummy_system() , x );
- stepper_iterator last2( Stepper() , dummy_system() , x );
-
- BOOST_CHECK( first1 == last1 );
- BOOST_CHECK( first1 == last2 );
- BOOST_CHECK( last1 == last2 );
-}
-
-
-
-BOOST_AUTO_TEST_CASE_TEMPLATE( copy_algorithm , Stepper , dummy_steppers )
-{
- typedef adaptive_iterator< Stepper , dummy_system > stepper_iterator;
- state_type x = {{ 1.0 }};
- std::vector< state_type > res;
- stepper_iterator first( Stepper() , dummy_system() , x , 0.0 , 0.35 , 0.1 );
- stepper_iterator last( Stepper() , dummy_system() , x );
-
- std::copy( first , last , std::back_insert_iterator< std::vector< state_type > >( res ) );
-
- BOOST_CHECK_EQUAL( res.size() , size_t( 4 ) );
- BOOST_CHECK_CLOSE( res[0][0] , 1.0 , 1.0e-14 );
- BOOST_CHECK_CLOSE( res[1][0] , 1.25 , 1.0e-14 );
- BOOST_CHECK_CLOSE( res[2][0] , 1.5 , 1.0e-14 );
- BOOST_CHECK_CLOSE( res[3][0] , 1.75 , 1.0e-14 );
-}
-
-BOOST_AUTO_TEST_CASE_TEMPLATE( copy_algorithm_with_factory , Stepper , dummy_steppers )
-{
- state_type x = {{ 1.0 }};
- std::vector< state_type > res;
- std::copy( make_adaptive_iterator_begin( Stepper() , dummy_system() , x , 0.0 , 0.35 , 0.1 ) ,
- make_adaptive_iterator_end( Stepper() , dummy_system() , x ) ,
- std::back_insert_iterator< std::vector< state_type > >( res ) );
-
- BOOST_CHECK_EQUAL( res.size() , size_t( 4 ) );
- BOOST_CHECK_CLOSE( res[0][0] , 1.0 , 1.0e-14 );
- BOOST_CHECK_CLOSE( res[1][0] , 1.25 , 1.0e-14 );
- BOOST_CHECK_CLOSE( res[2][0] , 1.5 , 1.0e-14 );
- BOOST_CHECK_CLOSE( res[3][0] , 1.75 , 1.0e-14 );
-}
-
-BOOST_AUTO_TEST_CASE_TEMPLATE( copy_algorithm_with_range_factory , Stepper , dummy_steppers )
-{
- state_type x = {{ 1.0 }};
- std::vector< state_type > res;
- boost::range::copy( make_adaptive_range( Stepper() , dummy_system() , x , 0.0 , 0.35 , 0.1 ) ,
- std::back_insert_iterator< std::vector< state_type > >( res ) );
-
- BOOST_CHECK_EQUAL( res.size() , size_t( 4 ) );
- BOOST_CHECK_CLOSE( res[0][0] , 1.0 , 1.0e-14 );
- BOOST_CHECK_CLOSE( res[1][0] , 1.25 , 1.0e-14 );
- BOOST_CHECK_CLOSE( res[2][0] , 1.5 , 1.0e-14 );
- BOOST_CHECK_CLOSE( res[3][0] , 1.75 , 1.0e-14 );
-}
-
-
-
-
-BOOST_AUTO_TEST_SUITE_END()

Deleted: trunk/libs/numeric/odeint/test/adaptive_time_iterator.cpp
==============================================================================
--- trunk/libs/numeric/odeint/test/adaptive_time_iterator.cpp 2012-12-07 07:26:55 EST (Fri, 07 Dec 2012)
+++ (empty file)
@@ -1,136 +0,0 @@
-/*
- [auto_generated]
- libs/numeric/odeint/test/adaptive_time_iterator.cpp
-
- [begin_description]
- This file tests the adaptive time iterator.
- [end_description]
-
- Copyright 2009-2012 Karsten Ahnert
- Copyright 2009-2012 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)
- */
-
-
-#define BOOST_TEST_MODULE odeint_adaptive_time_iterator
-
-#include <iterator>
-#include <algorithm>
-#include <vector>
-
-#include <boost/numeric/odeint/config.hpp>
-#include <boost/array.hpp>
-#include <boost/range/algorithm/copy.hpp>
-#include <boost/mpl/vector.hpp>
-
-#include <boost/test/unit_test.hpp>
-#include <boost/test/floating_point_comparison.hpp>
-
-#include <boost/numeric/odeint/iterator/adaptive_time_iterator.hpp>
-#include "dummy_steppers.hpp"
-
-namespace mpl = boost::mpl;
-using namespace boost::numeric::odeint;
-
-struct dummy_system { };
-
-typedef dummy_stepper::state_type state_type;
-typedef dummy_stepper::value_type value_type;
-typedef dummy_stepper::time_type time_type;
-typedef std::vector< std::pair< state_type , time_type > > result_vector;
-
-BOOST_AUTO_TEST_SUITE( adaptive_time_iterator_test )
-
-typedef mpl::vector<
-// dummy_controlled_stepper
- dummy_dense_output_stepper
- > dummy_steppers;
-
-
-BOOST_AUTO_TEST_CASE_TEMPLATE( transitivity1 , Stepper , dummy_steppers )
-{
- typedef adaptive_time_iterator< Stepper , dummy_system > stepper_iterator;
-
- state_type x = {{ 1.0 }};
- stepper_iterator first1( Stepper() , dummy_system() , x , 1.5 , 1.0 , 0.1 );
- stepper_iterator last1( Stepper() , dummy_system() , x );
- stepper_iterator last2( Stepper() , dummy_system() , x );
-
- BOOST_CHECK( first1 == last1 );
- BOOST_CHECK( first1 == last2 );
- BOOST_CHECK( last1 == last2 );
-}
-
-
-
-BOOST_AUTO_TEST_CASE_TEMPLATE( copy_algorithm , Stepper , dummy_steppers )
-{
- typedef adaptive_time_iterator< Stepper , dummy_system > stepper_iterator;
- state_type x = {{ 1.0 }};
- result_vector res;
- stepper_iterator first( Stepper() , dummy_system() , x , 0.0 , 0.35 , 0.1 );
- stepper_iterator last( Stepper() , dummy_system() , x );
-
- std::copy( first , last , std::back_insert_iterator< result_vector >( res ) );
-
- BOOST_CHECK_EQUAL( res.size() , size_t( 4 ) );
- BOOST_CHECK_CLOSE( res[0].first[0] , 1.0 , 1.0e-13 );
- BOOST_CHECK_CLOSE( res[0].second , 0.0 , 1.0e-13 );
- BOOST_CHECK_CLOSE( res[1].first[0] , 1.25 , 1.0e-13 );
- BOOST_CHECK_CLOSE( res[1].second , 0.1 , 1.0e-13 );
- BOOST_CHECK_CLOSE( res[2].first[0] , 1.5 , 1.0e-13 );
- BOOST_CHECK_CLOSE( res[2].second , 0.2 , 1.0e-13 );
- BOOST_CHECK_CLOSE( res[3].first[0] , 1.75 , 1.0e-13 );
- BOOST_CHECK_CLOSE( res[3].second , 0.3 , 1.0e-13 );
-
- BOOST_CHECK_CLOSE( x[0] , 2.0 , 1.0e-14 );
-}
-
-// BOOST_AUTO_TEST_CASE_TEMPLATE( copy_algorithm_with_factory , Stepper , dummy_steppers )
-// {
-// state_type x = {{ 1.0 }};
-// result_vector res;
-// std::copy( make_adaptive_time_iterator_begin( Stepper() , dummy_system() , x , 0.0 , 0.35 , 0.1 ) ,
-// make_adaptive_time_iterator_end( Stepper() , dummy_system() , x ) ,
-// std::back_insert_iterator< result_vector >( res ) );
-
-// BOOST_CHECK_EQUAL( res.size() , size_t( 4 ) );
-// BOOST_CHECK_CLOSE( res[0].first[0] , 1.0 , 1.0e-13 );
-// BOOST_CHECK_CLOSE( res[0].second , 0.0 , 1.0e-13 );
-// BOOST_CHECK_CLOSE( res[1].first[0] , 1.25 , 1.0e-13 );
-// BOOST_CHECK_CLOSE( res[1].second , 0.1 , 1.0e-13 );
-// BOOST_CHECK_CLOSE( res[2].first[0] , 1.5 , 1.0e-13 );
-// BOOST_CHECK_CLOSE( res[2].second , 0.2 , 1.0e-13 );
-// BOOST_CHECK_CLOSE( res[3].first[0] , 1.75 , 1.0e-13 );
-// BOOST_CHECK_CLOSE( res[3].second , 0.3 , 1.0e-13 );
-
-// BOOST_CHECK_CLOSE( x[0] , 2.0 , 1.0e-14 );
-// }
-
-// BOOST_AUTO_TEST_CASE_TEMPLATE( copy_algorithm_with_range_factory , Stepper , dummy_steppers )
-// {
-// state_type x = {{ 1.0 }};
-// result_vector res;
-// boost::range::copy( make_adaptive_time_range( Stepper() , dummy_system() , x , 0.0 , 0.35 , 0.1 ) ,
-// std::back_insert_iterator< result_vector >( res ) );
-
-// BOOST_CHECK_EQUAL( res.size() , size_t( 4 ) );
-// BOOST_CHECK_CLOSE( res[0].first[0] , 1.0 , 1.0e-13 );
-// BOOST_CHECK_CLOSE( res[0].second , 0.0 , 1.0e-13 );
-// BOOST_CHECK_CLOSE( res[1].first[0] , 1.25 , 1.0e-13 );
-// BOOST_CHECK_CLOSE( res[1].second , 0.1 , 1.0e-13 );
-// BOOST_CHECK_CLOSE( res[2].first[0] , 1.5 , 1.0e-13 );
-// BOOST_CHECK_CLOSE( res[2].second , 0.2 , 1.0e-13 );
-// BOOST_CHECK_CLOSE( res[3].first[0] , 1.75 , 1.0e-13 );
-// BOOST_CHECK_CLOSE( res[3].second , 0.3 , 1.0e-13 );
-
-// BOOST_CHECK_CLOSE( x[0] , 2.0 , 1.0e-14 );
-// }
-
-
-
-
-BOOST_AUTO_TEST_SUITE_END()

Deleted: trunk/libs/numeric/odeint/test/const_step_iterator.cpp
==============================================================================
--- trunk/libs/numeric/odeint/test/const_step_iterator.cpp 2012-12-07 07:26:55 EST (Fri, 07 Dec 2012)
+++ (empty file)
@@ -1,141 +0,0 @@
-/*
- [auto_generated]
- libs/numeric/odeint/test/const_step_iterator.cpp
-
- [begin_description]
- This file tests the const step iterator.
- [end_description]
-
- Copyright 2009-2012 Karsten Ahnert
- Copyright 2009-2012 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)
- */
-
-
-#define BOOST_TEST_MODULE odeint_const_step_iterator
-
-#include <iterator>
-#include <algorithm>
-#include <vector>
-
-#include <boost/numeric/odeint/config.hpp>
-#include <boost/array.hpp>
-#include <boost/range/algorithm/copy.hpp>
-#include <boost/mpl/vector.hpp>
-
-#include <boost/test/unit_test.hpp>
-#include <boost/test/floating_point_comparison.hpp>
-
-#include <boost/numeric/odeint/iterator/const_step_iterator.hpp>
-#include "dummy_steppers.hpp"
-
-namespace mpl = boost::mpl;
-using namespace boost::numeric::odeint;
-
-struct dummy_system { };
-
-typedef dummy_stepper::state_type state_type;
-typedef dummy_stepper::value_type value_type;
-
-BOOST_AUTO_TEST_SUITE( const_step_iterator_test )
-
-typedef mpl::vector<
- dummy_stepper
- , dummy_dense_output_stepper
- > dummy_steppers;
-
-
-BOOST_AUTO_TEST_CASE_TEMPLATE( transitivity1 , Stepper , dummy_steppers )
-{
- typedef const_step_iterator< Stepper , dummy_system > stepper_iterator;
-
- state_type x = {{ 1.0 }};
- stepper_iterator first1( Stepper() , dummy_system() , x , 2.5 , 2.0 , 0.1 );
- stepper_iterator last1( Stepper() , dummy_system() , x );
- stepper_iterator last2( Stepper() , dummy_system() , x );
-
- BOOST_CHECK( first1 == last1 );
- BOOST_CHECK( first1 == last2 );
- BOOST_CHECK( last1 == last2 );
-}
-
-
-BOOST_AUTO_TEST_CASE_TEMPLATE( copy_algorithm , Stepper , dummy_steppers )
-{
- typedef const_step_iterator< Stepper , dummy_system > stepper_iterator;
- state_type x = {{ 1.0 }};
- std::vector< state_type > res;
- stepper_iterator first( Stepper() , dummy_system() , x , 0.0 , 0.35 , 0.1 );
- stepper_iterator last( Stepper() , dummy_system() , x );
-
- std::copy( first , last , std::back_insert_iterator< std::vector< state_type > >( res ) );
-
- BOOST_CHECK_EQUAL( res.size() , size_t( 4 ) );
- BOOST_CHECK_CLOSE( res[0][0] , 1.0 , 1.0e-14 );
- BOOST_CHECK_CLOSE( res[1][0] , 1.25 , 1.0e-14 );
- BOOST_CHECK_CLOSE( res[2][0] , 1.5 , 1.0e-14 );
- BOOST_CHECK_CLOSE( res[3][0] , 1.75 , 1.0e-14 );
-
- BOOST_CHECK_CLOSE( x[0] , 2.0 , 1.0e-14 );
-}
-
-BOOST_AUTO_TEST_CASE_TEMPLATE( copy_algorithm_negative_time_step , Stepper , dummy_steppers )
-{
- typedef const_step_iterator< Stepper , dummy_system > stepper_iterator;
- state_type x = {{ 1.0 }};
- std::vector< state_type > res;
- stepper_iterator first( Stepper() , dummy_system() , x , 0.3 , -0.05 , -0.1 );
- stepper_iterator last( Stepper() , dummy_system() , x );
-
- std::copy( first , last , std::back_insert_iterator< std::vector< state_type > >( res ) );
-
- BOOST_CHECK_EQUAL( res.size() , size_t( 4 ) );
- BOOST_CHECK_CLOSE( res[0][0] , 1.0 , 1.0e-14 );
- BOOST_CHECK_CLOSE( res[1][0] , 1.25 , 1.0e-14 );
- BOOST_CHECK_CLOSE( res[2][0] , 1.5 , 1.0e-14 );
- BOOST_CHECK_CLOSE( res[3][0] , 1.75 , 1.0e-14 );
-
- BOOST_CHECK_CLOSE( x[0] , 2.0 , 1.0e-14 );
-}
-
-
-BOOST_AUTO_TEST_CASE_TEMPLATE( copy_algorithm_with_factory , Stepper , dummy_steppers )
-{
- state_type x = {{ 1.0 }};
- std::vector< state_type > res;
- std::copy( make_const_step_iterator_begin( Stepper() , dummy_system() , x , 0.0 , 0.35 , 0.1 ) ,
- make_const_step_iterator_end( Stepper() , dummy_system() , x ) ,
- std::back_insert_iterator< std::vector< state_type > >( res ) );
-
- BOOST_CHECK_EQUAL( res.size() , size_t( 4 ) );
- BOOST_CHECK_CLOSE( res[0][0] , 1.0 , 1.0e-14 );
- BOOST_CHECK_CLOSE( res[1][0] , 1.25 , 1.0e-14 );
- BOOST_CHECK_CLOSE( res[2][0] , 1.5 , 1.0e-14 );
- BOOST_CHECK_CLOSE( res[3][0] , 1.75 , 1.0e-14 );
-
- BOOST_CHECK_CLOSE( x[0] , 2.0 , 1.0e-14 );
-}
-
-BOOST_AUTO_TEST_CASE_TEMPLATE( copy_algorithm_with_range_factory , Stepper , dummy_steppers )
-{
- state_type x = {{ 1.0 }};
- std::vector< state_type > res;
- boost::range::copy( make_const_step_range( Stepper() , dummy_system() , x , 0.0 , 0.35 , 0.1 ) ,
- std::back_insert_iterator< std::vector< state_type > >( res ) );
-
- BOOST_CHECK_EQUAL( res.size() , size_t( 4 ) );
- BOOST_CHECK_CLOSE( res[0][0] , 1.0 , 1.0e-14 );
- BOOST_CHECK_CLOSE( res[1][0] , 1.25 , 1.0e-14 );
- BOOST_CHECK_CLOSE( res[2][0] , 1.5 , 1.0e-14 );
- BOOST_CHECK_CLOSE( res[3][0] , 1.75 , 1.0e-14 );
-
- BOOST_CHECK_CLOSE( x[0] , 2.0 , 1.0e-14 );
-}
-
-
-
-
-BOOST_AUTO_TEST_SUITE_END()

Deleted: trunk/libs/numeric/odeint/test/const_step_time_iterator.cpp
==============================================================================
--- trunk/libs/numeric/odeint/test/const_step_time_iterator.cpp 2012-12-07 07:26:55 EST (Fri, 07 Dec 2012)
+++ (empty file)
@@ -1,133 +0,0 @@
-/*
- [auto_generated]
- libs/numeric/odeint/test/const_step_time_iterator.cpp
-
- [begin_description]
- This file tests the const step time iterator.
- [end_description]
-
- Copyright 2009-2012 Karsten Ahnert
- Copyright 2009-2012 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)
- */
-
-
-#define BOOST_TEST_MODULE odeint_const_step_time_iterator
-
-#include <iterator>
-#include <algorithm>
-#include <vector>
-
-#include <boost/numeric/odeint/config.hpp>
-#include <boost/array.hpp>
-#include <boost/range/algorithm/copy.hpp>
-#include <boost/mpl/vector.hpp>
-
-#include <boost/test/unit_test.hpp>
-#include <boost/test/floating_point_comparison.hpp>
-
-#include <boost/numeric/odeint/iterator/const_step_time_iterator.hpp>
-#include "dummy_steppers.hpp"
-
-namespace mpl = boost::mpl;
-using namespace boost::numeric::odeint;
-
-struct dummy_system { };
-
-typedef dummy_stepper::state_type state_type;
-typedef dummy_stepper::value_type value_type;
-typedef dummy_stepper::time_type time_type;
-typedef std::vector< std::pair< state_type , time_type > > result_vector;
-
-BOOST_AUTO_TEST_SUITE( const_step_time_iterator_test )
-
-typedef mpl::vector<
- dummy_stepper
- , dummy_dense_output_stepper
- > dummy_steppers;
-
-
-BOOST_AUTO_TEST_CASE_TEMPLATE( transitivity1 , Stepper , dummy_steppers )
-{
- typedef const_step_time_iterator< Stepper , dummy_system > stepper_iterator;
-
- state_type x = {{ 1.0 }};
- stepper_iterator first1( Stepper() , dummy_system() , x , 1.5 , 1.0 , 0.1 );
- stepper_iterator last1( Stepper() , dummy_system() , x );
- stepper_iterator last2( Stepper() , dummy_system() , x );
-
- BOOST_CHECK( first1 == last1 );
- BOOST_CHECK( first1 == last2 );
- BOOST_CHECK( last1 == last2 );
-}
-
-
-
-BOOST_AUTO_TEST_CASE_TEMPLATE( copy_algorithm , Stepper , dummy_steppers )
-{
- typedef const_step_time_iterator< Stepper , dummy_system > stepper_iterator;
- state_type x = {{ 1.0 }};
- result_vector res;
- stepper_iterator first( Stepper() , dummy_system() , x , 0.0 , 0.35 , 0.1 );
- stepper_iterator last( Stepper() , dummy_system() , x );
-
- std::copy( first , last , std::back_insert_iterator< result_vector >( res ) );
-
- BOOST_CHECK_EQUAL( res.size() , size_t( 4 ) );
- BOOST_CHECK_CLOSE( res[0].first[0] , 1.0 , 1.0e-13 );
- BOOST_CHECK_CLOSE( res[0].second , 0.0 , 1.0e-13 );
- BOOST_CHECK_CLOSE( res[1].first[0] , 1.25 , 1.0e-13 );
- BOOST_CHECK_CLOSE( res[1].second , 0.1 , 1.0e-13 );
- BOOST_CHECK_CLOSE( res[2].first[0] , 1.5 , 1.0e-13 );
- BOOST_CHECK_CLOSE( res[2].second , 0.2 , 1.0e-13 );
- BOOST_CHECK_CLOSE( res[3].first[0] , 1.75 , 1.0e-13 );
- BOOST_CHECK_CLOSE( res[3].second , 0.3 , 1.0e-13 );
- BOOST_CHECK_CLOSE( x[0] , 2.0 , 1.0e-13 );
-}
-
-BOOST_AUTO_TEST_CASE_TEMPLATE( copy_algorithm_with_factory , Stepper , dummy_steppers )
-{
- state_type x = {{ 1.0 }};
- result_vector res;
- std::copy( make_const_step_time_iterator_begin( Stepper() , dummy_system() , x , 0.0 , 0.35 , 0.1 ) ,
- make_const_step_time_iterator_end( Stepper() , dummy_system() , x ) ,
- std::back_insert_iterator< result_vector >( res ) );
-
- BOOST_CHECK_EQUAL( res.size() , size_t( 4 ) );
- BOOST_CHECK_CLOSE( res[0].first[0] , 1.0 , 1.0e-13 );
- BOOST_CHECK_CLOSE( res[0].second , 0.0 , 1.0e-13 );
- BOOST_CHECK_CLOSE( res[1].first[0] , 1.25 , 1.0e-13 );
- BOOST_CHECK_CLOSE( res[1].second , 0.1 , 1.0e-13 );
- BOOST_CHECK_CLOSE( res[2].first[0] , 1.5 , 1.0e-13 );
- BOOST_CHECK_CLOSE( res[2].second , 0.2 , 1.0e-13 );
- BOOST_CHECK_CLOSE( res[3].first[0] , 1.75 , 1.0e-13 );
- BOOST_CHECK_CLOSE( res[3].second , 0.3 , 1.0e-13 );
- BOOST_CHECK_CLOSE( x[0] , 2.0 , 1.0e-13 );
-}
-
-BOOST_AUTO_TEST_CASE_TEMPLATE( copy_algorithm_with_range_factory , Stepper , dummy_steppers )
-{
- state_type x = {{ 1.0 }};
- result_vector res;
- boost::range::copy( make_const_step_time_range( Stepper() , dummy_system() , x , 0.0 , 0.35 , 0.1 ) ,
- std::back_insert_iterator< result_vector >( res ) );
-
- BOOST_CHECK_EQUAL( res.size() , size_t( 4 ) );
- BOOST_CHECK_CLOSE( res[0].first[0] , 1.0 , 1.0e-13 );
- BOOST_CHECK_CLOSE( res[0].second , 0.0 , 1.0e-13 );
- BOOST_CHECK_CLOSE( res[1].first[0] , 1.25 , 1.0e-13 );
- BOOST_CHECK_CLOSE( res[1].second , 0.1 , 1.0e-13 );
- BOOST_CHECK_CLOSE( res[2].first[0] , 1.5 , 1.0e-13 );
- BOOST_CHECK_CLOSE( res[2].second , 0.2 , 1.0e-13 );
- BOOST_CHECK_CLOSE( res[3].first[0] , 1.75 , 1.0e-13 );
- BOOST_CHECK_CLOSE( res[3].second , 0.3 , 1.0e-13 );
- BOOST_CHECK_CLOSE( x[0] , 2.0 , 1.0e-13 );
-}
-
-
-
-
-BOOST_AUTO_TEST_SUITE_END()


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