diff options
author | Lorry Tar Creator <lorry-tar-importer@baserock.org> | 2015-04-08 03:09:47 +0000 |
---|---|---|
committer | <> | 2015-05-05 14:37:32 +0000 |
commit | f2541bb90af059680aa7036f315f052175999355 (patch) | |
tree | a5b214744b256f07e1dc2bd7273035a7808c659f /boost/numeric/odeint/integrate/integrate.hpp | |
parent | ed232fdd34968697a68783b3195b1da4226915b5 (diff) | |
download | boost-tarball-master.tar.gz |
Imported from /home/lorry/working-area/delta_boost-tarball/boost_1_58_0.tar.bz2.HEADboost_1_58_0master
Diffstat (limited to 'boost/numeric/odeint/integrate/integrate.hpp')
-rw-r--r-- | boost/numeric/odeint/integrate/integrate.hpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/boost/numeric/odeint/integrate/integrate.hpp b/boost/numeric/odeint/integrate/integrate.hpp index 6cb96c0f1..446656b58 100644 --- a/boost/numeric/odeint/integrate/integrate.hpp +++ b/boost/numeric/odeint/integrate/integrate.hpp @@ -48,6 +48,15 @@ integrate( System system , State &start_state , Time start_time , Time end_time return integrate_adaptive( stepper_type() , system , start_state , start_time , end_time , dt , observer ); } +template< class Value , 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 ) +{ + typedef controlled_runge_kutta< runge_kutta_dopri5< State , Value , State , Time > > stepper_type; + return integrate_adaptive( stepper_type() , system , start_state , start_time , end_time , dt , observer ); +} + + /* @@ -59,6 +68,13 @@ size_t integrate( System system , State &start_state , Time start_time , Time en return integrate( system , start_state , start_time , end_time , dt , null_observer() ); } +template< class Value , class System , class State , class Time > +size_t integrate( System system , State &start_state , Time start_time , Time end_time , Time dt ) +{ + return integrate< Value >( 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 ) @@ -70,6 +86,9 @@ size_t integrate( System system , State &start_state , Time start_time , Time en * 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. + * + * \attention A second version of this function template exists which explicitly + * expects the value type as template parameter, i.e. integrate< double >( sys , x , t0 , t1 , dt , obs ); * * \param system The system function to solve, hence the r.h.s. of the * ordinary differential equation. @@ -92,6 +111,9 @@ size_t integrate( System system , State &start_state , Time start_time , Time en * integration with step size control, thus dt changes during the integration. * This method uses standard error bounds of 1E-6. * No observer is called. + * + * \attention A second version of this function template exists which explicitly + * expects the value type as template parameter, i.e. integrate< double >( sys , x , t0 , t1 , dt ); * * \param system The system function to solve, hence the r.h.s. of the * ordinary differential equation. |