3 boost/numeric/odeint/integrate/detail/integrate_times.hpp
6 Default integrate times implementation.
9 Copyright 2009-2012 Karsten Ahnert
10 Copyright 2009-2012 Mario Mulansky
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)
18 #ifndef BOOST_NUMERIC_ODEINT_INTEGRATE_DETAIL_INTEGRATE_TIMES_HPP_INCLUDED
19 #define BOOST_NUMERIC_ODEINT_INTEGRATE_DETAIL_INTEGRATE_TIMES_HPP_INCLUDED
23 #include <boost/config.hpp>
24 #include <boost/range/algorithm/for_each.hpp>
26 #include <boost/numeric/odeint/util/unwrap_reference.hpp>
27 #include <boost/numeric/odeint/stepper/controlled_step_result.hpp>
28 #include <boost/numeric/odeint/util/detail/less_with_sign.hpp>
29 #include <boost/numeric/odeint/iterator/times_time_iterator.hpp>
30 #include <boost/numeric/odeint/iterator/integrate/detail/functors.hpp>
40 * integrate_times for all steppers
42 template< class Stepper , class System , class State , class TimeIterator , class Time , class Observer , class StepperTag >
43 size_t integrate_times(
44 Stepper stepper , System system , State &start_state ,
45 TimeIterator start_time , TimeIterator end_time , Time dt ,
46 Observer observer , StepperTag
51 boost::for_each( make_times_time_range( stepper , system , start_state ,
52 start_time , end_time , dt ) ,
53 // should we use traits<Stepper>::state_type here instead of State? NO!
54 obs_caller< Observer >( obs_calls , observer ) );
56 // step integration steps gives step+1 observer calls
63 } // namespace numeric
67 #endif // BOOST_NUMERIC_ODEINT_INTEGRATE_DETAIL_INTEGRATE_ADAPTIVE_HPP_INCLUDED