|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r57296 - sandbox/odeint/boost/numeric/odeint
From: karsten.ahnert_at_[hidden]
Date: 2009-11-02 15:19:52
Author: karsten
Date: 2009-11-02 15:19:51 EST (Mon, 02 Nov 2009)
New Revision: 57296
URL: http://svn.boost.org/trac/boost/changeset/57296
Log:
integrator_constant_step.hpp added, but is currently not working
Added:
sandbox/odeint/boost/numeric/odeint/integrator_constant_step.hpp (contents, props changed)
Text files modified:
sandbox/odeint/boost/numeric/odeint/euler.hpp | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
Modified: sandbox/odeint/boost/numeric/odeint/euler.hpp
==============================================================================
--- sandbox/odeint/boost/numeric/odeint/euler.hpp (original)
+++ sandbox/odeint/boost/numeric/odeint/euler.hpp 2009-11-02 15:19:51 EST (Mon, 02 Nov 2009)
@@ -42,6 +42,7 @@
ContainerType m_xtemp;
ResizeType m_resizer;
+ typedef typename ContainerType container_type;
typedef typename ContainerType::iterator iterator;
typedef typename ContainerType::value_type value_type;
Added: sandbox/odeint/boost/numeric/odeint/integrator_constant_step.hpp
==============================================================================
--- (empty file)
+++ sandbox/odeint/boost/numeric/odeint/integrator_constant_step.hpp 2009-11-02 15:19:51 EST (Mon, 02 Nov 2009)
@@ -0,0 +1,49 @@
+/*
+ boost header: numeric/odeint/integrator_constant_step.hpp
+
+ Copyright 2009 Karsten Ahnert
+ Copyright 2009 Mario Mulansky
+ Copyright 2009 Andre Bergner
+
+ Distributed under the Boost Software License, Version 1.0.
+ (See accompanying file LICENSE_1_0.txt or
+ copy at http://www.boost.org/LICENSE_1_0.txt)
+*/
+
+#ifndef BOOST_NUMERIC_ODEINT_INTEGRATOR_CONSTANT_STEP_HPP_INCLUDED
+#define BOOST_NUMERIC_ODEINT_INTEGRATOR_CONSTANT_STEP_HPP_INCLUDED
+
+namespace boost {
+namespace numeric {
+namespace odeint {
+
+ template<
+ class Stepper ,
+ class DynamicalSystem ,
+ class TimeType ,
+ class InsertIterator
+ >
+ void integrate(
+ Stepper stepper ,
+ DynamicalSystem system ,
+ TimeType dt ,
+ TimeType start_time ,
+ Stepper::container_type state ,
+ TimeType end_time ,
+ InsertIterator inserter
+ )
+ {
+ while( start_time < end_time )
+ {
+ *inserter++ = state;
+ stepper.next_step( system , state , t , dt );
+ start_time += dt;
+ }
+ }
+
+
+} // odeint
+} // numeric
+} // boost
+
+#endif //BOOST_NUMERIC_ODEINT_INTEGRATOR_CONSTANT_STEP_HPP_INCLUDED
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk