3 libs/numeric/odeint/test/prepare_stepper_testing.hpp
6 This file defines some helper functions for the stepper tests.
9 Copyright 2011-2012 Karsten Ahnert
10 Copyright 2012-2013 Mario Mulansky
12 Distributed under the Boost Software License, Version 1.0.
13 (See accompanying file LICENSE_1_0.txt or
14 copy at http://www.boost.org/LICENSE_1_0.txt)
17 #ifndef PREPARE_STEPPER_TESTING_HPP_
18 #define PREPARE_STEPPER_TESTING_HPP_
20 #include <boost/array.hpp>
24 #include <boost/fusion/sequence.hpp>
25 #include <boost/mpl/vector.hpp>
26 #include <boost/multiprecision/cpp_dec_float.hpp>
28 #include <boost/numeric/odeint/algebra/vector_space_algebra.hpp>
29 #include <boost/numeric/odeint/algebra/array_algebra.hpp>
30 #include <boost/numeric/odeint/algebra/algebra_dispatcher.hpp>
32 namespace mpl = boost::mpl;
33 namespace fusion = boost::fusion;
35 using namespace boost::numeric::odeint;
37 /* the state types that will be tested */
38 typedef std::vector< double > vector_type;
39 typedef std::vector< std::complex<double> > complex_vector_type;
40 typedef double vector_space_type;
41 typedef boost::array< double , 1 > array_type;
42 typedef boost::array< std::complex<double> , 1 > complex_array_type;
44 typedef boost::multiprecision::cpp_dec_float_50 mp_type;
45 typedef boost::array< mp_type , 1 > mp_array_type;
47 typedef mpl::vector< vector_type , complex_vector_type , vector_space_type ,
48 array_type , complex_array_type , mp_type , mp_array_type
49 >::type container_types;
51 namespace boost { namespace numeric { namespace odeint {
53 // mp_type forms a vector space
55 struct algebra_dispatcher< mp_type >
57 typedef vector_space_algebra algebra_type;
60 // add norm computation
62 struct vector_space_norm_inf< mp_type >
64 typedef mp_type result_type;
65 mp_type operator()( mp_type x ) const
74 #endif /* PREPARE_STEPPER_TESTING_HPP_ */