summaryrefslogtreecommitdiff
path: root/boost/numeric/odeint/stepper/base
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@baserock.org>2015-04-08 03:09:47 +0000
committer <>2015-05-05 14:37:32 +0000
commitf2541bb90af059680aa7036f315f052175999355 (patch)
treea5b214744b256f07e1dc2bd7273035a7808c659f /boost/numeric/odeint/stepper/base
parented232fdd34968697a68783b3195b1da4226915b5 (diff)
downloadboost-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/stepper/base')
-rw-r--r--boost/numeric/odeint/stepper/base/explicit_error_stepper_base.hpp35
-rw-r--r--boost/numeric/odeint/stepper/base/explicit_error_stepper_fsal_base.hpp30
-rw-r--r--boost/numeric/odeint/stepper/base/explicit_stepper_base.hpp31
-rw-r--r--boost/numeric/odeint/stepper/base/symplectic_rkn_stepper_base.hpp2
4 files changed, 87 insertions, 11 deletions
diff --git a/boost/numeric/odeint/stepper/base/explicit_error_stepper_base.hpp b/boost/numeric/odeint/stepper/base/explicit_error_stepper_base.hpp
index 3ba11a4fe..08009dc16 100644
--- a/boost/numeric/odeint/stepper/base/explicit_error_stepper_base.hpp
+++ b/boost/numeric/odeint/stepper/base/explicit_error_stepper_base.hpp
@@ -152,6 +152,22 @@ public:
/*
+ * named Version 2: do_step_dxdt_impl( sys , in , dxdt , t , dt )
+ *
+ * this version is needed when this stepper is used for initializing
+ * multistep stepper like adams-bashforth. Hence we provide an explicitely
+ * named version that is not disabled. Meant for internal use only.
+ */
+ template < class System, class StateInOut, class DerivIn >
+ void do_step_dxdt_impl( System system, StateInOut &x, const DerivIn &dxdt,
+ time_type t, time_type dt )
+ {
+ this->stepper().do_step_impl( system , x , dxdt , t , x , dt );
+ }
+
+
+
+ /*
* Version 3 : do_step( sys , in , t , out , dt )
*
* this version does not solve the forwarding problem, boost.range can not be used
@@ -181,10 +197,21 @@ public:
{
this->stepper().do_step_impl( system , in , dxdt , t , out , dt );
}
-
-
-
-
+
+ /*
+ * named Version 4: do_step_dxdt_impl( sys , in , dxdt , t , out, dt )
+ *
+ * this version is needed when this stepper is used for initializing
+ * multistep stepper like adams-bashforth. Hence we provide an explicitely
+ * named version that is not disabled. Meant for internal use only.
+ */
+ template < class System, class StateIn, class DerivIn, class StateOut >
+ void do_step_dxdt_impl( 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 );
+ }
/*
* Version 5 :do_step( sys , x , t , dt , xerr )
diff --git a/boost/numeric/odeint/stepper/base/explicit_error_stepper_fsal_base.hpp b/boost/numeric/odeint/stepper/base/explicit_error_stepper_fsal_base.hpp
index a055c7fa5..b1d751a0c 100644
--- a/boost/numeric/odeint/stepper/base/explicit_error_stepper_fsal_base.hpp
+++ b/boost/numeric/odeint/stepper/base/explicit_error_stepper_fsal_base.hpp
@@ -151,11 +151,27 @@ public:
/*
+ * named Version 2: do_step_dxdt_impl( sys , in , dxdt , t , dt )
+ *
+ * this version is needed when this stepper is used for initializing
+ * multistep stepper like adams-bashforth. Hence we provide an explicitely
+ * named version that is not disabled. Meant for internal use only.
+ */
+ template< class System , class StateInOut , class DerivInOut >
+ void do_step_dxdt_impl( 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
+ * 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
*/
template< class System , class StateIn , class StateOut >
typename boost::disable_if< boost::is_same< StateIn , time_type > , void >::type
@@ -174,12 +190,14 @@ public:
*
* 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 )
+ 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 );
+ this->stepper().do_step_impl( system, in, dxdt_in, t, out, dxdt_out,
+ dt );
}
diff --git a/boost/numeric/odeint/stepper/base/explicit_stepper_base.hpp b/boost/numeric/odeint/stepper/base/explicit_stepper_base.hpp
index 40aab8039..d81c8c7a7 100644
--- a/boost/numeric/odeint/stepper/base/explicit_stepper_base.hpp
+++ b/boost/numeric/odeint/stepper/base/explicit_stepper_base.hpp
@@ -139,6 +139,21 @@ public:
/*
+ * named Version 2: do_step_dxdt_impl( sys , in , dxdt , t , dt )
+ *
+ * this version is needed when this stepper is used for initializing
+ * multistep stepper like adams-bashforth. Hence we provide an explicitely
+ * named version that is not disabled. Meant for internal use only.
+ */
+ template < class System, class StateInOut, class DerivIn >
+ void do_step_dxdt_impl( System system, StateInOut &x, const DerivIn &dxdt,
+ time_type t, time_type dt )
+ {
+ this->stepper().do_step_impl( system , x , dxdt , t , x , dt );
+ }
+
+
+ /*
* Version 3 : do_step( sys , in , t , out , dt )
*
* this version does not solve the forwarding problem, boost.range can not be used
@@ -164,6 +179,22 @@ public:
this->stepper().do_step_impl( system , in , dxdt , t , out , dt );
}
+
+ /*
+ * named Version 4: do_step_dxdt_impl( sys , in , dxdt , t , out, dt )
+ *
+ * this version is needed when this stepper is used for initializing
+ * multistep stepper like adams-bashforth. Hence we provide an explicitely
+ * named version. Meant for internal use only.
+ */
+ template < class System, class StateIn, class DerivIn, class StateOut >
+ void do_step_dxdt_impl( 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 );
+ }
+
template< class StateIn >
void adjust_size( const StateIn &x )
{
diff --git a/boost/numeric/odeint/stepper/base/symplectic_rkn_stepper_base.hpp b/boost/numeric/odeint/stepper/base/symplectic_rkn_stepper_base.hpp
index ea3523e5b..eb09aefc8 100644
--- a/boost/numeric/odeint/stepper/base/symplectic_rkn_stepper_base.hpp
+++ b/boost/numeric/odeint/stepper/base/symplectic_rkn_stepper_base.hpp
@@ -182,7 +182,7 @@ private:
// stepper for systems with function for dq/dt = f(p) and dp/dt = -f(q)
template< class System , class StateIn , class StateOut >
- void do_step_impl( System system , const StateIn &in , time_type t , StateOut &out , time_type dt , boost::mpl::true_ )
+ void do_step_impl( System system , const StateIn &in , time_type /* t */ , StateOut &out , time_type dt , boost::mpl::true_ )
{
typedef typename odeint::unwrap_reference< System >::type system_type;
typedef typename odeint::unwrap_reference< typename system_type::first_type >::type coor_deriv_func_type;