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_moulton_coefficients.hpp
0004 
0005  [begin_description]
0006  Coefficients for the Adams Moulton 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_MOULTON_COEFFICIENTS_HPP_INCLUDED
0019 #define BOOST_NUMERIC_ODEINT_STEPPER_DETAIL_ADAMS_MOULTON_COEFFICIENTS_HPP_INCLUDED
0020 
0021 
0022 #include <boost/array.hpp>
0023 
0024 
0025 namespace boost {
0026 namespace numeric {
0027 namespace odeint {
0028 namespace detail {
0029 
0030 template< class Value , size_t Steps >
0031 class adams_moulton_coefficients ;
0032 
0033 template< class Value >
0034 class adams_moulton_coefficients< Value , 1 > : public boost::array< Value , 1 >
0035 {
0036 public:
0037     adams_moulton_coefficients( void )
0038     : boost::array< Value , 1 >()
0039       {
0040         (*this)[0] = static_cast< Value >( 1 );
0041       }
0042 };
0043 
0044 
0045 template< class Value >
0046 class adams_moulton_coefficients< Value , 2 > : public boost::array< Value , 2 >
0047 {
0048 public:
0049     adams_moulton_coefficients( void )
0050     : boost::array< Value , 2 >()
0051       {
0052         (*this)[0] = static_cast< Value >( 1 ) / static_cast< Value >( 2 );
0053         (*this)[1] = static_cast< Value >( 1 ) / static_cast< Value >( 2 );
0054       }
0055 };
0056 
0057 
0058 template< class Value >
0059 class adams_moulton_coefficients< Value , 3 > : public boost::array< Value , 3 >
0060 {
0061 public:
0062     adams_moulton_coefficients( void )
0063     : boost::array< Value , 3 >()
0064       {
0065         (*this)[0] = static_cast< Value >( 5 ) / static_cast< Value >( 12 );
0066         (*this)[1] = static_cast< Value >( 2 ) / static_cast< Value >( 3 );
0067         (*this)[2] = -static_cast< Value >( 1 ) / static_cast< Value >( 12 );
0068       }
0069 };
0070 
0071 
0072 template< class Value >
0073 class adams_moulton_coefficients< Value , 4 > : public boost::array< Value , 4 >
0074 {
0075 public:
0076     adams_moulton_coefficients( void )
0077     : boost::array< Value , 4 >()
0078       {
0079         (*this)[0] = static_cast< Value >( 3 ) / static_cast< Value >( 8 );
0080         (*this)[1] = static_cast< Value >( 19 ) / static_cast< Value >( 24 );
0081         (*this)[2] = -static_cast< Value >( 5 ) / static_cast< Value >( 24 );
0082         (*this)[3] = static_cast< Value >( 1 ) / static_cast< Value >( 24 );
0083       }
0084 };
0085 
0086 
0087 template< class Value >
0088 class adams_moulton_coefficients< Value , 5 > : public boost::array< Value , 5 >
0089 {
0090 public:
0091     adams_moulton_coefficients( void )
0092     : boost::array< Value , 5 >()
0093       {
0094         (*this)[0] = static_cast< Value >( 251 ) / static_cast< Value >( 720 );
0095         (*this)[1] = static_cast< Value >( 323 ) / static_cast< Value >( 360 );
0096         (*this)[2] = -static_cast< Value >( 11 ) / static_cast< Value >( 30 );
0097         (*this)[3] = static_cast< Value >( 53 ) / static_cast< Value >( 360 );
0098         (*this)[4] = -static_cast< Value >( 19 ) / static_cast< Value >( 720 );
0099       }
0100 };
0101 
0102 
0103 template< class Value >
0104 class adams_moulton_coefficients< Value , 6 > : public boost::array< Value , 6 >
0105 {
0106 public:
0107     adams_moulton_coefficients( void )
0108     : boost::array< Value , 6 >()
0109       {
0110         (*this)[0] = static_cast< Value >( 95 ) / static_cast< Value >( 288 );
0111         (*this)[1] = static_cast< Value >( 1427 ) / static_cast< Value >( 1440 );
0112         (*this)[2] = -static_cast< Value >( 133 ) / static_cast< Value >( 240 );
0113         (*this)[3] = static_cast< Value >( 241 ) / static_cast< Value >( 720 );
0114         (*this)[4] = -static_cast< Value >( 173 ) / static_cast< Value >( 1440 );
0115         (*this)[5] = static_cast< Value >( 3 ) / static_cast< Value >( 160 );
0116       }
0117 };
0118 
0119 template< class Value >
0120 class adams_moulton_coefficients< Value , 7 > : public boost::array< Value , 7 >
0121 {
0122 public:
0123     adams_moulton_coefficients( void )
0124     : boost::array< Value , 7 >()
0125       {
0126         (*this)[0] = static_cast< Value >( 19087 ) / static_cast< Value >( 60480 );
0127         (*this)[1] = static_cast< Value >( 2713 ) / static_cast< Value >( 2520 );
0128         (*this)[2] = -static_cast< Value >( 15487 ) / static_cast< Value >( 20160 );
0129         (*this)[3] = static_cast< Value >( 586 ) / static_cast< Value >( 945 );
0130         (*this)[4] = -static_cast< Value >( 6737 ) / static_cast< Value >( 20160 );
0131         (*this)[5] = static_cast< Value >( 263 ) / static_cast< Value >( 2520 );
0132         (*this)[6] = -static_cast< Value >( 863 ) / static_cast< Value >( 60480 );
0133       }
0134 };
0135 
0136 
0137 template< class Value >
0138 class adams_moulton_coefficients< Value , 8 > : public boost::array< Value , 8 >
0139 {
0140 public:
0141     adams_moulton_coefficients( void )
0142     : boost::array< Value , 8 >()
0143       {
0144         (*this)[0] = static_cast< Value >( 5257 ) / static_cast< Value >( 17280 );
0145         (*this)[1] = static_cast< Value >( 139849 ) / static_cast< Value >( 120960 );
0146         (*this)[2] = -static_cast< Value >( 4511 ) / static_cast< Value >( 4480 );
0147         (*this)[3] = static_cast< Value >( 123133 ) / static_cast< Value >( 120960 );
0148         (*this)[4] = -static_cast< Value >( 88547 ) / static_cast< Value >( 120960 );
0149         (*this)[5] = static_cast< Value >( 1537 ) / static_cast< Value >( 4480 );
0150         (*this)[6] = -static_cast< Value >( 11351 ) / static_cast< Value >( 120960 );
0151         (*this)[7] = static_cast< Value >( 275 ) / static_cast< Value >( 24192 );
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_MOULTON_COEFFICIENTS_HPP_INCLUDED