diff --git a/include/boost/numeric/odeint/external/nt2/nt2_algebra_dispatcher.hpp b/include/boost/numeric/odeint/external/nt2/nt2_algebra_dispatcher.hpp new file mode 100644 index 00000000..22fb7b14 --- /dev/null +++ b/include/boost/numeric/odeint/external/nt2/nt2_algebra_dispatcher.hpp @@ -0,0 +1,23 @@ +//============================================================================== +// Copyright 2014 LASMEA UMR 6602 CNRS/Univ. Clermont II +// Copyright 2014 LRI UMR 8623 CNRS/Univ Paris Sud XI +// Copyright 2014 MetaScale SAS +// +// Distributed under the Boost Software License, Version 1.0. +// See accompanying file LICENSE.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt +//============================================================================== +#ifndef BOOST_NUMERIC_ODEINT_EXTERNAL_NT2_NT2_ALGEBRA_DISPATCHER_HPP_INCLUDED +#define BOOST_NUMERIC_ODEINT_EXTERNAL_NT2_NT2_ALGEBRA_DISPATCHER_HPP_INCLUDED + +#include + +namespace boost { namespace numeric { namespace odeint { +template +struct algebra_dispatcher > +{ + typedef vector_space_algebra algebra_type; +}; +} } } + +#endif diff --git a/include/boost/numeric/odeint/external/nt2/nt2_copy.hpp b/include/boost/numeric/odeint/external/nt2/nt2_copy.hpp new file mode 100644 index 00000000..12bfbe80 --- /dev/null +++ b/include/boost/numeric/odeint/external/nt2/nt2_copy.hpp @@ -0,0 +1,27 @@ +//============================================================================== +// Copyright 2014 LASMEA UMR 6602 CNRS/Univ. Clermont II +// Copyright 2014 LRI UMR 8623 CNRS/Univ Paris Sud XI +// Copyright 2014 MetaScale SAS +// +// Distributed under the Boost Software License, Version 1.0. +// See accompanying file LICENSE.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt +//============================================================================== +#ifndef BOOST_NUMERIC_ODEINT_EXTERNAL_NT2_NT2_COPY_HPP_INCLUDED +#define BOOST_NUMERIC_ODEINT_EXTERNAL_NT2_NT2_COPY_HPP_INCLUDED + +#include + +namespace boost { namespace numeric { namespace odeint { + +template +struct copy_impl , nt2::container::table > +{ + static void copy(const nt2::container::table &v1, nt2::container::table &v2) + { + v2 = v1; + } +}; +} } } + +#endif diff --git a/include/boost/numeric/odeint/external/nt2/nt2_norm_inf.hpp b/include/boost/numeric/odeint/external/nt2/nt2_norm_inf.hpp new file mode 100644 index 00000000..d44c5cc4 --- /dev/null +++ b/include/boost/numeric/odeint/external/nt2/nt2_norm_inf.hpp @@ -0,0 +1,29 @@ +//============================================================================== +// Copyright 2014 LASMEA UMR 6602 CNRS/Univ. Clermont II +// Copyright 2014 LRI UMR 8623 CNRS/Univ Paris Sud XI +// Copyright 2014 MetaScale SAS +// +// Distributed under the Boost Software License, Version 1.0. +// See accompanying file LICENSE.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt +//============================================================================== +#ifndef BOOST_NUMERIC_ODEINT_EXTERNAL_NT2_NT2_NORM_INF_HPP_INCLUDED +#define BOOST_NUMERIC_ODEINT_EXTERNAL_NT2_NT2_NORM_INF_HPP_INCLUDED + +#include +#include +#include + +namespace boost { namespace numeric { namespace odeint { +template +struct vector_space_norm_inf > +{ + typedef T result_type; + result_type operator()(const nt2::container::table &v1) const + { + return nt2::globalmax(nt2::abs(v1)); + } +}; +} } } + +#endif diff --git a/include/boost/numeric/odeint/external/nt2/nt2_resize.hpp b/include/boost/numeric/odeint/external/nt2/nt2_resize.hpp new file mode 100644 index 00000000..ec08ffaf --- /dev/null +++ b/include/boost/numeric/odeint/external/nt2/nt2_resize.hpp @@ -0,0 +1,45 @@ +//============================================================================== +// Copyright 2014 LASMEA UMR 6602 CNRS/Univ. Clermont II +// Copyright 2014 LRI UMR 8623 CNRS/Univ Paris Sud XI +// Copyright 2014 MetaScale SAS +// +// Distributed under the Boost Software License, Version 1.0. +// See accompanying file LICENSE.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt +//============================================================================== +#ifndef BOOST_NUMERIC_ODEINT_EXTERNAL_NT2_NT2_RESIZE_HPP_INCLUDED +#define BOOST_NUMERIC_ODEINT_EXTERNAL_NT2_NT2_RESIZE_HPP_INCLUDED + +#include + +namespace boost { namespace numeric { namespace odeint { + +template +struct is_resizeable< nt2::container::table > +{ + typedef boost::true_type type; + static const bool value = type::value; +}; + +template +struct same_size_impl< nt2::container::table , nt2::container::table > +{ + static bool same_size( const nt2::container::table &v1 , + const nt2::container::table &v2 ) + { + return v1.size() == v2.size(); + } +}; + +template +struct resize_impl< nt2::container::table , nt2::container::table > +{ + static void resize( nt2::container::table &v1 , + const nt2::container::table &v2 ) + { + v1.resize( nt2::of_size(v2.size() )); + } +}; +} } } + +#endif