Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r68577 - in sandbox/odeint/branches/karsten: . boost/numeric/odeint/algebra boost/numeric/odeint/algebra/external boost/numeric/odeint/external/gsl boost/numeric/odeint/external/mkl boost/numeric/odeint/external/thrust boost/numeric/odeint/stepper boost/numeric/odeint/stepper/base boost/numeric/odeint/util libs/numeric/odeint/doc/html libs/numeric/odeint/doc/html/boost_sandbox_numeric_odeint libs/numeric/odeint/ideas/units libs/numeric/odeint/test libs/numeric/odeint/test_external/mkl libs/numeric/odeint/test_external/thrust
From: karsten.ahnert_at_[hidden]
Date: 2011-01-31 03:21:12


Author: karsten
Date: 2011-01-31 03:21:07 EST (Mon, 31 Jan 2011)
New Revision: 68577
URL: http://svn.boost.org/trac/boost/changeset/68577

Log:
* introducing rosenbrock
* reorganizing
Added:
   sandbox/odeint/branches/karsten/boost/numeric/odeint/external/gsl/
   sandbox/odeint/branches/karsten/boost/numeric/odeint/external/gsl/gsl_vector_adaptor.hpp (contents, props changed)
      - copied, changed from r68544, /sandbox/odeint/branches/karsten/boost/numeric/odeint/algebra/external/gsl_vector_adaptor.hpp
   sandbox/odeint/branches/karsten/boost/numeric/odeint/external/mkl/
   sandbox/odeint/branches/karsten/boost/numeric/odeint/external/mkl/mkl_operations.hpp (contents, props changed)
      - copied, changed from r68544, /sandbox/odeint/branches/karsten/boost/numeric/odeint/algebra/external/mkl_operations.hpp
   sandbox/odeint/branches/karsten/boost/numeric/odeint/external/thrust/
   sandbox/odeint/branches/karsten/boost/numeric/odeint/external/thrust/thrust_algebra.hpp (contents, props changed)
      - copied, changed from r68544, /sandbox/odeint/branches/karsten/boost/numeric/odeint/algebra/external/thrust_algebra.hpp
   sandbox/odeint/branches/karsten/boost/numeric/odeint/external/thrust/thrust_operations.hpp (contents, props changed)
      - copied, changed from r68544, /sandbox/odeint/branches/karsten/boost/numeric/odeint/algebra/external/thrust_operations.hpp
   sandbox/odeint/branches/karsten/boost/numeric/odeint/external/thrust/thrust_resize.hpp (contents, props changed)
      - copied, changed from r68544, /sandbox/odeint/branches/karsten/boost/numeric/odeint/algebra/external/thrust_resize.hpp
   sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/rosenbrock4.hpp (contents, props changed)
   sandbox/odeint/branches/karsten/boost/numeric/odeint/util/construct.hpp (contents, props changed)
   sandbox/odeint/branches/karsten/boost/numeric/odeint/util/copy.hpp (contents, props changed)
   sandbox/odeint/branches/karsten/boost/numeric/odeint/util/default_adjust_size.hpp (contents, props changed)
   sandbox/odeint/branches/karsten/boost/numeric/odeint/util/destruct.hpp (contents, props changed)
   sandbox/odeint/branches/karsten/boost/numeric/odeint/util/is_resizeable.hpp (contents, props changed)
   sandbox/odeint/branches/karsten/boost/numeric/odeint/util/matrix_vector_adjust_size.hpp (contents, props changed)
   sandbox/odeint/branches/karsten/boost/numeric/odeint/util/resize.hpp (contents, props changed)
   sandbox/odeint/branches/karsten/boost/numeric/odeint/util/same_size.hpp (contents, props changed)
   sandbox/odeint/branches/karsten/boost/numeric/odeint/util/size_adjuster.hpp (contents, props changed)
      - copied, changed from r68544, /sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/size_adjuster.hpp
   sandbox/odeint/branches/karsten/boost/numeric/odeint/util/ublas_resize.hpp (contents, props changed)
      - copied, changed from r68544, /sandbox/odeint/branches/karsten/boost/numeric/odeint/algebra/external/ublas_resize.hpp
Removed:
   sandbox/odeint/branches/karsten/boost/numeric/odeint/algebra/default_resize.hpp
   sandbox/odeint/branches/karsten/boost/numeric/odeint/algebra/external/
   sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/size_adjuster.hpp
Text files modified:
   sandbox/odeint/branches/karsten/.cproject | 15 +++++++++++----
   sandbox/odeint/branches/karsten/.project | 4 ++++
   sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/base/explicit_error_stepper_base.hpp | 6 ++++--
   sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/base/explicit_stepper_and_error_stepper_base.hpp | 6 ++++--
   sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/base/explicit_stepper_and_error_stepper_fsal_base.hpp | 6 ++++--
   sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/base/explicit_stepper_base.hpp | 6 ++++--
   sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/controlled_error_stepper.hpp | 12 +++++++++---
   sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/dense_output_controlled_explicit_fsal.hpp | 6 +++++-
   sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/dense_output_explicit.hpp | 6 ++++--
   sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/explicit_error_dopri5.hpp | 4 +---
   sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/explicit_error_rk54_ck.hpp | 4 +---
   sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/explicit_euler.hpp | 3 +--
   sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/explicit_rk4.hpp | 4 +---
   sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/implicit_euler.hpp | 20 ++++----------------
   sandbox/odeint/branches/karsten/boost/numeric/odeint/util/size_adjuster.hpp | 19 +++----------------
   sandbox/odeint/branches/karsten/libs/numeric/odeint/doc/html/boost_sandbox_numeric_odeint/reference.html | 2 +-
   sandbox/odeint/branches/karsten/libs/numeric/odeint/doc/html/boost_sandbox_numeric_odeint/tutorial.html | 9 +++++++++
   sandbox/odeint/branches/karsten/libs/numeric/odeint/doc/html/index.html | 2 +-
   sandbox/odeint/branches/karsten/libs/numeric/odeint/ideas/units/adjust_size_units.hpp | 11 ++---------
   sandbox/odeint/branches/karsten/libs/numeric/odeint/ideas/units/explicit_stepper_base_units.hpp | 6 +++++-
   sandbox/odeint/branches/karsten/libs/numeric/odeint/test/resizing.cpp | 22 +++++++++++++++++-----
   sandbox/odeint/branches/karsten/libs/numeric/odeint/test/stepper_copying.cpp | 5 ++++-
   sandbox/odeint/branches/karsten/libs/numeric/odeint/test_external/mkl/check_mkl.cpp | 2 +-
   sandbox/odeint/branches/karsten/libs/numeric/odeint/test_external/thrust/check_thrust.cu | 6 +++---
   24 files changed, 103 insertions(+), 83 deletions(-)

Modified: sandbox/odeint/branches/karsten/.cproject
==============================================================================
--- sandbox/odeint/branches/karsten/.cproject (original)
+++ sandbox/odeint/branches/karsten/.cproject 2011-01-31 03:21:07 EST (Mon, 31 Jan 2011)
@@ -20,28 +20,35 @@
                                         <folderInfo id="0.1427786045." name="/" resourcePath="">
                                                 <toolChain id="org.eclipse.cdt.build.core.prefbase.toolchain.1701227309" name="No ToolChain" resourceTypeBasedDiscovery="false" superClass="org.eclipse.cdt.build.core.prefbase.toolchain">
                                                         <targetPlatform id="org.eclipse.cdt.build.core.prefbase.toolchain.1701227309.1923743366" name=""/>
- <builder cleanBuildTarget="--clean" command="bjam" id="org.eclipse.cdt.build.core.settings.default.builder.1866451942" incrementalBuildTarget="" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Gnu Make Builder" superClass="org.eclipse.cdt.build.core.settings.default.builder"/>
+ <builder cleanBuildTarget="--clean" command="bjam" id="org.eclipse.cdt.build.core.settings.default.builder.1866451942" incrementalBuildTarget="" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Gnu Make Builder" superClass="org.eclipse.cdt.build.core.settings.default.builder">
+ <outputEntries>
+ <entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="outputPath" name=""/>
+ </outputEntries>
+ </builder>
                                                         <tool id="org.eclipse.cdt.build.core.settings.holder.libs.295828857" name="holder for library settings" superClass="org.eclipse.cdt.build.core.settings.holder.libs"/>
                                                         <tool id="org.eclipse.cdt.build.core.settings.holder.1728088817" name="Assembly" superClass="org.eclipse.cdt.build.core.settings.holder">
                                                                 <option id="org.eclipse.cdt.build.core.settings.holder.incpaths.558519945" name="Include Paths" superClass="org.eclipse.cdt.build.core.settings.holder.incpaths" valueType="includePath">
