diff options
author | DongHun Kwak <dh0128.kwak@samsung.com> | 2016-03-21 15:45:20 +0900 |
---|---|---|
committer | DongHun Kwak <dh0128.kwak@samsung.com> | 2016-03-21 15:46:37 +0900 |
commit | 733b5d5ae2c5d625211e2985ac25728ac3f54883 (patch) | |
tree | a5b214744b256f07e1dc2bd7273035a7808c659f /boost/numeric/odeint/integrate/integrate.hpp | |
parent | 08c1e93fa36a49f49325a07fe91ff92c964c2b6c (diff) | |
download | boost-733b5d5ae2c5d625211e2985ac25728ac3f54883.tar.gz boost-733b5d5ae2c5d625211e2985ac25728ac3f54883.tar.bz2 boost-733b5d5ae2c5d625211e2985ac25728ac3f54883.zip |
Imported Upstream version 1.58.0upstream/1.58.0
Change-Id: If0072143aa26874812e0db6872e1efb10a3e5e94
Signed-off-by: DongHun Kwak <dh0128.kwak@samsung.com>
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 6cb96c0f1e..446656b58a 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. |