Mercurial > hg > vamp-build-and-test
comparison DEPENDENCIES/generic/include/boost/numeric/odeint/integrate/integrate_n_steps.hpp @ 16:2665513ce2d3
Add boost headers
author | Chris Cannam |
---|---|
date | Tue, 05 Aug 2014 11:11:38 +0100 |
parents | |
children | c530137014c0 |
comparison
equal
deleted
inserted
replaced
15:663ca0da4350 | 16:2665513ce2d3 |
---|---|
1 /* | |
2 [auto_generated] | |
3 boost/numeric/odeint/integrate/integrate_n_steps.hpp | |
4 | |
5 [begin_description] | |
6 Integration of n steps with constant time size. Adaptive and dense-output methods are fully supported. | |
7 [end_description] | |
8 | |
9 Copyright 2009-2011 Karsten Ahnert | |
10 Copyright 2009-2011 Mario Mulansky | |
11 | |
12 Distributed under the Boost Software License, Version 1.0. | |
13 (See accompanying file LICENSE_1_0.txt or | |
14 copy at http://www.boost.org/LICENSE_1_0.txt) | |
15 */ | |
16 | |
17 | |
18 #ifndef BOOST_NUMERIC_ODEINT_INTEGRATE_INTEGRATE_N_STEPS_HPP_INCLUDED | |
19 #define BOOST_NUMERIC_ODEINT_INTEGRATE_INTEGRATE_N_STEPS_HPP_INCLUDED | |
20 | |
21 #include <boost/type_traits/is_same.hpp> | |
22 | |
23 #include <boost/numeric/odeint/stepper/stepper_categories.hpp> | |
24 #include <boost/numeric/odeint/integrate/null_observer.hpp> | |
25 #include <boost/numeric/odeint/integrate/detail/integrate_n_steps.hpp> | |
26 | |
27 namespace boost { | |
28 namespace numeric { | |
29 namespace odeint { | |
30 | |
31 | |
32 /* | |
33 * Integrates n steps | |
34 * | |
35 * the two overloads are needed in order to solve the forwarding problem | |
36 */ | |
37 template< class Stepper , class System , class State , class Time , class Observer> | |
38 Time integrate_n_steps( | |
39 Stepper stepper , System system , State &start_state , | |
40 Time start_time , Time dt , size_t num_of_steps , | |
41 Observer observer ) | |
42 { | |
43 | |
44 return detail::integrate_n_steps( | |
45 stepper , system , start_state , | |
46 start_time , dt , num_of_steps , | |
47 observer , typename Stepper::stepper_category() ); | |
48 } | |
49 | |
50 /** | |
51 * \brief Solves the forwarding problem, can be called with Boost.Range as start_state. | |
52 */ | |
53 template< class Stepper , class System , class State , class Time , class Observer > | |
54 Time integrate_n_steps( | |
55 Stepper stepper , System system , const State &start_state , | |
56 Time start_time , Time dt , size_t num_of_steps , | |
57 Observer observer ) | |
58 { | |
59 return detail::integrate_n_steps( | |
60 stepper , system , start_state , | |
61 start_time , dt , num_of_steps , | |
62 observer , typename Stepper::stepper_category() ); | |
63 } | |
64 | |
65 | |
66 /** | |
67 * \brief The same function as above, but without observer calls. | |
68 */ | |
69 template< class Stepper , class System , class State , class Time > | |
70 Time integrate_n_steps( | |
71 Stepper stepper , System system , State &start_state , | |
72 Time start_time , Time dt , size_t num_of_steps ) | |
73 { | |
74 return integrate_n_steps( stepper , system , start_state , start_time , dt , num_of_steps , null_observer() ); | |
75 } | |
76 | |
77 /** | |
78 * \brief Solves the forwarding problem, can be called with Boost.Range as start_state. | |
79 */ | |
80 template< class Stepper , class System , class State , class Time > | |
81 Time integrate_n_steps( | |
82 Stepper stepper , System system , const State &start_state , | |
83 Time start_time , Time dt , size_t num_of_steps ) | |
84 { | |
85 return integrate_n_steps( stepper , system , start_state , start_time , dt , num_of_steps , null_observer() ); | |
86 } | |
87 | |
88 | |
89 | |
90 /************* DOXYGEN *************/ | |
91 /** | |
92 * \fn Time integrate_n_steps( Stepper stepper , System system , State &start_state , Time start_time , Time dt , size_t num_of_steps , Observer observer ) | |
93 * \brief Integrates the ODE with constant step size. | |
94 * | |
95 * This function is similar to integrate_const. The observer is called at | |
96 * equidistant time intervals t0 + n*dt. | |
97 * If the Stepper is a normal stepper without step size control, dt is also | |
98 * used for the numerical scheme. If a ControlledStepper is provided, the | |
99 * algorithm might reduce the step size to meet the error bounds, but it is | |
100 * ensured that the observer is always called at equidistant time points | |
101 * t0 + n*dt. If a DenseOutputStepper is used, the step size also may vary | |
102 * and the dense output is used to call the observer at equidistant time | |
103 * points. The final integration time is always t0 + num_of_steps*dt. | |
104 * | |
105 * \param stepper The stepper to be used for numerical integration. | |
106 * \param system Function/Functor defining the rhs of the ODE. | |
107 * \param start_state The initial condition x0. | |
108 * \param start_time The initial time t0. | |
109 * \param dt The time step between observer calls, _not_ necessarily the | |
110 * time step of the integration. | |
111 * \param num_of_steps Number of steps to be performed | |
112 * \param observer Function/Functor called at equidistant time intervals. | |
113 * \return The number of steps performed. | |
114 */ | |
115 | |
116 | |
117 | |
118 } // namespace odeint | |
119 } // namespace numeric | |
120 } // namespace boost | |
121 | |
122 | |
123 | |
124 #endif // BOOST_NUMERIC_ODEINT_INTEGRATE_INTEGRATE_N_STEPS_HPP_INCLUDED |