- <listOptionValue builtIn="false" value="&quot;${BOOST_ROOT}&quot;"/>
+ <listOptionValue builtIn="false" value="/home/karsten/boost/boost_1_45_0"/>
                                                                 </option>
                                                                 <inputType id="org.eclipse.cdt.build.core.settings.holder.inType.1379843062" languageId="org.eclipse.cdt.core.assembly" languageName="Assembly" sourceContentType="org.eclipse.cdt.core.asmSource" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/>
                                                         </tool>
                                                         <tool id="org.eclipse.cdt.build.core.settings.holder.780742962" name="GNU C++" superClass="org.eclipse.cdt.build.core.settings.holder">
                                                                 <option id="org.eclipse.cdt.build.core.settings.holder.incpaths.1009256344" name="Include Paths" superClass="org.eclipse.cdt.build.core.settings.holder.incpaths" valueType="includePath">
- <listOptionValue builtIn="false" value="&quot;${BOOST_ROOT}&quot;"/>
+ <listOptionValue builtIn="false" value="/home/karsten/boost/boost_1_45_0"/>
                                                                 </option>
                                                                 <inputType id="org.eclipse.cdt.build.core.settings.holder.inType.157834134" languageId="org.eclipse.cdt.core.g++" languageName="GNU C++" sourceContentType="org.eclipse.cdt.core.cxxSource,org.eclipse.cdt.core.cxxHeader" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/>
                                                         </tool>
                                                         <tool id="org.eclipse.cdt.build.core.settings.holder.421502995" name="GNU C" superClass="org.eclipse.cdt.build.core.settings.holder">
                                                                 <option id="org.eclipse.cdt.build.core.settings.holder.incpaths.388283580" name="Include Paths" superClass="org.eclipse.cdt.build.core.settings.holder.incpaths" valueType="includePath">
- <listOptionValue builtIn="false" value="&quot;${BOOST_ROOT}&quot;"/>
+ <listOptionValue builtIn="false" value="/home/karsten/boost/boost_1_45_0"/>
                                                                 </option>
                                                                 <inputType id="org.eclipse.cdt.build.core.settings.holder.inType.1344941182" languageId="org.eclipse.cdt.core.gcc" languageName="GNU C" sourceContentType="org.eclipse.cdt.core.cSource,org.eclipse.cdt.core.cHeader" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/>
                                                         </tool>
                                                 </toolChain>
                                         </folderInfo>
+ <sourceEntries>
+ <entry excluding="mkl" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
+ </sourceEntries>
                                 </configuration>
                         </storageModule>
                         <storageModule moduleId="scannerConfiguration">

Modified: sandbox/odeint/branches/karsten/.project
==============================================================================
--- sandbox/odeint/branches/karsten/.project (original)
+++ sandbox/odeint/branches/karsten/.project 2011-01-31 03:21:07 EST (Mon, 31 Jan 2011)
@@ -12,6 +12,10 @@
                         <triggers>clean,full,incremental,</triggers>
                         <arguments>
                                 <dictionary>
+ <key>?children?</key>
+ <value>?name?=outputEntries\|?children?=?name?=entry\\\\\\\|\\\|\||</value>
+ </dictionary>
+ <dictionary>
                                         <key>?name?</key>
                                         <value></value>
                                 </dictionary>

Deleted: sandbox/odeint/branches/karsten/boost/numeric/odeint/algebra/default_resize.hpp
==============================================================================
--- sandbox/odeint/branches/karsten/boost/numeric/odeint/algebra/default_resize.hpp 2011-01-31 03:21:07 EST (Mon, 31 Jan 2011)
+++ (empty file)
@@ -1,211 +0,0 @@
-/*
- boost header: BOOST_NUMERIC_ODEINT/standard_resize.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_STANDARD_RESIZE_HPP_INCLUDED
-#define BOOST_NUMERIC_ODEINT_STANDARD_RESIZE_HPP_INCLUDED
-
-#include <vector>
-#include <list>
-
-#include <boost/range.hpp>
-
-#include <boost/type_traits/integral_constant.hpp> //for true_type and false_type
-
-namespace boost {
-namespace numeric {
-namespace odeint {
-
-
-/*
- * Default implementation for constructing a container does nothing
- * gsl_vector must be construct explicitly
- */
-template< class Container >
-struct construct_impl
-{
- static void construct( Container &x )
- {
- }
-};
-
-
-template< class Container >
-void construct( Container &x )
-{
- construct_impl< Container >::construct( x );
-}
-
-
-/*
- * Default implementation for destruction of a container does nothing
- * gsl_vector must be destroyed explicitly
- */
-template< class Container >
-struct destruct_impl
-{
- static void destruct( Container &x )
- {
- }
-};
-
-template< class Container >
-void destruct( Container &x )
-{
- destruct_impl< Container >::destruct( x );
-}
-
-
-
-/*
- * Default implementation of the copy operation used the assign operator
- * gsl_vector must copied differently
- */
-template< class Container1, class Container2 >
-struct copy_impl
-{
- static void copy( const Container1 &from , Container2 &to )
- {
- to = from;
- }
-};
-
-template< class Container1 , class Container2 >
-void copy( const Container1 &from , Container2 &to )
-{
- copy_impl< Container1 , Container2 >::copy( from , to );
-}
-
-
-
-
-
-
-
-/*
- * by default any type is not resizable
- */
-template< class Container >
-struct is_resizeable
-{
- struct type : public boost::false_type { };
- const static bool value = type::value;
-};
-
-/*
- * specialization for std::vector
- */
-template< class V, class A >
-struct is_resizeable< std::vector< V , A > >
-{
- struct type : public boost::true_type { };
- const static bool value = type::value;
-};
-
-/*
- * specialization for std::list
- */
-template< class V , class A >
-struct is_resizeable< std::list< V , A > >
-{
- struct type : public boost::true_type { };
- const static bool value = type::value;
-};
-
-
-
-
-
-
-/*
- * Default implementation of resize functionality.
- * This struct has to be specialized in order to work with ublas::matrix, etc.
- */
-template< class Container1 , class Container2 >
-struct resize_impl
-{
- static void resize( const Container1 &x1 , Container2 &x2 )
- {
- x2.resize( boost::size( x1 ) );
- }
-};
-
-template< class Container1 , class Container2 >
-void resize( const Container1 &x1 , Container2 &x2 )
-{
- resize_impl< Container1 , Container2 >::resize( x1 , x2 );
-}
-
-
-
-
-/*
- * Default implementation of same_size functionality.
- * This struct has to be specialized in order to work with ublas::matrix, etc.
- */
-template< class Container1 , class Container2 >
-struct same_size_impl
-{
- static bool same_size( const Container1 &x1 , const Container2 &x2 )
- {
- return ( boost::size( x1 ) == boost::size( x2 ) );
- }
-};
-
-template< class Container1 , class Container2 >
-bool same_size( const Container1 &x1 , const Container2 &x2 )
-{
- return same_size_impl< Container1 , Container2 >::same_size( x1 , x2 );
-}
-
-
-
-
-
-/*
- * Default implementation of adjust size functionality.
- * This struct can be specialized.
- *
- * Return true or false if the container has been resized.
- */
-template< class Container1 , class Container2 >
-struct adjust_size_impl
-{
- static bool adjust_size( const Container1 &x1 , Container2 &x2 )
- {
- if( !same_size( x1 , x2 ) )
- {
- resize( x1 , x2 );
- return true;
- }
- else
- {
- return false;
- }
- }
-};
-
-
-template< class Container1 , class Container2 >
-bool adjust_size( const Container1 &x1 , Container2 &x2 )
-{
- return adjust_size_impl< Container1 , Container2 >::adjust_size( x1 , x2 );
-}
-
-
-
-
-} // odeint
-} // numeric
-} // boost
-
-
-#endif //BOOST_NUMERIC_ODEINT_STANDARD_RESIZE_HPP_INCLUDED

