File indexing completed on 2025-01-18 09:42:55
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018 #ifndef BOOST_NUMERIC_ODEINT_STEPPER_DETAIL_GENERIC_RK_OPERATIONS_HPP_INCLUDED
0019 #define BOOST_NUMERIC_ODEINT_STEPPER_DETAIL_GENERIC_RK_OPERATIONS_HPP_INCLUDED
0020
0021
0022 namespace boost {
0023 namespace numeric {
0024 namespace odeint {
0025 namespace detail {
0026
0027 template< size_t StageNumber , class Operations , class Fac , class Time >
0028 struct generic_rk_scale_sum;
0029
0030 template< class Operations , class Fac , class Time >
0031 struct generic_rk_scale_sum< 1 , Operations , Fac , Time > : public Operations::template scale_sum2< Fac , Time >
0032 {
0033 generic_rk_scale_sum( const boost::array<Fac,1> &a , Time dt ) : Operations::template scale_sum2< Fac , Time >( 1.0 , a[0]*dt )
0034 { }
0035
0036 typedef void result_type;
0037 };
0038
0039
0040 template< class Operations , class Fac , class Time >
0041 struct generic_rk_scale_sum< 2 , Operations , Fac , Time > : public Operations::template scale_sum3< Fac , Time >
0042 {
0043 generic_rk_scale_sum( const boost::array<Fac,2> &a , Time dt )
0044 : Operations::template scale_sum3< Fac , Time >( 1.0 , a[0]*dt , a[1]*dt )
0045 { }
0046
0047 typedef void result_type;
0048 };
0049
0050 template< class Operations , class Fac , class Time >
0051 struct generic_rk_scale_sum< 3 , Operations , Fac , Time > : public Operations::template scale_sum4< Fac , Time >
0052 {
0053 generic_rk_scale_sum( const boost::array<Fac,3> &a , Time dt )
0054 : Operations::template scale_sum4< Fac , Time >( 1.0 , a[0]*dt , a[1]*dt , a[2]*dt )
0055 { }
0056
0057 typedef void result_type;
0058 };
0059
0060 template< class Operations , class Fac , class Time >
0061 struct generic_rk_scale_sum< 4 , Operations , Fac , Time > : public Operations::template scale_sum5< Fac , Time >
0062 {
0063 generic_rk_scale_sum( const boost::array<Fac,4> &a , Time dt )
0064 : Operations::template scale_sum5< Fac , Time >( 1.0 , a[0]*dt , a[1]*dt , a[2]*dt , a[3]*dt )
0065 { }
0066
0067 typedef void result_type;
0068 };
0069
0070 template< class Operations , class Fac , class Time >
0071 struct generic_rk_scale_sum< 5 , Operations , Fac , Time > : public Operations::template scale_sum6< Fac , Time >
0072 {
0073 generic_rk_scale_sum( const boost::array<Fac,5> &a , Time dt )
0074 : Operations::template scale_sum6< Fac , Time >( 1.0 , a[0]*dt , a[1]*dt , a[2]*dt , a[3]*dt , a[4]*dt )
0075 { }
0076
0077 typedef void result_type;
0078 };
0079
0080 template< class Operations , class Fac , class Time >
0081 struct generic_rk_scale_sum< 6 , Operations , Fac , Time > : public Operations::template scale_sum7< Fac , Time >
0082 {
0083 generic_rk_scale_sum( const boost::array<Fac,6> &a , Time dt )
0084 : 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 )
0085 { }
0086
0087 typedef void result_type;
0088 };
0089
0090 template< class Operations , class Fac , class Time >
0091 struct generic_rk_scale_sum< 7 , Operations , Fac , Time > : public Operations::template scale_sum8< Fac , Time >
0092 {
0093 generic_rk_scale_sum( const boost::array<Fac,7> &a , Time dt )
0094 : 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 )
0095 { }
0096
0097 typedef void result_type;
0098 };
0099
0100 template< class Operations , class Fac , class Time >
0101 struct generic_rk_scale_sum< 8 , Operations , Fac , Time > : public Operations::template scale_sum9< Fac , Time >
0102 {
0103 generic_rk_scale_sum( const boost::array<Fac,8> &a , Time dt )
0104 : Operations::template scale_sum9< Fac , Time >( 1.0 , a[0]*dt , a[1]*dt , a[2]*dt , a[3]*dt , a[4]*dt ,
0105 a[5]*dt , a[6]*dt , a[7]*dt )
0106 { }
0107
0108 typedef void result_type;
0109 };
0110
0111 template< class Operations , class Fac , class Time >
0112 struct generic_rk_scale_sum< 9 , Operations , Fac , Time > : public Operations::template scale_sum10< Fac , Time >
0113 {
0114 generic_rk_scale_sum( const boost::array<Fac,9> &a , Time dt )
0115 : Operations::template scale_sum10< Fac , Time >( 1.0 , a[0]*dt , a[1]*dt , a[2]*dt , a[3]*dt , a[4]*dt ,
0116 a[5]*dt , a[6]*dt , a[7]*dt , a[8]*dt )
0117 { }
0118
0119 typedef void result_type;
0120 };
0121
0122 template< class Operations , class Fac , class Time >
0123 struct generic_rk_scale_sum< 10 , Operations , Fac , Time > : public Operations::template scale_sum11< Fac , Time >
0124 {
0125 generic_rk_scale_sum( const boost::array<Fac,10> &a , Time dt )
0126 : Operations::template scale_sum11< Fac , Time >( 1.0 , a[0]*dt , a[1]*dt , a[2]*dt , a[3]*dt , a[4]*dt ,
0127 a[5]*dt , a[6]*dt , a[7]*dt , a[8]*dt , a[9]*dt )
0128 { }
0129
0130 typedef void result_type;
0131 };
0132
0133 template< class Operations , class Fac , class Time >
0134 struct generic_rk_scale_sum< 11 , Operations , Fac , Time > : public Operations::template scale_sum12< Fac , Time >
0135 {
0136 generic_rk_scale_sum( const boost::array<Fac,11> &a , Time dt )
0137 : Operations::template scale_sum12< Fac , Time >( 1.0 , a[0]*dt , a[1]*dt , a[2]*dt , a[3]*dt , a[4]*dt ,
0138 a[5]*dt , a[6]*dt , a[7]*dt , a[8]*dt , a[9]*dt , a[10]*dt )
0139 { }
0140
0141 typedef void result_type;
0142 };
0143
0144 template< class Operations , class Fac , class Time >
0145 struct generic_rk_scale_sum< 12 , Operations , Fac , Time > : public Operations::template scale_sum13< Fac , Time >
0146 {
0147 generic_rk_scale_sum( const boost::array<Fac,12> &a , Time dt )
0148 : Operations::template scale_sum13< Fac , Time >( 1.0 , a[0]*dt , a[1]*dt , a[2]*dt , a[3]*dt , a[4]*dt ,
0149 a[5]*dt , a[6]*dt , a[7]*dt , a[8]*dt , a[9]*dt , a[10]*dt , a[11]*dt )
0150 { }
0151
0152 typedef void result_type;
0153 };
0154
0155 template< class Operations , class Fac , class Time >
0156 struct generic_rk_scale_sum< 13 , Operations , Fac , Time > : public Operations::template scale_sum14< Fac , Time >
0157 {
0158 generic_rk_scale_sum( const boost::array<Fac,13> &a , Time dt )
0159 : Operations::template scale_sum14< Fac , Time >( 1.0 , a[0]*dt , a[1]*dt , a[2]*dt , a[3]*dt , a[4]*dt ,
0160 a[5]*dt , a[6]*dt , a[7]*dt , a[8]*dt , a[9]*dt , a[10]*dt , a[11]*dt , a[12]*dt )
0161 { }
0162
0163 typedef void result_type;
0164 };
0165
0166
0167
0168 template< size_t StageNumber , class Operations , class Fac , class Time >
0169 struct generic_rk_scale_sum_err;
0170
0171 template< class Operations , class Fac , class Time >
0172 struct generic_rk_scale_sum_err< 1 , Operations , Fac , Time > : public Operations::template scale_sum1< Time >
0173 {
0174 generic_rk_scale_sum_err( const boost::array<Fac,1> &a , Time dt ) : Operations::template scale_sum1< Time >( a[0]*dt )
0175 { }
0176
0177 typedef void result_type;
0178 };
0179
0180
0181 template< class Operations , class Fac , class Time >
0182 struct generic_rk_scale_sum_err< 2 , Operations , Fac , Time > : public Operations::template scale_sum2< Time >
0183 {
0184 generic_rk_scale_sum_err( const boost::array<Fac,2> &a , Time dt )
0185 : Operations::template scale_sum2< Time >( a[0]*dt , a[1]*dt )
0186 { }
0187
0188 typedef void result_type;
0189 };
0190
0191 template< class Operations , class Fac , class Time >
0192 struct generic_rk_scale_sum_err< 3 , Operations , Fac , Time > : public Operations::template scale_sum3< Time >
0193 {
0194 generic_rk_scale_sum_err( const boost::array<Fac,3> &a , Time dt )
0195 : Operations::template scale_sum3< Time >( a[0]*dt , a[1]*dt , a[2]*dt )
0196 { }
0197
0198 typedef void result_type;
0199 };
0200
0201 template< class Operations , class Fac , class Time >
0202 struct generic_rk_scale_sum_err< 4 , Operations , Fac , Time > : public Operations::template scale_sum4< Time >
0203 {
0204 generic_rk_scale_sum_err( const boost::array<Fac,4> &a , Time dt )
0205 : Operations::template scale_sum4< Time >( a[0]*dt , a[1]*dt , a[2]*dt , a[3]*dt )
0206 { }
0207
0208 typedef void result_type;
0209 };
0210
0211 template< class Operations , class Fac , class Time >
0212 struct generic_rk_scale_sum_err< 5 , Operations , Fac , Time > : public Operations::template scale_sum5< Fac >
0213 {
0214 generic_rk_scale_sum_err( const boost::array<Fac,5> &a , Time dt )
0215 : Operations::template scale_sum5< Time >( a[0]*dt , a[1]*dt , a[2]*dt , a[3]*dt , a[4]*dt )
0216 { }
0217
0218 typedef void result_type;
0219 };
0220
0221
0222 template< class Operations , class Fac , class Time >
0223 struct generic_rk_scale_sum_err< 6 , Operations , Fac , Time > : public Operations::template scale_sum6< Time >
0224 {
0225 generic_rk_scale_sum_err( const boost::array<Fac,6> &a , Time dt )
0226 : Operations::template scale_sum6< Time >( a[0]*dt , a[1]*dt , a[2]*dt , a[3]*dt , a[4]*dt , a[5]*dt )
0227 { }
0228
0229 typedef void result_type;
0230 };
0231
0232
0233
0234 template< class Operations , class Fac , class Time >
0235 struct generic_rk_scale_sum_err< 13 , Operations , Fac , Time > : public Operations::template scale_sum13< Time >
0236 {
0237 generic_rk_scale_sum_err( const boost::array<Fac,13> &a , Time dt )
0238 : Operations::template scale_sum13< Time >( a[0]*dt , a[1]*dt , a[2]*dt , a[3]*dt , a[4]*dt , a[5]*dt ,
0239 a[6]*dt , a[7]*dt , a[8]*dt , a[9]*dt , a[10]*dt , a[11]*dt , a[12]*dt )
0240 { }
0241
0242 typedef void result_type;
0243 };
0244
0245
0246 }
0247 }
0248 }
0249 }
0250
0251
0252 #endif