Back to home page

EIC code displayed by LXR

 
 

    


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

0001 /*
0002  [auto_generated]
0003  boost/numeric/odeint/stepper/detail/generic_rk_call_algebra.hpp
0004 
0005  [begin_description]
0006  Algebra caller for the generic Runge-Kutta methods.
0007  [end_description]
0008 
0009  Copyright 2011-2012 Mario Mulansky
0010  Copyright 2011-2012 Karsten Ahnert
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_GENERIC_RK_CALL_ALGEBRA_HPP_INCLUDED
0019 #define BOOST_NUMERIC_ODEINT_STEPPER_DETAIL_GENERIC_RK_CALL_ALGEBRA_HPP_INCLUDED
0020 
0021 
0022 namespace boost {
0023 namespace numeric {
0024 namespace odeint {
0025 namespace detail {
0026 
0027 template< size_t StageNumber , class Algebra >
0028 struct generic_rk_call_algebra;
0029 
0030 template< class Algebra >
0031 struct generic_rk_call_algebra< 1 , Algebra >
0032 {
0033     typedef Algebra algebra_type;
0034 
0035     template< class S1 , class S2 , class S3 , class S4 , class Op>
0036     void operator()( algebra_type &algebra , S1 &s1 , S2 &s2 ,  S3 &s3 , S4 * /* s4_array */ , Op op ) const
0037     {
0038         algebra.for_each3( s1 , s2 , s3 , op );
0039     }
0040 
0041     template< class S1 , class S2 , class S4 , class Op>
0042     void operator()( algebra_type &algebra , S1 &s1 , S2 &s2 , S4 * /* s4_array */ , Op op ) const
0043     {
0044         algebra.for_each2( s1 , s2 , op );
0045     }
0046 };
0047 
0048 template< class Algebra >
0049 struct generic_rk_call_algebra< 2 , Algebra >
0050 {
0051     template< class S1 , class S2 , class S3 , class S4 , class Op>
0052     void operator()( Algebra &algebra , S1 &s1 , S2 &s2 ,  S3 &s3 , S4 s4_array[1] , Op op ) const
0053     {
0054         algebra.for_each4( s1 , s2 , s3 , s4_array[0].m_v , op );
0055     }
0056 
0057     template< class S1 , class S2 , class S4 , class Op>
0058     void operator()( Algebra &algebra , S1 &s1 , S2 &s2 , S4 s4_array[1] , Op op ) const
0059     {
0060         algebra.for_each3( s1 , s2 , s4_array[0].m_v , op );
0061     }
0062 };
0063 
0064 
0065 template< class Algebra >
0066 struct generic_rk_call_algebra< 3 , Algebra >
0067 {
0068     template< class S1 , class S2 , class S3 , class S4 , class Op>
0069     void operator()( Algebra &algebra , S1 &s1 , S2 &s2 , S3 &s3 , S4 s4_array[2] , Op op ) const
0070     {
0071         algebra.for_each5( s1 , s2 , s3 , s4_array[0].m_v , s4_array[1].m_v , op );
0072     }
0073 
0074     template< class S1 , class S2 , class S4 , class Op>
0075     void operator()( Algebra &algebra , S1 &s1 , S2 &s2 , S4 s4_array[2] , Op op ) const
0076     {
0077         algebra.for_each4( s1 , s2 , s4_array[0].m_v , s4_array[1].m_v , op );
0078     }
0079 };
0080 
0081 
0082 template< class Algebra >
0083 struct generic_rk_call_algebra< 4 , Algebra >
0084 {
0085     template< class S1 , class S2 , class S3 , class S4 , class Op>
0086     void operator()( Algebra &algebra , S1 &s1 , S2 &s2 , S3 &s3 , S4 s4_array[3] , Op op ) const
0087     {
0088         algebra.for_each6( s1 , s2 , s3 , s4_array[0].m_v , s4_array[1].m_v , s4_array[2].m_v , op );
0089     }
0090 
0091     template< class S1 , class S2 , class S4 , class Op>
0092     void operator()( Algebra &algebra , S1 &s1 , S2 &s2 , S4 s4_array[3] , Op op ) const
0093     {
0094         algebra.for_each5( s1 , s2 , s4_array[0].m_v , s4_array[1].m_v , s4_array[2].m_v , op );
0095     }
0096 };
0097 
0098 
0099 template< class Algebra >
0100 struct generic_rk_call_algebra< 5 , Algebra >
0101 {
0102     template< class S1 , class S2 , class S3 , class S4 , class Op>
0103     void operator()( Algebra &algebra , S1 &s1 , S2 &s2 , S3 &s3 , S4 s4_array[4] , Op op ) const
0104     {
0105         algebra.for_each7( s1 , s2 , s3 , s4_array[0].m_v , s4_array[1].m_v , s4_array[2].m_v , s4_array[3].m_v , op );
0106     }
0107 
0108     template< class S1 , class S2 , class S4 , class Op>
0109     void operator()( Algebra &algebra , S1 &s1 , S2 &s2 , S4 s4_array[4] , Op op ) const
0110     {
0111         algebra.for_each6( s1 , s2 , s4_array[0].m_v , s4_array[1].m_v , s4_array[2].m_v , s4_array[3].m_v , op );
0112     }
0113 };
0114 
0115 template< class Algebra >
0116 struct generic_rk_call_algebra< 6 , Algebra >
0117 {
0118     template< class S1 , class S2 , class S3 , class S4 , class Op>
0119     void operator()( Algebra &algebra , S1 &s1 , S2 &s2 , S3 &s3 , S4 s4_array[5] , Op op ) const
0120     {
0121         algebra.for_each8( s1 , s2 , s3 , s4_array[0].m_v , s4_array[1].m_v , s4_array[2].m_v , s4_array[3].m_v , s4_array[4].m_v , op );
0122     }
0123 
0124     template< class S1 , class S2 , class S4 , class Op>
0125     void operator()( Algebra &algebra , S1 &s1 , S2 &s2 , S4 s4_array[5] , Op op ) const
0126     {
0127         algebra.for_each7( s1 , s2 , s4_array[0].m_v , s4_array[1].m_v , s4_array[2].m_v , s4_array[3].m_v , s4_array[4].m_v , op );
0128     }
0129 };
0130 
0131 template< class Algebra >
0132 struct generic_rk_call_algebra< 7 , Algebra >
0133 {
0134     template< class S1 , class S2 , class S3 , class S4 , class Op>
0135     void operator()( Algebra &algebra , S1 &s1 , S2 &s2 , S3 &s3 , S4 s4_array[6] , Op op ) const
0136     {
0137         algebra.for_each9( s1 , s2 , s3 , s4_array[0].m_v , s4_array[1].m_v , s4_array[2].m_v , s4_array[3].m_v , s4_array[4].m_v ,
0138                 s4_array[5].m_v , op );
0139     }
0140 
0141     template< class S1 , class S2 , class S4 , class Op>
0142     void operator()( Algebra &algebra , S1 &s1 , S2 &s2 , S4 s4_array[6] , Op op ) const
0143     {
0144         algebra.for_each8( s1 , s2 , s4_array[0].m_v , s4_array[1].m_v , s4_array[2].m_v , s4_array[3].m_v , s4_array[4].m_v ,
0145                 s4_array[5].m_v , op );
0146     }
0147 };
0148 
0149 template< class Algebra >
0150 struct generic_rk_call_algebra< 8 , Algebra >
0151 {
0152     template< class S1 , class S2 , class S3 , class S4 , class Op>
0153     void operator()( Algebra &algebra , S1 &s1 , S2 &s2 , S3 &s3 , S4 s4_array[7] , Op op ) const
0154     {
0155         algebra.for_each10( s1 , s2 , s3 , s4_array[0].m_v , s4_array[1].m_v , s4_array[2].m_v , s4_array[3].m_v , s4_array[4].m_v ,
0156                 s4_array[5].m_v , s4_array[6].m_v , op );
0157     }
0158 
0159     template< class S1 , class S2 , class S4 , class Op>
0160     void operator()( Algebra &algebra , S1 &s1 , S2 &s2 , S4 s4_array[7] , Op op ) const
0161     {
0162         algebra.for_each9( s1 , s2 , s4_array[0].m_v , s4_array[1].m_v , s4_array[2].m_v , s4_array[3].m_v , s4_array[4].m_v ,
0163                 s4_array[5].m_v , s4_array[6].m_v , op );
0164     }
0165 };
0166 
0167 template< class Algebra >
0168 struct generic_rk_call_algebra< 9 , Algebra >
0169 {
0170     template< class S1 , class S2 , class S3 , class S4 , class Op>
0171     void operator()( Algebra &algebra , S1 &s1 , S2 &s2 , S3 &s3 , S4 s4_array[8] , Op op ) const
0172     {
0173         algebra.for_each11( s1 , s2 , s3 , s4_array[0].m_v , s4_array[1].m_v , s4_array[2].m_v , s4_array[3].m_v , s4_array[4].m_v ,
0174                 s4_array[5].m_v , s4_array[6].m_v , s4_array[7].m_v , op );
0175     }
0176 
0177     template< class S1 , class S2 , class S4 , class Op>
0178     void operator()( Algebra &algebra , S1 &s1 , S2 &s2 , S4 s4_array[8] , Op op ) const
0179     {
0180         algebra.for_each10( s1 , s2 , s4_array[0].m_v , s4_array[1].m_v , s4_array[2].m_v , s4_array[3].m_v , s4_array[4].m_v ,
0181                 s4_array[5].m_v , s4_array[6].m_v , s4_array[7].m_v , op );
0182     }
0183 };
0184 
0185 template< class Algebra >
0186 struct generic_rk_call_algebra< 10 , Algebra >
0187 {
0188     template< class S1 , class S2 , class S3 , class S4 , class Op>
0189     void operator()( Algebra &algebra , S1 &s1 , S2 &s2 , S3 &s3 , S4 s4_array[9] , Op op ) const
0190     {
0191         algebra.for_each12( s1 , s2 , s3 , s4_array[0].m_v , s4_array[1].m_v , s4_array[2].m_v , s4_array[3].m_v , s4_array[4].m_v ,
0192                 s4_array[5].m_v , s4_array[6].m_v , s4_array[7].m_v , s4_array[8].m_v , op );
0193     }
0194 
0195     template< class S1 , class S2 , class S4 , class Op>
0196     void operator()( Algebra &algebra , S1 &s1 , S2 &s2 , S4 s4_array[9] , Op op ) const
0197     {
0198         algebra.for_each11( s1 , s2 , s4_array[0].m_v , s4_array[1].m_v , s4_array[2].m_v , s4_array[3].m_v , s4_array[4].m_v ,
0199                 s4_array[5].m_v , s4_array[6].m_v , s4_array[7].m_v , s4_array[8].m_v , op );
0200     }
0201 };
0202 
0203 
0204 template< class Algebra >
0205 struct generic_rk_call_algebra< 11 , Algebra >
0206 {
0207     template< class S1 , class S2 , class S3 , class S4 , class Op>
0208     void operator()( Algebra &algebra , S1 &s1 , S2 &s2 , S3 &s3 , S4 s4_array[10] , Op op ) const
0209     {
0210         algebra.for_each13( s1 , s2 , s3 , s4_array[0].m_v , s4_array[1].m_v , s4_array[2].m_v , s4_array[3].m_v , s4_array[4].m_v ,
0211                 s4_array[5].m_v , s4_array[6].m_v , s4_array[7].m_v , s4_array[8].m_v , s4_array[9].m_v , op );
0212     }
0213 
0214     template< class S1 , class S2 , class S4 , class Op>
0215     void operator()( Algebra &algebra , S1 &s1 , S2 &s2 , S4 s4_array[10] , Op op ) const
0216     {
0217         algebra.for_each12( s1 , s2 , s4_array[0].m_v , s4_array[1].m_v , s4_array[2].m_v , s4_array[3].m_v , s4_array[4].m_v ,
0218                 s4_array[5].m_v , s4_array[6].m_v , s4_array[7].m_v , s4_array[8].m_v , s4_array[9].m_v , op );
0219     }
0220 };
0221 
0222 template< class Algebra >
0223 struct generic_rk_call_algebra< 12 , Algebra >
0224 {
0225     template< class S1 , class S2 , class S3 , class S4 , class Op>
0226     void operator()( Algebra &algebra , S1 &s1 , S2 &s2 , S3 &s3 , S4 s4_array[11] , Op op ) const
0227     {
0228         algebra.for_each14( s1 , s2 , s3 , s4_array[0].m_v , s4_array[1].m_v , s4_array[2].m_v , s4_array[3].m_v , s4_array[4].m_v ,
0229                 s4_array[5].m_v , s4_array[6].m_v , s4_array[7].m_v , s4_array[8].m_v , s4_array[9].m_v , s4_array[10].m_v , op );
0230     }
0231 
0232     template< class S1 , class S2 , class S4 , class Op>
0233     void operator()( Algebra &algebra , S1 &s1 , S2 &s2 , S4 s4_array[11] , Op op ) const
0234     {
0235         algebra.for_each13( s1 , s2 , s4_array[0].m_v , s4_array[1].m_v , s4_array[2].m_v , s4_array[3].m_v , s4_array[4].m_v ,
0236                 s4_array[5].m_v , s4_array[6].m_v , s4_array[7].m_v , s4_array[8].m_v , s4_array[9].m_v , s4_array[10].m_v , op );
0237     }
0238 };
0239 
0240 template< class Algebra >
0241 struct generic_rk_call_algebra< 13 , Algebra >
0242 {
0243     template< class S1 , class S2 , class S3 , class S4 , class Op>
0244     void operator()( Algebra &algebra , S1 &s1 , S2 &s2 , S3 &s3 , S4 s4_array[12] , Op op ) const
0245     {
0246         algebra.for_each15( s1 , s2 , s3 , s4_array[0].m_v , s4_array[1].m_v , s4_array[2].m_v , s4_array[3].m_v , s4_array[4].m_v ,
0247                 s4_array[5].m_v , s4_array[6].m_v , s4_array[7].m_v , s4_array[8].m_v , s4_array[9].m_v , s4_array[10].m_v , s4_array[11].m_v , op );
0248     }
0249 
0250     template< class S1 , class S2 , class S4 , class Op>
0251     void operator()( Algebra &algebra , S1 &s1 , S2 &s2 , S4 s4_array[12] , Op op ) const
0252     {
0253         algebra.for_each14( s1 , s2 , s4_array[0].m_v , s4_array[1].m_v , s4_array[2].m_v , s4_array[3].m_v , s4_array[4].m_v ,
0254                 s4_array[5].m_v , s4_array[6].m_v , s4_array[7].m_v , s4_array[8].m_v , s4_array[9].m_v , s4_array[10].m_v , s4_array[11].m_v , op );
0255     }
0256 };
0257 
0258 }
0259 }
0260 }
0261 }
0262 
0263 #endif // BOOST_NUMERIC_ODEINT_STEPPER_DETAIL_GENERIC_RK_CALL_ALGEBRA_HPP_INCLUDED