annotate DEPENDENCIES/generic/include/boost/numeric/odeint/integrate/integrate.hpp @ 76:e58ce2aebd18 emscripten

Merge from default branch
author Chris Cannam
date Thu, 30 Oct 2014 13:25:25 +0000
parents 2665513ce2d3
children c530137014c0
rev   line source
Chris@16 1 /*
Chris@16 2 [auto_generated]
Chris@16 3 boost/numeric/odeint/integrate/integrate.hpp
Chris@16 4
Chris@16 5 [begin_description]
Chris@16 6 Convenience methods which choose the stepper for the current ODE.
Chris@16 7 [end_description]
Chris@16 8
Chris@16 9 Copyright 2009-2011 Karsten Ahnert
Chris@16 10 Copyright 2009-2011 Mario Mulansky
Chris@16 11
Chris@16 12 Distributed under the Boost Software License, Version 1.0.
Chris@16 13 (See accompanying file LICENSE_1_0.txt or
Chris@16 14 copy at http://www.boost.org/LICENSE_1_0.txt)
Chris@16 15 */
Chris@16 16
Chris@16 17
Chris@16 18 #ifndef BOOST_NUMERIC_ODEINT_INTEGRATE_INTEGRATE_HPP_INCLUDED
Chris@16 19 #define BOOST_NUMERIC_ODEINT_INTEGRATE_INTEGRATE_HPP_INCLUDED
Chris@16 20
Chris@16 21 #include <boost/numeric/odeint/stepper/runge_kutta_dopri5.hpp>
Chris@16 22 #include <boost/numeric/odeint/stepper/controlled_runge_kutta.hpp>
Chris@16 23 #include <boost/numeric/odeint/integrate/null_observer.hpp>
Chris@16 24 #include <boost/numeric/odeint/integrate/integrate_adaptive.hpp>
Chris@16 25
Chris@16 26
Chris@16 27
Chris@16 28 namespace boost {
Chris@16 29 namespace numeric {
Chris@16 30 namespace odeint {
Chris@16 31
Chris@16 32
Chris@16 33 /*
Chris@16 34 * ToDo :
Chris@16 35 *
Chris@16 36 * determine type of dxdt for units
Chris@16 37 *
Chris@16 38 */
Chris@16 39 template< class System , class State , class Time , class Observer >
Chris@16 40 size_t integrate( System system , State &start_state , Time start_time , Time end_time , Time dt , Observer observer )
Chris@16 41 {
Chris@16 42 return integrate_adaptive( controlled_runge_kutta< runge_kutta_dopri5< State > >() , system , start_state , start_time , end_time , dt , observer );
Chris@16 43 }
Chris@16 44
Chris@16 45
Chris@16 46
Chris@16 47 /*
Chris@16 48 * the two overloads are needed in order to solve the forwarding problem
Chris@16 49 */
Chris@16 50 template< class System , class State , class Time >
Chris@16 51 size_t integrate( System system , State &start_state , Time start_time , Time end_time , Time dt )
Chris@16 52 {
Chris@16 53 return integrate( system , start_state , start_time , end_time , dt , null_observer() );
Chris@16 54 }
Chris@16 55
Chris@16 56
Chris@16 57 /**
Chris@16 58 * \fn integrate( System system , State &start_state , Time start_time , Time end_time , Time dt , Observer observer )
Chris@16 59 * \brief Integrates the ODE.
Chris@16 60 *
Chris@16 61 * Integrates the ODE given by system from start_time to end_time starting
Chris@16 62 * with start_state as initial condition and dt as initial time step.
Chris@16 63 * This function uses a dense output dopri5 stepper and performs an adaptive
Chris@16 64 * integration with step size control, thus dt changes during the integration.
Chris@16 65 * This method uses standard error bounds of 1E-6.
Chris@16 66 * After each step, the observer is called.
Chris@16 67 *
Chris@16 68 * \param system The system function to solve, hence the r.h.s. of the
Chris@16 69 * ordinary differential equation.
Chris@16 70 * \param start_state The initial state.
Chris@16 71 * \param start_time Start time of the integration.
Chris@16 72 * \param end_time End time of the integration.
Chris@16 73 * \param dt Initial step size, will be adjusted during the integration.
Chris@16 74 * \param observer Observer that will be called after each time step.
Chris@16 75 * \return The number of steps performed.
Chris@16 76 */
Chris@16 77
Chris@16 78
Chris@16 79 /**
Chris@16 80 * \fn integrate( System system , State &start_state , Time start_time , Time end_time , Time dt )
Chris@16 81 * \brief Integrates the ODE without observer calls.
Chris@16 82 *
Chris@16 83 * Integrates the ODE given by system from start_time to end_time starting
Chris@16 84 * with start_state as initial condition and dt as initial time step.
Chris@16 85 * This function uses a dense output dopri5 stepper and performs an adaptive
Chris@16 86 * integration with step size control, thus dt changes during the integration.
Chris@16 87 * This method uses standard error bounds of 1E-6.
Chris@16 88 * No observer is called.
Chris@16 89 *
Chris@16 90 * \param system The system function to solve, hence the r.h.s. of the
Chris@16 91 * ordinary differential equation.
Chris@16 92 * \param start_state The initial state.
Chris@16 93 * \param start_time Start time of the integration.
Chris@16 94 * \param end_time End time of the integration.
Chris@16 95 * \param dt Initial step size, will be adjusted during the integration.
Chris@16 96 * \return The number of steps performed.
Chris@16 97 */
Chris@16 98
Chris@16 99 } // namespace odeint
Chris@16 100 } // namespace numeric
Chris@16 101 } // namespace boost
Chris@16 102
Chris@16 103
Chris@16 104
Chris@16 105 #endif // BOOST_NUMERIC_ODEINT_INTEGRATE_INTEGRATE_HPP_INCLUDED