Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:42:54

0001 /*
0002  [auto_generated]
0003  boost/numeric/odeint/stepper/detail/adams_bashforth_coefficients.hpp
0004 
0005  [begin_description]
0006  Definition of the coefficients for the Adams-Bashforth method.
0007  [end_description]
0008 
0009  Copyright 2011-2012 Karsten Ahnert
0010  Copyright 2011-2012 Mario Mulansky
0011 
0012  Distributed under the Boost Software License, Version 1.0.
0013  (See accompanying file LICENSE_1_0.txt or
0014  copy at http://www.boost.org/LICENSE_1_0.txt)
0015  */
0016 
0017 
0018 #ifndef BOOST_NUMERIC_ODEINT_STEPPER_DETAIL_ADAMS_BASHFORTH_COEFFICIENTS_HPP_INCLUDED
0019 #define BOOST_NUMERIC_ODEINT_STEPPER_DETAIL_ADAMS_BASHFORTH_COEFFICIENTS_HPP_INCLUDED
0020 
0021 #include <boost/array.hpp>
0022 
0023 
0024 namespace boost {
0025 namespace numeric {
0026 namespace odeint {
0027 namespace detail {
0028 
0029 template< class Value , size_t Steps >
0030 class adams_bashforth_coefficients ;
0031 
0032 template< class Value >
0033 class adams_bashforth_coefficients< Value , 1 > : public boost::array< Value , 1 >
0034 {
0035 public:
0036     adams_bashforth_coefficients( void )
0037     : boost::array< Value , 1 >()
0038       {
0039         (*this)[0] = static_cast< Value >( 1 );
0040       }
0041 };
0042 
0043 
0044 template< class Value >
0045 class adams_bashforth_coefficients< Value , 2 > : public boost::array< Value , 2 >
0046 {
0047 public:
0048     adams_bashforth_coefficients( void )
0049     : boost::array< Value , 2 >()
0050       {
0051         (*this)[0] = static_cast< Value >( 3 ) / static_cast< Value >( 2 );
0052         (*this)[1] = -static_cast< Value >( 1 ) / static_cast< Value >( 2 );
0053       }
0054 };
0055 
0056 
0057 template< class Value >
0058 class adams_bashforth_coefficients< Value , 3 > : public boost::array< Value , 3 >
0059 {
0060 public:
0061     adams_bashforth_coefficients( void )
0062     : boost::array< Value , 3 >()
0063       {
0064         (*this)[0] = static_cast< Value >( 23 ) / static_cast< Value >( 12 );
0065         (*this)[1] = -static_cast< Value >( 4 ) / static_cast< Value >( 3 );
0066         (*this)[2] = static_cast< Value >( 5 ) / static_cast< Value >( 12 );
0067       }
0068 };
0069 
0070 
0071 template< class Value >
0072 class adams_bashforth_coefficients< Value , 4 > : public boost::array< Value , 4 >
0073 {
0074 public:
0075     adams_bashforth_coefficients( void )
0076     : boost::array< Value , 4 >()
0077       {
0078         (*this)[0] = static_cast< Value >( 55 ) / static_cast< Value >( 24 );
0079         (*this)[1] = -static_cast< Value >( 59 ) / static_cast< Value >( 24 );
0080         (*this)[2] = static_cast< Value >( 37 ) / static_cast< Value >( 24 );
0081         (*this)[3] = -static_cast< Value >( 3 ) / static_cast< Value >( 8 );
0082       }
0083 };
0084 
0085 
0086 template< class Value >
0087 class adams_bashforth_coefficients< Value , 5 > : public boost::array< Value , 5 >
0088 {
0089 public:
0090     adams_bashforth_coefficients( void )
0091     : boost::array< Value , 5 >()
0092       {
0093         (*this)[0] = static_cast< Value >( 1901 ) / static_cast< Value >( 720 );
0094         (*this)[1] = -static_cast< Value >( 1387 ) / static_cast< Value >( 360 );
0095         (*this)[2] = static_cast< Value >( 109 ) / static_cast< Value >( 30 );
0096         (*this)[3] = -static_cast< Value >( 637 ) / static_cast< Value >( 360 );
0097         (*this)[4] = static_cast< Value >( 251 ) / static_cast< Value >( 720 );
0098       }
0099 };
0100 
0101 
0102 template< class Value >
0103 class adams_bashforth_coefficients< Value , 6 > : public boost::array< Value , 6 >
0104 {
0105 public:
0106     adams_bashforth_coefficients( void )
0107     : boost::array< Value , 6 >()
0108       {
0109         (*this)[0] = static_cast< Value >( 4277 ) / static_cast< Value >( 1440 );
0110         (*this)[1] = -static_cast< Value >( 2641 ) / static_cast< Value >( 480 );
0111         (*this)[2] = static_cast< Value >( 4991 ) / static_cast< Value >( 720 );
0112         (*this)[3] = -static_cast< Value >( 3649 ) / static_cast< Value >( 720 );
0113         (*this)[4] = static_cast< Value >( 959 ) / static_cast< Value >( 480 );
0114         (*this)[5] = -static_cast< Value >( 95 ) / static_cast< Value >( 288 );
0115       }
0116 };
0117 
0118 
0119 template< class Value >
0120 class adams_bashforth_coefficients< Value , 7 > : public boost::array< Value , 7 >
0121 {
0122 public:
0123     adams_bashforth_coefficients( void )
0124     : boost::array< Value , 7 >()
0125       {
0126         (*this)[0] = static_cast< Value >( 198721 ) / static_cast< Value >( 60480 );
0127         (*this)[1] = -static_cast< Value >( 18637 ) / static_cast< Value >( 2520 );
0128         (*this)[2] = static_cast< Value >( 235183 ) / static_cast< Value >( 20160 );
0129         (*this)[3] = -static_cast< Value >( 10754 ) / static_cast< Value >( 945 );
0130         (*this)[4] = static_cast< Value >( 135713 ) / static_cast< Value >( 20160 );
0131         (*this)[5] = -static_cast< Value >( 5603 ) / static_cast< Value >( 2520 );
0132         (*this)[6] = static_cast< Value >( 19087 ) / static_cast< Value >( 60480 );
0133       }
0134 };
0135 
0136 
0137 template< class Value >
0138 class adams_bashforth_coefficients< Value , 8 > : public boost::array< Value , 8 >
0139 {
0140 public:
0141     adams_bashforth_coefficients( void )
0142     : boost::array< Value , 8 >()
0143       {
0144         (*this)[0] = static_cast< Value >( 16083 ) / static_cast< Value >( 4480 );
0145         (*this)[1] = -static_cast< Value >( 1152169 ) / static_cast< Value >( 120960 );
0146         (*this)[2] = static_cast< Value >( 242653 ) / static_cast< Value >( 13440 );
0147         (*this)[3] = -static_cast< Value >( 296053 ) / static_cast< Value >( 13440 );
0148         (*this)[4] = static_cast< Value >( 2102243 ) / static_cast< Value >( 120960 );
0149         (*this)[5] = -static_cast< Value >( 115747 ) / static_cast< Value >( 13440 );
0150         (*this)[6] = static_cast< Value >( 32863 ) / static_cast< Value >( 13440 );
0151         (*this)[7] = -static_cast< Value >( 5257 ) / static_cast< Value >( 17280 );
0152       }
0153 };
0154 
0155 
0156 
0157 
0158 
0159 
0160 
0161 } // detail
0162 } // odeint
0163 } // numeric
0164 } // boost
0165 
0166 
0167 
0168 #endif // BOOST_NUMERIC_ODEINT_STEPPER_DETAIL_ADAMS_BASHFORTH_COEFFICIENTS_HPP_INCLUDED