mirror of
https://github.com/boostorg/odeint.git
synced 2026-01-19 04:22:12 +00:00
@@ -14,7 +14,6 @@ target_include_directories(boost_numeric_odeint INTERFACE include)
|
||||
|
||||
target_link_libraries(boost_numeric_odeint
|
||||
INTERFACE
|
||||
Boost::array
|
||||
Boost::assert
|
||||
Boost::bind
|
||||
Boost::compute
|
||||
@@ -30,7 +29,6 @@ target_link_libraries(boost_numeric_odeint
|
||||
Boost::numeric_ublas
|
||||
Boost::preprocessor
|
||||
Boost::range
|
||||
Boost::static_assert
|
||||
Boost::throw_exception
|
||||
Boost::type_traits
|
||||
Boost::units
|
||||
|
||||
@@ -103,13 +103,13 @@ In the following we list the existing `Algebra`/`Operations` configurations that
|
||||
|
||||
[table
|
||||
[[`State`] [`Algebra`] [`Operations`] [Remarks]]
|
||||
[[Anything supporting __boost_range, like `std::vector`, `std::list`, `boost::array`,... based on a `value_type` that supports operators +,* (typically `double`)] [`range_algebra`] [`default_operations`] [Standard implementation, applicable for most typical situations.]]
|
||||
[[`boost::array` based on a `value_type` that supports operators +,*] [`array_algebra`] [`default_operations`] [Special implementation for boost::array with better performance than `range_algebra`]]
|
||||
[[Anything supporting __boost_range, like `std::vector`, `std::list`, `std::array`,... based on a `value_type` that supports operators +,* (typically `double`)] [`range_algebra`] [`default_operations`] [Standard implementation, applicable for most typical situations.]]
|
||||
[[`std::array` based on a `value_type` that supports operators +,*] [`array_algebra`] [`default_operations`] [Special implementation for std::array with better performance than `range_algebra`]]
|
||||
[[Anything that defines operators + within itself and * with scalar (Mathematically spoken, anything that is a vector space).] [`vector_space_algebra`] [`default_operations`] [For the use of __controlled_stepper, the template `vector_space_reduce` has to be instantiated.]]
|
||||
[[`thrust::device_vector`, `thrust::host_vector`] [`thrust_algebra`] [`thrust_operations`] [For running odeint on CUDA devices by using __thrust]]
|
||||
[[Any RandomAccessRange] [`openmp_range_algebra`] [`default_operations`] [OpenMP-parallelised range algebra]]
|
||||
[[`openmp_state`] [`openmp_algebra`] [`default_operations`] [OpenMP-parallelised algebra for split data]]
|
||||
[[`boost::array` or anything which allocates the elements in a C-like manner] [`vector_space_algebra`] [`mkl_operations`] [Using the __intel_mkl in odeint for maximum performance. Currently, only the RK4 stepper is supported.]]
|
||||
[[`std::array` or anything which allocates the elements in a C-like manner] [`vector_space_algebra`] [`mkl_operations`] [Using the __intel_mkl in odeint for maximum performance. Currently, only the RK4 stepper is supported.]]
|
||||
]
|
||||
|
||||
[endsect]
|
||||
|
||||
@@ -54,7 +54,7 @@ Symplectic systems are used in symplectic steppers like `symplectic_rkn_sb3a_mcl
|
||||
|
||||
[table
|
||||
[[Name] [Expression] [Type] [Semantics]]
|
||||
[[Check for pair] [`boost::is_pair< System >::type`] [`boost::mpl::true_`] [Check if System is a pair]]
|
||||
[[Check for pair] [`boost::is_pair< System >::type`] [`std::integral_constant<bool, true>`] [Check if System is a pair]]
|
||||
[[Calculate ['dq/dt = f(p)]] [`sys.first( p , dqdt )`] [`void`] [Calculates ['f(p)], the result is stored into `dqdt`] ]
|
||||
[[Calculate ['dp/dt = g(q)]] [`sys.second( q , dpdt )`] [`void`] [Calculates ['g(q)], the result is stored into `dpdt`] ]
|
||||
]
|
||||
@@ -92,7 +92,7 @@ We call this concept ['SimpleSymplecticSystem]
|
||||
|
||||
[table
|
||||
[[Name] [Expression] [Type] [Semantics]]
|
||||
[[Check for pair] [`boost::is_pair< System >::type`] [`boost::mpl::false_`] [Check if System is a pair, should be evaluated to false in this case.]]
|
||||
[[Check for pair] [`boost::is_pair< System >::type`] [`std::integral_constant<bool, false>`] [Check if System is a pair, should be evaluated to false in this case.]]
|
||||
[[Calculate ['dp/dt = g(q)]] [`sys( q , dpdt )`] [`void`] [Calculates ['g(q)], the result is stored into `dpdt`] ]
|
||||
]
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@ with non-standard state types:
|
||||
|
||||
Again, odeint already provides basic interfaces for most of the usual state
|
||||
types.
|
||||
So if you use a `std::vector`, or a `boost::array` as state type no additional
|
||||
So if you use a `std::vector`, or a `std::array` as state type no additional
|
||||
work is required, they just work out of the box.
|
||||
|
||||
[section Construction/Resizing]
|
||||
@@ -51,7 +51,7 @@ work is required, they just work out of the box.
|
||||
We distinguish between two basic state types: fixed sized and dynamically
|
||||
sized.
|
||||
For fixed size state types the default constructor `state_type()` already
|
||||
allocates the required memory, prominent example is `boost::array<T,N>`.
|
||||
allocates the required memory, prominent example is `std:array<T,N>`.
|
||||
Dynamically sized types have to be resized to make sure enough memory is
|
||||
allocated, the standard constructor does not take care of the resizing.
|
||||
Examples for this are the STL containers like `vector<double>`.
|
||||
|
||||
@@ -275,7 +275,7 @@ if the sizes of the state and the internal variable differ and only resizes if
|
||||
they are different.
|
||||
|
||||
[note You only have to worry about memory allocation when using dynamically
|
||||
sized vector types. If your state type is heap allocated, like `boost::array`,
|
||||
sized vector types. If your state type is heap allocated, like `std::array`,
|
||||
no memory allocation is required whatsoever.]
|
||||
|
||||
By default the resizing parameter is `initially_resizer`, meaning that the
|
||||
@@ -290,7 +290,7 @@ everything themselves. The third class of resizer is the `never_resizer` which
|
||||
means that the internal variables are never adjusted automatically and always
|
||||
have to be adjusted by hand .
|
||||
|
||||
There is a second mechanism which influences the resizing and which controls if a state type is at least resizeable - a meta-function `is_resizeable`. This meta-function returns a static Boolean value if any type is resizable. For example it will return `true` for `std::vector< T >` but `false` for `boost::array< T >`. By default and for unknown types `is_resizeable` returns `false`, so if you have your own type you need to specialize this meta-function. For more details on the resizing mechanism see the section __adapt_state_types.
|
||||
There is a second mechanism which influences the resizing and which controls if a state type is at least resizeable - a meta-function `is_resizeable`. This meta-function returns a static Boolean value if any type is resizable. For example it will return `true` for `std::vector< T >` but `false` for `std::array< T >`. By default and for unknown types `is_resizeable` returns `false`, so if you have your own type you need to specialize this meta-function. For more details on the resizing mechanism see the section __adapt_state_types.
|
||||
|
||||
|
||||
|
||||
@@ -398,10 +398,10 @@ like - presumably arbitrary precision types. One could also instantiate
|
||||
the coefficients directly
|
||||
|
||||
``
|
||||
const boost::array< double , 1 > heun_a1 = {{ 1.0 / 3.0 }};
|
||||
const boost::array< double , 2 > heun_a2 = {{ 0.0 , 2.0 / 3.0 }};
|
||||
const boost::array< double , 3 > heun_b = {{ 1.0 / 4.0 , 0.0 , 3.0 / 4.0 }};
|
||||
const boost::array< double , 3 > heun_c = {{ 0.0 , 1.0 / 3.0 , 2.0 / 3.0 }};
|
||||
const std::array< double , 1 > heun_a1 = {{ 1.0 / 3.0 }};
|
||||
const std::array< double , 2 > heun_a2 = {{ 0.0 , 2.0 / 3.0 }};
|
||||
const std::array< double , 3 > heun_b = {{ 1.0 / 4.0 , 0.0 , 3.0 / 4.0 }};
|
||||
const std::array< double , 3 > heun_c = {{ 0.0 , 1.0 / 3.0 , 2.0 / 3.0 }};
|
||||
``
|
||||
|
||||
But then you are nailed down to use doubles.
|
||||
|
||||
@@ -29,7 +29,7 @@ Ordinary differential equations occur nearly everywhere in natural sciences. For
|
||||
Numerical approximations for the solution ['x(t)] are calculated iteratively. The easiest algorithm is the Euler scheme, where starting at ['x(0)] one finds ['x(dt) = x(0) + dt f(x(0),0)]. Now one can use ['x(dt)] and obtain ['x(2dt)] in a similar way and so on. The Euler method is of order 1, that means the error at each step is ['~ dt[super 2]]. This is, of course, not very satisfying, which is why the Euler method is rarely used for real life problems and serves just as illustrative example.
|
||||
|
||||
The main focus of odeint is to provide numerical methods implemented in a way where the algorithm is completely independent on the data structure used to represent the state /x/.
|
||||
In doing so, odeint is applicable for a broad variety of situations and it can be used with many other libraries. Besides the usual case where the state is defined as a `std::vector` or a `boost::array`, we provide native support for the following libraries:
|
||||
In doing so, odeint is applicable for a broad variety of situations and it can be used with many other libraries. Besides the usual case where the state is defined as a `std::vector` or a `std::array`, we provide native support for the following libraries:
|
||||
|
||||
* __ublas
|
||||
* __thrust, making odeint naturally running on CUDA devices
|
||||
@@ -88,7 +88,7 @@ first order ODEs by introducing the new variables ['q=x] and ['p=x'] such that [
|
||||
[rhs_function]
|
||||
|
||||
Here we chose `vector<double>` as the state type, but others are also
|
||||
possible, for example `boost::array<double,2>`. odeint is designed in such a
|
||||
possible, for example `std::array<double,2>`. odeint is designed in such a
|
||||
way that you can easily use your own state types. Next, the ODE is defined
|
||||
which is in this case a simple function calculating ['f(x)]. The parameter
|
||||
signature of this function is crucial: the integration methods will always
|
||||
|
||||
@@ -44,7 +44,7 @@ const double sigma = 10.0;
|
||||
const double R = 28.0;
|
||||
const double b = 8.0 / 3.0;
|
||||
|
||||
typedef boost::array< double , 3 > lorenz_state_type;
|
||||
typedef std::array< double , 3 > lorenz_state_type;
|
||||
|
||||
void lorenz( const lorenz_state_type &x , lorenz_state_type &dxdt , double t )
|
||||
{
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
[section Define the ODE]
|
||||
|
||||
First of all, you have to specify the data type that represents a state ['x] of your system. Mathematically, this usually is an n-dimensional vector with real numbers or complex numbers as scalar objects. For odeint the most natural way is to use `vector< double >` or `vector< complex< double > >` to represent the system state. However, odeint can deal with other container types as well, e.g. `boost::array< double , N >`, as long as it fulfills some requirements defined below.
|
||||
First of all, you have to specify the data type that represents a state ['x] of your system. Mathematically, this usually is an n-dimensional vector with real numbers or complex numbers as scalar objects. For odeint the most natural way is to use `vector< double >` or `vector< complex< double > >` to represent the system state. However, odeint can deal with other container types as well, e.g. `std::array< double , N >`, as long as it fulfills some requirements defined below.
|
||||
|
||||
To integrate a differential equation numerically, one also has to define the rhs of the equation ['x' = f(x)]. In odeint you supply this function in terms of an object that implements the ()-operator with a certain parameter structure. Hence, the straightforward way would be to just define a function, e.g:
|
||||
|
||||
|
||||
@@ -69,7 +69,7 @@ To implement this system we define a 3D point type which will represent the spac
|
||||
[point_type]
|
||||
|
||||
|
||||
The next step is to define a container type storing the values of ['q] and ['p] and to define system functions. As container type we use `boost::array`
|
||||
The next step is to define a container type storing the values of ['q] and ['p] and to define system functions. As container type we use `std::array`
|
||||
|
||||
[import ../examples/solar_system.cpp]
|
||||
[container_type_definition]
|
||||
|
||||
@@ -65,7 +65,7 @@ Like the __tut_solar_system, the FPU is solved again by a symplectic solver, but
|
||||
|
||||
[fpu_system_function]
|
||||
|
||||
You can also use `boost::array< double , N >` for the state type.
|
||||
You can also use `std::array< double , N >` for the state type.
|
||||
|
||||
Now, you have to define your initial values and perform the integration:
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@ with other state_types, realized by templatizing the `operator()`:
|
||||
[stiff_system_alternative_definition]
|
||||
|
||||
Now you can use `stiff_system` in combination with `std::vector` or
|
||||
`boost::array`. In the example the explicit time derivative of ['f(x,t)] is
|
||||
`std::array`. In the example the explicit time derivative of ['f(x,t)] is
|
||||
introduced separately in the Jacobian. If ['df / dt = 0] simply fill `dfdt` with zeros.
|
||||
|
||||
A well know solver for stiff systems is the Rosenbrock method. It has a step size control and dense output facilities and can be used like all the other steppers:
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
#include <iostream>
|
||||
#include <cmath>
|
||||
|
||||
#include <boost/array.hpp>
|
||||
#include <array>
|
||||
#include <boost/numeric/odeint.hpp>
|
||||
|
||||
using namespace boost::numeric::odeint;
|
||||
@@ -23,7 +23,7 @@ const int Steps = 4;
|
||||
|
||||
typedef double value_type;
|
||||
|
||||
typedef boost::array< double , 2 > state_type;
|
||||
typedef std::array< double , 2 > state_type;
|
||||
|
||||
typedef runge_kutta_fehlberg78<state_type> initializing_stepper_type;
|
||||
typedef adams_bashforth_moulton< Steps , state_type > stepper_type;
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
#include <algorithm>
|
||||
#include <cassert>
|
||||
|
||||
#include <boost/array.hpp>
|
||||
#include <array>
|
||||
|
||||
#include <boost/range/algorithm.hpp>
|
||||
#include <boost/range/adaptor/filtered.hpp>
|
||||
@@ -55,7 +55,7 @@ struct lorenz
|
||||
|
||||
int main( int argc , char **argv )
|
||||
{
|
||||
typedef boost::array< double , 3 > state_type;
|
||||
typedef std::array< double , 3 > state_type;
|
||||
|
||||
/*
|
||||
* Controlled steppers with time iterator
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
namespace odeint = boost::numeric::odeint;
|
||||
|
||||
typedef boost::array< double , 3 > state_type;
|
||||
typedef std::array< double , 3 > state_type;
|
||||
|
||||
//[ ode_wrapper
|
||||
template< class Obj , class Mem >
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
#define _USE_MATH_DEFINES
|
||||
#include <cmath>
|
||||
|
||||
#include <boost/array.hpp>
|
||||
#include <array>
|
||||
#include <boost/ref.hpp>
|
||||
|
||||
#include <boost/numeric/odeint/config.hpp>
|
||||
@@ -26,7 +26,7 @@
|
||||
using namespace std;
|
||||
using namespace boost::numeric::odeint;
|
||||
|
||||
typedef boost::array< double , 1 > state_type;
|
||||
typedef std::array< double , 1 > state_type;
|
||||
|
||||
/*
|
||||
* x' = ( - x*sin t + 2 tan x ) y
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
|
||||
#include <iostream>
|
||||
#include <boost/array.hpp>
|
||||
#include <array>
|
||||
|
||||
#include <boost/numeric/odeint.hpp>
|
||||
|
||||
@@ -52,8 +52,8 @@ const size_t n = 3;
|
||||
const size_t num_of_lyap = 3;
|
||||
const size_t N = n + n*num_of_lyap;
|
||||
|
||||
typedef boost::array< double , N > state_type;
|
||||
typedef boost::array< double , num_of_lyap > lyap_type;
|
||||
typedef std::array< double , N > state_type;
|
||||
typedef std::array< double , num_of_lyap > lyap_type;
|
||||
|
||||
void lorenz_with_lyap( const state_type &x , state_type &dxdt , double t )
|
||||
{
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
#include <fstream>
|
||||
#include <cmath>
|
||||
|
||||
#include <boost/array.hpp>
|
||||
#include <array>
|
||||
|
||||
#include <boost/numeric/odeint/config.hpp>
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
using namespace std;
|
||||
using namespace boost::numeric::odeint;
|
||||
|
||||
typedef boost::array< double , 3 > state_type;
|
||||
typedef std::array< double , 3 > state_type;
|
||||
|
||||
/*
|
||||
* x1' = x2*x3
|
||||
|
||||
@@ -12,11 +12,11 @@
|
||||
copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
*/
|
||||
|
||||
#include <boost/array.hpp>
|
||||
#include <array>
|
||||
|
||||
#include <boost/numeric/odeint.hpp>
|
||||
|
||||
typedef boost::array< double , 1 > state_type;
|
||||
typedef std::array< double , 1 > state_type;
|
||||
|
||||
using namespace boost::numeric::odeint;
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
|
||||
#include <iostream>
|
||||
#include <boost/array.hpp>
|
||||
#include <array>
|
||||
|
||||
#include <gmpxx.h>
|
||||
|
||||
@@ -25,7 +25,7 @@ using namespace boost::numeric::odeint;
|
||||
|
||||
//[ gmpxx_lorenz
|
||||
typedef mpf_class value_type;
|
||||
typedef boost::array< value_type , 3 > state_type;
|
||||
typedef std::array< value_type , 3 > state_type;
|
||||
|
||||
struct lorenz
|
||||
{
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
#include <boost/fusion/container/vector.hpp>
|
||||
#include <boost/fusion/container/generation/make_vector.hpp>
|
||||
|
||||
#include <boost/array.hpp>
|
||||
#include <array>
|
||||
|
||||
#include <boost/numeric/odeint.hpp>
|
||||
|
||||
@@ -33,7 +33,7 @@ namespace fusion = boost::fusion;
|
||||
|
||||
//[ heun_define_coefficients
|
||||
template< class Value = double >
|
||||
struct heun_a1 : boost::array< Value , 1 > {
|
||||
struct heun_a1 : std::array< Value , 1 > {
|
||||
heun_a1( void )
|
||||
{
|
||||
(*this)[0] = static_cast< Value >( 1 ) / static_cast< Value >( 3 );
|
||||
@@ -41,7 +41,7 @@ struct heun_a1 : boost::array< Value , 1 > {
|
||||
};
|
||||
|
||||
template< class Value = double >
|
||||
struct heun_a2 : boost::array< Value , 2 >
|
||||
struct heun_a2 : std::array< Value , 2 >
|
||||
{
|
||||
heun_a2( void )
|
||||
{
|
||||
@@ -52,7 +52,7 @@ struct heun_a2 : boost::array< Value , 2 >
|
||||
|
||||
|
||||
template< class Value = double >
|
||||
struct heun_b : boost::array< Value , 3 >
|
||||
struct heun_b : std::array< Value , 3 >
|
||||
{
|
||||
heun_b( void )
|
||||
{
|
||||
@@ -63,7 +63,7 @@ struct heun_b : boost::array< Value , 3 >
|
||||
};
|
||||
|
||||
template< class Value = double >
|
||||
struct heun_c : boost::array< Value , 3 >
|
||||
struct heun_c : std::array< Value , 3 >
|
||||
{
|
||||
heun_c( void )
|
||||
{
|
||||
@@ -157,7 +157,7 @@ int main( int argc , char **argv )
|
||||
|
||||
|
||||
//[ heun_example
|
||||
typedef boost::array< double , 3 > state_type;
|
||||
typedef std::array< double , 3 > state_type;
|
||||
heun< state_type > h;
|
||||
state_type x = {{ 10.0 , 10.0 , 10.0 }};
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#include <iostream>
|
||||
#include <boost/array.hpp>
|
||||
#include <array>
|
||||
|
||||
#include <boost/numeric/odeint.hpp>
|
||||
|
||||
@@ -10,7 +10,7 @@ const double sigma = 10.0;
|
||||
const double R = 28.0;
|
||||
const double b = 8.0 / 3.0;
|
||||
|
||||
typedef boost::array< double , 3 > state_type;
|
||||
typedef std::array< double , 3 > state_type;
|
||||
|
||||
void lorenz( const state_type &x , state_type &dxdt , double t )
|
||||
{
|
||||
|
||||
@@ -24,7 +24,7 @@ using namespace boost::numeric::odeint;
|
||||
|
||||
typedef boost::multiprecision::cpp_dec_float_50 value_type;
|
||||
|
||||
typedef boost::array< value_type , 3 > state_type;
|
||||
typedef std::array< value_type , 3 > state_type;
|
||||
//]
|
||||
|
||||
//[ mp_lorenz_rhs
|
||||
|
||||
@@ -104,7 +104,7 @@ int main()
|
||||
x[0] = 5.0 ; x[1] = 10.0 ; x[2] = 10.0;
|
||||
|
||||
// make sure resizing is ON
|
||||
BOOST_STATIC_ASSERT( is_resizeable<state_type>::value == true );
|
||||
static_assert( is_resizeable<state_type>::value == true, "Resizing must be on" );
|
||||
|
||||
// my_vector works with range_algebra as it implements
|
||||
// the required parts of a container interface
|
||||
|
||||
@@ -72,7 +72,7 @@ inline std::ostream& operator<< (std::ostream& os, const __float128& f) {
|
||||
}
|
||||
|
||||
|
||||
#include <boost/array.hpp>
|
||||
#include <array>
|
||||
#include <boost/range/algorithm.hpp>
|
||||
#include <boost/range/adaptor/filtered.hpp>
|
||||
#include <boost/range/numeric.hpp>
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
|
||||
#include <iostream>
|
||||
#include <boost/array.hpp>
|
||||
#include <array>
|
||||
|
||||
#include <boost/numeric/odeint.hpp>
|
||||
|
||||
@@ -23,8 +23,8 @@
|
||||
const size_t n = 6;
|
||||
|
||||
typedef point< double , 3 > point_type;
|
||||
typedef boost::array< point_type , n > container_type;
|
||||
typedef boost::array< double , n > mass_type;
|
||||
typedef std::array< point_type , n > container_type;
|
||||
typedef std::array< double , n > mass_type;
|
||||
//]
|
||||
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
*/
|
||||
|
||||
#include <iostream>
|
||||
#include <boost/array.hpp>
|
||||
#include <array>
|
||||
#include <boost/bind.hpp>
|
||||
#include <boost/numeric/odeint.hpp>
|
||||
|
||||
@@ -23,7 +23,7 @@ using namespace boost::numeric::odeint;
|
||||
|
||||
const size_t N = 3;
|
||||
|
||||
typedef boost::array< double , N > state_type;
|
||||
typedef std::array< double , N > state_type;
|
||||
|
||||
//[ system_function_structure
|
||||
void sys( const state_type & /*x*/ , state_type & /*dxdt*/ , const double /*t*/ )
|
||||
@@ -42,7 +42,7 @@ void sys2( const state_type &/*x*/ , state_type &/*dxdt*/ , const double /*t*/ )
|
||||
|
||||
|
||||
//[ symplectic_stepper_detail_system_function
|
||||
typedef boost::array< double , 1 > vector_type;
|
||||
typedef std::array< double , 1 > vector_type;
|
||||
|
||||
|
||||
struct harm_osc_f1
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
#include <vector>
|
||||
#include <iostream>
|
||||
#include <boost/random.hpp>
|
||||
#include <boost/array.hpp>
|
||||
#include <array>
|
||||
|
||||
#include <boost/numeric/odeint.hpp>
|
||||
|
||||
@@ -26,8 +26,8 @@ template< size_t N > class stochastic_euler
|
||||
{
|
||||
public:
|
||||
|
||||
typedef boost::array< double , N > state_type;
|
||||
typedef boost::array< double , N > deriv_type;
|
||||
typedef std::array< double , N > state_type;
|
||||
typedef std::array< double , N > deriv_type;
|
||||
typedef double value_type;
|
||||
typedef double time_type;
|
||||
typedef unsigned short order_type;
|
||||
@@ -71,8 +71,8 @@ class stochastic_euler
|
||||
{
|
||||
public:
|
||||
|
||||
typedef boost::array< double , N > state_type;
|
||||
typedef boost::array< double , N > deriv_type;
|
||||
typedef std::array< double , N > state_type;
|
||||
typedef std::array< double , N > deriv_type;
|
||||
typedef double value_type;
|
||||
typedef double time_type;
|
||||
typedef unsigned short order_type;
|
||||
@@ -97,7 +97,7 @@ public:
|
||||
|
||||
//[ stochastic_euler_ornstein_uhlenbeck_def
|
||||
const static size_t N = 1;
|
||||
typedef boost::array< double , N > state_type;
|
||||
typedef std::array< double , N > state_type;
|
||||
|
||||
struct ornstein_det
|
||||
{
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
#include <iostream>
|
||||
#include <complex>
|
||||
#include <boost/array.hpp>
|
||||
#include <array>
|
||||
|
||||
#include <boost/numeric/odeint.hpp>
|
||||
|
||||
|
||||
@@ -17,10 +17,11 @@
|
||||
#ifndef BOOST_NUMERIC_ODEINT_ALGEBRA_ALGEBRA_DISPATCHER_HPP_INCLUDED
|
||||
#define BOOST_NUMERIC_ODEINT_ALGEBRA_ALGEBRA_DISPATCHER_HPP_INCLUDED
|
||||
|
||||
#include <boost/numeric/odeint/config.hpp>
|
||||
|
||||
#include <type_traits>
|
||||
#include <complex>
|
||||
#include <boost/type_traits/is_floating_point.hpp>
|
||||
#include <array>
|
||||
|
||||
#include <boost/numeric/odeint/config.hpp>
|
||||
|
||||
#include <boost/numeric/ublas/vector.hpp>
|
||||
#include <boost/numeric/ublas/matrix.hpp>
|
||||
@@ -29,9 +30,6 @@
|
||||
#include <boost/numeric/odeint/algebra/array_algebra.hpp>
|
||||
#include <boost/numeric/odeint/algebra/vector_space_algebra.hpp>
|
||||
|
||||
#include <boost/array.hpp>
|
||||
|
||||
|
||||
namespace boost {
|
||||
namespace numeric {
|
||||
namespace odeint {
|
||||
@@ -48,14 +46,14 @@ struct algebra_dispatcher : algebra_dispatcher_sfinae< StateType > { };
|
||||
|
||||
// specialize for array
|
||||
template< class T , size_t N >
|
||||
struct algebra_dispatcher< boost::array< T , N > >
|
||||
struct algebra_dispatcher< std::array< T , N > >
|
||||
{
|
||||
typedef array_algebra algebra_type;
|
||||
};
|
||||
|
||||
//specialize for some integral types
|
||||
template< typename T >
|
||||
struct algebra_dispatcher_sfinae< T , typename boost::enable_if< typename boost::is_floating_point< T >::type >::type >
|
||||
struct algebra_dispatcher_sfinae< T , typename std::enable_if< std::is_floating_point< T >::value >::type >
|
||||
{
|
||||
typedef vector_space_algebra algebra_type;
|
||||
};
|
||||
@@ -85,26 +83,4 @@ struct algebra_dispatcher< boost::numeric::ublas::matrix< T , L , A > >
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef BOOST_NUMERIC_ODEINT_CXX11
|
||||
|
||||
// c++11 mode: specialization for std::array if available
|
||||
|
||||
#include <array>
|
||||
|
||||
namespace boost {
|
||||
namespace numeric {
|
||||
namespace odeint {
|
||||
|
||||
// specialize for std::array
|
||||
template< class T , size_t N >
|
||||
struct algebra_dispatcher< std::array< T , N > >
|
||||
{
|
||||
typedef array_algebra algebra_type;
|
||||
};
|
||||
|
||||
} } }
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
#define BOOST_NUMERIC_ODEINT_ALGEBRA_ARRAY_ALGEBRA_HPP_INCLUDED
|
||||
|
||||
#include <algorithm>
|
||||
#include <boost/array.hpp>
|
||||
#include <array>
|
||||
|
||||
#include <boost/numeric/odeint/algebra/norm_result_type.hpp>
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
#include <algorithm>
|
||||
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/array.hpp>
|
||||
#include <array>
|
||||
|
||||
#include <boost/numeric/odeint/util/unit_helper.hpp>
|
||||
|
||||
|
||||
@@ -17,11 +17,11 @@
|
||||
#ifndef BOOST_NUMERIC_ODEINT_ALGEBRA_DETAIL_EXTRACT_VALUE_TYPE_HPP_INCLUDED
|
||||
#define BOOST_NUMERIC_ODEINT_ALGEBRA_DETAIL_EXTRACT_VALUE_TYPE_HPP_INCLUDED
|
||||
|
||||
#include <type_traits>
|
||||
#include <boost/utility.hpp>
|
||||
#include <boost/mpl/identity.hpp>
|
||||
#include <boost/mpl/if.hpp>
|
||||
#include <boost/mpl/has_xxx.hpp>
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
|
||||
BOOST_MPL_HAS_XXX_TRAIT_DEF(value_type)
|
||||
|
||||
@@ -40,8 +40,8 @@ struct extract_value_type
|
||||
// e.g. returning S::value_type::value_type::value_type
|
||||
|
||||
template< typename S >
|
||||
struct extract_value_type< S , typename boost::enable_if< has_value_type<S> >::type >
|
||||
: mpl::if_< is_same< S, typename S::value_type > ,
|
||||
struct extract_value_type< S , typename std::enable_if< has_value_type<S>::value >::type >
|
||||
: mpl::if_< std::is_same< S, typename S::value_type > ,
|
||||
mpl::identity< S > , // cut the recursion if S and S::value_type are the same
|
||||
extract_value_type< typename S::value_type > >::type
|
||||
{};
|
||||
|
||||
@@ -18,14 +18,13 @@
|
||||
#ifndef BOOST_NUMERIC_ODEINT_ALGEBRA_DETAIL_MACROS_HPP_INCLUDED
|
||||
#define BOOST_NUMERIC_ODEINT_ALGEBRA_DETAIL_MACROS_HPP_INCLUDED
|
||||
|
||||
#include <type_traits>
|
||||
|
||||
//type traits aren't working with nvcc
|
||||
#ifndef __CUDACC__
|
||||
#include <boost/type_traits.hpp>
|
||||
#include <boost/static_assert.hpp>
|
||||
|
||||
#define BOOST_ODEINT_CHECK_CONTAINER_TYPE( Type1 , Type2 ) \
|
||||
BOOST_STATIC_ASSERT(( boost::is_same< typename boost::remove_const< Type1 >::type , Type2 >::value ))
|
||||
static_assert(( std::is_same< typename std::remove_const< Type1 >::type , Type2 >::value ));
|
||||
|
||||
#else
|
||||
//empty macro for nvcc
|
||||
@@ -33,11 +32,4 @@
|
||||
|
||||
#endif // __CUDACC__
|
||||
|
||||
|
||||
|
||||
/*
|
||||
#define BOOST_ODEINT_CHECK_OPERATION_ARITY( Operation , Arity ) \
|
||||
BOOST_STATIC_ASSERT(( boost::function_traits< Operation >::arity == Arity ))
|
||||
*/
|
||||
|
||||
#endif // BOOST_NUMERIC_ODEINT_ALGEBRA_DETAIL_MACROS_HPP_INCLUDED
|
||||
|
||||
@@ -122,7 +122,7 @@ struct fusion_algebra
|
||||
template< class S1 , class S2 , class S3 , class S4 , class S5 , class S6 , class S7 , class S8 , class Op >
|
||||
static void for_each8( S1 &s1 , S2 &s2 , S3 &s3 , S4 &s4 , S5 &s5 , S6 &s6 , S7 &s7 , S8 &s8 , Op op )
|
||||
{
|
||||
BOOST_STATIC_ASSERT_MSG( BOOST_FUSION_INVOKE_MAX_ARITY >= 8 , "Macro Parameter BOOST_FUSION_INVOKE_MAX_ARITY to small!" );
|
||||
static_assert( BOOST_FUSION_INVOKE_MAX_ARITY >= 8 , "Macro Parameter BOOST_FUSION_INVOKE_MAX_ARITY to small!" );
|
||||
typedef boost::fusion::vector< S1& , S2& , S3& , S4& , S5& , S6& , S7& , S8& > Sequences;
|
||||
Sequences sequences( s1 , s2 , s3 , s4 , s5 , s6 , s7 , s8 );
|
||||
boost::fusion::for_each( boost::fusion::zip_view< Sequences >( sequences ) , boost::fusion::make_fused( op ) );
|
||||
@@ -131,7 +131,7 @@ struct fusion_algebra
|
||||
template< class S1 , class S2 , class S3 , class S4 , class S5 , class S6 , class S7 , class S8 , class S9 , class Op >
|
||||
static void for_each9( S1 &s1 , S2 &s2 , S3 &s3 , S4 &s4 , S5 &s5 , S6 &s6 , S7 &s7 , S8 &s8 , S9 &s9 , Op op )
|
||||
{
|
||||
BOOST_STATIC_ASSERT_MSG( BOOST_FUSION_INVOKE_MAX_ARITY >= 9 , "Macro Parameter BOOST_FUSION_INVOKE_MAX_ARITY to small!" );
|
||||
static_assert( BOOST_FUSION_INVOKE_MAX_ARITY >= 9 , "Macro Parameter BOOST_FUSION_INVOKE_MAX_ARITY to small!" );
|
||||
typedef boost::fusion::vector< S1& , S2& , S3& , S4& , S5& , S6& , S7& , S8& , S9& > Sequences;
|
||||
Sequences sequences( s1 , s2 , s3 , s4 , s5 , s6 , s7 , s8 , s9 );
|
||||
boost::fusion::for_each( boost::fusion::zip_view< Sequences >( sequences ) , boost::fusion::make_fused( op ) );
|
||||
@@ -140,7 +140,7 @@ struct fusion_algebra
|
||||
template< class S1 , class S2 , class S3 , class S4 , class S5 , class S6 , class S7 , class S8 , class S9 , class S10 , class Op >
|
||||
static void for_each10( S1 &s1 , S2 &s2 , S3 &s3 , S4 &s4 , S5 &s5 , S6 &s6 , S7 &s7 , S8 &s8 , S9 &s9 , S10 &s10 , Op op )
|
||||
{
|
||||
BOOST_STATIC_ASSERT_MSG( BOOST_FUSION_INVOKE_MAX_ARITY >= 10 , "Macro Parameter BOOST_FUSION_INVOKE_MAX_ARITY to small!" );
|
||||
static_assert( BOOST_FUSION_INVOKE_MAX_ARITY >= 10 , "Macro Parameter BOOST_FUSION_INVOKE_MAX_ARITY to small!" );
|
||||
typedef boost::fusion::vector< S1& , S2& , S3& , S4& , S5& , S6& , S7& , S8& , S9& , S10& > Sequences;
|
||||
Sequences sequences( s1 , s2 , s3 , s4 , s5 , s6 , s7 , s8 , s9 , s10 );
|
||||
boost::fusion::for_each( boost::fusion::zip_view< Sequences >( sequences ) , boost::fusion::make_fused( op ) );
|
||||
@@ -149,8 +149,8 @@ struct fusion_algebra
|
||||
template< class S1 , class S2 , class S3 , class S4 , class S5 , class S6 , class S7 , class S8 , class S9 , class S10 , class S11 , class Op >
|
||||
static void for_each11( S1 &s1 , S2 &s2 , S3 &s3 , S4 &s4 , S5 &s5 , S6 &s6 , S7 &s7 , S8 &s8 , S9 &s9 , S10 &s10 , S11 &s11 , Op op )
|
||||
{
|
||||
BOOST_STATIC_ASSERT_MSG( BOOST_FUSION_INVOKE_MAX_ARITY >= 11 , "Macro Parameter BOOST_FUSION_INVOKE_MAX_ARITY to small!" );
|
||||
BOOST_STATIC_ASSERT_MSG( BOOST_RESULT_OF_NUM_ARGS >= 11 , "Macro Parameter BOOST_RESULT_OF_NUM_ARGS to small!" );
|
||||
static_assert( BOOST_FUSION_INVOKE_MAX_ARITY >= 11 , "Macro Parameter BOOST_FUSION_INVOKE_MAX_ARITY to small!" );
|
||||
static_assert( BOOST_RESULT_OF_NUM_ARGS >= 11 , "Macro Parameter BOOST_RESULT_OF_NUM_ARGS to small!" );
|
||||
typedef boost::fusion::vector< S1& , S2& , S3& , S4& , S5& , S6& , S7& , S8& , S9& , S10& , S11& > Sequences;
|
||||
Sequences sequences( s1 , s2 , s3 , s4 , s5 , s6 , s7 , s8 , s9 , s10 , s11 );
|
||||
boost::fusion::for_each( boost::fusion::zip_view< Sequences >( sequences ) , boost::fusion::make_fused( op ) );
|
||||
@@ -159,8 +159,8 @@ struct fusion_algebra
|
||||
template< class S1 , class S2 , class S3 , class S4 , class S5 , class S6 , class S7 , class S8 , class S9 , class S10 , class S11 , class S12 , class Op >
|
||||
static void for_each12( S1 &s1 , S2 &s2 , S3 &s3 , S4 &s4 , S5 &s5 , S6 &s6 , S7 &s7 , S8 &s8 , S9 &s9 , S10 &s10 , S11 &s11 , S12 &s12 , Op op )
|
||||
{
|
||||
BOOST_STATIC_ASSERT_MSG( BOOST_FUSION_INVOKE_MAX_ARITY >= 12 , "Macro Parameter BOOST_FUSION_INVOKE_MAX_ARITY to small!" );
|
||||
BOOST_STATIC_ASSERT_MSG( BOOST_RESULT_OF_NUM_ARGS >= 12 , "Macro Parameter BOOST_RESULT_OF_NUM_ARGS to small!" );
|
||||
static_assert( BOOST_FUSION_INVOKE_MAX_ARITY >= 12 , "Macro Parameter BOOST_FUSION_INVOKE_MAX_ARITY to small!" );
|
||||
static_assert( BOOST_RESULT_OF_NUM_ARGS >= 12 , "Macro Parameter BOOST_RESULT_OF_NUM_ARGS to small!" );
|
||||
typedef boost::fusion::vector< S1& , S2& , S3& , S4& , S5& , S6& , S7& , S8& , S9& , S10& , S11& , S12& > Sequences;
|
||||
Sequences sequences( s1 , s2 , s3 , s4 , s5 , s6 , s7 , s8 , s9 , s10 , s11 , s12 );
|
||||
boost::fusion::for_each( boost::fusion::zip_view< Sequences >( sequences ) , boost::fusion::make_fused( op ) );
|
||||
@@ -169,8 +169,8 @@ struct fusion_algebra
|
||||
template< class S1 , class S2 , class S3 , class S4 , class S5 , class S6 , class S7 , class S8 , class S9 , class S10 , class S11 , class S12 , class S13 , class Op >
|
||||
static void for_each13( S1 &s1 , S2 &s2 , S3 &s3 , S4 &s4 , S5 &s5 , S6 &s6 , S7 &s7 , S8 &s8 , S9 &s9 , S10 &s10 , S11 &s11 , S12 &s12 , S13 &s13 , Op op )
|
||||
{
|
||||
BOOST_STATIC_ASSERT_MSG( BOOST_FUSION_INVOKE_MAX_ARITY >= 13 , "Macro Parameter BOOST_FUSION_INVOKE_MAX_ARITY to small!" );
|
||||
BOOST_STATIC_ASSERT_MSG( BOOST_RESULT_OF_NUM_ARGS >= 13 , "Macro Parameter BOOST_RESULT_OF_NUM_ARGS to small!" );
|
||||
static_assert( BOOST_FUSION_INVOKE_MAX_ARITY >= 13 , "Macro Parameter BOOST_FUSION_INVOKE_MAX_ARITY to small!" );
|
||||
static_assert( BOOST_RESULT_OF_NUM_ARGS >= 13 , "Macro Parameter BOOST_RESULT_OF_NUM_ARGS to small!" );
|
||||
typedef boost::fusion::vector< S1& , S2& , S3& , S4& , S5& , S6& , S7& , S8& , S9& , S10& , S11& , S12& , S13& > Sequences;
|
||||
Sequences sequences( s1 , s2 , s3 , s4 , s5 , s6 , s7 , s8 , s9 , s10 , s11 , s12 , s13 );
|
||||
boost::fusion::for_each( boost::fusion::zip_view< Sequences >( sequences ) , boost::fusion::make_fused( op ) );
|
||||
@@ -179,8 +179,8 @@ struct fusion_algebra
|
||||
template< class S1 , class S2 , class S3 , class S4 , class S5 , class S6 , class S7 , class S8 , class S9 , class S10 , class S11 , class S12 , class S13 , class S14 , class Op >
|
||||
static void for_each14( S1 &s1 , S2 &s2 , S3 &s3 , S4 &s4 , S5 &s5 , S6 &s6 , S7 &s7 , S8 &s8 , S9 &s9 , S10 &s10 , S11 &s11 , S12 &s12 , S13 &s13 , S14 &s14 , Op op )
|
||||
{
|
||||
BOOST_STATIC_ASSERT_MSG( BOOST_FUSION_INVOKE_MAX_ARITY >= 14 , "Macro Parameter BOOST_FUSION_INVOKE_MAX_ARITY to small!" );
|
||||
BOOST_STATIC_ASSERT_MSG( BOOST_RESULT_OF_NUM_ARGS >= 14 , "Macro Parameter BOOST_RESULT_OF_NUM_ARGS to small!" );
|
||||
static_assert( BOOST_FUSION_INVOKE_MAX_ARITY >= 14 , "Macro Parameter BOOST_FUSION_INVOKE_MAX_ARITY to small!" );
|
||||
static_assert( BOOST_RESULT_OF_NUM_ARGS >= 14 , "Macro Parameter BOOST_RESULT_OF_NUM_ARGS to small!" );
|
||||
typedef boost::fusion::vector< S1& , S2& , S3& , S4& , S5& , S6& , S7& , S8& , S9& , S10& , S11& , S12& , S13& , S14& > Sequences;
|
||||
Sequences sequences( s1 , s2 , s3 , s4 , s5 , s6 , s7 , s8 , s9 , s10 , s11 , s12 , s13 , s14 );
|
||||
boost::fusion::for_each( boost::fusion::zip_view< Sequences >( sequences ) , boost::fusion::make_fused( op ) );
|
||||
@@ -189,8 +189,8 @@ struct fusion_algebra
|
||||
template< class S1 , class S2 , class S3 , class S4 , class S5 , class S6 , class S7 , class S8 , class S9 , class S10 , class S11 , class S12 , class S13 , class S14 , class S15 , class Op >
|
||||
static void for_each15( S1 &s1 , S2 &s2 , S3 &s3 , S4 &s4 , S5 &s5 , S6 &s6 , S7 &s7 , S8 &s8 , S9 &s9 , S10 &s10 , S11 &s11 , S12 &s12 , S13 &s13 , S14 &s14 , S15 &s15 , Op op )
|
||||
{
|
||||
BOOST_STATIC_ASSERT_MSG( BOOST_FUSION_INVOKE_MAX_ARITY >= 15 , "Macro Parameter BOOST_FUSION_INVOKE_MAX_ARITY to small!" );
|
||||
BOOST_STATIC_ASSERT_MSG( BOOST_RESULT_OF_NUM_ARGS >= 15 , "Macro Parameter BOOST_RESULT_OF_NUM_ARGS to small!" );
|
||||
static_assert( BOOST_FUSION_INVOKE_MAX_ARITY >= 15 , "Macro Parameter BOOST_FUSION_INVOKE_MAX_ARITY to small!" );
|
||||
static_assert( BOOST_RESULT_OF_NUM_ARGS >= 15 , "Macro Parameter BOOST_RESULT_OF_NUM_ARGS to small!" );
|
||||
typedef boost::fusion::vector< S1& , S2& , S3& , S4& , S5& , S6& , S7& , S8& , S9& , S10& , S11& , S12& , S13& , S14& , S15& > Sequences;
|
||||
Sequences sequences( s1 , s2 , s3 , s4 , s5 , s6 , s7 , s8 , s9 , s10 , s11 , s12 , s13 , s14 , s15 );
|
||||
boost::fusion::for_each( boost::fusion::zip_view< Sequences >( sequences ) , boost::fusion::make_fused( op ) );
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
boost/numeric/odeint/algebra/range_algebra.hpp
|
||||
|
||||
[begin_description]
|
||||
Default algebra, which works with the most state types, like vector< double >, boost::array< double >, boost::range.
|
||||
Default algebra, which works with the most state types, like vector< double >, std::array< double >, boost::range.
|
||||
Internally is uses boost::range to obtain the begin and end iterator of the according sequence.
|
||||
[end_description]
|
||||
|
||||
|
||||
@@ -20,9 +20,6 @@
|
||||
|
||||
#include <complex>
|
||||
|
||||
#include <boost/type_traits/remove_reference.hpp>
|
||||
|
||||
|
||||
namespace boost {
|
||||
namespace numeric {
|
||||
namespace odeint {
|
||||
|
||||
@@ -18,36 +18,32 @@
|
||||
#ifndef BOOST_NUMERIC_ODEINT_EXTERNAL_EIGEN_EIGEN_RESIZE_HPP_DEFINED
|
||||
#define BOOST_NUMERIC_ODEINT_EXTERNAL_EIGEN_EIGEN_RESIZE_HPP_DEFINED
|
||||
|
||||
#include <type_traits>
|
||||
|
||||
#include <boost/numeric/odeint/util/is_resizeable.hpp>
|
||||
#include <boost/numeric/odeint/util/resize.hpp>
|
||||
#include <boost/numeric/odeint/util/same_size.hpp>
|
||||
|
||||
#include <boost/utility/enable_if.hpp>
|
||||
#include <boost/type_traits/is_base_of.hpp>
|
||||
|
||||
#include <Eigen/Dense>
|
||||
|
||||
namespace boost {
|
||||
namespace numeric {
|
||||
namespace odeint {
|
||||
|
||||
|
||||
|
||||
template< class Derived >
|
||||
struct is_resizeable_sfinae< Derived ,
|
||||
typename boost::enable_if< typename boost::is_base_of< Eigen::MatrixBase< Derived > , Derived >::type >::type >
|
||||
typename std::enable_if< std::is_base_of< Eigen::MatrixBase< Derived > , Derived >::value >::type >
|
||||
{
|
||||
typedef boost::true_type type;
|
||||
typedef std::integral_constant<bool, true> type;
|
||||
const static bool value = type::value;
|
||||
};
|
||||
|
||||
|
||||
template < class Derived >
|
||||
struct is_resizeable_sfinae< Derived ,
|
||||
typename boost::enable_if< typename boost::is_base_of< Eigen::ArrayBase< Derived > , Derived >::type >::type >
|
||||
typename std::enable_if< std::is_base_of< Eigen::ArrayBase< Derived > , Derived >::value >::type >
|
||||
{
|
||||
typedef boost::true_type type;
|
||||
typedef std::integral_constant<bool, true> type;
|
||||
const static bool value = type::value;
|
||||
};
|
||||
|
||||
@@ -55,7 +51,7 @@ struct is_resizeable_sfinae< Derived ,
|
||||
|
||||
template< class Derived >
|
||||
struct same_size_impl_sfinae< Derived , Derived ,
|
||||
typename boost::enable_if< typename boost::is_base_of< Eigen::MatrixBase< Derived > , Derived >::type >::type >
|
||||
typename std::enable_if< std::is_base_of< Eigen::MatrixBase< Derived > , Derived >::value >::type >
|
||||
{
|
||||
static bool same_size( const Eigen::MatrixBase< Derived > &m1 , const Eigen::MatrixBase< Derived > &m2 )
|
||||
|
||||
@@ -66,7 +62,7 @@ struct same_size_impl_sfinae< Derived , Derived ,
|
||||
|
||||
template< class Derived >
|
||||
struct same_size_impl_sfinae< Derived , Derived ,
|
||||
typename boost::enable_if< typename boost::is_base_of< Eigen::ArrayBase< Derived > , Derived >::type >::type >
|
||||
typename std::enable_if< std::is_base_of< Eigen::ArrayBase< Derived > , Derived >::value >::type >
|
||||
{
|
||||
static bool same_size( const Eigen::ArrayBase< Derived > &v1 , const Eigen::ArrayBase< Derived > &v2 )
|
||||
{
|
||||
@@ -79,7 +75,7 @@ struct same_size_impl_sfinae< Derived , Derived ,
|
||||
|
||||
template< class Derived >
|
||||
struct resize_impl_sfinae< Derived , Derived ,
|
||||
typename boost::enable_if< typename boost::is_base_of< Eigen::MatrixBase< Derived > , Derived >::type >::type >
|
||||
typename std::enable_if< std::is_base_of< Eigen::MatrixBase< Derived > , Derived >::value >::type >
|
||||
{
|
||||
static void resize( Eigen::MatrixBase< Derived > &m1 , const Eigen::MatrixBase< Derived > &m2 )
|
||||
{
|
||||
@@ -89,7 +85,7 @@ struct resize_impl_sfinae< Derived , Derived ,
|
||||
|
||||
template< class Derived >
|
||||
struct resize_impl_sfinae< Derived , Derived ,
|
||||
typename boost::enable_if< typename boost::is_base_of< Eigen::ArrayBase< Derived > , Derived >::type >::type >
|
||||
typename std::enable_if< std::is_base_of< Eigen::ArrayBase< Derived > , Derived >::value >::type >
|
||||
{
|
||||
static void resize( Eigen::ArrayBase< Derived > &v1 , const Eigen::ArrayBase< Derived > &v2 )
|
||||
{
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
|
||||
#include <gsl/gsl_vector.h>
|
||||
|
||||
#include <boost/type_traits/integral_constant.hpp>
|
||||
#include <boost/range.hpp>
|
||||
#include <boost/iterator/iterator_facade.hpp>
|
||||
|
||||
@@ -167,8 +166,8 @@ namespace odeint {
|
||||
template<>
|
||||
struct is_resizeable< gsl_vector* >
|
||||
{
|
||||
//struct type : public boost::true_type { };
|
||||
typedef boost::true_type type;
|
||||
//struct type : public std::integral_constant<bool, true> { };
|
||||
typedef std::integral_constant<bool, true> type;
|
||||
const static bool value = type::value;
|
||||
};
|
||||
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
#include <boost/numeric/odeint/util/split_adaptor.hpp>
|
||||
#include <boost/numeric/odeint/algebra/algebra_dispatcher.hpp>
|
||||
#include <boost/numeric/odeint/external/mpi/mpi_state.hpp>
|
||||
#include <boost/numeric/odeint/tools/assert.hpp>
|
||||
|
||||
namespace boost {
|
||||
namespace numeric {
|
||||
@@ -75,7 +76,7 @@ struct unsplit_impl< mpi_state< InnerState >, Target,
|
||||
size_t total_size = 0;
|
||||
for(size_t i = 0 ; i < pieces.size() ; i++)
|
||||
total_size += boost::size(pieces[i]);
|
||||
BOOST_ASSERT( total_size <= boost::size(to) );
|
||||
BOOST_NUMERIC_ODEINT_ASSERT( total_size <= boost::size(to) );
|
||||
// copy parts
|
||||
iterator out = boost::begin(to);
|
||||
for(size_t i = 0 ; i < pieces.size() ; i++)
|
||||
|
||||
@@ -19,10 +19,10 @@
|
||||
#ifndef BOOST_NUMERIC_ODEINT_EXTERNAL_OPENMP_OPENMP_NESTED_ALGEBRA_HPP_INCLUDED
|
||||
#define BOOST_NUMERIC_ODEINT_EXTERNAL_OPENMP_OPENMP_NESTED_ALGEBRA_HPP_INCLUDED
|
||||
|
||||
#include <boost/assert.hpp>
|
||||
#include <boost/range.hpp>
|
||||
#include <boost/numeric/odeint/algebra/norm_result_type.hpp>
|
||||
#include <boost/numeric/odeint/util/n_ary_helper.hpp>
|
||||
#include <boost/numeric/odeint/tools/assert.hpp>
|
||||
|
||||
namespace boost {
|
||||
namespace numeric {
|
||||
@@ -40,7 +40,7 @@ struct openmp_nested_algebra
|
||||
#if __cplusplus >= 201103L // C++11 supports _Pragma
|
||||
|
||||
#define BOOST_ODEINT_GEN_LOCAL(z, n, unused) \
|
||||
BOOST_ASSERT_MSG( len == boost::size(s ## n), "All nested state ranges must have the same size." ); \
|
||||
BOOST_NUMERIC_ODEINT_ASSERT_MSG( len == boost::size(s ## n), "All nested state ranges must have the same size." ); \
|
||||
typename boost::range_iterator<S ## n>::type beg ## n = boost::begin(s ## n);
|
||||
#define BOOST_ODEINT_GEN_BODY(n) \
|
||||
const size_t len = boost::size(s0); \
|
||||
|
||||
@@ -19,10 +19,10 @@
|
||||
#ifndef BOOST_NUMERIC_ODEINT_EXTERNAL_OPENMP_OPENMP_RANGE_ALGEBRA_HPP_INCLUDED
|
||||
#define BOOST_NUMERIC_ODEINT_EXTERNAL_OPENMP_OPENMP_RANGE_ALGEBRA_HPP_INCLUDED
|
||||
|
||||
#include <boost/assert.hpp>
|
||||
#include <boost/range.hpp>
|
||||
#include <boost/numeric/odeint/algebra/norm_result_type.hpp>
|
||||
#include <boost/numeric/odeint/util/n_ary_helper.hpp>
|
||||
#include <boost/numeric/odeint/tools/assert.hpp>
|
||||
|
||||
namespace boost {
|
||||
namespace numeric {
|
||||
@@ -38,7 +38,7 @@ struct openmp_range_algebra
|
||||
#if __cplusplus >= 201103L // C++11 supports _Pragma
|
||||
|
||||
#define BOOST_ODEINT_GEN_LOCAL(z, n, unused) \
|
||||
BOOST_ASSERT_MSG( len == boost::size(s ## n), "All state ranges must have the same size." ); \
|
||||
BOOST_NUMERIC_ODEINT_ASSERT_MSG( len == boost::size(s ## n), "All state ranges must have the same size." ); \
|
||||
typename boost::range_iterator<S ## n>::type beg ## n = boost::begin(s ## n);
|
||||
#define BOOST_ODEINT_GEN_BODY(n) \
|
||||
const size_t len = boost::size(s0); \
|
||||
|
||||
@@ -18,8 +18,6 @@
|
||||
#ifndef BOOST_NUMERIC_ODEINT_INTEGRATE_INTEGRATE_ADAPTIVE_HPP_INCLUDED
|
||||
#define BOOST_NUMERIC_ODEINT_INTEGRATE_INTEGRATE_ADAPTIVE_HPP_INCLUDED
|
||||
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
|
||||
#include <boost/numeric/odeint/stepper/stepper_categories.hpp>
|
||||
#include <boost/numeric/odeint/integrate/null_observer.hpp>
|
||||
#include <boost/numeric/odeint/integrate/detail/integrate_adaptive.hpp>
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
#ifndef BOOST_NUMERIC_ODEINT_INTEGRATE_INTEGRATE_CONST_HPP_INCLUDED
|
||||
#define BOOST_NUMERIC_ODEINT_INTEGRATE_INTEGRATE_CONST_HPP_INCLUDED
|
||||
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
#include <type_traits>
|
||||
|
||||
#include <boost/numeric/odeint/stepper/stepper_categories.hpp>
|
||||
#include <boost/numeric/odeint/integrate/null_observer.hpp>
|
||||
@@ -44,7 +44,7 @@ size_t integrate_const(
|
||||
typedef typename odeint::unwrap_reference<Stepper>::type::stepper_category stepper_category;
|
||||
// we want to get as fast as possible to the end
|
||||
// no overflow checks needed
|
||||
if (boost::is_same<null_observer, Observer>::value) {
|
||||
BOOST_IF_CONSTEXPR (std::is_same<null_observer, Observer>::value) {
|
||||
return detail::integrate_adaptive(
|
||||
stepper, system, start_state,
|
||||
start_time, end_time, dt,
|
||||
@@ -77,7 +77,7 @@ size_t integrate_const(
|
||||
typedef typename odeint::unwrap_reference<Stepper>::type::stepper_category stepper_category;
|
||||
// we want to get as fast as possible to the end
|
||||
|
||||
if (boost::is_same<null_observer, Observer>::value) {
|
||||
BOOST_IF_CONSTEXPR (std::is_same<null_observer, Observer>::value) {
|
||||
return detail::integrate_adaptive(
|
||||
stepper, system, start_state,
|
||||
start_time, end_time, dt,
|
||||
|
||||
@@ -18,8 +18,6 @@
|
||||
#ifndef BOOST_NUMERIC_ODEINT_INTEGRATE_INTEGRATE_N_STEPS_HPP_INCLUDED
|
||||
#define BOOST_NUMERIC_ODEINT_INTEGRATE_INTEGRATE_N_STEPS_HPP_INCLUDED
|
||||
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
|
||||
#include <boost/numeric/odeint/stepper/stepper_categories.hpp>
|
||||
#include <boost/numeric/odeint/integrate/null_observer.hpp>
|
||||
#include <boost/numeric/odeint/integrate/detail/integrate_n_steps.hpp>
|
||||
|
||||
@@ -18,8 +18,6 @@
|
||||
#ifndef BOOST_NUMERIC_ODEINT_INTEGRATE_INTEGRATE_TIMES_HPP_INCLUDED
|
||||
#define BOOST_NUMERIC_ODEINT_INTEGRATE_INTEGRATE_TIMES_HPP_INCLUDED
|
||||
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
|
||||
#include <boost/range.hpp>
|
||||
|
||||
#include <boost/numeric/odeint/stepper/stepper_categories.hpp>
|
||||
|
||||
@@ -18,8 +18,6 @@
|
||||
#ifndef BOOST_NUMERIC_ODEINT_ITERATOR_DETAIL_ADAPTIVE_ITERATOR_IMPL_HPP_DEFINED
|
||||
#define BOOST_NUMERIC_ODEINT_ITERATOR_DETAIL_ADAPTIVE_ITERATOR_IMPL_HPP_DEFINED
|
||||
|
||||
#include <boost/utility/enable_if.hpp>
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
#include <boost/throw_exception.hpp>
|
||||
|
||||
#include <boost/numeric/odeint/util/unit_helper.hpp>
|
||||
|
||||
@@ -18,8 +18,6 @@
|
||||
#ifndef BOOST_NUMERIC_ODEINT_ITERATOR_DETAIL_TIMES_ITERATOR_IMPL_HPP_DEFINED
|
||||
#define BOOST_NUMERIC_ODEINT_ITERATOR_DETAIL_TIMES_ITERATOR_IMPL_HPP_DEFINED
|
||||
|
||||
#include <boost/utility/enable_if.hpp>
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
#include <boost/throw_exception.hpp>
|
||||
|
||||
#include <boost/numeric/odeint/util/unit_helper.hpp>
|
||||
|
||||
@@ -18,8 +18,6 @@
|
||||
#ifndef BOOST_NUMERIC_ODEINT_INTEGRATE_INTEGRATE_ADAPTIVE_HPP_INCLUDED
|
||||
#define BOOST_NUMERIC_ODEINT_INTEGRATE_INTEGRATE_ADAPTIVE_HPP_INCLUDED
|
||||
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
|
||||
#include <boost/numeric/odeint/stepper/stepper_categories.hpp>
|
||||
#include <boost/numeric/odeint/iterator/integrate/null_observer.hpp>
|
||||
#include <boost/numeric/odeint/iterator/integrate/detail/integrate_adaptive.hpp>
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
#ifndef BOOST_NUMERIC_ODEINT_INTEGRATE_INTEGRATE_CONST_HPP_INCLUDED
|
||||
#define BOOST_NUMERIC_ODEINT_INTEGRATE_INTEGRATE_CONST_HPP_INCLUDED
|
||||
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
#include <type_traits>
|
||||
|
||||
#include <boost/numeric/odeint/stepper/stepper_categories.hpp>
|
||||
#include <boost/numeric/odeint/iterator/integrate/null_observer.hpp>
|
||||
@@ -46,7 +46,7 @@ size_t integrate_const(
|
||||
{
|
||||
typedef typename odeint::unwrap_reference< Stepper >::type::stepper_category stepper_category;
|
||||
// we want to get as fast as possible to the end
|
||||
if( boost::is_same< null_observer , Observer >::value )
|
||||
BOOST_IF_CONSTEXPR ( std::is_same< null_observer , Observer >::value )
|
||||
{
|
||||
return detail::integrate_adaptive(
|
||||
stepper , system , start_state ,
|
||||
@@ -74,7 +74,7 @@ size_t integrate_const(
|
||||
{
|
||||
typedef typename odeint::unwrap_reference< Stepper >::type::stepper_category stepper_category;
|
||||
// we want to get as fast as possible to the end
|
||||
if( boost::is_same< null_observer , Observer >::value )
|
||||
BOOST_IF_CONSTEXPR ( std::is_same< null_observer , Observer >::value )
|
||||
{
|
||||
return detail::integrate_adaptive(
|
||||
stepper , system , start_state ,
|
||||
|
||||
@@ -18,8 +18,6 @@
|
||||
#ifndef BOOST_NUMERIC_ODEINT_INTEGRATE_INTEGRATE_N_STEPS_HPP_INCLUDED
|
||||
#define BOOST_NUMERIC_ODEINT_INTEGRATE_INTEGRATE_N_STEPS_HPP_INCLUDED
|
||||
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
|
||||
#include <boost/numeric/odeint/stepper/stepper_categories.hpp>
|
||||
#include <boost/numeric/odeint/iterator/integrate/null_observer.hpp>
|
||||
#include <boost/numeric/odeint/iterator/integrate/detail/integrate_n_steps.hpp>
|
||||
|
||||
@@ -18,8 +18,6 @@
|
||||
#ifndef BOOST_NUMERIC_ODEINT_INTEGRATE_INTEGRATE_TIMES_HPP_INCLUDED
|
||||
#define BOOST_NUMERIC_ODEINT_INTEGRATE_INTEGRATE_TIMES_HPP_INCLUDED
|
||||
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
|
||||
#include <boost/range.hpp>
|
||||
|
||||
#include <boost/numeric/odeint/stepper/stepper_categories.hpp>
|
||||
|
||||
@@ -85,8 +85,7 @@ class adams_bashforth : public algebra_stepper_base< Algebra , Operations >
|
||||
{
|
||||
|
||||
#ifndef DOXYGEN_SKIP
|
||||
BOOST_STATIC_ASSERT(( Steps > 0 ));
|
||||
BOOST_STATIC_ASSERT(( Steps < 9 ));
|
||||
static_assert(( Steps > 0 && Steps < 9 ), "Must have between 1 and 8 steps inclusive");
|
||||
#endif
|
||||
|
||||
public :
|
||||
|
||||
@@ -56,8 +56,7 @@ class adams_bashforth_moulton
|
||||
{
|
||||
|
||||
#ifndef DOXYGEN_SKIP
|
||||
BOOST_STATIC_ASSERT(( Steps > 0 ));
|
||||
BOOST_STATIC_ASSERT(( Steps < 9 ));
|
||||
static_assert(( Steps > 0 && Steps < 9 ), "Must have between 1 and 8 steps inclusive");
|
||||
#endif
|
||||
|
||||
public :
|
||||
|
||||
@@ -19,7 +19,8 @@
|
||||
#ifndef BOOST_NUMERIC_ODEINT_STEPPER_BASE_SYMPLECTIC_RKN_STEPPER_BASE_HPP_INCLUDED
|
||||
#define BOOST_NUMERIC_ODEINT_STEPPER_BASE_SYMPLECTIC_RKN_STEPPER_BASE_HPP_INCLUDED
|
||||
|
||||
#include <boost/array.hpp>
|
||||
#include <array>
|
||||
#include <type_traits>
|
||||
|
||||
#include <boost/numeric/odeint/util/bind.hpp>
|
||||
#include <boost/numeric/odeint/util/unwrap_reference.hpp>
|
||||
@@ -86,7 +87,7 @@ public:
|
||||
|
||||
static const order_type order_value = Order;
|
||||
|
||||
typedef boost::array< value_type , num_of_stages > coef_type;
|
||||
typedef std::array< value_type , num_of_stages > coef_type;
|
||||
|
||||
symplectic_nystroem_stepper_base( const coef_type &coef_a , const coef_type &coef_b , const algebra_type &algebra = algebra_type() )
|
||||
: algebra_stepper_base_type( algebra ) , m_coef_a( coef_a ) , m_coef_b( coef_b ) ,
|
||||
@@ -182,7 +183,7 @@ private:
|
||||
|
||||
// stepper for systems with function for dq/dt = f(p) and dp/dt = -f(q)
|
||||
template< class System , class StateIn , class StateOut >
|
||||
void do_step_impl( System system , const StateIn &in , time_type /* t */ , StateOut &out , time_type dt , boost::mpl::true_ )
|
||||
void do_step_impl( System system , const StateIn &in , time_type /* t */ , StateOut &out , time_type dt , std::integral_constant<bool, true> )
|
||||
{
|
||||
typedef typename odeint::unwrap_reference< System >::type system_type;
|
||||
typedef typename odeint::unwrap_reference< typename system_type::first_type >::type coor_deriv_func_type;
|
||||
@@ -236,7 +237,7 @@ private:
|
||||
|
||||
// stepper for systems with only function dp /dt = -f(q), dq/dt = p, time not required but still expected for compatibility reasons
|
||||
template< class System , class StateIn , class StateOut >
|
||||
void do_step_impl( System system , const StateIn &in , time_type /* t */ , StateOut &out , time_type dt , boost::mpl::false_ )
|
||||
void do_step_impl( System system , const StateIn &in , time_type /* t */ , StateOut &out , time_type dt , std::integral_constant<bool, false> )
|
||||
{
|
||||
typedef typename odeint::unwrap_reference< System >::type momentum_deriv_func_type;
|
||||
momentum_deriv_func_type &momentum_func = system;
|
||||
|
||||
@@ -45,9 +45,6 @@
|
||||
|
||||
#include <boost/numeric/odeint/integrate/max_step_checker.hpp>
|
||||
|
||||
#include <boost/type_traits.hpp>
|
||||
|
||||
|
||||
namespace boost {
|
||||
namespace numeric {
|
||||
namespace odeint {
|
||||
|
||||
@@ -53,7 +53,7 @@ public:
|
||||
: m_algebra( algebra )
|
||||
{};
|
||||
|
||||
size_t adjust_order(size_t order, size_t init, boost::array<wrapped_state_type, 4> &xerr)
|
||||
size_t adjust_order(size_t order, size_t init, std::array<wrapped_state_type, 4> &xerr)
|
||||
{
|
||||
using std::abs;
|
||||
|
||||
@@ -149,7 +149,7 @@ public:
|
||||
|
||||
typedef typename stepper_type::wrapped_state_type wrapped_state_type;
|
||||
typedef typename stepper_type::wrapped_deriv_type wrapped_deriv_type;
|
||||
typedef boost::array< wrapped_state_type , 4 > error_storage_type;
|
||||
typedef std::array< wrapped_state_type , 4 > error_storage_type;
|
||||
|
||||
typedef typename stepper_type::coeff_type coeff_type;
|
||||
typedef controlled_adams_bashforth_moulton< ErrorStepper , StepAdjuster , OrderAdjuster , Resizer > controlled_stepper_type;
|
||||
|
||||
@@ -18,8 +18,7 @@
|
||||
#ifndef BOOST_NUMERIC_ODEINT_STEPPER_DETAIL_ADAMS_BASHFORTH_CALL_ALGEBRA_HPP_INCLUDED
|
||||
#define BOOST_NUMERIC_ODEINT_STEPPER_DETAIL_ADAMS_BASHFORTH_CALL_ALGEBRA_HPP_INCLUDED
|
||||
|
||||
#include <boost/assert.hpp>
|
||||
|
||||
#include <cstddef>
|
||||
|
||||
namespace boost {
|
||||
namespace numeric {
|
||||
@@ -115,7 +114,6 @@ struct adams_bashforth_call_algebra< 7 , Algebra , Operations >
|
||||
template< class StateIn , class StateOut , class StepStorage , class Coefficients , class Time >
|
||||
void operator()( Algebra &algebra , const StateIn &in , StateOut &out , const StepStorage &steps , const Coefficients &coef , Time dt ) const
|
||||
{
|
||||
//BOOST_ASSERT( false ); // not implemented
|
||||
typedef typename Coefficients::value_type value_type;
|
||||
algebra.for_each9( out , in , steps[0].m_v , steps[1].m_v , steps[2].m_v , steps[3].m_v , steps[4].m_v , steps[5].m_v , steps[6].m_v ,
|
||||
typename Operations::template scale_sum8< value_type , Time , Time , Time , Time , Time , Time >(
|
||||
@@ -130,7 +128,6 @@ struct adams_bashforth_call_algebra< 8 , Algebra , Operations >
|
||||
template< class StateIn , class StateOut , class StepStorage , class Coefficients , class Time >
|
||||
void operator()( Algebra &algebra , const StateIn &in , StateOut &out , const StepStorage &steps , const Coefficients &coef , Time dt ) const
|
||||
{
|
||||
//BOOST_ASSERT( false ); // not implemented
|
||||
typedef typename Coefficients::value_type value_type;
|
||||
algebra.for_each10( out , in , steps[0].m_v , steps[1].m_v , steps[2].m_v , steps[3].m_v , steps[4].m_v , steps[5].m_v , steps[6].m_v , steps[7].m_v ,
|
||||
typename Operations::template scale_sum9< value_type , Time , Time , Time , Time , Time , Time , Time >(
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
#ifndef BOOST_NUMERIC_ODEINT_STEPPER_DETAIL_ADAMS_BASHFORTH_COEFFICIENTS_HPP_INCLUDED
|
||||
#define BOOST_NUMERIC_ODEINT_STEPPER_DETAIL_ADAMS_BASHFORTH_COEFFICIENTS_HPP_INCLUDED
|
||||
|
||||
#include <boost/array.hpp>
|
||||
#include <array>
|
||||
|
||||
|
||||
namespace boost {
|
||||
@@ -30,11 +30,11 @@ template< class Value , size_t Steps >
|
||||
class adams_bashforth_coefficients ;
|
||||
|
||||
template< class Value >
|
||||
class adams_bashforth_coefficients< Value , 1 > : public boost::array< Value , 1 >
|
||||
class adams_bashforth_coefficients< Value , 1 > : public std::array< Value , 1 >
|
||||
{
|
||||
public:
|
||||
adams_bashforth_coefficients( void )
|
||||
: boost::array< Value , 1 >()
|
||||
: std::array< Value , 1 >()
|
||||
{
|
||||
(*this)[0] = static_cast< Value >( 1 );
|
||||
}
|
||||
@@ -42,11 +42,11 @@ public:
|
||||
|
||||
|
||||
template< class Value >
|
||||
class adams_bashforth_coefficients< Value , 2 > : public boost::array< Value , 2 >
|
||||
class adams_bashforth_coefficients< Value , 2 > : public std::array< Value , 2 >
|
||||
{
|
||||
public:
|
||||
adams_bashforth_coefficients( void )
|
||||
: boost::array< Value , 2 >()
|
||||
: std::array< Value , 2 >()
|
||||
{
|
||||
(*this)[0] = static_cast< Value >( 3 ) / static_cast< Value >( 2 );
|
||||
(*this)[1] = -static_cast< Value >( 1 ) / static_cast< Value >( 2 );
|
||||
@@ -55,11 +55,11 @@ public:
|
||||
|
||||
|
||||
template< class Value >
|
||||
class adams_bashforth_coefficients< Value , 3 > : public boost::array< Value , 3 >
|
||||
class adams_bashforth_coefficients< Value , 3 > : public std::array< Value , 3 >
|
||||
{
|
||||
public:
|
||||
adams_bashforth_coefficients( void )
|
||||
: boost::array< Value , 3 >()
|
||||
: std::array< Value , 3 >()
|
||||
{
|
||||
(*this)[0] = static_cast< Value >( 23 ) / static_cast< Value >( 12 );
|
||||
(*this)[1] = -static_cast< Value >( 4 ) / static_cast< Value >( 3 );
|
||||
@@ -69,11 +69,11 @@ public:
|
||||
|
||||
|
||||
template< class Value >
|
||||
class adams_bashforth_coefficients< Value , 4 > : public boost::array< Value , 4 >
|
||||
class adams_bashforth_coefficients< Value , 4 > : public std::array< Value , 4 >
|
||||
{
|
||||
public:
|
||||
adams_bashforth_coefficients( void )
|
||||
: boost::array< Value , 4 >()
|
||||
: std::array< Value , 4 >()
|
||||
{
|
||||
(*this)[0] = static_cast< Value >( 55 ) / static_cast< Value >( 24 );
|
||||
(*this)[1] = -static_cast< Value >( 59 ) / static_cast< Value >( 24 );
|
||||
@@ -84,11 +84,11 @@ public:
|
||||
|
||||
|
||||
template< class Value >
|
||||
class adams_bashforth_coefficients< Value , 5 > : public boost::array< Value , 5 >
|
||||
class adams_bashforth_coefficients< Value , 5 > : public std::array< Value , 5 >
|
||||
{
|
||||
public:
|
||||
adams_bashforth_coefficients( void )
|
||||
: boost::array< Value , 5 >()
|
||||
: std::array< Value , 5 >()
|
||||
{
|
||||
(*this)[0] = static_cast< Value >( 1901 ) / static_cast< Value >( 720 );
|
||||
(*this)[1] = -static_cast< Value >( 1387 ) / static_cast< Value >( 360 );
|
||||
@@ -100,11 +100,11 @@ public:
|
||||
|
||||
|
||||
template< class Value >
|
||||
class adams_bashforth_coefficients< Value , 6 > : public boost::array< Value , 6 >
|
||||
class adams_bashforth_coefficients< Value , 6 > : public std::array< Value , 6 >
|
||||
{
|
||||
public:
|
||||
adams_bashforth_coefficients( void )
|
||||
: boost::array< Value , 6 >()
|
||||
: std::array< Value , 6 >()
|
||||
{
|
||||
(*this)[0] = static_cast< Value >( 4277 ) / static_cast< Value >( 1440 );
|
||||
(*this)[1] = -static_cast< Value >( 2641 ) / static_cast< Value >( 480 );
|
||||
@@ -117,11 +117,11 @@ public:
|
||||
|
||||
|
||||
template< class Value >
|
||||
class adams_bashforth_coefficients< Value , 7 > : public boost::array< Value , 7 >
|
||||
class adams_bashforth_coefficients< Value , 7 > : public std::array< Value , 7 >
|
||||
{
|
||||
public:
|
||||
adams_bashforth_coefficients( void )
|
||||
: boost::array< Value , 7 >()
|
||||
: std::array< Value , 7 >()
|
||||
{
|
||||
(*this)[0] = static_cast< Value >( 198721 ) / static_cast< Value >( 60480 );
|
||||
(*this)[1] = -static_cast< Value >( 18637 ) / static_cast< Value >( 2520 );
|
||||
@@ -135,11 +135,11 @@ public:
|
||||
|
||||
|
||||
template< class Value >
|
||||
class adams_bashforth_coefficients< Value , 8 > : public boost::array< Value , 8 >
|
||||
class adams_bashforth_coefficients< Value , 8 > : public std::array< Value , 8 >
|
||||
{
|
||||
public:
|
||||
adams_bashforth_coefficients( void )
|
||||
: boost::array< Value , 8 >()
|
||||
: std::array< Value , 8 >()
|
||||
{
|
||||
(*this)[0] = static_cast< Value >( 16083 ) / static_cast< Value >( 4480 );
|
||||
(*this)[1] = -static_cast< Value >( 1152169 ) / static_cast< Value >( 120960 );
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
#ifndef BOOST_NUMERIC_ODEINT_STEPPER_DETAIL_ADAMS_MOULTON_CALL_ALGEBRA_HPP_INCLUDED
|
||||
#define BOOST_NUMERIC_ODEINT_STEPPER_DETAIL_ADAMS_MOULTON_CALL_ALGEBRA_HPP_INCLUDED
|
||||
|
||||
#include <boost/assert.hpp>
|
||||
#include <cstddef>
|
||||
|
||||
namespace boost {
|
||||
namespace numeric {
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
#define BOOST_NUMERIC_ODEINT_STEPPER_DETAIL_ADAMS_MOULTON_COEFFICIENTS_HPP_INCLUDED
|
||||
|
||||
|
||||
#include <boost/array.hpp>
|
||||
#include <array>
|
||||
|
||||
|
||||
namespace boost {
|
||||
@@ -31,11 +31,11 @@ template< class Value , size_t Steps >
|
||||
class adams_moulton_coefficients ;
|
||||
|
||||
template< class Value >
|
||||
class adams_moulton_coefficients< Value , 1 > : public boost::array< Value , 1 >
|
||||
class adams_moulton_coefficients< Value , 1 > : public std::array< Value , 1 >
|
||||
{
|
||||
public:
|
||||
adams_moulton_coefficients( void )
|
||||
: boost::array< Value , 1 >()
|
||||
: std::array< Value , 1 >()
|
||||
{
|
||||
(*this)[0] = static_cast< Value >( 1 );
|
||||
}
|
||||
@@ -43,11 +43,11 @@ public:
|
||||
|
||||
|
||||
template< class Value >
|
||||
class adams_moulton_coefficients< Value , 2 > : public boost::array< Value , 2 >
|
||||
class adams_moulton_coefficients< Value , 2 > : public std::array< Value , 2 >
|
||||
{
|
||||
public:
|
||||
adams_moulton_coefficients( void )
|
||||
: boost::array< Value , 2 >()
|
||||
: std::array< Value , 2 >()
|
||||
{
|
||||
(*this)[0] = static_cast< Value >( 1 ) / static_cast< Value >( 2 );
|
||||
(*this)[1] = static_cast< Value >( 1 ) / static_cast< Value >( 2 );
|
||||
@@ -56,11 +56,11 @@ public:
|
||||
|
||||
|
||||
template< class Value >
|
||||
class adams_moulton_coefficients< Value , 3 > : public boost::array< Value , 3 >
|
||||
class adams_moulton_coefficients< Value , 3 > : public std::array< Value , 3 >
|
||||
{
|
||||
public:
|
||||
adams_moulton_coefficients( void )
|
||||
: boost::array< Value , 3 >()
|
||||
: std::array< Value , 3 >()
|
||||
{
|
||||
(*this)[0] = static_cast< Value >( 5 ) / static_cast< Value >( 12 );
|
||||
(*this)[1] = static_cast< Value >( 2 ) / static_cast< Value >( 3 );
|
||||
@@ -70,11 +70,11 @@ public:
|
||||
|
||||
|
||||
template< class Value >
|
||||
class adams_moulton_coefficients< Value , 4 > : public boost::array< Value , 4 >
|
||||
class adams_moulton_coefficients< Value , 4 > : public std::array< Value , 4 >
|
||||
{
|
||||
public:
|
||||
adams_moulton_coefficients( void )
|
||||
: boost::array< Value , 4 >()
|
||||
: std::array< Value , 4 >()
|
||||
{
|
||||
(*this)[0] = static_cast< Value >( 3 ) / static_cast< Value >( 8 );
|
||||
(*this)[1] = static_cast< Value >( 19 ) / static_cast< Value >( 24 );
|
||||
@@ -85,11 +85,11 @@ public:
|
||||
|
||||
|
||||
template< class Value >
|
||||
class adams_moulton_coefficients< Value , 5 > : public boost::array< Value , 5 >
|
||||
class adams_moulton_coefficients< Value , 5 > : public std::array< Value , 5 >
|
||||
{
|
||||
public:
|
||||
adams_moulton_coefficients( void )
|
||||
: boost::array< Value , 5 >()
|
||||
: std::array< Value , 5 >()
|
||||
{
|
||||
(*this)[0] = static_cast< Value >( 251 ) / static_cast< Value >( 720 );
|
||||
(*this)[1] = static_cast< Value >( 323 ) / static_cast< Value >( 360 );
|
||||
@@ -101,11 +101,11 @@ public:
|
||||
|
||||
|
||||
template< class Value >
|
||||
class adams_moulton_coefficients< Value , 6 > : public boost::array< Value , 6 >
|
||||
class adams_moulton_coefficients< Value , 6 > : public std::array< Value , 6 >
|
||||
{
|
||||
public:
|
||||
adams_moulton_coefficients( void )
|
||||
: boost::array< Value , 6 >()
|
||||
: std::array< Value , 6 >()
|
||||
{
|
||||
(*this)[0] = static_cast< Value >( 95 ) / static_cast< Value >( 288 );
|
||||
(*this)[1] = static_cast< Value >( 1427 ) / static_cast< Value >( 1440 );
|
||||
@@ -117,11 +117,11 @@ public:
|
||||
};
|
||||
|
||||
template< class Value >
|
||||
class adams_moulton_coefficients< Value , 7 > : public boost::array< Value , 7 >
|
||||
class adams_moulton_coefficients< Value , 7 > : public std::array< Value , 7 >
|
||||
{
|
||||
public:
|
||||
adams_moulton_coefficients( void )
|
||||
: boost::array< Value , 7 >()
|
||||
: std::array< Value , 7 >()
|
||||
{
|
||||
(*this)[0] = static_cast< Value >( 19087 ) / static_cast< Value >( 60480 );
|
||||
(*this)[1] = static_cast< Value >( 2713 ) / static_cast< Value >( 2520 );
|
||||
@@ -135,11 +135,11 @@ public:
|
||||
|
||||
|
||||
template< class Value >
|
||||
class adams_moulton_coefficients< Value , 8 > : public boost::array< Value , 8 >
|
||||
class adams_moulton_coefficients< Value , 8 > : public std::array< Value , 8 >
|
||||
{
|
||||
public:
|
||||
adams_moulton_coefficients( void )
|
||||
: boost::array< Value , 8 >()
|
||||
: std::array< Value , 8 >()
|
||||
{
|
||||
(*this)[0] = static_cast< Value >( 5257 ) / static_cast< Value >( 17280 );
|
||||
(*this)[1] = static_cast< Value >( 139849 ) / static_cast< Value >( 120960 );
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
#include <boost/numeric/odeint/algebra/algebra_dispatcher.hpp>
|
||||
#include <boost/numeric/odeint/algebra/operations_dispatcher.hpp>
|
||||
|
||||
#include <boost/array.hpp>
|
||||
#include <array>
|
||||
|
||||
namespace boost {
|
||||
namespace numeric {
|
||||
@@ -168,10 +168,10 @@ public:
|
||||
size_t m_eo;
|
||||
size_t m_steps_init;
|
||||
|
||||
rotating_buffer<boost::array<value_type, order_value+1>, 2> beta; // beta[0] = beta(n)
|
||||
rotating_buffer<boost::array<wrapped_deriv_type, order_value+2>, 3> phi; // phi[0] = phi(n+1)
|
||||
boost::array<value_type, order_value + 2> g;
|
||||
boost::array<value_type, 14> gs;
|
||||
rotating_buffer<std::array<value_type, order_value+1>, 2> beta; // beta[0] = beta(n)
|
||||
rotating_buffer<std::array<wrapped_deriv_type, order_value+2>, 3> phi; // phi[0] = phi(n+1)
|
||||
std::array<value_type, order_value + 2> g;
|
||||
std::array<value_type, 14> gs;
|
||||
|
||||
private:
|
||||
template< class StateType >
|
||||
@@ -192,7 +192,7 @@ private:
|
||||
|
||||
time_storage_type m_time_storage;
|
||||
static const size_t c_size = order_value + 2;
|
||||
boost::array<value_type, c_size*c_size> c;
|
||||
std::array<value_type, c_size*c_size> c;
|
||||
|
||||
algebra_type m_algebra;
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
#include <boost/fusion/mpl.hpp>
|
||||
#include <boost/fusion/sequence.hpp>
|
||||
|
||||
#include <boost/array.hpp>
|
||||
#include <array>
|
||||
|
||||
#include <boost/numeric/odeint/algebra/range_algebra.hpp>
|
||||
#include <boost/numeric/odeint/algebra/default_operations.hpp>
|
||||
@@ -49,14 +49,14 @@ namespace detail {
|
||||
template< class T , class Constant >
|
||||
struct array_wrapper
|
||||
{
|
||||
typedef const typename boost::array< T , Constant::value > type;
|
||||
typedef const typename std::array< T , Constant::value > type;
|
||||
};
|
||||
|
||||
template< class T , size_t i >
|
||||
struct stage
|
||||
{
|
||||
T c;
|
||||
boost::array< T , i > a;
|
||||
std::array< T , i > a;
|
||||
};
|
||||
|
||||
|
||||
@@ -91,8 +91,8 @@ public:
|
||||
>::type
|
||||
>::type coef_a_type;
|
||||
|
||||
typedef boost::array< Value , StageCount > coef_b_type;
|
||||
typedef boost::array< Value , StageCount > coef_c_type;
|
||||
typedef std::array< Value , StageCount > coef_b_type;
|
||||
typedef std::array< Value , StageCount > coef_c_type;
|
||||
|
||||
typedef typename boost::fusion::result_of::as_vector
|
||||
<
|
||||
|
||||
@@ -30,7 +30,7 @@ struct generic_rk_scale_sum;
|
||||
template< class Operations , class Fac , class Time >
|
||||
struct generic_rk_scale_sum< 1 , Operations , Fac , Time > : public Operations::template scale_sum2< Fac , Time >
|
||||
{
|
||||
generic_rk_scale_sum( const boost::array<Fac,1> &a , Time dt ) : Operations::template scale_sum2< Fac , Time >( 1.0 , a[0]*dt )
|
||||
generic_rk_scale_sum( const std::array<Fac,1> &a , Time dt ) : Operations::template scale_sum2< Fac , Time >( 1.0 , a[0]*dt )
|
||||
{ }
|
||||
|
||||
typedef void result_type;
|
||||
@@ -40,7 +40,7 @@ struct generic_rk_scale_sum< 1 , Operations , Fac , Time > : public Operations::
|
||||
template< class Operations , class Fac , class Time >
|
||||
struct generic_rk_scale_sum< 2 , Operations , Fac , Time > : public Operations::template scale_sum3< Fac , Time >
|
||||
{
|
||||
generic_rk_scale_sum( const boost::array<Fac,2> &a , Time dt )
|
||||
generic_rk_scale_sum( const std::array<Fac,2> &a , Time dt )
|
||||
: Operations::template scale_sum3< Fac , Time >( 1.0 , a[0]*dt , a[1]*dt )
|
||||
{ }
|
||||
|
||||
@@ -50,7 +50,7 @@ struct generic_rk_scale_sum< 2 , Operations , Fac , Time > : public Operations::
|
||||
template< class Operations , class Fac , class Time >
|
||||
struct generic_rk_scale_sum< 3 , Operations , Fac , Time > : public Operations::template scale_sum4< Fac , Time >
|
||||
{
|
||||
generic_rk_scale_sum( const boost::array<Fac,3> &a , Time dt )
|
||||
generic_rk_scale_sum( const std::array<Fac,3> &a , Time dt )
|
||||
: Operations::template scale_sum4< Fac , Time >( 1.0 , a[0]*dt , a[1]*dt , a[2]*dt )
|
||||
{ }
|
||||
|
||||
@@ -60,7 +60,7 @@ struct generic_rk_scale_sum< 3 , Operations , Fac , Time > : public Operations::
|
||||
template< class Operations , class Fac , class Time >
|
||||
struct generic_rk_scale_sum< 4 , Operations , Fac , Time > : public Operations::template scale_sum5< Fac , Time >
|
||||
{
|
||||
generic_rk_scale_sum( const boost::array<Fac,4> &a , Time dt )
|
||||
generic_rk_scale_sum( const std::array<Fac,4> &a , Time dt )
|
||||
: Operations::template scale_sum5< Fac , Time >( 1.0 , a[0]*dt , a[1]*dt , a[2]*dt , a[3]*dt )
|
||||
{ }
|
||||
|
||||
@@ -70,7 +70,7 @@ struct generic_rk_scale_sum< 4 , Operations , Fac , Time > : public Operations::
|
||||
template< class Operations , class Fac , class Time >
|
||||
struct generic_rk_scale_sum< 5 , Operations , Fac , Time > : public Operations::template scale_sum6< Fac , Time >
|
||||
{
|
||||
generic_rk_scale_sum( const boost::array<Fac,5> &a , Time dt )
|
||||
generic_rk_scale_sum( const std::array<Fac,5> &a , Time dt )
|
||||
: Operations::template scale_sum6< Fac , Time >( 1.0 , a[0]*dt , a[1]*dt , a[2]*dt , a[3]*dt , a[4]*dt )
|
||||
{ }
|
||||
|
||||
@@ -80,7 +80,7 @@ struct generic_rk_scale_sum< 5 , Operations , Fac , Time > : public Operations::
|
||||
template< class Operations , class Fac , class Time >
|
||||
struct generic_rk_scale_sum< 6 , Operations , Fac , Time > : public Operations::template scale_sum7< Fac , Time >
|
||||
{
|
||||
generic_rk_scale_sum( const boost::array<Fac,6> &a , Time dt )
|
||||
generic_rk_scale_sum( const std::array<Fac,6> &a , Time dt )
|
||||
: Operations::template scale_sum7< Fac , Time >( 1.0 , a[0]*dt , a[1]*dt , a[2]*dt , a[3]*dt , a[4]*dt , a[5]*dt )
|
||||
{ }
|
||||
|
||||
@@ -90,7 +90,7 @@ struct generic_rk_scale_sum< 6 , Operations , Fac , Time > : public Operations::
|
||||
template< class Operations , class Fac , class Time >
|
||||
struct generic_rk_scale_sum< 7 , Operations , Fac , Time > : public Operations::template scale_sum8< Fac , Time >
|
||||
{
|
||||
generic_rk_scale_sum( const boost::array<Fac,7> &a , Time dt )
|
||||
generic_rk_scale_sum( const std::array<Fac,7> &a , Time dt )
|
||||
: Operations::template scale_sum8< Fac , Time >( 1.0 , a[0]*dt , a[1]*dt , a[2]*dt , a[3]*dt , a[4]*dt , a[5]*dt , a[6]*dt )
|
||||
{ }
|
||||
|
||||
@@ -100,7 +100,7 @@ struct generic_rk_scale_sum< 7 , Operations , Fac , Time > : public Operations::
|
||||
template< class Operations , class Fac , class Time >
|
||||
struct generic_rk_scale_sum< 8 , Operations , Fac , Time > : public Operations::template scale_sum9< Fac , Time >
|
||||
{
|
||||
generic_rk_scale_sum( const boost::array<Fac,8> &a , Time dt )
|
||||
generic_rk_scale_sum( const std::array<Fac,8> &a , Time dt )
|
||||
: Operations::template scale_sum9< Fac , Time >( 1.0 , a[0]*dt , a[1]*dt , a[2]*dt , a[3]*dt , a[4]*dt ,
|
||||
a[5]*dt , a[6]*dt , a[7]*dt )
|
||||
{ }
|
||||
@@ -111,7 +111,7 @@ struct generic_rk_scale_sum< 8 , Operations , Fac , Time > : public Operations::
|
||||
template< class Operations , class Fac , class Time >
|
||||
struct generic_rk_scale_sum< 9 , Operations , Fac , Time > : public Operations::template scale_sum10< Fac , Time >
|
||||
{
|
||||
generic_rk_scale_sum( const boost::array<Fac,9> &a , Time dt )
|
||||
generic_rk_scale_sum( const std::array<Fac,9> &a , Time dt )
|
||||
: Operations::template scale_sum10< Fac , Time >( 1.0 , a[0]*dt , a[1]*dt , a[2]*dt , a[3]*dt , a[4]*dt ,
|
||||
a[5]*dt , a[6]*dt , a[7]*dt , a[8]*dt )
|
||||
{ }
|
||||
@@ -122,7 +122,7 @@ struct generic_rk_scale_sum< 9 , Operations , Fac , Time > : public Operations::
|
||||
template< class Operations , class Fac , class Time >
|
||||
struct generic_rk_scale_sum< 10 , Operations , Fac , Time > : public Operations::template scale_sum11< Fac , Time >
|
||||
{
|
||||
generic_rk_scale_sum( const boost::array<Fac,10> &a , Time dt )
|
||||
generic_rk_scale_sum( const std::array<Fac,10> &a , Time dt )
|
||||
: Operations::template scale_sum11< Fac , Time >( 1.0 , a[0]*dt , a[1]*dt , a[2]*dt , a[3]*dt , a[4]*dt ,
|
||||
a[5]*dt , a[6]*dt , a[7]*dt , a[8]*dt , a[9]*dt )
|
||||
{ }
|
||||
@@ -133,7 +133,7 @@ struct generic_rk_scale_sum< 10 , Operations , Fac , Time > : public Operations:
|
||||
template< class Operations , class Fac , class Time >
|
||||
struct generic_rk_scale_sum< 11 , Operations , Fac , Time > : public Operations::template scale_sum12< Fac , Time >
|
||||
{
|
||||
generic_rk_scale_sum( const boost::array<Fac,11> &a , Time dt )
|
||||
generic_rk_scale_sum( const std::array<Fac,11> &a , Time dt )
|
||||
: Operations::template scale_sum12< Fac , Time >( 1.0 , a[0]*dt , a[1]*dt , a[2]*dt , a[3]*dt , a[4]*dt ,
|
||||
a[5]*dt , a[6]*dt , a[7]*dt , a[8]*dt , a[9]*dt , a[10]*dt )
|
||||
{ }
|
||||
@@ -144,7 +144,7 @@ struct generic_rk_scale_sum< 11 , Operations , Fac , Time > : public Operations:
|
||||
template< class Operations , class Fac , class Time >
|
||||
struct generic_rk_scale_sum< 12 , Operations , Fac , Time > : public Operations::template scale_sum13< Fac , Time >
|
||||
{
|
||||
generic_rk_scale_sum( const boost::array<Fac,12> &a , Time dt )
|
||||
generic_rk_scale_sum( const std::array<Fac,12> &a , Time dt )
|
||||
: Operations::template scale_sum13< Fac , Time >( 1.0 , a[0]*dt , a[1]*dt , a[2]*dt , a[3]*dt , a[4]*dt ,
|
||||
a[5]*dt , a[6]*dt , a[7]*dt , a[8]*dt , a[9]*dt , a[10]*dt , a[11]*dt )
|
||||
{ }
|
||||
@@ -155,7 +155,7 @@ struct generic_rk_scale_sum< 12 , Operations , Fac , Time > : public Operations:
|
||||
template< class Operations , class Fac , class Time >
|
||||
struct generic_rk_scale_sum< 13 , Operations , Fac , Time > : public Operations::template scale_sum14< Fac , Time >
|
||||
{
|
||||
generic_rk_scale_sum( const boost::array<Fac,13> &a , Time dt )
|
||||
generic_rk_scale_sum( const std::array<Fac,13> &a , Time dt )
|
||||
: Operations::template scale_sum14< Fac , Time >( 1.0 , a[0]*dt , a[1]*dt , a[2]*dt , a[3]*dt , a[4]*dt ,
|
||||
a[5]*dt , a[6]*dt , a[7]*dt , a[8]*dt , a[9]*dt , a[10]*dt , a[11]*dt , a[12]*dt )
|
||||
{ }
|
||||
@@ -171,7 +171,7 @@ struct generic_rk_scale_sum_err;
|
||||
template< class Operations , class Fac , class Time >
|
||||
struct generic_rk_scale_sum_err< 1 , Operations , Fac , Time > : public Operations::template scale_sum1< Time >
|
||||
{
|
||||
generic_rk_scale_sum_err( const boost::array<Fac,1> &a , Time dt ) : Operations::template scale_sum1< Time >( a[0]*dt )
|
||||
generic_rk_scale_sum_err( const std::array<Fac,1> &a , Time dt ) : Operations::template scale_sum1< Time >( a[0]*dt )
|
||||
{ }
|
||||
|
||||
typedef void result_type;
|
||||
@@ -181,7 +181,7 @@ struct generic_rk_scale_sum_err< 1 , Operations , Fac , Time > : public Operatio
|
||||
template< class Operations , class Fac , class Time >
|
||||
struct generic_rk_scale_sum_err< 2 , Operations , Fac , Time > : public Operations::template scale_sum2< Time >
|
||||
{
|
||||
generic_rk_scale_sum_err( const boost::array<Fac,2> &a , Time dt )
|
||||
generic_rk_scale_sum_err( const std::array<Fac,2> &a , Time dt )
|
||||
: Operations::template scale_sum2< Time >( a[0]*dt , a[1]*dt )
|
||||
{ }
|
||||
|
||||
@@ -191,7 +191,7 @@ struct generic_rk_scale_sum_err< 2 , Operations , Fac , Time > : public Operatio
|
||||
template< class Operations , class Fac , class Time >
|
||||
struct generic_rk_scale_sum_err< 3 , Operations , Fac , Time > : public Operations::template scale_sum3< Time >
|
||||
{
|
||||
generic_rk_scale_sum_err( const boost::array<Fac,3> &a , Time dt )
|
||||
generic_rk_scale_sum_err( const std::array<Fac,3> &a , Time dt )
|
||||
: Operations::template scale_sum3< Time >( a[0]*dt , a[1]*dt , a[2]*dt )
|
||||
{ }
|
||||
|
||||
@@ -201,7 +201,7 @@ struct generic_rk_scale_sum_err< 3 , Operations , Fac , Time > : public Operatio
|
||||
template< class Operations , class Fac , class Time >
|
||||
struct generic_rk_scale_sum_err< 4 , Operations , Fac , Time > : public Operations::template scale_sum4< Time >
|
||||
{
|
||||
generic_rk_scale_sum_err( const boost::array<Fac,4> &a , Time dt )
|
||||
generic_rk_scale_sum_err( const std::array<Fac,4> &a , Time dt )
|
||||
: Operations::template scale_sum4< Time >( a[0]*dt , a[1]*dt , a[2]*dt , a[3]*dt )
|
||||
{ }
|
||||
|
||||
@@ -211,7 +211,7 @@ struct generic_rk_scale_sum_err< 4 , Operations , Fac , Time > : public Operatio
|
||||
template< class Operations , class Fac , class Time >
|
||||
struct generic_rk_scale_sum_err< 5 , Operations , Fac , Time > : public Operations::template scale_sum5< Fac >
|
||||
{
|
||||
generic_rk_scale_sum_err( const boost::array<Fac,5> &a , Time dt )
|
||||
generic_rk_scale_sum_err( const std::array<Fac,5> &a , Time dt )
|
||||
: Operations::template scale_sum5< Time >( a[0]*dt , a[1]*dt , a[2]*dt , a[3]*dt , a[4]*dt )
|
||||
{ }
|
||||
|
||||
@@ -222,7 +222,7 @@ struct generic_rk_scale_sum_err< 5 , Operations , Fac , Time > : public Operatio
|
||||
template< class Operations , class Fac , class Time >
|
||||
struct generic_rk_scale_sum_err< 6 , Operations , Fac , Time > : public Operations::template scale_sum6< Time >
|
||||
{
|
||||
generic_rk_scale_sum_err( const boost::array<Fac,6> &a , Time dt )
|
||||
generic_rk_scale_sum_err( const std::array<Fac,6> &a , Time dt )
|
||||
: Operations::template scale_sum6< Time >( a[0]*dt , a[1]*dt , a[2]*dt , a[3]*dt , a[4]*dt , a[5]*dt )
|
||||
{ }
|
||||
|
||||
@@ -234,7 +234,7 @@ struct generic_rk_scale_sum_err< 6 , Operations , Fac , Time > : public Operatio
|
||||
template< class Operations , class Fac , class Time >
|
||||
struct generic_rk_scale_sum_err< 13 , Operations , Fac , Time > : public Operations::template scale_sum13< Time >
|
||||
{
|
||||
generic_rk_scale_sum_err( const boost::array<Fac,13> &a , Time dt )
|
||||
generic_rk_scale_sum_err( const std::array<Fac,13> &a , Time dt )
|
||||
: Operations::template scale_sum13< Time >( a[0]*dt , a[1]*dt , a[2]*dt , a[3]*dt , a[4]*dt , a[5]*dt ,
|
||||
a[6]*dt , a[7]*dt , a[8]*dt , a[9]*dt , a[10]*dt , a[11]*dt , a[12]*dt )
|
||||
{ }
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
#ifndef BOOST_NUMERIC_ODEINT_STEPPER_DETAIL_PID_STEP_ADJUSTER_COEFFICIENTS_HPP_INCLUDED
|
||||
#define BOOST_NUMERIC_ODEINT_STEPPER_DETAIL_PID_STEP_ADJUSTER_COEFFICIENTS_HPP_INCLUDED
|
||||
|
||||
#include <boost/array.hpp>
|
||||
#include <array>
|
||||
|
||||
namespace boost {
|
||||
namespace numeric {
|
||||
@@ -38,11 +38,11 @@ template<int Type>
|
||||
class pid_step_adjuster_coefficients;
|
||||
|
||||
template<>
|
||||
class pid_step_adjuster_coefficients<BASIC> : public boost::array<double, 5>
|
||||
class pid_step_adjuster_coefficients<BASIC> : public std::array<double, 5>
|
||||
{
|
||||
public:
|
||||
pid_step_adjuster_coefficients()
|
||||
: boost::array<double, 5>()
|
||||
: std::array<double, 5>()
|
||||
{
|
||||
(*this)[0] = 1.0;
|
||||
(*this)[1] = 0.0;
|
||||
@@ -53,11 +53,11 @@ public:
|
||||
};
|
||||
|
||||
template<>
|
||||
class pid_step_adjuster_coefficients<H0211> : public boost::array<double, 5>
|
||||
class pid_step_adjuster_coefficients<H0211> : public std::array<double, 5>
|
||||
{
|
||||
public:
|
||||
pid_step_adjuster_coefficients()
|
||||
: boost::array<double, 5>()
|
||||
: std::array<double, 5>()
|
||||
{
|
||||
(*this)[0] = 1.0 / 2.0;
|
||||
(*this)[1] = 1.0 / 2.0;
|
||||
@@ -68,11 +68,11 @@ public:
|
||||
};
|
||||
|
||||
template<>
|
||||
class pid_step_adjuster_coefficients<H211b> : public boost::array<double, 5>
|
||||
class pid_step_adjuster_coefficients<H211b> : public std::array<double, 5>
|
||||
{
|
||||
public:
|
||||
pid_step_adjuster_coefficients()
|
||||
: boost::array<double, 5>()
|
||||
: std::array<double, 5>()
|
||||
{
|
||||
(*this)[0] = 1.0 / 5.0;
|
||||
(*this)[1] = 2.0 / 5.0;
|
||||
@@ -83,11 +83,11 @@ public:
|
||||
};
|
||||
|
||||
template<>
|
||||
class pid_step_adjuster_coefficients<H211PI> : public boost::array<double, 5>
|
||||
class pid_step_adjuster_coefficients<H211PI> : public std::array<double, 5>
|
||||
{
|
||||
public:
|
||||
pid_step_adjuster_coefficients()
|
||||
: boost::array<double, 5>()
|
||||
: std::array<double, 5>()
|
||||
{
|
||||
(*this)[0] = 1.0 / 6.0;
|
||||
(*this)[1] = 2.0 / 6.0;
|
||||
@@ -98,11 +98,11 @@ public:
|
||||
};
|
||||
|
||||
template<>
|
||||
class pid_step_adjuster_coefficients<H0312> : public boost::array<double, 5>
|
||||
class pid_step_adjuster_coefficients<H0312> : public std::array<double, 5>
|
||||
{
|
||||
public:
|
||||
pid_step_adjuster_coefficients()
|
||||
: boost::array<double, 5>()
|
||||
: std::array<double, 5>()
|
||||
{
|
||||
(*this)[0] = 1.0 / 4.0;
|
||||
(*this)[1] = 2.0 / 2.0;
|
||||
@@ -113,11 +113,11 @@ public:
|
||||
};
|
||||
|
||||
template<>
|
||||
class pid_step_adjuster_coefficients<H312b> : public boost::array<double, 5>
|
||||
class pid_step_adjuster_coefficients<H312b> : public std::array<double, 5>
|
||||
{
|
||||
public:
|
||||
pid_step_adjuster_coefficients()
|
||||
: boost::array<double, 5>()
|
||||
: std::array<double, 5>()
|
||||
{
|
||||
(*this)[0] = 1.0 / 6.0;
|
||||
(*this)[1] = 2.0 / 6.0;
|
||||
@@ -128,11 +128,11 @@ public:
|
||||
};
|
||||
|
||||
template<>
|
||||
class pid_step_adjuster_coefficients<H312PID> : public boost::array<double, 5>
|
||||
class pid_step_adjuster_coefficients<H312PID> : public std::array<double, 5>
|
||||
{
|
||||
public:
|
||||
pid_step_adjuster_coefficients()
|
||||
: boost::array<double, 5>()
|
||||
: std::array<double, 5>()
|
||||
{
|
||||
(*this)[0] = 1.0 / 18.0;
|
||||
(*this)[1] = 2.0 / 9.0;
|
||||
@@ -143,11 +143,11 @@ public:
|
||||
};
|
||||
|
||||
template<>
|
||||
class pid_step_adjuster_coefficients<H0321> : public boost::array<double, 5>
|
||||
class pid_step_adjuster_coefficients<H0321> : public std::array<double, 5>
|
||||
{
|
||||
public:
|
||||
pid_step_adjuster_coefficients()
|
||||
: boost::array<double, 5>()
|
||||
: std::array<double, 5>()
|
||||
{
|
||||
(*this)[0] = 5.0 / 4.0;
|
||||
(*this)[1] = 1.0 / 2.0;
|
||||
@@ -158,11 +158,11 @@ public:
|
||||
};
|
||||
|
||||
template<>
|
||||
class pid_step_adjuster_coefficients<H321> : public boost::array<double, 5>
|
||||
class pid_step_adjuster_coefficients<H321> : public std::array<double, 5>
|
||||
{
|
||||
public:
|
||||
pid_step_adjuster_coefficients()
|
||||
: boost::array<double, 5>()
|
||||
: std::array<double, 5>()
|
||||
{
|
||||
(*this)[0] = 1.0 / 3.0;
|
||||
(*this)[1] = 1.0 / 18.0;
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
#ifndef BOOST_NUMERIC_ODEINT_STEPPER_DETAIL_ROTATING_BUFFER_HPP_INCLUDED
|
||||
#define BOOST_NUMERIC_ODEINT_STEPPER_DETAIL_ROTATING_BUFFER_HPP_INCLUDED
|
||||
|
||||
#include <boost/array.hpp>
|
||||
#include <array>
|
||||
|
||||
namespace boost {
|
||||
namespace numeric {
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
#define BOOST_NUMERIC_ODEINT_STEPPER_EXPLICIT_GENERIC_RK_HPP_INCLUDED
|
||||
|
||||
|
||||
#include <boost/array.hpp>
|
||||
#include <array>
|
||||
|
||||
|
||||
#include <boost/numeric/odeint/stepper/base/explicit_stepper_base.hpp>
|
||||
@@ -60,14 +60,14 @@ struct stage_vector;
|
||||
template< class T , class Constant >
|
||||
struct array_wrapper
|
||||
{
|
||||
typedef const typename boost::array< T , Constant::value > type;
|
||||
typedef const typename std::array< T , Constant::value > type;
|
||||
};
|
||||
|
||||
template< class T , size_t i >
|
||||
struct stage
|
||||
{
|
||||
T c;
|
||||
boost::array< T , i > a;
|
||||
std::array< T , i > a;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -67,7 +67,7 @@ class extrapolation_stepper : public explicit_error_stepper_base
|
||||
|
||||
private:
|
||||
// check for Order being odd
|
||||
BOOST_STATIC_ASSERT_MSG(
|
||||
static_assert(
|
||||
( ( Order % 2 ) == 0 ) && ( Order > 2 ),
|
||||
"extrapolation_stepper requires even Order larger than 2" );
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
#include <boost/numeric/odeint/algebra/algebra_dispatcher.hpp>
|
||||
#include <boost/numeric/odeint/algebra/operations_dispatcher.hpp>
|
||||
|
||||
#include <boost/array.hpp>
|
||||
#include <array>
|
||||
|
||||
#include <boost/numeric/odeint/util/resizer.hpp>
|
||||
|
||||
@@ -42,7 +42,7 @@ namespace odeint {
|
||||
|
||||
#ifndef DOXYGEN_SKIP
|
||||
template< class Value = double >
|
||||
struct rk4_coefficients_a1 : boost::array< Value , 1 >
|
||||
struct rk4_coefficients_a1 : std::array< Value , 1 >
|
||||
{
|
||||
rk4_coefficients_a1( void )
|
||||
{
|
||||
@@ -51,7 +51,7 @@ struct rk4_coefficients_a1 : boost::array< Value , 1 >
|
||||
};
|
||||
|
||||
template< class Value = double >
|
||||
struct rk4_coefficients_a2 : boost::array< Value , 2 >
|
||||
struct rk4_coefficients_a2 : std::array< Value , 2 >
|
||||
{
|
||||
rk4_coefficients_a2( void )
|
||||
{
|
||||
@@ -62,7 +62,7 @@ struct rk4_coefficients_a2 : boost::array< Value , 2 >
|
||||
|
||||
|
||||
template< class Value = double >
|
||||
struct rk4_coefficients_a3 : boost::array< Value , 3 >
|
||||
struct rk4_coefficients_a3 : std::array< Value , 3 >
|
||||
{
|
||||
rk4_coefficients_a3( void )
|
||||
{
|
||||
@@ -73,7 +73,7 @@ struct rk4_coefficients_a3 : boost::array< Value , 3 >
|
||||
};
|
||||
|
||||
template< class Value = double >
|
||||
struct rk4_coefficients_b : boost::array< Value , 4 >
|
||||
struct rk4_coefficients_b : std::array< Value , 4 >
|
||||
{
|
||||
rk4_coefficients_b( void )
|
||||
{
|
||||
@@ -85,7 +85,7 @@ struct rk4_coefficients_b : boost::array< Value , 4 >
|
||||
};
|
||||
|
||||
template< class Value = double >
|
||||
struct rk4_coefficients_c : boost::array< Value , 4 >
|
||||
struct rk4_coefficients_c : std::array< Value , 4 >
|
||||
{
|
||||
rk4_coefficients_c( void )
|
||||
{
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
#include <boost/numeric/odeint/util/is_resizeable.hpp>
|
||||
#include <boost/numeric/odeint/util/resizer.hpp>
|
||||
|
||||
#include <boost/array.hpp>
|
||||
#include <array>
|
||||
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@ namespace odeint {
|
||||
|
||||
#ifndef DOXYGEN_SKIP
|
||||
template< class Value = double >
|
||||
struct rk54_ck_coefficients_a1 : boost::array< Value , 1 >
|
||||
struct rk54_ck_coefficients_a1 : std::array< Value , 1 >
|
||||
{
|
||||
rk54_ck_coefficients_a1( void )
|
||||
{
|
||||
@@ -52,7 +52,7 @@ struct rk54_ck_coefficients_a1 : boost::array< Value , 1 >
|
||||
};
|
||||
|
||||
template< class Value = double >
|
||||
struct rk54_ck_coefficients_a2 : boost::array< Value , 2 >
|
||||
struct rk54_ck_coefficients_a2 : std::array< Value , 2 >
|
||||
{
|
||||
rk54_ck_coefficients_a2( void )
|
||||
{
|
||||
@@ -63,7 +63,7 @@ struct rk54_ck_coefficients_a2 : boost::array< Value , 2 >
|
||||
|
||||
|
||||
template< class Value = double >
|
||||
struct rk54_ck_coefficients_a3 : boost::array< Value , 3 >
|
||||
struct rk54_ck_coefficients_a3 : std::array< Value , 3 >
|
||||
{
|
||||
rk54_ck_coefficients_a3( void )
|
||||
{
|
||||
@@ -74,7 +74,7 @@ struct rk54_ck_coefficients_a3 : boost::array< Value , 3 >
|
||||
};
|
||||
|
||||
template< class Value = double >
|
||||
struct rk54_ck_coefficients_a4 : boost::array< Value , 4 >
|
||||
struct rk54_ck_coefficients_a4 : std::array< Value , 4 >
|
||||
{
|
||||
rk54_ck_coefficients_a4( void )
|
||||
{
|
||||
@@ -86,7 +86,7 @@ struct rk54_ck_coefficients_a4 : boost::array< Value , 4 >
|
||||
};
|
||||
|
||||
template< class Value = double >
|
||||
struct rk54_ck_coefficients_a5 : boost::array< Value , 5 >
|
||||
struct rk54_ck_coefficients_a5 : std::array< Value , 5 >
|
||||
{
|
||||
rk54_ck_coefficients_a5( void )
|
||||
{
|
||||
@@ -99,7 +99,7 @@ struct rk54_ck_coefficients_a5 : boost::array< Value , 5 >
|
||||
};
|
||||
|
||||
template< class Value = double >
|
||||
struct rk54_ck_coefficients_b : boost::array< Value , 6 >
|
||||
struct rk54_ck_coefficients_b : std::array< Value , 6 >
|
||||
{
|
||||
rk54_ck_coefficients_b( void )
|
||||
{
|
||||
@@ -113,7 +113,7 @@ struct rk54_ck_coefficients_b : boost::array< Value , 6 >
|
||||
};
|
||||
|
||||
template< class Value = double >
|
||||
struct rk54_ck_coefficients_db : boost::array< Value , 6 >
|
||||
struct rk54_ck_coefficients_db : std::array< Value , 6 >
|
||||
{
|
||||
rk54_ck_coefficients_db( void )
|
||||
{
|
||||
@@ -128,7 +128,7 @@ struct rk54_ck_coefficients_db : boost::array< Value , 6 >
|
||||
|
||||
|
||||
template< class Value = double >
|
||||
struct rk54_ck_coefficients_c : boost::array< Value , 6 >
|
||||
struct rk54_ck_coefficients_c : std::array< Value , 6 >
|
||||
{
|
||||
rk54_ck_coefficients_c( void )
|
||||
{
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
#include <boost/numeric/odeint/algebra/algebra_dispatcher.hpp>
|
||||
#include <boost/numeric/odeint/algebra/operations_dispatcher.hpp>
|
||||
|
||||
#include <boost/array.hpp>
|
||||
#include <array>
|
||||
|
||||
#include <boost/numeric/odeint/util/state_wrapper.hpp>
|
||||
#include <boost/numeric/odeint/util/is_resizeable.hpp>
|
||||
@@ -44,7 +44,7 @@ namespace odeint {
|
||||
|
||||
#ifndef DOXYGEN_SKIP
|
||||
template< class Value = double >
|
||||
struct rk78_coefficients_a1 : boost::array< Value , 1 >
|
||||
struct rk78_coefficients_a1 : std::array< Value , 1 >
|
||||
{
|
||||
rk78_coefficients_a1( void )
|
||||
{
|
||||
@@ -53,7 +53,7 @@ struct rk78_coefficients_a1 : boost::array< Value , 1 >
|
||||
};
|
||||
|
||||
template< class Value = double >
|
||||
struct rk78_coefficients_a2 : boost::array< Value , 2 >
|
||||
struct rk78_coefficients_a2 : std::array< Value , 2 >
|
||||
{
|
||||
rk78_coefficients_a2( void )
|
||||
{
|
||||
@@ -64,7 +64,7 @@ struct rk78_coefficients_a2 : boost::array< Value , 2 >
|
||||
|
||||
|
||||
template< class Value = double >
|
||||
struct rk78_coefficients_a3 : boost::array< Value , 3 >
|
||||
struct rk78_coefficients_a3 : std::array< Value , 3 >
|
||||
{
|
||||
rk78_coefficients_a3( void )
|
||||
{
|
||||
@@ -75,7 +75,7 @@ struct rk78_coefficients_a3 : boost::array< Value , 3 >
|
||||
};
|
||||
|
||||
template< class Value = double >
|
||||
struct rk78_coefficients_a4 : boost::array< Value , 4 >
|
||||
struct rk78_coefficients_a4 : std::array< Value , 4 >
|
||||
{
|
||||
rk78_coefficients_a4( void )
|
||||
{
|
||||
@@ -87,7 +87,7 @@ struct rk78_coefficients_a4 : boost::array< Value , 4 >
|
||||
};
|
||||
|
||||
template< class Value = double >
|
||||
struct rk78_coefficients_a5 : boost::array< Value , 5 >
|
||||
struct rk78_coefficients_a5 : std::array< Value , 5 >
|
||||
{
|
||||
rk78_coefficients_a5( void )
|
||||
{
|
||||
@@ -101,7 +101,7 @@ struct rk78_coefficients_a5 : boost::array< Value , 5 >
|
||||
|
||||
|
||||
template< class Value = double >
|
||||
struct rk78_coefficients_a6 : boost::array< Value , 6 >
|
||||
struct rk78_coefficients_a6 : std::array< Value , 6 >
|
||||
{
|
||||
rk78_coefficients_a6( void )
|
||||
{
|
||||
@@ -115,7 +115,7 @@ struct rk78_coefficients_a6 : boost::array< Value , 6 >
|
||||
};
|
||||
|
||||
template< class Value = double >
|
||||
struct rk78_coefficients_a7 : boost::array< Value , 7 >
|
||||
struct rk78_coefficients_a7 : std::array< Value , 7 >
|
||||
{
|
||||
rk78_coefficients_a7( void )
|
||||
{
|
||||
@@ -130,7 +130,7 @@ struct rk78_coefficients_a7 : boost::array< Value , 7 >
|
||||
};
|
||||
|
||||
template< class Value = double >
|
||||
struct rk78_coefficients_a8 : boost::array< Value , 8 >
|
||||
struct rk78_coefficients_a8 : std::array< Value , 8 >
|
||||
{
|
||||
rk78_coefficients_a8( void )
|
||||
{
|
||||
@@ -146,7 +146,7 @@ struct rk78_coefficients_a8 : boost::array< Value , 8 >
|
||||
};
|
||||
|
||||
template< class Value = double >
|
||||
struct rk78_coefficients_a9 : boost::array< Value , 9 >
|
||||
struct rk78_coefficients_a9 : std::array< Value , 9 >
|
||||
{
|
||||
rk78_coefficients_a9( void )
|
||||
{
|
||||
@@ -163,7 +163,7 @@ struct rk78_coefficients_a9 : boost::array< Value , 9 >
|
||||
};
|
||||
|
||||
template< class Value = double >
|
||||
struct rk78_coefficients_a10 : boost::array< Value , 10 >
|
||||
struct rk78_coefficients_a10 : std::array< Value , 10 >
|
||||
{
|
||||
rk78_coefficients_a10( void )
|
||||
{
|
||||
@@ -181,7 +181,7 @@ struct rk78_coefficients_a10 : boost::array< Value , 10 >
|
||||
};
|
||||
|
||||
template< class Value = double >
|
||||
struct rk78_coefficients_a11 : boost::array< Value , 11 >
|
||||
struct rk78_coefficients_a11 : std::array< Value , 11 >
|
||||
{
|
||||
rk78_coefficients_a11( void )
|
||||
{
|
||||
@@ -200,7 +200,7 @@ struct rk78_coefficients_a11 : boost::array< Value , 11 >
|
||||
};
|
||||
|
||||
template< class Value = double >
|
||||
struct rk78_coefficients_a12 : boost::array< Value , 12 >
|
||||
struct rk78_coefficients_a12 : std::array< Value , 12 >
|
||||
{
|
||||
rk78_coefficients_a12( void )
|
||||
{
|
||||
@@ -220,7 +220,7 @@ struct rk78_coefficients_a12 : boost::array< Value , 12 >
|
||||
};
|
||||
|
||||
template< class Value = double >
|
||||
struct rk78_coefficients_b : boost::array< Value , 13 >
|
||||
struct rk78_coefficients_b : std::array< Value , 13 >
|
||||
{
|
||||
rk78_coefficients_b( void )
|
||||
{
|
||||
@@ -241,7 +241,7 @@ struct rk78_coefficients_b : boost::array< Value , 13 >
|
||||
};
|
||||
|
||||
template< class Value = double >
|
||||
struct rk78_coefficients_db : boost::array< Value , 13 >
|
||||
struct rk78_coefficients_db : std::array< Value , 13 >
|
||||
{
|
||||
rk78_coefficients_db( void )
|
||||
{
|
||||
@@ -263,7 +263,7 @@ struct rk78_coefficients_db : boost::array< Value , 13 >
|
||||
|
||||
|
||||
template< class Value = double >
|
||||
struct rk78_coefficients_c : boost::array< Value , 13 >
|
||||
struct rk78_coefficients_c : std::array< Value , 13 >
|
||||
{
|
||||
rk78_coefficients_c( void )
|
||||
{
|
||||
|
||||
@@ -18,8 +18,6 @@
|
||||
#ifndef BOOST_NUMERIC_ODEINT_STEPPER_STEPPER_CATEGORIES_HPP_INCLUDED
|
||||
#define BOOST_NUMERIC_ODEINT_STEPPER_STEPPER_CATEGORIES_HPP_INCLUDED
|
||||
|
||||
#include <boost/type_traits/integral_constant.hpp>
|
||||
|
||||
namespace boost {
|
||||
namespace numeric {
|
||||
namespace odeint {
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
#include <boost/numeric/odeint/algebra/algebra_dispatcher.hpp>
|
||||
#include <boost/numeric/odeint/algebra/operations_dispatcher.hpp>
|
||||
|
||||
#include <boost/array.hpp>
|
||||
#include <array>
|
||||
|
||||
namespace boost {
|
||||
namespace numeric {
|
||||
@@ -38,7 +38,7 @@ namespace detail {
|
||||
namespace symplectic_euler_coef {
|
||||
|
||||
template< class Value >
|
||||
struct coef_a_type : public boost::array< Value , 1 >
|
||||
struct coef_a_type : public std::array< Value , 1 >
|
||||
{
|
||||
coef_a_type( void )
|
||||
{
|
||||
@@ -47,7 +47,7 @@ struct coef_a_type : public boost::array< Value , 1 >
|
||||
};
|
||||
|
||||
template< class Value >
|
||||
struct coef_b_type : public boost::array< Value , 1 >
|
||||
struct coef_b_type : public std::array< Value , 1 >
|
||||
{
|
||||
coef_b_type( void )
|
||||
{
|
||||
|
||||
@@ -44,7 +44,7 @@ namespace symplectic_rkn_sb3a_m4_mclachlan {
|
||||
|
||||
|
||||
template< class Value >
|
||||
struct coef_a_type : public boost::array< Value , 5 >
|
||||
struct coef_a_type : public std::array< Value , 5 >
|
||||
{
|
||||
coef_a_type( void )
|
||||
{
|
||||
@@ -60,7 +60,7 @@ namespace symplectic_rkn_sb3a_m4_mclachlan {
|
||||
};
|
||||
|
||||
template< class Value >
|
||||
struct coef_b_type : public boost::array< Value , 5 >
|
||||
struct coef_b_type : public std::array< Value , 5 >
|
||||
{
|
||||
coef_b_type( void )
|
||||
{
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
#include <boost/numeric/odeint/util/resizer.hpp>
|
||||
|
||||
#include <boost/array.hpp>
|
||||
#include <array>
|
||||
|
||||
namespace boost {
|
||||
namespace numeric {
|
||||
@@ -48,7 +48,7 @@ namespace symplectic_rkn_sb3a_mclachlan {
|
||||
*/
|
||||
|
||||
template< class Value >
|
||||
struct coef_a_type : public boost::array< Value , 6 >
|
||||
struct coef_a_type : public std::array< Value , 6 >
|
||||
{
|
||||
coef_a_type( void )
|
||||
{
|
||||
@@ -63,7 +63,7 @@ namespace symplectic_rkn_sb3a_mclachlan {
|
||||
};
|
||||
|
||||
template< class Value >
|
||||
struct coef_b_type : public boost::array< Value , 6 >
|
||||
struct coef_b_type : public std::array< Value , 6 >
|
||||
{
|
||||
coef_b_type( void )
|
||||
{
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
#include <boost/numeric/odeint/util/copy.hpp>
|
||||
#include <boost/numeric/odeint/util/resizer.hpp>
|
||||
// #include <boost/numeric/odeint/util/is_pair.hpp>
|
||||
// #include <boost/array.hpp>
|
||||
// #include <array>
|
||||
|
||||
|
||||
|
||||
|
||||
30
include/boost/numeric/odeint/tools/assert.hpp
Normal file
30
include/boost/numeric/odeint/tools/assert.hpp
Normal file
@@ -0,0 +1,30 @@
|
||||
// (C) Copyright Matt Borland 2021 - 2023.
|
||||
// Use, modification and distribution are subject to 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)
|
||||
//
|
||||
// We deliberately use assert in here:
|
||||
//
|
||||
// boost-no-inspect
|
||||
|
||||
#ifndef BOOST_NUMERIC_ODEINT_TOOLS_ASSERT_HPP
|
||||
#define BOOST_NUMERIC_ODEINT_TOOLS_ASSERT_HPP
|
||||
|
||||
#include <boost/numeric/odeint/tools/is_standalone.hpp>
|
||||
|
||||
#ifndef BOOST_NUMERIC_ODEINT_STANDALONE
|
||||
|
||||
#include <boost/assert.hpp>
|
||||
|
||||
#define BOOST_NUMERIC_ODEINT_ASSERT(expr) BOOST_ASSERT(expr)
|
||||
#define BOOST_NUMERIC_ODEINT_ASSERT_MSG(expr, msg) BOOST_ASSERT_MSG(expr, msg)
|
||||
|
||||
#else // Standalone mode so we use cassert
|
||||
|
||||
#include <cassert>
|
||||
#define BOOST_NUMERIC_ODEINT_ASSERT(expr) assert(expr)
|
||||
#define BOOST_NUMERIC_ODEINT_ASSERT_MSG(expr, msg) assert((expr)&&(msg))
|
||||
|
||||
#endif
|
||||
|
||||
#endif //BOOST_NUMERIC_ODEINT_TOOLS_ASSERT_HPP
|
||||
21
include/boost/numeric/odeint/tools/is_standalone.hpp
Normal file
21
include/boost/numeric/odeint/tools/is_standalone.hpp
Normal file
@@ -0,0 +1,21 @@
|
||||
// Copyright Matt Borland 2021.
|
||||
// Use, modification and distribution are subject to 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_TOOLS_IS_STANDALONE_HPP
|
||||
#define BOOST_NUMERIC_ODEINT_TOOLS_IS_STANDALONE_HPP
|
||||
|
||||
// If one or more of our required dependencies are missing assume we are
|
||||
// in standalone mode
|
||||
|
||||
#ifdef __has_include
|
||||
#if !__has_include(<boost/config.hpp>) || !__has_include(<boost/assert.hpp>) || !__has_include(<boost/lexical_cast.hpp>) || \
|
||||
!__has_include(<boost/throw_exception.hpp>) || !__has_include(<boost/predef/other/endian.h>)
|
||||
# ifndef BOOST_NUMERIC_ODEINT_STANDALONE
|
||||
# define BOOST_NUMERIC_ODEINT_STANDALONE
|
||||
# endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif //BOOST_NUMERIC_ODEINT_TOOLS_IS_STANDALONE_HPP
|
||||
39
include/boost/numeric/odeint/tools/traits.hpp
Normal file
39
include/boost/numeric/odeint/tools/traits.hpp
Normal file
@@ -0,0 +1,39 @@
|
||||
// Copyright Matt Borland 2021 - 2023.
|
||||
// Use, modification and distribution are subject to 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_TOOLS_TRAITS
|
||||
#define BOOST_NUMERIC_ODEINT_TOOLS_TRAITS
|
||||
|
||||
#include <type_traits>
|
||||
|
||||
namespace boost {
|
||||
namespace numeric {
|
||||
namespace odeint {
|
||||
namespace detail {
|
||||
|
||||
#define BOOST_NUMERIC_ODEINT_HAS_NAMED_TRAIT(trait, name) \
|
||||
template <typename T> \
|
||||
class trait \
|
||||
{ \
|
||||
private: \
|
||||
using yes = char; \
|
||||
struct no { char x[2]; }; \
|
||||
\
|
||||
template <typename U> \
|
||||
static yes test(typename U::name* = nullptr); \
|
||||
\
|
||||
template <typename U> \
|
||||
static no test(...); \
|
||||
\
|
||||
public: \
|
||||
static constexpr bool value = (sizeof(test<T>(0)) == sizeof(char)); \
|
||||
};
|
||||
|
||||
} //namespace detail
|
||||
} //namespace odeint
|
||||
} //namespace numeric
|
||||
} //namespace boost
|
||||
|
||||
#endif //BOOST_NUMERIC_ODEINT_TOOLS_TRAITS
|
||||
@@ -18,6 +18,7 @@
|
||||
#ifndef BOOST_NUMERIC_ODEINT_UTIL_COPY_HPP_INCLUDED
|
||||
#define BOOST_NUMERIC_ODEINT_UTIL_COPY_HPP_INCLUDED
|
||||
|
||||
#include <type_traits>
|
||||
|
||||
#include <boost/range/algorithm/copy.hpp>
|
||||
|
||||
@@ -32,13 +33,13 @@ namespace odeint {
|
||||
namespace detail {
|
||||
|
||||
template< class Container1 , class Container2 >
|
||||
void do_copying( const Container1 &from , Container2 &to , boost::mpl::true_ )
|
||||
void do_copying( const Container1 &from , Container2 &to , std::integral_constant<bool, true>)
|
||||
{
|
||||
boost::range::copy( from , boost::begin( to ) );
|
||||
}
|
||||
|
||||
template< class Container1 , class Container2 >
|
||||
void do_copying( const Container1 &from , Container2 &to , boost::mpl::false_ )
|
||||
void do_copying( const Container1 &from , Container2 &to , std::integral_constant<bool, false>)
|
||||
{
|
||||
to = from;
|
||||
}
|
||||
|
||||
@@ -26,28 +26,21 @@
|
||||
#endif
|
||||
|
||||
#include <cstddef>
|
||||
#include <type_traits>
|
||||
#include <boost/range/config.hpp>
|
||||
#include <boost/mpl/has_xxx.hpp>
|
||||
#include <boost/mpl/bool.hpp>
|
||||
#include <boost/mpl/and.hpp>
|
||||
#include <boost/numeric/odeint/tools/traits.hpp>
|
||||
|
||||
namespace boost {
|
||||
namespace numeric {
|
||||
namespace odeint {
|
||||
|
||||
namespace detail {
|
||||
|
||||
|
||||
namespace range_detail
|
||||
{
|
||||
BOOST_MPL_HAS_XXX_TRAIT_DEF(iterator)
|
||||
BOOST_MPL_HAS_XXX_TRAIT_DEF(const_iterator)
|
||||
}
|
||||
|
||||
namespace detail
|
||||
{
|
||||
BOOST_NUMERIC_ODEINT_HAS_NAMED_TRAIT(has_iterator, iterator);
|
||||
BOOST_NUMERIC_ODEINT_HAS_NAMED_TRAIT(has_const_iterator, const_iterator);
|
||||
|
||||
template< typename Range >
|
||||
struct is_range : boost::mpl::and_<range_detail::has_iterator<Range>, range_detail::has_const_iterator<Range> >
|
||||
struct is_range : std::integral_constant<bool, (has_iterator<Range>::value && has_const_iterator<Range>::value)>
|
||||
{
|
||||
};
|
||||
|
||||
@@ -56,12 +49,12 @@ struct is_range : boost::mpl::and_<range_detail::has_iterator<Range>, range_deta
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
template< typename iteratorT >
|
||||
struct is_range< std::pair<iteratorT,iteratorT> > : boost::mpl::true_
|
||||
struct is_range< std::pair<iteratorT,iteratorT> > : std::integral_constant<bool, true>
|
||||
{
|
||||
};
|
||||
|
||||
template< typename iteratorT >
|
||||
struct is_range< const std::pair<iteratorT,iteratorT> > : boost::mpl::true_
|
||||
struct is_range< const std::pair<iteratorT,iteratorT> > : std::integral_constant<bool, true>
|
||||
{
|
||||
};
|
||||
|
||||
@@ -70,12 +63,12 @@ struct is_range< const std::pair<iteratorT,iteratorT> > : boost::mpl::true_
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
template< typename elementT, std::size_t sz >
|
||||
struct is_range< elementT[sz] > : boost::mpl::true_
|
||||
struct is_range< elementT[sz] > : std::integral_constant<bool, true>
|
||||
{
|
||||
};
|
||||
|
||||
template< typename elementT, std::size_t sz >
|
||||
struct is_range< const elementT[sz] > : boost::mpl::true_
|
||||
struct is_range< const elementT[sz] > : std::integral_constant<bool, true>
|
||||
{
|
||||
};
|
||||
|
||||
@@ -84,42 +77,42 @@ struct is_range< const elementT[sz] > : boost::mpl::true_
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
template<>
|
||||
struct is_range< char* > : boost::mpl::true_
|
||||
struct is_range< char* > : std::integral_constant<bool, true>
|
||||
{
|
||||
};
|
||||
|
||||
template<>
|
||||
struct is_range< wchar_t* > : boost::mpl::true_
|
||||
struct is_range< wchar_t* > : std::integral_constant<bool, true>
|
||||
{
|
||||
};
|
||||
|
||||
template<>
|
||||
struct is_range< const char* > : boost::mpl::true_
|
||||
struct is_range< const char* > : std::integral_constant<bool, true>
|
||||
{
|
||||
};
|
||||
|
||||
template<>
|
||||
struct is_range< const wchar_t* > : boost::mpl::true_
|
||||
struct is_range< const wchar_t* > : std::integral_constant<bool, true>
|
||||
{
|
||||
};
|
||||
|
||||
template<>
|
||||
struct is_range< char* const > : boost::mpl::true_
|
||||
struct is_range< char* const > : std::integral_constant<bool, true>
|
||||
{
|
||||
};
|
||||
|
||||
template<>
|
||||
struct is_range< wchar_t* const > : boost::mpl::true_
|
||||
struct is_range< wchar_t* const > : std::integral_constant<bool, true>
|
||||
{
|
||||
};
|
||||
|
||||
template<>
|
||||
struct is_range< const char* const > : boost::mpl::true_
|
||||
struct is_range< const char* const > : std::integral_constant<bool, true>
|
||||
{
|
||||
};
|
||||
|
||||
template<>
|
||||
struct is_range< const wchar_t* const > : boost::mpl::true_
|
||||
struct is_range< const wchar_t* const > : std::integral_constant<bool, true>
|
||||
{
|
||||
};
|
||||
|
||||
|
||||
@@ -18,22 +18,19 @@
|
||||
#ifndef BOOST_NUMERIC_ODEINT_UTIL_IS_PAIR_HPP_INCLUDED
|
||||
#define BOOST_NUMERIC_ODEINT_UTIL_IS_PAIR_HPP_INCLUDED
|
||||
|
||||
|
||||
#include <boost/mpl/bool.hpp>
|
||||
#include <utility>
|
||||
|
||||
#include <type_traits>
|
||||
|
||||
namespace boost {
|
||||
namespace numeric {
|
||||
namespace odeint {
|
||||
|
||||
template< class T >
|
||||
struct is_pair : public boost::mpl::false_
|
||||
struct is_pair : public std::integral_constant<bool, false>
|
||||
{
|
||||
};
|
||||
|
||||
template< class T1 , class T2 >
|
||||
struct is_pair< std::pair< T1 , T2 > > : public boost::mpl::true_
|
||||
struct is_pair< std::pair< T1 , T2 > > : public std::integral_constant<bool, true>
|
||||
{
|
||||
};
|
||||
|
||||
|
||||
@@ -111,10 +111,10 @@ struct resize_impl_sfinae< T1 , T2 ,
|
||||
{
|
||||
static void resize( T1 &x1 , const T2 &x2 )
|
||||
{
|
||||
boost::array< int , T1::dimensionality > extents;
|
||||
std::array< int , T1::dimensionality > extents;
|
||||
for( size_t i=0 ; i<T1::dimensionality ; ++i ) extents[i] = x2.shape()[i];
|
||||
x1.resize( extents );
|
||||
boost::array< int , T1::dimensionality > origins;
|
||||
std::array< int , T1::dimensionality > origins;
|
||||
for( size_t i=0 ; i<T1::dimensionality ; ++i ) origins[i] = x2.index_bases()[i];
|
||||
x1.reindex( origins );
|
||||
}
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
#ifndef BOOST_NUMERIC_ODEINT_UTIL_SPLIT_ADAPTOR_INCLUDED
|
||||
#define BOOST_NUMERIC_ODEINT_UTIL_SPLIT_ADAPTOR_INCLUDED
|
||||
|
||||
#include <boost/numeric/odeint/tools/assert.hpp>
|
||||
#include <boost/range/adaptor/argument_fwd.hpp>
|
||||
#include <boost/range/size_type.hpp>
|
||||
#include <boost/range/iterator_range.hpp>
|
||||
@@ -33,8 +34,8 @@ namespace detail {
|
||||
inline std::pair<std::size_t, std::size_t>
|
||||
split_offsets( std::size_t total_length, std::size_t index, std::size_t parts )
|
||||
{
|
||||
BOOST_ASSERT( parts > 0 );
|
||||
BOOST_ASSERT( index < parts );
|
||||
BOOST_NUMERIC_ODEINT_ASSERT( parts > 0 );
|
||||
BOOST_NUMERIC_ODEINT_ASSERT( index < parts );
|
||||
const std::size_t
|
||||
slice = total_length / parts,
|
||||
partial = total_length % parts,
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
#include <random>
|
||||
|
||||
#include <boost/timer.hpp>
|
||||
#include <boost/array.hpp>
|
||||
#include <array>
|
||||
|
||||
#include <boost/numeric/odeint.hpp>
|
||||
|
||||
@@ -26,7 +26,7 @@ typedef boost::timer timer_type;
|
||||
typedef double fp_type;
|
||||
//typedef float fp_type;
|
||||
|
||||
typedef boost::array<fp_type, 3> state_type;
|
||||
typedef std::array<fp_type, 3> state_type;
|
||||
typedef std::vector<state_type> state_vec;
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
#include <random>
|
||||
|
||||
#include <boost/timer.hpp>
|
||||
#include <boost/array.hpp>
|
||||
#include <array>
|
||||
|
||||
#include <boost/numeric/odeint.hpp>
|
||||
#include <boost/simd/sdk/simd/pack.hpp>
|
||||
@@ -38,7 +38,7 @@ typedef double fp_type;
|
||||
//typedef float fp_type;
|
||||
|
||||
typedef simd::pack<fp_type> simd_pack;
|
||||
typedef boost::array<simd_pack, dim> state_type;
|
||||
typedef std::array<simd_pack, dim> state_type;
|
||||
// use the simd allocator to get properly aligned memory
|
||||
typedef std::vector< state_type, simd::allocator< state_type > > state_vec;
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#ifndef LORENZ_HPP_
|
||||
#define LORENZ_HPP_
|
||||
|
||||
#include <boost/array.hpp>
|
||||
#include <array>
|
||||
|
||||
struct lorenz
|
||||
{
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
#include <iostream>
|
||||
|
||||
#include <boost/timer.hpp>
|
||||
#include <boost/array.hpp>
|
||||
#include <array>
|
||||
|
||||
#include <boost/numeric/odeint/stepper/runge_kutta4_classic.hpp>
|
||||
#include <boost/numeric/odeint/stepper/runge_kutta4.hpp>
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
typedef boost::timer timer_type;
|
||||
|
||||
typedef boost::array< double , 3 > state_type;
|
||||
typedef std::array< double , 3 > state_type;
|
||||
|
||||
using namespace boost::numeric::odeint;
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
|
||||
#include <utility>
|
||||
|
||||
#include <boost/array.hpp>
|
||||
#include <array>
|
||||
|
||||
#include <boost/test/unit_test.hpp>
|
||||
|
||||
@@ -123,7 +123,7 @@ BOOST_AUTO_TEST_CASE( test_rotating_buffer )
|
||||
|
||||
BOOST_AUTO_TEST_CASE( test_copying )
|
||||
{
|
||||
typedef boost::array< double , 1 > state_type;
|
||||
typedef std::array< double , 1 > state_type;
|
||||
typedef adams_bashforth< 2 , state_type > stepper_type;
|
||||
|
||||
stepper_type s1;
|
||||
@@ -150,7 +150,7 @@ typedef boost::mpl::range_c< size_t , 1 , 6 > vector_of_steps;
|
||||
BOOST_AUTO_TEST_CASE_TEMPLATE( test_init_and_steps , step_type , vector_of_steps )
|
||||
{
|
||||
const static size_t steps = step_type::value;
|
||||
typedef boost::array< value_type , 3 > state_type;
|
||||
typedef std::array< value_type , 3 > state_type;
|
||||
|
||||
adams_bashforth< steps , state_type > stepper;
|
||||
state_type x = {{ 10.0 , 10.0 , 10.0 }};
|
||||
@@ -165,7 +165,7 @@ BOOST_AUTO_TEST_CASE_TEMPLATE( test_init_and_steps , step_type , vector_of_steps
|
||||
|
||||
BOOST_AUTO_TEST_CASE( test_instantiation )
|
||||
{
|
||||
typedef boost::array< double , 3 > state_type;
|
||||
typedef std::array< double , 3 > state_type;
|
||||
adams_bashforth< 1 , state_type > s1;
|
||||
adams_bashforth< 2 , state_type > s2;
|
||||
adams_bashforth< 3 , state_type > s3;
|
||||
@@ -189,7 +189,7 @@ BOOST_AUTO_TEST_CASE( test_instantiation )
|
||||
|
||||
BOOST_AUTO_TEST_CASE( test_auto_initialization )
|
||||
{
|
||||
typedef boost::array< double , 3 > state_type;
|
||||
typedef std::array< double , 3 > state_type;
|
||||
state_type x = {{ 10.0 , 10.0 , 10.0 }};
|
||||
|
||||
adams_bashforth< 3 , state_type , value_type , state_type , value_type , range_algebra , default_operations ,
|
||||
@@ -219,7 +219,7 @@ BOOST_AUTO_TEST_CASE( test_auto_initialization )
|
||||
|
||||
BOOST_AUTO_TEST_CASE( test_manual_initialization )
|
||||
{
|
||||
typedef boost::array< double , 3 > state_type;
|
||||
typedef std::array< double , 3 > state_type;
|
||||
state_type x = {{ 10.0 , 10.0 , 10.0 }};
|
||||
|
||||
adams_bashforth< 3 , state_type , value_type , state_type , value_type , range_algebra , default_operations ,
|
||||
|
||||
@@ -56,7 +56,7 @@ typedef boost::mpl::range_c< size_t , 1 , 6 > vector_of_steps;
|
||||
BOOST_AUTO_TEST_CASE_TEMPLATE( test_init_and_steps , step_type , vector_of_steps )
|
||||
{
|
||||
const static size_t steps = step_type::value;
|
||||
typedef boost::array< value_type , 3 > state_type;
|
||||
typedef std::array< value_type , 3 > state_type;
|
||||
|
||||
adams_bashforth_moulton< steps , state_type > stepper;
|
||||
state_type x = {{ 10.0 , 10.0 , 10.0 }};
|
||||
@@ -72,7 +72,7 @@ BOOST_AUTO_TEST_CASE_TEMPLATE( test_init_and_steps , step_type , vector_of_steps
|
||||
|
||||
BOOST_AUTO_TEST_CASE( test_copying )
|
||||
{
|
||||
typedef boost::array< double , 1 > state_type;
|
||||
typedef std::array< double , 1 > state_type;
|
||||
typedef adams_bashforth_moulton< 2 , state_type > stepper_type;
|
||||
|
||||
stepper_type s1;
|
||||
@@ -86,7 +86,7 @@ BOOST_AUTO_TEST_CASE( test_copying )
|
||||
|
||||
BOOST_AUTO_TEST_CASE( test_instantiation )
|
||||
{
|
||||
typedef boost::array< double , 3 > state_type;
|
||||
typedef std::array< double , 3 > state_type;
|
||||
adams_bashforth_moulton< 1 , state_type > s1;
|
||||
adams_bashforth_moulton< 2 , state_type > s2;
|
||||
adams_bashforth_moulton< 3 , state_type > s3;
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
#include <utility>
|
||||
|
||||
#include <boost/array.hpp>
|
||||
#include <array>
|
||||
|
||||
#include <boost/test/unit_test.hpp>
|
||||
|
||||
@@ -74,7 +74,7 @@ typedef boost::mpl::range_c< size_t , 1 , 6 > vector_of_steps;
|
||||
BOOST_AUTO_TEST_CASE_TEMPLATE( test_init_and_steps , step_type , vector_of_steps )
|
||||
{
|
||||
const static size_t steps = step_type::value;
|
||||
typedef boost::array< value_type , 3 > state_type;
|
||||
typedef std::array< value_type , 3 > state_type;
|
||||
|
||||
adams_moulton< steps , state_type > stepper;
|
||||
// state_type x = {{ 10.0 , 10.0 , 10.0 }};
|
||||
@@ -86,7 +86,7 @@ BOOST_AUTO_TEST_CASE_TEMPLATE( test_init_and_steps , step_type , vector_of_steps
|
||||
|
||||
BOOST_AUTO_TEST_CASE( test_instantiation )
|
||||
{
|
||||
typedef boost::array< double , 3 > state_type;
|
||||
typedef std::array< double , 3 > state_type;
|
||||
adams_moulton< 1 , state_type > s1;
|
||||
adams_moulton< 2 , state_type > s2;
|
||||
adams_moulton< 3 , state_type > s3;
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
#include <vector>
|
||||
|
||||
#include <boost/numeric/odeint/config.hpp>
|
||||
#include <boost/array.hpp>
|
||||
#include <array>
|
||||
#include <boost/range/algorithm/copy.hpp>
|
||||
#include <boost/range/algorithm/for_each.hpp>
|
||||
#include <boost/mpl/vector.hpp>
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
#include <vector>
|
||||
|
||||
#include <boost/numeric/odeint/config.hpp>
|
||||
#include <boost/array.hpp>
|
||||
#include <array>
|
||||
#include <boost/range/algorithm/copy.hpp>
|
||||
#include <boost/range/algorithm/for_each.hpp>
|
||||
#include <boost/mpl/vector.hpp>
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
#include <boost/test/unit_test.hpp>
|
||||
#include <boost/static_assert.hpp>
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
#include <boost/array.hpp>
|
||||
#include <array>
|
||||
#include <boost/mpl/list.hpp>
|
||||
|
||||
using namespace boost::unit_test;
|
||||
@@ -43,38 +43,38 @@ BOOST_AUTO_TEST_SUITE( algebra_dispatcher_test )
|
||||
BOOST_AUTO_TEST_CASE( range_algebra_with_vector )
|
||||
{
|
||||
typedef runge_kutta4< std::vector< double > > stepper_type;
|
||||
BOOST_STATIC_ASSERT(( boost::is_same< stepper_type::algebra_type , range_algebra >::value ));
|
||||
static_assert(( boost::is_same< stepper_type::algebra_type , range_algebra >::value ), "Not range algebra");
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE( array_algebra_with_array )
|
||||
{
|
||||
typedef runge_kutta4< boost::array< double , 2 > > stepper_type;
|
||||
BOOST_STATIC_ASSERT(( boost::is_same< stepper_type::algebra_type , array_algebra >::value ));
|
||||
typedef runge_kutta4< std::array< double , 2 > > stepper_type;
|
||||
static_assert(( boost::is_same< stepper_type::algebra_type , array_algebra >::value ), "Not array algebra");
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE( range_algebra_with_array )
|
||||
{
|
||||
typedef runge_kutta4< boost::array< double , 2 > , double , boost::array< double , 2 > , double , range_algebra > stepper_type;
|
||||
BOOST_STATIC_ASSERT(( boost::is_same< stepper_type::algebra_type , range_algebra >::value ));
|
||||
typedef runge_kutta4< std::array< double , 2 > , double , std::array< double , 2 > , double , range_algebra > stepper_type;
|
||||
static_assert(( boost::is_same< stepper_type::algebra_type , range_algebra >::value ), "Not range algebra");
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE( fusion_algebra_with_fusion_vector )
|
||||
{
|
||||
typedef runge_kutta4< boost::fusion::vector< double > > stepper_type;
|
||||
BOOST_STATIC_ASSERT(( boost::is_same< stepper_type::algebra_type , fusion_algebra >::value ));
|
||||
static_assert(( boost::is_same< stepper_type::algebra_type , fusion_algebra >::value ), "Not fusion algebra");
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE( fusion_algebra_with_fusion_vector2 )
|
||||
{
|
||||
typedef runge_kutta_fehlberg78< boost::fusion::vector< double > > stepper_type;
|
||||
BOOST_STATIC_ASSERT(( boost::is_same< stepper_type::algebra_type , fusion_algebra >::value ));
|
||||
static_assert(( boost::is_same< stepper_type::algebra_type , fusion_algebra >::value ), "Not fusion algebra");
|
||||
}
|
||||
|
||||
typedef boost::mpl::list< float , double , long double , std::complex< double > , std::complex< float > > fp_types;
|
||||
BOOST_AUTO_TEST_CASE_TEMPLATE( vector_space_algebra_with_floating_point , T , fp_types )
|
||||
{
|
||||
typedef runge_kutta_fehlberg78< T > stepper_type;
|
||||
BOOST_STATIC_ASSERT(( boost::is_same< typename stepper_type::algebra_type , vector_space_algebra >::value ));
|
||||
static_assert(( boost::is_same< typename stepper_type::algebra_type , vector_space_algebra >::value ), "Not vector space algebra");
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
#include <utility>
|
||||
#include <iostream>
|
||||
|
||||
#include <boost/array.hpp>
|
||||
#include <array>
|
||||
|
||||
#include <boost/test/unit_test.hpp>
|
||||
|
||||
@@ -39,7 +39,7 @@ using namespace boost::unit_test;
|
||||
using namespace boost::numeric::odeint;
|
||||
|
||||
typedef double value_type;
|
||||
typedef boost::array< value_type , 3 > state_type;
|
||||
typedef std::array< value_type , 3 > state_type;
|
||||
|
||||
const double sigma = 10.0;
|
||||
const double R = 28.0;
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
#include <vector>
|
||||
|
||||
#include <boost/numeric/odeint/config.hpp>
|
||||
#include <boost/array.hpp>
|
||||
#include <array>
|
||||
#include <boost/range/algorithm/for_each.hpp>
|
||||
#include <boost/range/algorithm/copy.hpp>
|
||||
#include <boost/mpl/vector.hpp>
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
#include <vector>
|
||||
|
||||
#include <boost/numeric/odeint/config.hpp>
|
||||
#include <boost/array.hpp>
|
||||
#include <array>
|
||||
#include <boost/range/algorithm/copy.hpp>
|
||||
#include <boost/range/algorithm/for_each.hpp>
|
||||
#include <boost/mpl/vector.hpp>
|
||||
|
||||
@@ -22,7 +22,7 @@ struct const_sys
|
||||
}
|
||||
};
|
||||
|
||||
typedef boost::array< double , 1 > state_type;
|
||||
typedef std::array< double , 1 > state_type;
|
||||
typedef double value_type;
|
||||
|
||||
BOOST_AUTO_TEST_SUITE( controlled_adams_bashforth_moulton_test )
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
#ifndef LIBS_NUMERIC_ODEINT_TEST_DIAGNOSTIC_STATE_TYPE_HPP_DEFINED
|
||||
#define LIBS_NUMERIC_ODEINT_TEST_DIAGNOSTIC_STATE_TYPE_HPP_DEFINED
|
||||
|
||||
#include <boost/array.hpp>
|
||||
#include <array>
|
||||
#include <boost/numeric/odeint/util/is_resizeable.hpp>
|
||||
#include <boost/numeric/odeint/util/same_size.hpp>
|
||||
#include <boost/numeric/odeint/util/resize.hpp>
|
||||
@@ -62,7 +62,7 @@ struct counter
|
||||
};
|
||||
|
||||
template< size_t N >
|
||||
class diagnostic_type : public boost::array< double , 1 > { };
|
||||
class diagnostic_type : public std::array< double , 1 > { };
|
||||
|
||||
|
||||
typedef diagnostic_type< 0 > diagnostic_state_type;
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
#ifndef BOOST_LIBS_NUMERIC_ODEINT_TEST_DUMMY_STEPPER_HPP_INCLUDED
|
||||
#define BOOST_LIBS_NUMERIC_ODEINT_TEST_DUMMY_STEPPER_HPP_INCLUDED
|
||||
|
||||
#include <boost/array.hpp>
|
||||
#include <array>
|
||||
#include <boost/numeric/odeint/stepper/stepper_categories.hpp>
|
||||
#include <boost/numeric/odeint/stepper/controlled_step_result.hpp>
|
||||
|
||||
@@ -30,7 +30,7 @@ struct dummy_stepper
|
||||
{
|
||||
typedef double value_type;
|
||||
typedef value_type time_type;
|
||||
typedef boost::array< value_type , 1 > state_type;
|
||||
typedef std::array< value_type , 1 > state_type;
|
||||
typedef state_type deriv_type;
|
||||
typedef unsigned short order_type;
|
||||
typedef stepper_tag stepper_category;
|
||||
@@ -48,7 +48,7 @@ struct dummy_dense_output_stepper
|
||||
{
|
||||
typedef double value_type;
|
||||
typedef value_type time_type;
|
||||
typedef boost::array< value_type , 1 > state_type;
|
||||
typedef std::array< value_type , 1 > state_type;
|
||||
typedef state_type deriv_type;
|
||||
typedef dense_output_stepper_tag stepper_category;
|
||||
|
||||
@@ -100,7 +100,7 @@ struct dummy_controlled_stepper
|
||||
{
|
||||
typedef double value_type;
|
||||
typedef value_type time_type;
|
||||
typedef boost::array< value_type , 1 > state_type;
|
||||
typedef std::array< value_type , 1 > state_type;
|
||||
typedef state_type deriv_type;
|
||||
typedef controlled_stepper_tag stepper_category;
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ using namespace boost::numeric::odeint;
|
||||
template< class Stepper1 , class Stepper2 >
|
||||
void check_stepper_type( const Stepper1 &s1 , const Stepper2 &s2 )
|
||||
{
|
||||
BOOST_STATIC_ASSERT(( boost::is_same< Stepper1 , Stepper2 >::value ));
|
||||
static_assert(( boost::is_same< Stepper1 , Stepper2 >::value ), "Stepper1 and Stepper2 must be the same type");
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_SUITE( generation_test )
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user