Copied: sandbox/odeint/branches/karsten/boost/numeric/odeint/external/gsl/gsl_vector_adaptor.hpp (from r68544, /sandbox/odeint/branches/karsten/boost/numeric/odeint/algebra/external/gsl_vector_adaptor.hpp)
==============================================================================

Copied: sandbox/odeint/branches/karsten/boost/numeric/odeint/external/mkl/mkl_operations.hpp (from r68544, /sandbox/odeint/branches/karsten/boost/numeric/odeint/algebra/external/mkl_operations.hpp)
==============================================================================

Copied: sandbox/odeint/branches/karsten/boost/numeric/odeint/external/thrust/thrust_algebra.hpp (from r68544, /sandbox/odeint/branches/karsten/boost/numeric/odeint/algebra/external/thrust_algebra.hpp)
==============================================================================

Copied: sandbox/odeint/branches/karsten/boost/numeric/odeint/external/thrust/thrust_operations.hpp (from r68544, /sandbox/odeint/branches/karsten/boost/numeric/odeint/algebra/external/thrust_operations.hpp)
==============================================================================

Copied: sandbox/odeint/branches/karsten/boost/numeric/odeint/external/thrust/thrust_resize.hpp (from r68544, /sandbox/odeint/branches/karsten/boost/numeric/odeint/algebra/external/thrust_resize.hpp)
==============================================================================

Modified: sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/base/explicit_error_stepper_base.hpp
==============================================================================
--- sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/base/explicit_error_stepper_base.hpp (original)
+++ sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/base/explicit_error_stepper_base.hpp 2011-01-31 03:21:07 EST (Mon, 31 Jan 2011)
@@ -15,8 +15,10 @@
 
 #include <boost/ref.hpp>
 
