File indexing completed on 2024-11-15 09:19:50
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018 #ifndef BOOST_NUMERIC_ODEINT_INTEGRATE_INTEGRATE_N_STEPS_HPP_INCLUDED
0019 #define BOOST_NUMERIC_ODEINT_INTEGRATE_INTEGRATE_N_STEPS_HPP_INCLUDED
0020
0021 #include <boost/type_traits/is_same.hpp>
0022
0023 #include <boost/numeric/odeint/stepper/stepper_categories.hpp>
0024 #include <boost/numeric/odeint/integrate/null_observer.hpp>
0025 #include <boost/numeric/odeint/integrate/detail/integrate_n_steps.hpp>
0026 #include <boost/numeric/odeint/integrate/check_adapter.hpp>
0027
0028 namespace boost {
0029 namespace numeric {
0030 namespace odeint {
0031
0032
0033
0034
0035
0036
0037
0038 template< class Stepper , class System , class State , class Time , class Observer , class StepOverflowChecker >
0039 Time integrate_n_steps(
0040 Stepper stepper , System system , State &start_state ,
0041 Time start_time , Time dt , size_t num_of_steps ,
0042 Observer observer , StepOverflowChecker checker )
0043 {
0044
0045 typedef typename odeint::unwrap_reference< Stepper >::type stepper_type;
0046 typedef typename odeint::unwrap_reference< Observer >::type observer_type;
0047 typedef typename odeint::unwrap_reference< StepOverflowChecker >::type checker_type;
0048 typedef typename stepper_type::stepper_category stepper_category;
0049
0050 return detail::integrate_n_steps(
0051 checked_stepper<stepper_type, checker_type>(stepper, checker),
0052 system , start_state ,
0053 start_time , dt , num_of_steps ,
0054 checked_observer<observer_type, checker_type>(observer, checker),
0055 stepper_category() );
0056 }
0057
0058
0059
0060
0061 template< class Stepper , class System , class State , class Time , class Observer , class StepOverflowChecker >
0062 Time integrate_n_steps(
0063 Stepper stepper , System system , const State &start_state ,
0064 Time start_time , Time dt , size_t num_of_steps ,
0065 Observer observer , StepOverflowChecker checker )
0066 {
0067 typedef typename odeint::unwrap_reference< Stepper >::type stepper_type;
0068 typedef typename odeint::unwrap_reference< Observer >::type observer_type;
0069 typedef typename odeint::unwrap_reference< StepOverflowChecker >::type checker_type;
0070 typedef typename stepper_type::stepper_category stepper_category;
0071
0072 return detail::integrate_n_steps(
0073 checked_stepper<stepper_type, checker_type>(stepper, checker),
0074 system , start_state ,
0075 start_time , dt , num_of_steps ,
0076 checked_observer<observer_type, checker_type>(observer, checker),
0077 stepper_category() );
0078 }
0079
0080
0081
0082
0083
0084 template< class Stepper , class System , class State , class Time , class Observer >
0085 Time integrate_n_steps(
0086 Stepper stepper , System system , State &start_state ,
0087 Time start_time , Time dt , size_t num_of_steps , Observer observer )
0088 {
0089 typedef typename odeint::unwrap_reference<Stepper>::type::stepper_category stepper_category;
0090
0091 return detail::integrate_n_steps(
0092 stepper , system , start_state ,
0093 start_time , dt , num_of_steps ,
0094 observer , stepper_category() );
0095 }
0096
0097
0098
0099
0100 template< class Stepper , class System , class State , class Time , class Observer >
0101 Time integrate_n_steps(
0102 Stepper stepper , System system , const State &start_state ,
0103 Time start_time , Time dt , size_t num_of_steps , Observer observer )
0104 {
0105 typedef typename odeint::unwrap_reference<Stepper>::type::stepper_category stepper_category;
0106
0107 return detail::integrate_n_steps(
0108 stepper , system , start_state ,
0109 start_time , dt , num_of_steps ,
0110 observer , stepper_category() );
0111 }
0112
0113
0114
0115
0116 template< class Stepper , class System , class State , class Time >
0117 Time integrate_n_steps(
0118 Stepper stepper , System system , State &start_state ,
0119 Time start_time , Time dt , size_t num_of_steps )
0120 {
0121 return integrate_n_steps(stepper, system, start_state, start_time,
0122 dt, num_of_steps, null_observer());
0123 }
0124
0125
0126
0127
0128 template< class Stepper , class System , class State , class Time >
0129 Time integrate_n_steps(
0130 Stepper stepper , System system , const State &start_state ,
0131 Time start_time , Time dt , size_t num_of_steps )
0132 {
0133 return integrate_n_steps(stepper, system, start_state, start_time,
0134 dt, num_of_steps, null_observer());
0135 }
0136
0137
0138
0139
0140
0141
0142
0143
0144
0145
0146
0147
0148
0149
0150
0151
0152
0153
0154
0155
0156
0157
0158
0159
0160
0161
0162
0163
0164
0165
0166
0167
0168
0169
0170
0171
0172
0173
0174 }
0175 }
0176 }
0177
0178
0179
0180 #endif