-#include <boost/numeric/odeint/stepper/size_adjuster.hpp>
-#include <boost/numeric/odeint/algebra/default_resize.hpp>
+#include <boost/numeric/odeint/util/size_adjuster.hpp>
+#include <boost/numeric/odeint/util/construct.hpp>
+#include <boost/numeric/odeint/util/destruct.hpp>
+#include <boost/numeric/odeint/util/copy.hpp>
 
 
 namespace boost {

Modified: sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/base/explicit_stepper_and_error_stepper_base.hpp
==============================================================================
--- sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/base/explicit_stepper_and_error_stepper_base.hpp (original)
+++ sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/base/explicit_stepper_and_error_stepper_base.hpp 2011-01-31 03:21:07 EST (Mon, 31 Jan 2011)
@@ -15,8 +15,10 @@
 
 #include <boost/ref.hpp>
 
-#include <boost/numeric/odeint/stepper/size_adjuster.hpp>
-#include <boost/numeric/odeint/algebra/default_resize.hpp>
+#include <boost/numeric/odeint/util/size_adjuster.hpp>
+#include <boost/numeric/odeint/util/construct.hpp>
+#include <boost/numeric/odeint/util/destruct.hpp>
+#include <boost/numeric/odeint/util/copy.hpp>
 
 
 namespace boost {

Modified: sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/base/explicit_stepper_and_error_stepper_fsal_base.hpp
==============================================================================
--- sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/base/explicit_stepper_and_error_stepper_fsal_base.hpp (original)
+++ sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/base/explicit_stepper_and_error_stepper_fsal_base.hpp 2011-01-31 03:21:07 EST (Mon, 31 Jan 2011)
@@ -15,8 +15,10 @@
 
 #include <boost/ref.hpp>
 
-#include <boost/numeric/odeint/stepper/size_adjuster.hpp>
-#include <boost/numeric/odeint/algebra/default_resize.hpp>
+#include <boost/numeric/odeint/util/size_adjuster.hpp>
+#include <boost/numeric/odeint/util/construct.hpp>
+#include <boost/numeric/odeint/util/destruct.hpp>
+#include <boost/numeric/odeint/util/copy.hpp>
 
 
 namespace boost {

Modified: sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/base/explicit_stepper_base.hpp
==============================================================================
--- sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/base/explicit_stepper_base.hpp (original)
+++ sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/base/explicit_stepper_base.hpp 2011-01-31 03:21:07 EST (Mon, 31 Jan 2011)
@@ -15,8 +15,10 @@
 
 #include <boost/ref.hpp>
 
-#include <boost/numeric/odeint/stepper/size_adjuster.hpp>
-#include <boost/numeric/odeint/algebra/default_resize.hpp>
+#include <boost/numeric/odeint/util/size_adjuster.hpp>
+#include <boost/numeric/odeint/util/construct.hpp>
+#include <boost/numeric/odeint/util/destruct.hpp>
+#include <boost/numeric/odeint/util/copy.hpp>
 
 
 namespace boost {

Modified: sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/controlled_error_stepper.hpp
==============================================================================
--- sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/controlled_error_stepper.hpp (original)
+++ sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/controlled_error_stepper.hpp 2011-01-31 03:21:07 EST (Mon, 31 Jan 2011)
@@ -17,12 +17,18 @@
 
 #include <boost/ref.hpp>
 
-#include <boost/numeric/odeint/stepper/size_adjuster.hpp>
-#include <boost/numeric/odeint/stepper/controlled_step_result.hpp>
-#include <boost/numeric/odeint/stepper/stepper_categories.hpp>
+#include <boost/numeric/odeint/util/size_adjuster.hpp>
+#include <boost/numeric/odeint/util/construct.hpp>
+#include <boost/numeric/odeint/util/destruct.hpp>
+#include <boost/numeric/odeint/util/copy.hpp>
+
 #include <boost/numeric/odeint/algebra/range_algebra.hpp>
 #include <boost/numeric/odeint/algebra/default_operations.hpp>
 
+#include <boost/numeric/odeint/stepper/controlled_step_result.hpp>
+#include <boost/numeric/odeint/stepper/stepper_categories.hpp>
+
+
 
 namespace boost {
 namespace numeric {

Modified: sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/dense_output_controlled_explicit_fsal.hpp
==============================================================================
--- sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/dense_output_controlled_explicit_fsal.hpp (original)
+++ sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/dense_output_controlled_explicit_fsal.hpp 2011-01-31 03:21:07 EST (Mon, 31 Jan 2011)
@@ -11,7 +11,11 @@
 #include <utility>
 #include <stdexcept>
 
-#include <boost/numeric/odeint/stepper/size_adjuster.hpp>
+#include <boost/numeric/odeint/util/size_adjuster.hpp>
+#include <boost/numeric/odeint/util/construct.hpp>
+#include <boost/numeric/odeint/util/destruct.hpp>
+#include <boost/numeric/odeint/util/copy.hpp>
+
 #include <boost/numeric/odeint/stepper/controlled_step_result.hpp>
 
 namespace boost {

Modified: sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/dense_output_explicit.hpp
==============================================================================
--- sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/dense_output_explicit.hpp (original)
+++ sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/dense_output_explicit.hpp 2011-01-31 03:21:07 EST (Mon, 31 Jan 2011)
@@ -10,8 +10,10 @@
 
 #include <utility>
 
-#include <boost/numeric/odeint/stepper/size_adjuster.hpp>
-#include <boost/numeric/odeint/algebra/default_resize.hpp>
+#include <boost/numeric/odeint/util/size_adjuster.hpp>
+#include <boost/numeric/odeint/util/construct.hpp>
+#include <boost/numeric/odeint/util/destruct.hpp>
+#include <boost/numeric/odeint/util/copy.hpp>
 
 namespace boost {
 namespace numeric {

Modified: sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/explicit_error_dopri5.hpp
==============================================================================
--- sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/explicit_error_dopri5.hpp (original)
+++ sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/explicit_error_dopri5.hpp 2011-01-31 03:21:07 EST (Mon, 31 Jan 2011)
@@ -14,11 +14,9 @@
 
 #include <boost/ref.hpp>
 
+#include <boost/numeric/odeint/stepper/base/explicit_stepper_and_error_stepper_fsal_base.hpp>
 #include <boost/numeric/odeint/algebra/range_algebra.hpp>
 #include <boost/numeric/odeint/algebra/default_operations.hpp>
-#include <boost/numeric/odeint/algebra/default_resize.hpp>
-
-#include <boost/numeric/odeint/stepper/base/explicit_stepper_and_error_stepper_fsal_base.hpp>
 #include <boost/numeric/odeint/stepper/stepper_categories.hpp>
 #include <boost/numeric/odeint/stepper/detail/macros.hpp>
 

Modified: sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/explicit_error_rk54_ck.hpp
==============================================================================
--- sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/explicit_error_rk54_ck.hpp (original)
+++ sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/explicit_error_rk54_ck.hpp 2011-01-31 03:21:07 EST (Mon, 31 Jan 2011)
@@ -15,11 +15,9 @@
 
 #include <boost/ref.hpp>
 
+#include <boost/numeric/odeint/stepper/base/explicit_stepper_and_error_stepper_base.hpp>
 #include <boost/numeric/odeint/algebra/range_algebra.hpp>
 #include <boost/numeric/odeint/algebra/default_operations.hpp>
-#include <boost/numeric/odeint/algebra/default_resize.hpp>
-
-#include <boost/numeric/odeint/stepper/base/explicit_stepper_and_error_stepper_base.hpp>
 #include <boost/numeric/odeint/stepper/stepper_categories.hpp>
 #include <boost/numeric/odeint/stepper/detail/macros.hpp>
 

Modified: sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/explicit_euler.hpp
==============================================================================
--- sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/explicit_euler.hpp (original)
+++ sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/explicit_euler.hpp 2011-01-31 03:21:07 EST (Mon, 31 Jan 2011)
@@ -13,10 +13,9 @@
 #ifndef BOOST_BOOST_NUMERIC_ODEINT_EXPLICIT_EULER_HPP_INCLUDED
 #define BOOST_BOOST_NUMERIC_ODEINT_EXPLICIT_EULER_HPP_INCLUDED
 
+#include <boost/numeric/odeint/stepper/base/explicit_stepper_base.hpp>
 #include <boost/numeric/odeint/algebra/range_algebra.hpp>
 #include <boost/numeric/odeint/algebra/default_operations.hpp>
-
-#include <boost/numeric/odeint/stepper/base/explicit_stepper_base.hpp>
 #include <boost/numeric/odeint/stepper/detail/macros.hpp>
 
 namespace boost {

Modified: sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/explicit_rk4.hpp
==============================================================================
--- sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/explicit_rk4.hpp (original)
+++ sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/explicit_rk4.hpp 2011-01-31 03:21:07 EST (Mon, 31 Jan 2011)
@@ -15,11 +15,9 @@
 
 #include <boost/ref.hpp>
 
+#include <boost/numeric/odeint/stepper/base/explicit_stepper_base.hpp>
 #include <boost/numeric/odeint/algebra/range_algebra.hpp>
 #include <boost/numeric/odeint/algebra/default_operations.hpp>
-#include <boost/numeric/odeint/algebra/default_resize.hpp>
-
-#include <boost/numeric/odeint/stepper/base/explicit_stepper_base.hpp>
 #include <boost/numeric/odeint/stepper/detail/macros.hpp>
 
 namespace boost {

Modified: sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/implicit_euler.hpp
==============================================================================
--- sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/implicit_euler.hpp (original)
+++ sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/implicit_euler.hpp 2011-01-31 03:21:07 EST (Mon, 31 Jan 2011)
@@ -14,8 +14,9 @@
 
 #include <utility>
 
-#include <boost/numeric/odeint/stepper/size_adjuster.hpp>
-#include <boost/numeric/odeint/algebra/external/ublas_resize.hpp>
+#include <boost/numeric/odeint/util/size_adjuster.hpp>
+#include <boost/numeric/odeint/util/matrix_vector_adjust_size.hpp>
+#include <boost/numeric/odeint/util/ublas_resize.hpp>
 
 #include <boost/numeric/ublas/vector.hpp>
 #include <boost/numeric/ublas/matrix.hpp>
@@ -36,19 +37,6 @@
 
 
 
-struct matrix_vector_adjuster
-{
- template< class Vector , class Matrix >
- static bool adjust_size( const Vector &v , Matrix &m )
- {
- if( ( m.size1() != v.size() ) || ( m.size2() != v.size() ) )
- {
- m.resize( v.size() , v.size() );
- return true;
- }
- return false;
- }
-};
 
 
 template< class ValueType , class AdjustSizePolicy = adjust_size_initially_tag >
@@ -152,7 +140,7 @@
 
     const value_type m_epsilon;
     size_adjuster< state_type , 3 > m_state_adjuster;
- size_adjuster< matrix_type , 1 , matrix_vector_adjuster> m_matrix_adjuster;
+ size_adjuster< matrix_type , 1 , matrix_vector_adjust_size > m_matrix_adjuster;
     size_adjuster< pmatrix_type , 1 > m_pmatrix_adjuster;
     state_type m_dxdt;
     state_type m_x;

Added: sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/rosenbrock4.hpp
==============================================================================
--- (empty file)
+++ sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/rosenbrock4.hpp 2011-01-31 03:21:07 EST (Mon, 31 Jan 2011)
@@ -0,0 +1,165 @@
+/*
+ * rosenbrock4.hpp
+ *
+ * Created on: Jan 30, 2011
+ * Author: karsten
+ */
+
+#ifndef BOOST_NUMERIC_ODEINT_STEPPER_ROSENBROCK4_HPP_
+#define BOOST_NUMERIC_ODEINT_STEPPER_ROSENBROCK4_HPP_
+
+#include <boost/ref.hpp>
+
+#include <boost/numeric/ublas/vector.hpp>
+#include <boost/numeric/ublas/matrix.hpp>
+#include <boost/numeric/ublas/lu.hpp>
+
+#include <boost/numeric/odeint/stepper/controlled_step_result.hpp>
+#include <boost/numeric/odeint/util/size_adjuster.hpp>
+
+namespace boost {
+namespace numeric {
+namespace odeint {
+
+
+
+/*
+ * ToDo:
+ *
+ * 1. roll out parameters
+ * 2. how to call, with jacobi and system?
+ * 3. Introduce adjust size
+ * 4. Interfacing for odeint, check if controlled_error_stepper can be used
+ * 5. dense output
+ * 6. roll out matrix_vector_adjuster
+ */
+template< class Value >
+class rosenbrock4
+{
+public:
+
+ typedef Value value_type;
+ typedef boost::numeric::ublas::vector< value_type > state_type;
+ typedef state_type deriv_type;
+ typedef value_type time_type;
+ typedef boost::numeric::ublas::matrix< time_type > matrix_type;
+ typedef boost::numeric::ublas::permutation_matrix< size_t > pmatrix_type;
+
+ rosenbrock4( void )
+ {
+ }
+
+ template< class System >
+ void do_step( System system , const state_type &x , time_type t , state_type &xout , time_type dt , state_type &xerr )
+ {
+ const value_type gamma = 0.25;
+ const value_type d1 = 0.25 , d2 = -0.1043 , d3 = 0.1035 , d4 = 0.3620000000000023e-01;
+ const value_type c2 = 0.386 , c3 = 0.21 , c4 = 0.63;
+ const value_type c21 = -0.5668800000000000e+01;
+ const value_type a21 = 0.1544000000000000e+01;
+ const value_type c31 = -0.2430093356833875e+01 , c32 = -0.2063599157091915e+00;
+ const value_type a31 = 0.9466785280815826e+00 , a32 = 0.2557011698983284e+00;
+ const value_type c41 = -0.1073529058151375e+00 , c42 = -0.9594562251023355e+01 , c43 = -0.2047028614809616e+02;
+ const value_type a41 = 0.3314825187068521e+01 , a42 = 0.2896124015972201e+01 , a43 = 0.9986419139977817e+00;
+ const value_type c51 = 0.7496443313967647e+01 , c52 = -0.1024680431464352e+02 , c53 = -0.3399990352819905e+02 , c54 = 0.1170890893206160e+02;
+ const value_type a51 = 0.1221224509226641e+01 , a52 = 0.6019134481288629e+01 , a53 = 0.1253708332932087e+02 , a54 = -0.6878860361058950e+00 ;
+ const value_type c61 = 0.8083246795921522e+01 , c62 = -0.7981132988064893e+01 , c63 = -0.3152159432874371e+02 , c64 = 0.1631930543123136e+02 , c65 = -0.6058818238834054e+01;
+
+ typedef typename boost::unwrap_reference< System >::type system_type;
+ typedef typename boost::unwrap_reference< typename system_type::first_type >::type deriv_func_type;
+ typedef typename boost::unwrap_reference< typename system_type::second_type >::type jacobi_func_type;
+ system_type &sys = system;
+ deriv_func_type &deriv_func = sys.first;
+ jacobi_func_type &jacobi_func = sys.second;
+
+
+ const size_t n = x.size();
+ matrix_type jac( n , n );
+ pmatrix_type pm( n );
+ state_type dfdt( n ) , dxdt( n );
+ deriv_func( x , dxdt , t );
+ jacobi_func( x , jac , t , dfdt );
+
+ state_type g1( n ) , g2( n ) , g3( n ) , g4( n ) , g5( n );
+ state_type xtmp( n ) , dxdtnew( n );
+
+
+ jac *= -1.0;
+ jac += 1.0 / gamma / dt * boost::numeric::ublas::identity_matrix< time_type >( n );
+ boost::numeric::ublas::lu_factorize( jac , pm );
+
+ for( size_t i=0 ; i<n ; ++i )
+ g1[i] = dxdt[i] + dt * d1 * dfdt[i];
+ boost::numeric::ublas::lu_substitute( jac , pm , g1 );
+
+
+ for( size_t i=0 ; i<n ; ++i )
+ xtmp[i] = x[i] + a21 * g1[i];
+ deriv_func( xtmp , dxdtnew , t + c2 * dt );
+ for( size_t i=0 ; i<n ; ++i )
+ g2[i] = dxdtnew[i] + dt * d2 * dfdt[i] + c21 * g1[i] / dt;
+ boost::numeric::ublas::lu_substitute( jac , pm , g2 );
+
+
+ for( size_t i=0 ; i<n ; ++i )
+ xtmp[i] = x[i] + a31 * g1[i] + a32 * g2[i];
+ deriv_func( xtmp , dxdtnew , t + c3 * dt );
+ for( size_t i=0 ; i<n ; ++i )
+ g3[i] = dxdtnew[i] + dt * d3 * dfdt[i] + ( c31 * g1[i] + c32 * g2[i] ) / dt;
+ boost::numeric::ublas::lu_substitute( jac , pm , g3 );
+
+
+ for( size_t i=0 ; i<n ; ++i )
+ xtmp[i] = x[i] + a41 * g1[i] + a42 * g2[i] + a43 * g3[i];
+ deriv_func( xtmp , dxdtnew , t + c4 * dt );
+ for( size_t i=0 ; i<n ; ++i )
+ g4[i] = dxdtnew[i] + dt * d4 * dfdt[i] + ( c41 * g1[i] + c42 * g2[i] + c43 * g3[i] ) / dt;
+ boost::numeric::ublas::lu_substitute( jac , pm , g4 );
+
+
+ for( size_t i=0 ; i<n ; ++i )
+ xtmp[i] = x[i] + a51 * g1[i] + a52 * g2[i] + a53 * g3[i] + a54 * g4[i];
+ deriv_func( xtmp , dxdtnew , t + dt );
+ for( size_t i=0 ; i<n ; ++i )
+ g5[i] = dxdtnew[i] + ( c51 * g1[i] + c52 * g2[i] + c53 * g3[i] + c54 * g4[i] ) / dt;
+ boost::numeric::ublas::lu_substitute( jac , pm , g5 );
+
+ for( size_t i=0 ; i<n ; ++i )
+ xtmp[i] += g5[i];
+ deriv_func( xtmp , dxdtnew , t + dt );
+ for( size_t i=0 ; i<n ; ++i )
+ xerr[i] = dxdtnew[i] + ( c61 * g1[i] + c62 * g2[i] + c63 * g3[i] + c64 * g4[i] + c65 * g5[i] ) / dt;
+ boost::numeric::ublas::lu_substitute( jac , pm , xerr );
+
+ for( size_t i=0 ; i<n ; ++i )
+ xout[i] = xtmp[i] + xerr[i];
+ }
+
+ template< class System >
+ void do_step( System system , state_type &x , time_type t , time_type dt , state_type &xerr )
+ {
+ do_step( system , x , t , x , dt , xerr );
+ }
+
+
+private:
+
+ size_adjuster< state_type , 9 > m_state_adjuster;
+ size_adjuster< matrix_type , 1 , matrix_vector_adjuster> m_matrix_adjuster;
+ size_adjuster< pmatrix_type , 1 > m_pmatrix_adjuster;
+
+ matrix_type m_jac;
+ pmatrix_type m_pm;
+ state_type m_dfdt , m_dxdt;
+ state_type m_g1 , m_g2 , m_g3 , m_g4 , m_g5;
+ state_type m_xtmp , m_dxdtnew;
+
+
+};
+
+
+} // namespace odeint
+} // namespace numeric
+} // namespace boost
+
+#endif /* BOOST_NUMERIC_ODEINT_STEPPER_ROSENBROCK4_HPP_ */

Deleted: sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/size_adjuster.hpp
==============================================================================
--- sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/size_adjuster.hpp 2011-01-31 03:21:07 EST (Mon, 31 Jan 2011)
+++ (empty file)
@@ -1,213 +0,0 @@
-/*
- boost header: NUMERIC_ODEINT/adjust_size.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_ADJUST_SIZE_HPP_INCLUDED
-#define BOOST_NUMERIC_ODEINT_ADJUST_SIZE_HPP_INCLUDED
-
-#include <algorithm>
-
-#include <boost/noncopyable.hpp>
-#include <boost/array.hpp>
-
-#include <boost/numeric/odeint/algebra/default_resize.hpp>
-
-
-namespace boost {
-namespace numeric {
-namespace odeint {
-
-
-
-/*
- * Tags to specify resize behavior of steppers
- */
-struct adjust_size_manually_tag {};
-struct adjust_size_initially_tag {};
-struct adjust_size_always_tag {};
-
-
-
-/*
- * we need this interface in order to call matrix by vector resizing,
- * i.e. mat.resize( vec.size() , vec.size() )
- *
- * See implicit_euler.hpp for usage
- */
-struct default_adjust_size_caller
-{
- template< class Container1 , class Container2 >
- static bool adjust_size( const Container1 &x1 , Container2 &x2 )
- {
- return boost::numeric::odeint::adjust_size( x1 , x2 );
- }
-};
-
-
-/*
- * Adjust size functionality with policies and resizeability
- */
-template< class Container , size_t Dim , class AdjustSizeCaller = default_adjust_size_caller >
-class size_adjuster : boost::noncopyable
-{
-public:
-
- typedef Container container_type;
- static const size_t dim = Dim;
- typedef AdjustSizeCaller adjust_size_caller;
-
- size_adjuster() : m_is_initialized( false ) , m_states()
- {
- std::fill( m_states.begin() , m_states.end() , static_cast< container_type* >( 0 ) );
- }
-
- template< class State >
- bool adjust_size( const State &x )
- {
- return adjust_size_by_resizeability( x , typename is_resizeable< container_type >::type() );
- }
-
- template< class State >
- bool adjust_size_by_policy( const State &x , adjust_size_manually_tag )
- {
- return false;
- }
-
- template< class State >
- bool adjust_size_by_policy( const State &x , adjust_size_initially_tag )
- {
- if( !m_is_initialized )
- {
- m_is_initialized = true;
- return adjust_size_by_resizeability( x , typename is_resizeable< container_type >::type() );
- }
- else
- {
- return false;
- }
- }
-
- template< class State >
- bool adjust_size_by_policy( const State &x , adjust_size_always_tag )
- {
- return adjust_size_by_resizeability( x , typename is_resizeable< container_type >::type() );
- }
-
- void register_state( size_t idx , container_type &x )
- {
- m_states[idx] = &x;
- }
-
-
-private:
-
- template< class State >
- bool adjust_size_by_resizeability( const State &x , boost::true_type )
- {
- for( size_t i=0 ; i<dim ; ++i )
- {
- adjust_size_caller::adjust_size( x , *(m_states[i]) );
- }
- return ( dim > 0 );
- }
-
- template< class State >
- bool adjust_size_by_resizeability( const State &x , boost::false_type )
- {
- return false;
- }
-
-
-private :
-
- bool m_is_initialized;
- boost::array< container_type* , dim > m_states;
-};
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-/*
- * really old stuff
- */
-//template< class State , class AdjustSizeImpl >
-//class size_adjuster
-//{
-//public:
-//
-// size_adjuster( AdjustSizeImpl &adjust_size_impl ) : m_is_initialized( false ) , m_adjust_size_impl( adjust_size_impl ) { }
-//
-// void adjust_size( const State &x )
-// {
-// adjust_size_by_resizeability( x , typename is_resizeable< State >::type() );
-// }
-//
-// void adjust_size_by_policy( const State &x , adjust_size_manually_tag )
-// {
-// }
-//
-// void adjust_size_by_policy( const State &x , adjust_size_initially_tag )
-// {
-// if( !m_is_initialized )
-// {
-// adjust_size_by_resizeability( x , typename is_resizeable< State >::type() );
-// m_is_initialized = true;
-// }
-// }
-//
-// void adjust_size_by_policy( const State &x , adjust_size_always_tag )
-// {
-// adjust_size_by_resizeability( x , typename is_resizeable< State >::type() );
-// }
-//
-//
-//private:
-//
-//
-// void adjust_size_by_resizeability( const State &x , boost::true_type )
-// {
-// m_adjust_size_impl( x );
-// }
-//
-// void adjust_size_by_resizeability( const State &x , boost::false_type )
-// {
-// }
-//
-//
-//private :
-//
-// bool m_is_initialized;
-// AdjustSizeImpl &m_adjust_size_impl;
-//};
-
-
-} // odeint
-} // numeric
-} // boost
-
-
-#endif //BOOST_NUMERIC_ODEINT_ADJUST_SIZE_HPP_INCLUDED

Added: sandbox/odeint/branches/karsten/boost/numeric/odeint/util/construct.hpp
==============================================================================
--- (empty file)
+++ sandbox/odeint/branches/karsten/boost/numeric/odeint/util/construct.hpp 2011-01-31 03:21:07 EST (Mon, 31 Jan 2011)
@@ -0,0 +1,39 @@
+/*
+ * construct.hpp
+ *
+ * Created on: Jan 30, 2011
+ * Author: karsten
+ */
+
+#ifndef BOOST_NUMERIC_ODEINT_UTIL_CONSTRUCT_HPP_
+#define BOOST_NUMERIC_ODEINT_UTIL_CONSTRUCT_HPP_
+
+namespace boost {
+namespace numeric {
+namespace odeint {
+
+/*
+ * Default implementation for constructing a container does nothing
+ * gsl_vector must be construct explicitly
+ */
+template< class Container >
+struct construct_impl
+{
+ static void construct( Container &x )
+ {
+ }
+};
+
+
+template< class Container >
+void construct( Container &x )
+{
+ construct_impl< Container >::construct( x );
+}
+
+
+} // namespace odeint
+} // namespace numeric
+} // namespace boost
+
+#endif /* BOOST_NUMERIC_ODEINT_UTIL_CONSTRUCT_HPP_ */

Added: sandbox/odeint/branches/karsten/boost/numeric/odeint/util/copy.hpp
==============================================================================
--- (empty file)
+++ sandbox/odeint/branches/karsten/boost/numeric/odeint/util/copy.hpp 2011-01-31 03:21:07 EST (Mon, 31 Jan 2011)
@@ -0,0 +1,40 @@
+/*
+ * copy.hpp
+ *
+ * Created on: Jan 30, 2011
+ * Author: karsten
+ */
+
+#ifndef BOOST_NUMERIC_ODEINT_UTIL_COPY_HPP_
+#define BOOST_NUMERIC_ODEINT_UTIL_COPY_HPP_
+
+namespace boost {
+namespace numeric {
+namespace odeint {
+
+/*
+ * Default implementation of the copy operation used the assign operator
+ * gsl_vector must copied differently
+ */
+template< class Container1, class Container2 >
+struct copy_impl
+{
+ static void copy( const Container1 &from , Container2 &to )
+ {
+ to = from;
+ }
+};
+
+template< class Container1 , class Container2 >
+void copy( const Container1 &from , Container2 &to )
+{
+ copy_impl< Container1 , Container2 >::copy( from , to );
+}
+
+
+} // namespace odeint
+} // namespace numeric
+} // namespace boost
+
+
+#endif /* BOOST_NUMERIC_ODEINT_UTIL_COPY_HPP_ */

Added: sandbox/odeint/branches/karsten/boost/numeric/odeint/util/default_adjust_size.hpp
==============================================================================
--- (empty file)
+++ sandbox/odeint/branches/karsten/boost/numeric/odeint/util/default_adjust_size.hpp 2011-01-31 03:21:07 EST (Mon, 31 Jan 2011)
@@ -0,0 +1,51 @@
+/*
+ * adjust_size.hpp
+ *
+ * Created on: Jan 30, 2011
+ * Author: karsten
+ */
+
+#ifndef BOOST_NUMERIC_ODEINT_UTIL_ADJUST_SIZE_HPP_
+#define BOOST_NUMERIC_ODEINT_UTIL_ADJUST_SIZE_HPP_
+
+#include <boost/numeric/odeint/util/same_size.hpp>
+#include <boost/numeric/odeint/util/resize.hpp>
+
+namespace boost {
+namespace numeric {
+namespace odeint {
+
+
+
+/*
+ *
+ * We need this interface in order to call matrix by vector resizing,
+ * i.e. mat.resize( vec.size() , vec.size() )
+ *
+ * See implicit_euler.hpp for usage
+ */
+struct default_adjust_size
+{
+ template< class Container1 , class Container2 >
+ static bool adjust_size( const Container1 &x1 , Container2 &x2 )
+ {
+ if( !same_size( x1 , x2 ) )
+ {
+ resize( x1 , x2 );
+ return true;
+ }
+ else
+ {
+ return false;
+ }
+ }
+};
+
+
+
+} // namespace odeint
+} // namespace numeric
+} // namespace boost
+
+
+#endif /* BOOST_NUMERIC_ODEINT_UTIL_ADJUST_SIZE_HPP_ */

Added: sandbox/odeint/branches/karsten/boost/numeric/odeint/util/destruct.hpp
==============================================================================
--- (empty file)
+++ sandbox/odeint/branches/karsten/boost/numeric/odeint/util/destruct.hpp 2011-01-31 03:21:07 EST (Mon, 31 Jan 2011)
@@ -0,0 +1,39 @@
+/*
+ * destruct.hpp
+ *
+ * Created on: Jan 30, 2011
+ * Author: karsten
+ */
+
+#ifndef BOOST_NUMERIC_ODEINT_UTIL_DESTRUCT_HPP_
+#define BOOST_NUMERIC_ODEINT_UTIL_DESTRUCT_HPP_
+
+namespace boost {
+namespace numeric {
+namespace odeint {
+
+/*
+ * Default implementation for destruction of a container does nothing
+ * gsl_vector must be destroyed explicitly
+ */
+template< class Container >
+struct destruct_impl
+{
+ static void destruct( Container &x )
+ {
+ }
+};
+
+template< class Container >
+void destruct( Container &x )
+{
+ destruct_impl< Container >::destruct( x );
+}
+
+
+} // namespace odeint
+} // namespace numeric
+} // namespace boost
+
+
+#endif /* BOOST_NUMERIC_ODEINT_UTIL_DESTRUCT_HPP_ */

Added: sandbox/odeint/branches/karsten/boost/numeric/odeint/util/is_resizeable.hpp
==============================================================================
--- (empty file)
+++ sandbox/odeint/branches/karsten/boost/numeric/odeint/util/is_resizeable.hpp 2011-01-31 03:21:07 EST (Mon, 31 Jan 2011)
@@ -0,0 +1,47 @@
+/*
+ * is_resizeable.hpp
+ *
+ * Created on: Jan 30, 2011
+ * Author: karsten
+ */
+
+#ifndef BOOST_NUMERIC_ODEINT_UTIL_IS_RESIZEABLE_HPP_
+#define BOOST_NUMERIC_ODEINT_UTIL_IS_RESIZEABLE_HPP_
+
+#include <vector>
+
+#include <boost/type_traits/integral_constant.hpp> //for true_type and false_type
+
+
+namespace boost {
+namespace numeric {
+namespace odeint {
+
+/*
+ * by default any type is not resizable
+ */
+template< class Container >
+struct is_resizeable
+{
+ struct type : public boost::false_type { };
+ const static bool value = type::value;
+};
+
+/*
+ * specialization for std::vector
+ */
+template< class V, class A >
+struct is_resizeable< std::vector< V , A > >
+{
+ struct type : public boost::true_type { };
+ const static bool value = type::value;
+};
+
+
+
+} // namespace odeint
+} // namespace numeric
+} // namespace boost
+
+
+#endif /* BOOST_NUMERIC_ODEINT_UTIL_IS_RESIZEABLE_HPP_ */

Added: sandbox/odeint/branches/karsten/boost/numeric/odeint/util/matrix_vector_adjust_size.hpp
==============================================================================
--- (empty file)
+++ sandbox/odeint/branches/karsten/boost/numeric/odeint/util/matrix_vector_adjust_size.hpp 2011-01-31 03:21:07 EST (Mon, 31 Jan 2011)
@@ -0,0 +1,35 @@
+/*
+ * matrix_vector_adjuster.hpp
+ *
+ * Created on: Jan 31, 2011
+ * Author: karsten
+ */
+
+#ifndef BOOST_NUMERIC_ODEINT_UTIL_MATRIX_VECTOR_ADJUST_SIZE_HPP_
+#define BOOST_NUMERIC_ODEINT_UTIL_MATRIX_VECTOR_ADJUST_SIZE_HPP_
+
+
+namespace boost {
+namespace numeric {
+namespace odeint {
+
+struct matrix_vector_adjust_size
+{
+ template< class Vector , class Matrix >
+ static bool adjust_size( const Vector &v , Matrix &m )
+ {
+ if( ( m.size1() != v.size() ) || ( m.size2() != v.size() ) )
+ {
+ m.resize( v.size() , v.size() );
+ return true;
+ }
+ return false;
+ }
+};
+
+} // namespace odeint
+} // namespace numeric
+} // namespace boost
+
+
+#endif /* BOOST_NUMERIC_ODEINT_UTIL_MATRIX_VECTOR_ADJUSTER_HPP_ */

Added: sandbox/odeint/branches/karsten/boost/numeric/odeint/util/resize.hpp
==============================================================================
--- (empty file)
+++ sandbox/odeint/branches/karsten/boost/numeric/odeint/util/resize.hpp 2011-01-31 03:21:07 EST (Mon, 31 Jan 2011)
@@ -0,0 +1,43 @@
+/*
+ * resize.hpp
+ *
+ * Created on: Jan 30, 2011
+ * Author: karsten
+ */
+
+#ifndef BOOST_NUMERIC_ODEINT_UTIL_RESIZE_HPP_
+#define BOOST_NUMERIC_ODEINT_UTIL_RESIZE_HPP_
+
+#include <boost/range/size.hpp>
+
+namespace boost {
+namespace numeric {
+namespace odeint {
+
+
+/*
+ * Default implementation of resize functionality.
+ * This struct has to be specialized in order to work with ublas::matrix, etc.
+ */
+template< class Container1 , class Container2 >
+struct resize_impl
+{
+ static void resize( const Container1 &x1 , Container2 &x2 )
+ {
+ x2.resize( boost::size( x1 ) );
+ }
+};
+
+template< class Container1 , class Container2 >
+void resize( const Container1 &x1 , Container2 &x2 )
+{
+ resize_impl< Container1 , Container2 >::resize( x1 , x2 );
+}
+
+
+
+} // namespace odeint
+} // namespace numeric
+} // namespace boost
+
+#endif /* BOOST_NUMERIC_ODEINT_UTIL_RESIZE_HPP_ */

Added: sandbox/odeint/branches/karsten/boost/numeric/odeint/util/same_size.hpp
==============================================================================
--- (empty file)
+++ sandbox/odeint/branches/karsten/boost/numeric/odeint/util/same_size.hpp 2011-01-31 03:21:07 EST (Mon, 31 Jan 2011)
@@ -0,0 +1,43 @@
+/*
+ * same_size.hpp
+ *
+ * Created on: Jan 30, 2011
+ * Author: karsten
+ */
+
+#ifndef BOOST_NUMERIC_ODEINT_UTIL_SAME_SIZE_HPP_
+#define BOOST_NUMERIC_ODEINT_UTIL_SAME_SIZE_HPP_
+
+#include <boost/range/size.hpp>
+
+namespace boost {
+namespace numeric {
+namespace odeint {
+
+
+/*
+ * Default implementation of same_size functionality.
+ * This struct has to be specialized in order to work with ublas::matrix, etc.
+ */
+template< class Container1 , class Container2 >
+struct same_size_impl
+{
+ static bool same_size( const Container1 &x1 , const Container2 &x2 )
+ {
+ return ( boost::size( x1 ) == boost::size( x2 ) );
+ }
+};
+
+template< class Container1 , class Container2 >
+bool same_size( const Container1 &x1 , const Container2 &x2 )
+{
+ return same_size_impl< Container1 , Container2 >::same_size( x1 , x2 );
+}
+
+
+
+} // namespace odeint
+} // namespace numeric
+} // namespace boost
+
+#endif /* BOOST_NUMERIC_ODEINT_UTIL_SAME_SIZE_HPP_ */

Copied: sandbox/odeint/branches/karsten/boost/numeric/odeint/util/size_adjuster.hpp (from r68544, /sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/size_adjuster.hpp)
==============================================================================
--- /sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/size_adjuster.hpp (original)
+++ sandbox/odeint/branches/karsten/boost/numeric/odeint/util/size_adjuster.hpp 2011-01-31 03:21:07 EST (Mon, 31 Jan 2011)
@@ -18,7 +18,8 @@
 #include <boost/noncopyable.hpp>
 #include <boost/array.hpp>
 
-#include <boost/numeric/odeint/algebra/default_resize.hpp>
+#include <boost/numeric/odeint/util/is_resizeable.hpp>
+#include <boost/numeric/odeint/util/default_adjust_size.hpp>
 
 
 namespace boost {
@@ -36,26 +37,12 @@
 
 
 
-/*
- * we need this interface in order to call matrix by vector resizing,
- * i.e. mat.resize( vec.size() , vec.size() )
- *
- * See implicit_euler.hpp for usage
- */
-struct default_adjust_size_caller
-{
- template< class Container1 , class Container2 >
- static bool adjust_size( const Container1 &x1 , Container2 &x2 )
- {
- return boost::numeric::odeint::adjust_size( x1 , x2 );
- }
-};
 
 
 /*
  * Adjust size functionality with policies and resizeability
  */
-template< class Container , size_t Dim , class AdjustSizeCaller = default_adjust_size_caller >
+template< class Container , size_t Dim , class AdjustSizeCaller = default_adjust_size >
 class size_adjuster : boost::noncopyable
 {
 public:

Copied: sandbox/odeint/branches/karsten/boost/numeric/odeint/util/ublas_resize.hpp (from r68544, /sandbox/odeint/branches/karsten/boost/numeric/odeint/algebra/external/ublas_resize.hpp)
==============================================================================

Modified: sandbox/odeint/branches/karsten/libs/numeric/odeint/doc/html/boost_sandbox_numeric_odeint/reference.html
==============================================================================
--- sandbox/odeint/branches/karsten/libs/numeric/odeint/doc/html/boost_sandbox_numeric_odeint/reference.html (original)
+++ sandbox/odeint/branches/karsten/libs/numeric/odeint/doc/html/boost_sandbox_numeric_odeint/reference.html 2011-01-31 03:21:07 EST (Mon, 31 Jan 2011)
@@ -33,7 +33,7 @@
       classes</a>
 </h3></div></div></div>
 <div class="table">
-<a name="id578400"></a><p class="title"><b>Table&#160;1.3.&#160;Stepper Algorithms</b></p>
+<a name="id578418"></a><p class="title"><b>Table&#160;1.3.&#160;Stepper Algorithms</b></p>
 <div class="table-contents"><table class="table" summary="Stepper Algorithms">
 <colgroup>
 <col>

Modified: sandbox/odeint/branches/karsten/libs/numeric/odeint/doc/html/boost_sandbox_numeric_odeint/tutorial.html
==============================================================================
--- sandbox/odeint/branches/karsten/libs/numeric/odeint/doc/html/boost_sandbox_numeric_odeint/tutorial.html (original)
+++ sandbox/odeint/branches/karsten/libs/numeric/odeint/doc/html/boost_sandbox_numeric_odeint/tutorial.html 2011-01-31 03:21:07 EST (Mon, 31 Jan 2011)
@@ -632,6 +632,15 @@
           blah blah
         </p>
 </div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="boost_sandbox_numeric_odeint.tutorial.special_topics.using_arbitrary_precision_floating_point_types"></a><a class="link" href="tutorial.html#boost_sandbox_numeric_odeint.tutorial.special_topics.using_arbitrary_precision_floating_point_types" title="Using arbitrary precision floating point types">Using
+ arbitrary precision floating point types</a>
+</h4></div></div></div>
+<p>
+ GMP
+ </p>
+</div>
 </div>
 <div class="section">
 <div class="titlepage"><div><div><h3 class="title">

Modified: sandbox/odeint/branches/karsten/libs/numeric/odeint/doc/html/index.html
==============================================================================
--- sandbox/odeint/branches/karsten/libs/numeric/odeint/doc/html/index.html (original)
+++ sandbox/odeint/branches/karsten/libs/numeric/odeint/doc/html/index.html 2011-01-31 03:21:07 EST (Mon, 31 Jan 2011)
@@ -87,7 +87,7 @@
 </div>
 </div>
 <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
-<td align="left"><p><small>Last revised: January 29, 2011 at 16:20:42 GMT</small></p></td>
+<td align="left"><p><small>Last revised: January 30, 2011 at 19:12:57 GMT</small></p></td>
 <td align="right"><div class="copyright-footer"></div></td>
 </tr></table>
 <hr>

Modified: sandbox/odeint/branches/karsten/libs/numeric/odeint/ideas/units/adjust_size_units.hpp
==============================================================================
--- sandbox/odeint/branches/karsten/libs/numeric/odeint/ideas/units/adjust_size_units.hpp (original)
+++ sandbox/odeint/branches/karsten/libs/numeric/odeint/ideas/units/adjust_size_units.hpp 2011-01-31 03:21:07 EST (Mon, 31 Jan 2011)
@@ -18,7 +18,7 @@
 #include <boost/noncopyable.hpp>
 #include <boost/array.hpp>
 
-#include <boost/numeric/odeint/algebra/default_resize.hpp>
+#include <boost/numeric/odeint/util/default_adjust_size.hpp>
 
 
 namespace boost {
@@ -27,13 +27,6 @@
 
 
 
-/*
- * Tags to specify resize behavior of steppers
- */
-struct adjust_size_manually_tag {};
-struct adjust_size_initially_tag {};
-struct adjust_size_always_tag {};
-
 
 
 
@@ -97,7 +90,7 @@
         {
                 for( size_t i=0 ; i<Dim ; ++i )
                 {
- boost::numeric::odeint::adjust_size( x , *(m_states[i]) );
+ boost::numeric::odeint::default_adjust_size::adjust_size( x , *(m_states[i]) );
                 }
                 return ( Dim > 0 );
         }

Modified: sandbox/odeint/branches/karsten/libs/numeric/odeint/ideas/units/explicit_stepper_base_units.hpp
==============================================================================
--- sandbox/odeint/branches/karsten/libs/numeric/odeint/ideas/units/explicit_stepper_base_units.hpp (original)
+++ sandbox/odeint/branches/karsten/libs/numeric/odeint/ideas/units/explicit_stepper_base_units.hpp 2011-01-31 03:21:07 EST (Mon, 31 Jan 2011)
@@ -16,7 +16,11 @@
 #include <boost/noncopyable.hpp>
 #include <boost/ref.hpp>
 
-#include <boost/numeric/odeint/algebra/default_resize.hpp>
+#include <boost/numeric/odeint/util/size_adjuster.hpp>
+#include <boost/numeric/odeint/util/construct.hpp>
+#include <boost/numeric/odeint/util/destruct.hpp>
+#include <boost/numeric/odeint/util/copy.hpp>
+
 
 #include "adjust_size_units.hpp"
 

Modified: sandbox/odeint/branches/karsten/libs/numeric/odeint/test/resizing.cpp
==============================================================================
--- sandbox/odeint/branches/karsten/libs/numeric/odeint/test/resizing.cpp (original)
+++ sandbox/odeint/branches/karsten/libs/numeric/odeint/test/resizing.cpp 2011-01-31 03:21:07 EST (Mon, 31 Jan 2011)
@@ -41,18 +41,30 @@
 namespace boost { namespace numeric { namespace odeint {
 
 
- template<> struct is_resizeable< test_array_type >
+ template<>
+ struct is_resizeable< test_array_type >
         {
                 struct type : public boost::true_type { };
                 const static bool value = type::value;
         };
 
+ template<>
+ struct same_size_impl< test_array_type , test_array_type >
+ {
+ static bool same_size( const test_array_type &x1 , const test_array_type &x2 )
+ {
+ adjust_size_count++;
+ return true;
+ }
+ };
 
- template<> bool adjust_size( const test_array_type &x1 , test_array_type &x2 )
+ template <>
+ struct resize_impl< test_array_type , test_array_type >
         {
- adjust_size_count++;
- return false;
- }
+ static void resize( const test_array_type &x1 , test_array_type &x2 )
+ {
+ }
+ };
 
 } } }
 

Modified: sandbox/odeint/branches/karsten/libs/numeric/odeint/test/stepper_copying.cpp
==============================================================================
--- sandbox/odeint/branches/karsten/libs/numeric/odeint/test/stepper_copying.cpp (original)
+++ sandbox/odeint/branches/karsten/libs/numeric/odeint/test/stepper_copying.cpp 2011-01-31 03:21:07 EST (Mon, 31 Jan 2011)
@@ -10,7 +10,10 @@
 
 #include <boost/test/unit_test.hpp>
 
-#include <boost/numeric/odeint/algebra/default_resize.hpp>
+#include <boost/numeric/odeint/util/construct.hpp>
+#include <boost/numeric/odeint/util/destruct.hpp>
+#include <boost/numeric/odeint/util/copy.hpp>
+
 #include <boost/numeric/odeint/stepper/explicit_euler.hpp>
 #include <boost/numeric/odeint/stepper/explicit_rk4.hpp>
 #include <boost/numeric/odeint/stepper/explicit_error_rk54_ck.hpp>

Modified: sandbox/odeint/branches/karsten/libs/numeric/odeint/test_external/mkl/check_mkl.cpp
==============================================================================
--- sandbox/odeint/branches/karsten/libs/numeric/odeint/test_external/mkl/check_mkl.cpp (original)
+++ sandbox/odeint/branches/karsten/libs/numeric/odeint/test_external/mkl/check_mkl.cpp 2011-01-31 03:21:07 EST (Mon, 31 Jan 2011)
@@ -16,7 +16,7 @@
 
 #include <boost/numeric/odeint/stepper/explicit_euler.hpp>
 #include <boost/numeric/odeint/algebra/vector_space_algebra.hpp>
-#include <boost/numeric/odeint/algebra/external/mkl_operations.hpp>
+#include <boost/numeric/odeint/external/mkl/mkl_operations.hpp>
 
 using namespace boost::numeric::odeint;
 

Modified: sandbox/odeint/branches/karsten/libs/numeric/odeint/test_external/thrust/check_thrust.cu
==============================================================================
--- sandbox/odeint/branches/karsten/libs/numeric/odeint/test_external/thrust/check_thrust.cu (original)
+++ sandbox/odeint/branches/karsten/libs/numeric/odeint/test_external/thrust/check_thrust.cu 2011-01-31 03:21:07 EST (Mon, 31 Jan 2011)
@@ -13,9 +13,9 @@
 //#include <boost/test/unit_test.hpp>
 
 #include <boost/numeric/odeint/stepper/explicit_euler.hpp>
-#include <boost/numeric/odeint/algebra/external/thrust_algebra.hpp>
-#include <boost/numeric/odeint/algebra/external/thrust_operations.hpp>
-#include <boost/numeric/odeint/algebra/external/thrust_resize.hpp>
+#include <boost/numeric/odeint/external/thrust/thrust_algebra.hpp>
+#include <boost/numeric/odeint/external/thrust/thrust_operations.hpp>
+#include <boost/numeric/odeint/external/thrust/thrust_resize.hpp>
 
 #include <thrust/device_vector.h>
 #include <thrust/fill.h>


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