5#include <unordered_map> 
   32template<
class real_type>
 
   47                   const real_type* 
a , 
const real_type* 
b , 
const real_type* 
c):
 
   48        m_a(
a, 
a+s*s), m_b(
b, 
b+s), m_c(
c, 
c+s), m_bt(
b,
b+s), m_q(
order), m_p(
order), m_s(s){}
 
 
   60               const real_type* 
a, 
const real_type* 
b, 
const real_type* 
bt, 
const real_type* 
c):
 
   61        m_a(
a, 
a+s*s), m_b(
b,
b+s), m_c(
c,
c+s), m_bt(
bt, 
bt+s), m_q(
order), m_p(
embedded_order), m_s(s), m_embedded(true){}
 
 
   69        m_a(s), m_b(s), m_c(s), m_bt(s), m_s(s), m_embedded(true)
 
   71        for( 
unsigned i=0; i<s; i++)
 
   73            m_c[i] = data[i*(s+1)];
 
   74            for( 
unsigned j=0; j<s; j++)
 
   75                m_a(i,j) = data[i*(s+1)+j+1];
 
   77        m_q = (unsigned)data[s*(s+1)];
 
   78        for( 
unsigned j=0; j<s; j++)
 
   79            m_b[j] = data[s*(s+1)+j+1];
 
   80        m_p = (unsigned)data[(s+1)*(s+1)];
 
   81        for( 
unsigned j=0; j<s; j++)
 
   82            m_bt[j] = data[(s+1)*(s+1)+j+1];
 
 
   91    real_type 
a( 
unsigned i, 
unsigned j)
 const {
 
 
   99    real_type 
c( 
unsigned i)
 const {
 
 
  107    real_type 
b( 
unsigned j)
 const {
 
 
  115    real_type 
bt( 
unsigned j)
 const {
 
 
  124    real_type 
d( 
unsigned j)
 const {
 
  125        return m_b[j] - m_bt[j];
 
 
  145        for( 
unsigned i=0; i<m_s; i++)
 
  146            for( 
unsigned j=i; j<m_s; j++)
 
 
  156        for (
unsigned j=0; j<m_s; j++)
 
  157            if( 
a(m_s-1,j) != 
b(j) )
 
 
  163    std::vector<real_type> m_b, m_c, m_bt;
 
  164    unsigned m_q, m_p, m_s;
 
  165    bool m_embedded = 
false;
 
 
  179template<
class real_type>
 
  191    ShuOsherTableau( 
unsigned stages, 
unsigned order, 
const std::vector<real_type>& alpha_v, 
const std::vector<real_type>& beta_v){
 
  198        for( 
unsigned i=0; i<stages; i++)
 
  199            for( 
unsigned k=0; k<i+1; k++)
 
  201                m_alpha(i,k) = alpha_v[j];
 
  202                m_beta(i,k) = beta_v[j];
 
 
  218        std::vector< real_type > b(m_stages), c(m_stages);
 
  220        for( 
unsigned i=1; i<m_stages; i++)
 
  222            for( 
unsigned k=0; k<i; k++)
 
  224                a( i, k) = m_beta ( i-1, k);
 
  225                for( 
unsigned j = k+1; j<i; j++)
 
  226                    a(i,k) += m_alpha( i-1,j)*a(j,k);
 
  229        for( 
unsigned k=0; k<m_stages; k++)
 
  231            b[k] = m_beta( m_stages-1, k);
 
  232            for( 
unsigned j=k+1; j<m_stages; j++)
 
  233                b[k] += m_alpha(m_stages-1, j)*a( j, k);
 
  235        for( 
unsigned i=0; i<m_stages; i++)
 
  238            for( 
unsigned k=1; k<m_stages; k++)
 
 
  250    real_type 
alpha( 
unsigned i, 
unsigned j){ 
return m_alpha(i,j);}
 
  257    real_type 
beta( 
unsigned i, 
unsigned j){ 
return m_beta(i,j);}
 
  267    unsigned m_stages, m_order;
 
 
  274template<
class real_type>
 
  275ButcherTableau<real_type> explicit_euler_1_1()
 
  277    real_type a[1] = {0};
 
  278    real_type b[1] = {1};
 
  279    real_type c[1] = {0};
 
  280    return ButcherTableau<real_type>( 1,1, a,b,c);
 
  282template<
class real_type>
 
  283ButcherTableau<real_type> midpoint_2_2()
 
  285    real_type a[4] = {   0, 0,
 
  287    real_type b[2] = {0., 1.};
 
  288    real_type c[2] = {0, 0.5};
 
  289    return ButcherTableau<real_type>( 2,2, a,b,c);
 
  291template<
class real_type>
 
  292ButcherTableau<real_type> kutta_3_3()
 
  294    real_type a[9] = {0,0,0,
 
  297    real_type b[3] = {1./6., 2./3., 1./6.};
 
  298    real_type c[3] = {0, 0.5, 1.};
 
  299    return ButcherTableau<real_type>( 3,3, a,b,c);
 
  301template<
class real_type>
 
  302ButcherTableau<real_type> classic_4_4()
 
  310    real_type b[4] = {1./6., 1./3., 1./3., 1./6.};
 
  311    real_type c[4] = {0, 0.5, 0.5, 1.};
 
  312    return ButcherTableau<real_type>( 4,4, a,b,c);
 
  317template<
class real_type>
 
  318ButcherTableau<real_type> sirk3a_ex_3_3()
 
  325    real_type b[3] = {1./8., 1./8., 3./4.};
 
  326    real_type c[3] = {0, 8./7., 120./252.};
 
  327    return ButcherTableau<real_type>( 3,3, a,b,c);
 
  329template<
class real_type>
 
  330ButcherTableau<real_type> sirk3a_im_3_3()
 
  334        5589./6524., 75./233.,0,
 
  335        7691./26096., -26335./78288., 65./168.
 
  337    real_type b[3] = {1./8., 1./8., 3./4.};
 
  338    real_type c[3] = {3./4., 7689./6524., 27028./78288.};
 
  339    return ButcherTableau<real_type>( 3,3, a,b,c);
 
  344template<
class real_type>
 
  345ButcherTableau<real_type> heun_euler_2_1_2()
 
  347    real_type a[2*2] = {0,0, 1,0};
 
  348    real_type b[2] = {0.5, 0.5};
 
  349    real_type bt[2] = {1., 0.};
 
  350    real_type c[2] = {0,1};
 
  351    return ButcherTableau<real_type>(2,1,2, a, b, bt, c);
 
  353template<
class real_type>
 
  354ButcherTableau<real_type> cavaglieri_exp_3_1_2()
 
  360    real_type b[3] = {0., 5./6., 1./6.};
 
  361    real_type bt[3] = {0., 4./5., 1./5.};
 
  362    real_type c[3] = {0.,2./5., 1.};
 
  363    return ButcherTableau<real_type>(3,1,2, a, b, bt, c);
 
  365template<
class real_type>
 
  366ButcherTableau<real_type> fehlberg_3_2_3()
 
  372    real_type bt[3] = {1./2., 1./2., 0.};
 
  373    real_type b[3] = {1./6., 1./6., 2./3.};
 
  374    real_type c[3] = {0.,1., 0.5};
 
  375    return ButcherTableau<real_type>(3,2,3, a, b, bt, c);
 
  393template<
class real_type>
 
  394ButcherTableau<real_type> bogacki_shampine_4_2_3()
 
  400        2./9., 1./3., 4./9., 0.};
 
  401    real_type b[4] = {2./9., 1./3., 4./9., 0.};
 
  402    real_type bt[4] = {7./24., 1./4.,1./3.,1./8.};
 
  403    real_type c[4] = {0.,0.5,3./4.,1.};
 
  404    return ButcherTableau<real_type>(4,2,3, a, b, bt, c);
 
  406template<
class real_type>
 
  407ButcherTableau<real_type> cavaglieri_exp_4_2_3()
 
  410    real_type b[4] = {0., 673488652607./2334033219546., 493801219040./853653026979., 184814777513./1389668723319.};
 
  411    real_type c[4] = {0., 3375509829940./4525919076317., 272778623835./1039454778728., 1.0 };
 
  416        b[0],b[1],c[3]-b[0]-b[1],0};
 
  417    real_type bt[4] = { 449556814708./1155810555193, 0., 210901428686./1400818478499., 480175564215./1042748212601.};
 
  418    return ButcherTableau<real_type>(4,2,3, a, b, bt, c);
 
  435template<
class real_type>
 
  436ButcherTableau<real_type> ark324l2sa_erk_4_2_3()
 
  438    real_type data[5*6] = {
 
  440  1767732205903./2027836641118., 1767732205903./2027836641118., 0, 0, 0,
 
  441  3./5., 5535828885825./10492691773637., 788022342437./10882634858940., 0, 0,
 
  442  1, 6485989280629./16251701735622., -4246266847089./9704473918619., 10755448449292./10357097424841., 0. ,
 
  443  3, 1471266399579./7840856788654., -4482444167858./7529755066697., 11266239266428./11593286722821., 1767732205903./4055673282236.,
 
  444  2, 2756255671327./12835298489170., -10771552573575./22201958757719., 9247589265047./10645013368117., 2193209047091./5459859503100.
 
  446    return ButcherTableau<real_type>(4,data);
 
  448template<
class real_type>
 
  449ButcherTableau<real_type> zonneveld_5_3_4()
 
  452    0 , 0 , 0 , 0 , 0 , 0 ,
 
  453  1./2. , 1./2. , 0 , 0 , 0 , 0 ,
 
  454  1./2. , 0 , 1./2. , 0 , 0 , 0 ,
 
  455    1 , 0 , 0 , 1 , 0 , 0 ,
 
  456  3./4. , 5./32. , 7./32. , 13./32. , -1./32. , 0 ,
 
  457  4 , 1./6. , 1./3. , 1./3. , 1./6. , 0 ,
 
  458  3 , -1./2. , 7./3. , 7./3. , 13./6. , -16./3.};
 
  459    return ButcherTableau<real_type>(5,data);
 
  461template<
class real_type>
 
  462ButcherTableau<real_type> ark436l2sa_erk_6_3_4()
 
  465    0 , 0 , 0 , 0 , 0 , 0 , 0 ,
 
  466    0.5 , 0.5 , 0 , 0 , 0 , 0 , 0 ,
 
  467    83./250. , 13861./62500. , 6889./62500. , 0 , 0 , 0 , 0 ,
 
  468    31./50. , -116923316275./2393684061468. , -2731218467317./15368042101831. , 9408046702089./11113171139209. , 0 , 0 , 0 ,
 
  469    17./20. , -451086348788./2902428689909. , -2682348792572./7519795681897. , 12662868775082./11960479115383. , 3355817975965./11060851509271. , 0 , 0 ,
 
  470    1 , 647845179188./3216320057751. , 73281519250./8382639484533. , 552539513391./3454668386233. , 3354512671639./8306763924573. , 4040./17871. , 0 ,
 
  471    4 , 82889./524892. , 0 , 15625./83664. , 69875./102672. , -2260./8211. , 0.25 ,
 
  472    3 , 4586570599./29645900160. , 0 , 178811875./945068544. , 814220225./1159782912. , -3700637./11593932. , 61727./225920.
 
  474    return ButcherTableau<real_type>(6,data);
 
  476template<
class real_type>
 
  477ButcherTableau<real_type> sayfy_aburub_6_3_4()
 
  480        0 , 0 , 0 , 0 , 0 , 0 , 0 ,
 
  481  1./2. , 1./2. , 0 , 0 , 0 , 0 , 0 ,
 
  482  1 , -1 , 2 , 0 , 0 , 0 , 0 ,
 
  483  1 , 1./6. , 2./3. , 1./6. , 0 , 0 , 0 ,
 
  484  1./2. , 0.137 , 0.226 , 0.137 , 0 , 0 , 0 ,
 
  485  1 , 0.452 , -0.904 , -0.548 , 0 , 2 , 0 ,
 
  486  4 , 1./6. , 1./3. , 1./12. , 0 , 1./3. , 1./12. ,
 
  487  3 , 1./6. , 2./3. , 1./6. , 0 , 0 , 0
 
  489    return ButcherTableau<real_type>(6,data);
 
  491template<
class real_type>
 
  492ButcherTableau<real_type> cash_karp_6_4_5()
 
  494    real_type data[] = {0 , 0 , 0 , 0 , 0 , 0 , 0 ,
 
  495  1./5. , 1./5. , 0 , 0 , 0 , 0 , 0 ,
 
  496  3./10. , 3./40. , 9./40. , 0 , 0 , 0 , 0 ,
 
  497  3./5. , 3./10. , -9./10. , 6./5. , 0 , 0 , 0 ,
 
  498  1 , -11./54. , 5./2. , -70./27. , 35./27. , 0 , 0 ,
 
  499  7./8. , 1631./55296. , 175./512. , 575./13824. , 44275./110592. , 253./4096. , 0 ,
 
  500  5 , 37./378. , 0 , 250./621. , 125./594. , 0 , 512./1771. ,
 
  501  4 , 2825./27648. , 0 , 18575./48384. , 13525./55296. , 277./14336. , 1./4.
 
  503    return ButcherTableau<real_type>(6,data);
 
  505template<
class real_type>
 
  506ButcherTableau<real_type> fehlberg_6_4_5()
 
  509        0 , 0 , 0 , 0 , 0 , 0 , 0 ,
 
  510  1./4. , 1./4. , 0 , 0 , 0 , 0 , 0 ,
 
  511  3./8. , 3./32. , 9./32. , 0 , 0 , 0 , 0 ,
 
  512  12./13. , 1932./2197. , -7200./2197. , 7296./2197. , 0 , 0 , 0 ,
 
  513  1 , 439./216. , -8 , 3680./513. , -845./4104. , 0 , 0 ,
 
  514  1./2. , -8./27. , 2 , -3544./2565. , 1859./4104. , -11./40. , 0 ,
 
  515  5 , 16./135. , 0 , 6656./12825. , 28561./56430. , -9./50. , 2./55. ,
 
  516  4 , 25./216. , 0 , 1408./2565. , 2197./4104. , -1./5. , 0
 
  518    return ButcherTableau<real_type>(6,data);
 
  520template<
class real_type>
 
  521ButcherTableau<real_type> dormand_prince_7_4_5()
 
  524        0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 ,
 
  525  1./5. , 1./5. , 0 , 0 , 0 , 0 , 0 , 0 ,
 
  526  3./10. , 3./40. , 9./40. , 0 , 0 , 0 , 0 , 0 ,
 
  527  4./5. , 44./45. , -56./15. , 32./9. , 0 , 0 , 0 , 0 ,
 
  528  8./9. , 19372./6561. , -25360./2187. , 64448./6561. , -212./729. , 0 , 0 , 0 ,
 
  529  1 , 9017./3168. , -355./33. , 46732./5247. , 49./176. , -5103./18656. , 0 , 0 ,
 
  530  1 , 35./384. , 0 , 500./1113. , 125./192. , -2187./6784. , 11./84. , 0 ,
 
  531  5 , 35./384. , 0 , 500./1113. , 125./192. , -2187./6784. , 11./84. , 0 ,
 
  532  4 , 5179./57600. , 0 , 7571./16695. , 393./640. , -92097./339200. , 187./2100. , 1./40.
 
  534    return ButcherTableau<real_type>(7,data);
 
  536template<
class real_type>
 
  537ButcherTableau<real_type> tsitouras09_7_4_5()
 
  540        0.091937670648056,1.156529958312496,-0.781330409541651,
 
  541        0.197624776163019,0.271639883438847,0.063598120979232,0
 
  544        0.092167469090589,1.131750860603267,-0.759749304413104,
 
  545        0.205573577541223,0.264767065074229,0.040490332103796,1./40.
 
  548        0., 0.231572163526079, 0.212252555252816,0.596693497318054,
 
  549        0.797009955708112,1.,1.
 
  554        0,-0.059103796886580,0,0,0,0,0,
 
  555        0,4.560080615554683,-4.006458683473722,0,0,0,0,
 
  556        0,-2.443935658802774,2.631461258707441,0.524706566208284,0,0,0,
 
  557        0,9.516251378071800,-8.467630087008555,-0.987888827522473,0.867009765724064,0,0,
 
  560    for( 
unsigned i=0; i<6; i++)
 
  563        for( 
unsigned j=0; j<7; j++)
 
  567    for( 
unsigned j=0; j<7; j++)
 
  569    return ButcherTableau<real_type>(7,4,5,a,b,bt,c);
 
  572template<
class real_type>
 
  573ButcherTableau<real_type> tsitouras11_7_4_5()
 
  578        0.09646076681806523,0.01,0.4798896504144996,
 
  579        1.379008574103742,-3.290069515436081,2.324710524099774,0.,
 
  583        0.001780011052226,0.000816434459657,-0.007880878010262,0.144711007173263,-0.582357165452555,0.458082105929187,-1./66.
 
  586        0.,0.161,0.327,0.9,0.9800255409045097,1.,1.
 
  591        0,0.3354806554923570,0,0,0,0,0,
 
  592        0,-6.359448489975075,4.362295432869581,0,0,0,0,
 
  593        0,-11.74888356406283,7.495539342889836,-0.09249506636175525,0,0,0,
 
  594        0,-12.92096931784711,8.159367898576159,-0.07158497328140100,-0.02826905039406838,0,0,
 
  597    for( 
unsigned i=0; i<6; i++)
 
  600        for( 
unsigned j=0; j<7; j++)
 
  604    for( 
unsigned j=0; j<7; j++)
 
  607        bt[j] = b[j] - bt[j];
 
  609    return ButcherTableau<real_type>(7,4,5,a,b,bt,c);
 
  612template<
class real_type>
 
  613ButcherTableau<real_type> ark548l2sa_erk_8_4_5()
 
  6174./9.,4./9.,0,0,0,0,0,0,0,
 
  6186456083330201./8509243623797.,1./9.,1183333538310./1827251437969.,0,0,0,0,0,0,
 
  6191632083962415./14158861528103.,895379019517./9750411845327.,477606656805./13473228687314.,-112564739183./9373365219272.,0,0,0,0,0,
 
  6206365430648612./17842476412687.,-4458043123994./13015289567637.,-2500665203865./9342069639922.,983347055801./8893519644487.,2185051477207./2551468980502.,0,0,0,0,
 
  62118./25.,-167316361917./17121522574472.,1605541814917./7619724128744.,991021770328./13052792161721.,2342280609577./11279663441611.,3012424348531./12792462456678.,0,0,0,
 
  622191./200.,6680998715867./14310383562358.,5029118570809./3897454228471.,2415062538259./6382199904604.,-3924368632305./6964820224454.,-4331110370267./15021686902756.,-3944303808049./11994238218192.,0,0,
 
  6231,2193717860234./3570523412979.,2193717860234./3570523412979.,5952760925747./18750164281544.,-4412967128996./6196664114337.,4151782504231./36106512998704.,572599549169./6265429158920.,-457874356192./11306498036315.,0,
 
  6245,0,0,3517720773327./20256071687669.,4569610470461./17934693873752.,2819471173109./11655438449929.,3296210113763./10722700128969.,-1142099968913./5710983926999.,2./9.,
 
  6254,0,0,520639020421./8300446712847.,4550235134915./17827758688493.,1482366381361./6201654941325.,5551607622171./13911031047899.,-5266607656330./36788968843917.,1074053359553./5740751784926.
 
  628    return ButcherTableau<real_type>( 8, data);
 
  630template<
class real_type>
 
  631ButcherTableau<real_type> verner_9_5_6()
 
  638    real_type c[9] = {0, 0.06, 0.09593333333333333333333333333333333333333, 0.1439, 0.4973, 0.9725, 0.9995, 1.0, 1.0};
 
  641    0.06, 0,0,0,0,0,0,0,0,
 
  642    0.01923996296296296296296296296296296296296, 0.07669337037037037037037037037037037037037,0,0,0,0,0,0,0,
 
  643     0.035975, 0, 0.107925, 0, 0, 0, 0, 0, 0,
 
  644     1.318683415233148260919747276431735612861, 0, -5.042058063628562225427761634715637693344, 4.220674648395413964508014358283902080483, 0, 0, 0, 0, 0,
 
  645     -41.87259166432751461803757780644346812905, 0, 159.4325621631374917700365669070346830453, -122.1192135650100309202516203389242140663, 5.531743066200053768252631238332999150076, 0, 0, 0, 0,
 
  646     -54.43015693531650433250642051294142461271, 0, 207.0672513650184644273657173866509835987, -158.6108137845899991828742424365058599469, 6.991816585950242321992597280791793907096, -0.01859723106220323397765171799549294623692, 0, 0, 0,
 
  647     -54.66374178728197680241215648050386959351, 0, 207.9528062553893734515824816699834244238, -159.2889574744995071508959805871426654216, 7.018743740796944434698170760964252490817, -0.01833878590504572306472782005141738268361, -0.0005119484997882099077875432497245168395840, 0, 0,
 
  648      0.03438957868357036009278820124728322386520, 0, 0, 0.2582624555633503404659558098586120858767, 0.4209371189673537150642551514069801967032, 4.405396469669310170148836816197095664891, -176.4831190242986576151740942499002125029, 172.3641334014150730294022582711902413315, 0};
 
  650    real_type b[9] = { 0.03438957868357036009278820124728322386520, 0, 0, 0.2582624555633503404659558098586120858767, 0.4209371189673537150642551514069801967032, 4.405396469669310170148836816197095664891, -176.4831190242986576151740942499002125029, 172.3641334014150730294022582711902413315, 0 };
 
  651    real_type bt[9] = { 0.04909967648382489730906854927971225836479, 0, 0, 0.2251112229516524153401395320539875329485, 0.4694682253029562039431948525047387412553, 0.8065792249988867707634161808995217981443, 0., -0.6071194891777959797672951465256217122488, 0.05686113944047569241147603178766138153594};
 
  652    return ButcherTableau<real_type>(9,5,6,a,b,bt,c);
 
  654template<
class real_type>
 
  655ButcherTableau<real_type> verner_10_6_7()
 
  662    real_type c[10] = { 0,  0.005, 0.1088888888888888888888888888888888888889, 0.1633333333333333333333333333333333333333, 0.4555000000000000000000000000000000000000, 0.6095094489978381317087004421486024949638, 0.884, 0.925, 1.0, 1.0};
 
  664        0, 0,0,0,0,0,0,0,0,0,
 
  665        0.005, 0,0,0,0,0,0,0,0,0,
 
  666     -1.076790123456790123456790123456790123457, 1.185679012345679012345679012345679012346, 0, 0, 0, 0, 0, 0, 0, 0,
 
  667    0.04083333333333333333333333333333333333333, 0, 0.1225, 0, 0, 0, 0, 0, 0, 0,
 
  668      0.6389139236255726780508121615993336109954, 0, -2.455672638223656809662640566430653894211, 2.272258714598084131611828404831320283215, 0, 0, 0, 0, 0, 0,
 
  669     -2.661577375018757131119259297861818119279, 0, 10.80451388645613769565396655365532838482, -8.353914657396199411968048547819291691541, 0.8204875949566569791420417341743839209619, 0, 0, 0, 0, 0,
 
  670      6.067741434696770992718360183877276714679, 0, -24.71127363591108579734203485290746001803, 20.42751793078889394045773111748346612697, -1.906157978816647150624096784352757010879, 1.006172249242068014790040335899474187268, 0, 0, 0, 0,
 
  671      12.05467007625320299509109452892778311648, 0, -49.75478495046898932807257615331444758322, 41.14288863860467663259698416710157354209, -4.461760149974004185641911603484815375051, 2.042334822239174959821717077708608543738, -0.09834843665406107379530801693870224403537, 0, 0, 0,
 
  672      10.13814652288180787641845141981689030769, 0, -42.64113603171750214622846006736635730625, 35.76384003992257007135021178023160054034, -4.348022840392907653340370296908245943710, 2.009862268377035895441943593011827554771, 0.3487490460338272405953822853053145879140, -0.2714390051048312842371587140910297407572, 0, 0,
 
  673     -45.03007203429867712435322405073769635151, 0, 187.3272437654588840752418206154201997384, -154.0288236935018690596728621034510402582, 18.56465306347536233859492332958439136765, -7.141809679295078854925420496823551192821, 1.308808578161378625114762706007696696508, 0, 0, 0};
 
  674    real_type b[10] = {  0.04715561848627222170431765108838175679569, 0, 0, 0.2575056429843415189596436101037687580986, 0.2621665397741262047713863095764527711129, 0.1521609265673855740323133199165117535523, 0.4939969170032484246907175893227876844296, -0.2943031171403250441557244744092703429139, 0.08131747232495109999734599440136761892478, 0};
 
  675    real_type bt[10] = { 0.04460860660634117628731817597479197781432, 0, 0, 0.2671640378571372680509102260943837899738, 0.2201018300177293019979715776650753096323, 0.2188431703143156830983120833512893824578, 0.2289871705411202883378173889763552365362, 0, 0, 0.02029518466335628222767054793810430358554};
 
  676    return ButcherTableau<real_type>(10,6,7, a,b,bt,c);
 
  679template<
class real_type>
 
  680ButcherTableau<real_type> fehlberg_13_7_8()
 
  683        0,   0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
 
  684  2./27.,   2./27., 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
 
  685  1./9.,   1./36., 1./12., 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
 
  686  1./6.,   1./24., 0, 1./8., 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
 
  687  5./12.,   5./12., 0, -25./16., 25./16., 0, 0, 0, 0, 0, 0, 0, 0, 0,
 
  688  1./2.,   1./20., 0, 0, 1./4., 1./5., 0, 0, 0, 0, 0, 0, 0, 0,
 
  689  5./6.,   -25./108., 0, 0, 125./108., -65./27., 125./54., 0, 0, 0, 0, 0, 0, 0,
 
  690  1./6.,   31./300., 0, 0, 0, 61./225., -2./9., 13./900., 0, 0, 0, 0, 0, 0,
 
  691  2./3.,   2, 0, 0, -53./6., 704./45., -107./9., 67./90., 3, 0, 0, 0, 0, 0,
 
  692  1./3.,   -91./108., 0, 0, 23./108., -976./135., 311./54., -19./60., 17./6., -1./12., 0, 0, 0, 0,
 
  693  1,   2383./4100., 0, 0, -341./164., 4496./1025., -301./82., 2133./4100., 45./82., 45./164., 18./41., 0, 0, 0,
 
  694  0,   3./205., 0, 0, 0, 0, -6./41., -3./205., -3./41., 3./41., 6./41., 0, 0, 0,
 
  695  1,   -1777./4100., 0, 0, -341./164., 4496./1025., -289./82., 2193./4100., 51./82., 33./164., 12./41., 0, 1, 0,
 
  696  8, 0, 0, 0, 0, 0, 34./105., 9./35., 9./35., 9./280., 9./280., 0, 41./840., 41./840. ,
 
  697  7, 41./840., 0, 0, 0, 0, 34./105., 9./35., 9./35., 9./280., 9./280., 41./840., 0, 0
 
  699    return ButcherTableau<real_type>( 13, data);
 
  701template<
class real_type>
 
  702ButcherTableau<real_type> dormand_prince_13_7_8()
 
  707       0,   0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
 
  708       1.0/18, 1.0/18,0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
 
  709       1.0/12, 1.0/48, 1.0/16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
 
  710       1.0/8,  1.0/32, 0, 3.0/32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
 
  711       5.0/16, 5.0/16, 0,-75.0/64, 75.0/64, 0, 0, 0, 0, 0, 0, 0, 0, 0,
 
  712       3.0/8,  3.0/80, 0,   0, 3.0/16, 3.0/20, 0, 0, 0, 0, 0, 0, 0, 0,
 
  713       59.0/400, 29443841.0/614563906,0,0,  77736538.0/692538347, -28693883.0/1125000000,  23124283.0/1800000000, 0,0,0,0,0,0,0,
 
  714       93.0/200, 16016141.0/946692911,0,0, 61564180.0/158732637, 22789713.0/633445777,  545815736.0/2771057229,  -180193667.0/1043307555, 0,0,0,0,0,0,
 
  715       5490023248.0/9719169821, 39632708.0/573591083,0,0, -433636366.0/683701615, -421739975.0/2616292301,  100302831.0/723423059, 790204164.0/839813087, 800635310.0/3783071287, 0,0,0,0,0,
 
  716       13.0/20,  246121993.0/1340847787, 0,0, -37695042795.0/15268766246,-309121744.0/1061227803, -12992083.0/490766935,  6005943493.0/2108947869, 393006217.0/1396673457,  123872331.0/1001029789, 0,0,0,0,
 
  717      1201146811.0/1299019798,  -1028468189.0/846180014, 0,0, 8478235783.0/508512852, 1311729495.0/1432422823, -10304129995.0/1701304382, -48777925059.0/3047939560, 15336726248.0/1032824649, -45442868181.0/3398467696,  3065993473.0/597172653, 0,0,0,
 
  718      1.0, 185892177.0/718116043, 0,0, -3185094517.0/667107341,-477755414.0/1098053517, -703635378.0/230739211,  5731566787.0/1027545527, 5232866602.0/850066563, -4093664535.0/808688257, 3962137247.0/1805957418, 65686358.0/487910083, 0,0,
 
  719      1.0, 403863854.0/491063109, 0,0, -5068492393.0/434740067, -411421997.0/543043805, 652783627.0/914296604, 11173962825.0/925320556, -13158990841.0/6184727034, 3936647629.0/1978049680, -160528059.0/685178525, 248638103.0/1413531060,0,0,
 
  720      8,  14005451.0/335480064,0,0, 0,0, -59238493.0/1068277825, 181606767.0/758867731,  561292985.0/797845732, -1041891430.0/1371343529, 760417239.0/1151165299,  118820643.0/751138087, -528747749.0/2220607170, 1.0/4,
 
  721      7,  13451932.0/455176632,0,0, 0,0, -808719846.0/976000145, 1757004468.0/5645159321, 656045339.0/265891186, -3867574721.0/1518517206, 465885868.0/322736535, 53011238.0/667516719, 2.0/45,0
 
  723    return ButcherTableau<real_type>( 13, data);
 
  726template<
class real_type>
 
  727ButcherTableau<real_type> feagin_17_8_10()
 
  729    real_type a[17*17] = {
 
  7300,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,
 
  7310.100000000000000000000000000000000000000000000000000000000000, 0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,
 
  732-0.915176561375291440520015019275342154318951387664369720564660,
 
  733 1.45453440217827322805250021715664459117622483736537873607016,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,
 
  7340.202259190301118170324681949205488413821477543637878380814562,
 
  735 0.000000000000000000000000000000000000000000000000000000000000,
 
  736 0.606777570903354510974045847616465241464432630913635142443687,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,
 
  7370.184024714708643575149100693471120664216774047979591417844635,
 
  738 0.000000000000000000000000000000000000000000000000000000000000,
 
  739 0.197966831227192369068141770510388793370637287463360401555746,
 
  740-0.0729547847313632629185146671595558023015011608914382961421311,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,
 
  741 0.0879007340206681337319777094132125475918886824944548534041378,
 
  742 0.000000000000000000000000000000000000000000000000000000000000,
 
  743 0.000000000000000000000000000000000000000000000000000000000000,
 
  744 0.410459702520260645318174895920453426088035325902848695210406,
 
  745 0.482713753678866489204726942976896106809132737721421333413261, 0,0,0,0,0, 0,0,0,0,0, 0,0,
 
  746 0.0859700504902460302188480225945808401411132615636600222593880,
 
  747 0.000000000000000000000000000000000000000000000000000000000000,
 
  748 0.000000000000000000000000000000000000000000000000000000000000,
 
  749 0.330885963040722183948884057658753173648240154838402033448632,
 
  750 0.489662957309450192844507011135898201178015478433790097210790,
 
  751-0.0731856375070850736789057580558988816340355615025188195854775, 0,0,0,0, 0,0,0,0,0, 0,0,
 
  752 0.120930449125333720660378854927668953958938996999703678812621,
 
  753 0.000000000000000000000000000000000000000000000000000000000000,
 
  754 0.000000000000000000000000000000000000000000000000000000000000,
 
  755 0.000000000000000000000000000000000000000000000000000000000000,
 
  756 0.260124675758295622809007617838335174368108756484693361887839,
 
  757 0.0325402621549091330158899334391231259332716675992700000776101,
 
  758-0.0595780211817361001560122202563305121444953672762930724538856, 0,0,0, 0,0,0,0,0, 0,0,
 
  7590.110854379580391483508936171010218441909425780168656559807038,
 
  760 0.000000000000000000000000000000000000000000000000000000000000,
 
  761 0.000000000000000000000000000000000000000000000000000000000000,
 
  762 0.000000000000000000000000000000000000000000000000000000000000,
 
  763 0.000000000000000000000000000000000000000000000000000000000000,
 
  764-0.0605761488255005587620924953655516875526344415354339234619466,
 
  765 0.321763705601778390100898799049878904081404368603077129251110,
 
  766 0.510485725608063031577759012285123416744672137031752354067590, 0,0, 0,0,0,0,0, 0,0,
 
  7670.112054414752879004829715002761802363003717611158172229329393,
 
  768 0.000000000000000000000000000000000000000000000000000000000000,
 
  769 0.000000000000000000000000000000000000000000000000000000000000,
 
  770 0.000000000000000000000000000000000000000000000000000000000000,
 
  771 0.000000000000000000000000000000000000000000000000000000000000,
 
  772-0.144942775902865915672349828340980777181668499748506838876185,
 
  773-0.333269719096256706589705211415746871709467423992115497968724,
 
  774 0.499269229556880061353316843969978567860276816592673201240332,
 
  775 0.509504608929686104236098690045386253986643232352989602185060, 0, 0,0,0,0,0, 0,0,
 
  7760.113976783964185986138004186736901163890724752541486831640341,
 
  777 0.000000000000000000000000000000000000000000000000000000000000,
 
  778 0.000000000000000000000000000000000000000000000000000000000000,
 
  779 0.000000000000000000000000000000000000000000000000000000000000,
 
  780 0.000000000000000000000000000000000000000000000000000000000000,
 
  781-0.0768813364203356938586214289120895270821349023390922987406384,
 
  782 0.239527360324390649107711455271882373019741311201004119339563,
 
  783 0.397774662368094639047830462488952104564716416343454639902613,
 
  784 0.0107558956873607455550609147441477450257136782823280838547024,
 
  785-0.327769124164018874147061087350233395378262992392394071906457, 0,0,0,0,0, 0,0,
 
  7860.0798314528280196046351426864486400322758737630423413945356284,
 
  787 0.000000000000000000000000000000000000000000000000000000000000,
 
  788 0.000000000000000000000000000000000000000000000000000000000000,
 
  789 0.000000000000000000000000000000000000000000000000000000000000,
 
  790 0.000000000000000000000000000000000000000000000000000000000000,
 
  791-0.0520329686800603076514949887612959068721311443881683526937298,
 
  792-0.0576954146168548881732784355283433509066159287152968723021864,
 
  793 0.194781915712104164976306262147382871156142921354409364738090,
 
  794 0.145384923188325069727524825977071194859203467568236523866582,
 
  795-0.0782942710351670777553986729725692447252077047239160551335016,
 
  796-0.114503299361098912184303164290554670970133218405658122674674, 0,0,0,0, 0,0,
 
  7970.985115610164857280120041500306517278413646677314195559520529,
 
  798 0.000000000000000000000000000000000000000000000000000000000000,
 
  799 0.000000000000000000000000000000000000000000000000000000000000,
 
  800 0.330885963040722183948884057658753173648240154838402033448632,
 
  801 0.489662957309450192844507011135898201178015478433790097210790,
 
  802-1.37896486574843567582112720930751902353904327148559471526397,
 
  803-0.861164195027635666673916999665534573351026060987427093314412,
 
  804 5.78428813637537220022999785486578436006872789689499172601856,
 
  805 3.28807761985103566890460615937314805477268252903342356581925,
 
  806-2.38633905093136384013422325215527866148401465975954104585807,
 
  807-3.25479342483643918654589367587788726747711504674780680269911,
 
  808-2.16343541686422982353954211300054820889678036420109999154887, 0,0,0, 0,0,
 
  8090.895080295771632891049613132336585138148156279241561345991710,
 
  810 0.000000000000000000000000000000000000000000000000000000000000,
 
  811 0.197966831227192369068141770510388793370637287463360401555746,
 
  812-0.0729547847313632629185146671595558023015011608914382961421311,
 
  813 0.0000000000000000000000000000000000000000000000000000000000000,
 
  814-0.851236239662007619739049371445966793289359722875702227166105,
 
  815 0.398320112318533301719718614174373643336480918103773904231856,
 
  816 3.63937263181035606029412920047090044132027387893977804176229,
 
  817 1.54822877039830322365301663075174564919981736348973496313065,
 
  818-2.12221714704053716026062427460427261025318461146260124401561,
 
  819-1.58350398545326172713384349625753212757269188934434237975291,
 
  820-1.71561608285936264922031819751349098912615880827551992973034,
 
  821-0.0244036405750127452135415444412216875465593598370910566069132, 0,0, 0,0,
 
  822-0.915176561375291440520015019275342154318951387664369720564660,
 
  823 1.45453440217827322805250021715664459117622483736537873607016,
 
  824 0.000000000000000000000000000000000000000000000000000000000000,
 
  825 0.000000000000000000000000000000000000000000000000000000000000,
 
  826-0.777333643644968233538931228575302137803351053629547286334469,
 
  827 0.000000000000000000000000000000000000000000000000000000000000,
 
  828-0.0910895662155176069593203555807484200111889091770101799647985,
 
  829 0.000000000000000000000000000000000000000000000000000000000000,
 
  830 0.000000000000000000000000000000000000000000000000000000000000,
 
  831 0.000000000000000000000000000000000000000000000000000000000000,
 
  832 0.000000000000000000000000000000000000000000000000000000000000,
 
  833 0.000000000000000000000000000000000000000000000000000000000000,
 
  834 0.0910895662155176069593203555807484200111889091770101799647985,
 
  835 0.777333643644968233538931228575302137803351053629547286334469, 0, 0,0,
 
  8360.100000000000000000000000000000000000000000000000000000000000,
 
  837 0.000000000000000000000000000000000000000000000000000000000000,
 
  838-0.157178665799771163367058998273128921867183754126709419409654,
 
  839 0.000000000000000000000000000000000000000000000000000000000000,
 
  840 0.000000000000000000000000000000000000000000000000000000000000,
 
  841 0.000000000000000000000000000000000000000000000000000000000000,
 
  842 0.000000000000000000000000000000000000000000000000000000000000,
 
  843 0.000000000000000000000000000000000000000000000000000000000000,
 
  844 0.000000000000000000000000000000000000000000000000000000000000,
 
  845 0.000000000000000000000000000000000000000000000000000000000000,
 
  846 0.000000000000000000000000000000000000000000000000000000000000,
 
  847 0.000000000000000000000000000000000000000000000000000000000000,
 
  848 0.000000000000000000000000000000000000000000000000000000000000,
 
  849 0.000000000000000000000000000000000000000000000000000000000000,
 
  850 0.157178665799771163367058998273128921867183754126709419409654, 0,0,
 
  8510.181781300700095283888472062582262379650443831463199521664945,
 
  852 0.675000000000000000000000000000000000000000000000000000000000,
 
  853 0.342758159847189839942220553413850871742338734703958919937260,
 
  854 0.000000000000000000000000000000000000000000000000000000000000,
 
  855 0.259111214548322744512977076191767379267783684543182428778156,
 
  856-0.358278966717952089048961276721979397739750634673268802484271,
 
  857-1.04594895940883306095050068756409905131588123172378489286080,
 
  858 0.930327845415626983292300564432428777137601651182965794680397,
 
  859 1.77950959431708102446142106794824453926275743243327790536000,
 
  860 0.100000000000000000000000000000000000000000000000000000000000,
 
  861-0.282547569539044081612477785222287276408489375976211189952877,
 
  862-0.159327350119972549169261984373485859278031542127551931461821,
 
  863-0.145515894647001510860991961081084111308650130578626404945571,
 
  864-0.259111214548322744512977076191767379267783684543182428778156,
 
  865-0.342758159847189839942220553413850871742338734703958919937260,
 
  866-0.675000000000000000000000000000000000000000000000000000000000, 0
 
  870    0.0333333333333333333333333333333333333333333333333333333333333,
 
  871    0.0250000000000000000000000000000000000000000000000000000000000,
 
  872    0.0333333333333333333333333333333333333333333333333333333333333,
 
  873    0.000000000000000000000000000000000000000000000000000000000000,
 
  874    0.0500000000000000000000000000000000000000000000000000000000000,
 
  875    0.000000000000000000000000000000000000000000000000000000000000,
 
  876    0.0400000000000000000000000000000000000000000000000000000000000,
 
  877    0.000000000000000000000000000000000000000000000000000000000000,
 
  878    0.189237478148923490158306404106012326238162346948625830327194,
 
  879    0.277429188517743176508360262560654340428504319718040836339472,
 
  880    0.277429188517743176508360262560654340428504319718040836339472,
 
  881    0.189237478148923490158306404106012326238162346948625830327194,
 
  882    -0.0400000000000000000000000000000000000000000000000000000000000,
 
  883    -0.0500000000000000000000000000000000000000000000000000000000000,
 
  884    -0.0333333333333333333333333333333333333333333333333333333333333,
 
  885    -0.0250000000000000000000000000000000000000000000000000000000000,
 
  886    0.0333333333333333333333333333333333333333333333333333333333333
 
  889    0.0333333333333333333333333333333333333333333333333333333333333,
 
  890    0.0277777777777777777777777777777777777777777777777777777777777,
 
  891    0.0333333333333333333333333333333333333333333333333333333333333,
 
  892    0.000000000000000000000000000000000000000000000000000000000000,
 
  893    0.0500000000000000000000000000000000000000000000000000000000000,
 
  894    0.000000000000000000000000000000000000000000000000000000000000,
 
  895    0.0400000000000000000000000000000000000000000000000000000000000,
 
  896    0.000000000000000000000000000000000000000000000000000000000000,
 
  897    0.189237478148923490158306404106012326238162346948625830327194,
 
  898    0.277429188517743176508360262560654340428504319718040836339472,
 
  899    0.277429188517743176508360262560654340428504319718040836339472,
 
  900    0.189237478148923490158306404106012326238162346948625830327194,
 
  901    -0.0400000000000000000000000000000000000000000000000000000000000,
 
  902    -0.0500000000000000000000000000000000000000000000000000000000000,
 
  903    -0.0333333333333333333333333333333333333333333333333333333333333,
 
  904    -0.0277777777777777777777777777777777777777777777777777777777777,
 
  905    0.0333333333333333333333333333333333333333333333333333333333333
 
  908 0.000000000000000000000000000000000000000000000000000000000000,
 
  909 0.100000000000000000000000000000000000000000000000000000000000,
 
  910 0.539357840802981787532485197881302436857273449701009015505500,
 
  911 0.809036761204472681298727796821953655285910174551513523258250,
 
  912 0.309036761204472681298727796821953655285910174551513523258250,
 
  913 0.981074190219795268254879548310562080489056746118724882027805,
 
  914 0.833333333333333333333333333333333333333333333333333333333333,
 
  915 0.354017365856802376329264185948796742115824053807373968324184,
 
  916 0.882527661964732346425501486979669075182867844268052119663791,
 
  917 0.642615758240322548157075497020439535959501736363212695909875,
 
  918 0.357384241759677451842924502979560464040498263636787304090125,
 
  919 0.117472338035267653574498513020330924817132155731947880336209,
 
  920 0.833333333333333333333333333333333333333333333333333333333333,
 
  921 0.309036761204472681298727796821953655285910174551513523258250,
 
  922 0.539357840802981787532485197881302436857273449701009015505500,
 
  923 0.100000000000000000000000000000000000000000000000000000000000,
 
  924 1.00000000000000000000000000000000000000000000000000000000000
 
  926    return ButcherTableau<real_type>( 17, 8, 10, a, b,bt, c);
 
  929template<
class real_type>
 
  930ButcherTableau<real_type> implicit_euler_1_1()
 
  932    real_type a[1] = {1};
 
  933    real_type b[1] = {1};
 
  934    real_type c[1] = {1};
 
  935    return ButcherTableau<real_type>( 1,1, a,b,c);
 
  937template<
class real_type>
 
  938ButcherTableau<real_type> implicit_midpoint_1_2()
 
  940    real_type a[1] = { 0.5};
 
  941    real_type b[1] = { 1.};
 
  942    real_type c[1] = { 0.5};
 
  943    return ButcherTableau<real_type>( 1,2, a,b,c);
 
  945template<
class real_type>
 
  946ButcherTableau<real_type> trapezoidal_2_2()
 
  948    real_type a[4] = { 0, 0, 0.5, 0.5};
 
  949    real_type b[2] = { 0.5, 0.5};
 
  950    real_type c[2] = { 0, 1.};
 
  951    return ButcherTableau<real_type>( 2,2, a,b,c);
 
  954template<
class real_type>
 
  955ButcherTableau<real_type> sdirk_2_1_2()
 
  957    real_type 
x = (2.-sqrt(2.))/2.;
 
  964    return ButcherTableau<real_type>( 2, data);
 
  966template<
class real_type>
 
  967ButcherTableau<real_type> cavaglieri_imp_3_1_2()
 
  973    real_type b[3] = {0., 5./6., 1./6.};
 
  974    real_type bt[3] = {0., 4./5., 1./5.};
 
  975    real_type c[3] = {0.,2./5., 1.};
 
  976    return ButcherTableau<real_type>(3,1,2, a, b, bt, c);
 
 1006template<
class real_type>
 
 1007ButcherTableau<real_type> kvaerno_4_2_3()
 
 1010    real_type data[] = {
 
 1012  0.871733043 , 0.4358665215 , 0.4358665215 , 0 , 0 ,
 
 1013  1 , 0.490563388419108 , 0.073570090080892 , 0.4358665215 , 0 ,
 
 1014  1 , 0.308809969973036 , 1.490563388254106 , -1.235239879727145 , 0.4358665215 ,
 
 1015  3 , 0.308809969973036 , 1.490563388254106 , -1.235239879727145 , 0.4358665215 ,
 
 1016  2 , 0.490563388419108 , 0.073570090080892 , 0.4358665215 , 0
 
 1018    return ButcherTableau<real_type>( 4, data);
 
 1020template<
class real_type>
 
 1021ButcherTableau<real_type> sanchez_3_3()
 
 1023    real_type a0 = 1.351207191959658;
 
 1024    real_type b[3] = {a0,a0,1.-2.*a0};
 
 1025    real_type a[3*3] = {
 
 1028        b[0], b[1], b[2]/2.};
 
 1029    real_type c[3] = {b[0]/2.,b[0]+b[1]/2., b[0]+b[1]+b[2]/2.};
 
 1030    return ButcherTableau<real_type>(3,3,a,b,c);
 
 1032template<
class real_type>
 
 1033ButcherTableau<real_type> sanchez_3_4()
 
 1035    real_type a0 = 1.351207191959658;
 
 1036    real_type b[3] = {a0,1-2.*a0,a0};
 
 1037    real_type a[3*3] = {
 
 1040        b[0], b[1], b[2]/2.};
 
 1041    real_type c[3] = {b[0]/2.,b[0]+b[1]/2., b[0]+b[1]+b[2]/2.};
 
 1042    return ButcherTableau<real_type>(3,4,a,b,c);
 
 1045template<
class real_type>
 
 1046ButcherTableau<real_type> sanchez_6_5()
 
 1048    real_type b[6] = {0.5080048194000274, 1.360107162294827,
 
 1049        2.0192933591817224, 0.5685658926458251, -1.4598520495864393,
 
 1050        -1.9961191839359627 };
 
 1052    real_type c[6] = {0,0,0,0,0,0};
 
 1053    for( 
unsigned i=0; i<6; i++)
 
 1054        for( 
unsigned k=0; k<6; k++)
 
 1064    return ButcherTableau<real_type>(6,5,a,b,c);
 
 1066template<
class real_type>
 
 1067ButcherTableau<real_type> sanchez_7_6()
 
 1069    real_type b[7] = {7.8451361047755652e-01, 2.3557321335935860e-01,
 
 1070        -1.1776799841788705, 1.3151863206839107, -1.1776799841788705,
 
 1071        2.3557321335935860e-01, 7.8451361047755652e-01 };
 
 1073    real_type c[7] = {0,0,0,0,0,0,0};
 
 1074    for( 
unsigned i=0; i<7; i++)
 
 1075        for( 
unsigned k=0; k<7; k++)
 
 1085    return ButcherTableau<real_type>(7,6,a,b,c);
 
 1087template<
class real_type>
 
 1088ButcherTableau<real_type> sdirk_4_2_3()
 
 1090    real_type data[] = {
 
 1091        1./4. , 1./4. , 0 , 0 , 0 ,
 
 1092  11./28. , 1./7. , 1./4. , 0 , 0 ,
 
 1093  1./3. , 61./144. , -49./144. , 1./4. , 0 ,
 
 1094  1. , 0. , 0. , 3./4. , 1./4. ,
 
 1095  3 , 0. , 0. , 3./4. , 1./4. ,
 
 1096  2 , -61./600., 49/600., 79./100. , 23./100.
 
 1098    return ButcherTableau<real_type>( 4, data);
 
 1101template<
class real_type>
 
 1102ButcherTableau<real_type> cavaglieri_imp_4_2_3()
 
 1105    real_type b[4] = {0., 673488652607./2334033219546., 493801219040./853653026979., 184814777513./1389668723319.};
 
 1106    real_type c[4] = {0., 3375509829940./4525919076317., 272778623835./1039454778728., 1.0 };
 
 1107    real_type a[4*4] = {
 
 1109        0., 3375509829940./4525919076317., 0.,0,
 
 1110        b[0] , -11712383888607531889907./32694570495602105556248., 566138307881./912153721139., 0.,
 
 1111        b[0],b[1], b[2],b[3]};
 
 1112    real_type bt[4] = { 0., 366319659506./ 1093160237145., 270096253287./ 480244073137., 104228367309./ 1017021570740. };
 
 1126    return ButcherTableau<real_type>(4,2,3, a, b, bt, c);
 
 1128template<
class real_type>
 
 1129ButcherTableau<real_type> ark324l2sa_dirk_4_2_3()
 
 1131    real_type data[] = {
 
 1133  1767732205903./2027836641118. , 1767732205903./4055673282236. , 1767732205903./4055673282236. , 0 , 0 ,
 
 1134  3./5. , 2746238789719./10658868560708. , -640167445237./6845629431997. , 1767732205903./4055673282236. , 0 ,
 
 1135  1 , 1471266399579./7840856788654. , -4482444167858./7529755066697. , 11266239266428./11593286722821. , 1767732205903./4055673282236. ,
 
 1136  3 , 1471266399579./7840856788654. , -4482444167858./7529755066697. , 11266239266428./11593286722821. , 1767732205903./4055673282236. ,
 
 1137  2 , 2756255671327./12835298489170. , -10771552573575./22201958757719. , 9247589265047./10645013368117. , 2193209047091./5459859503100.
 
 1139    return ButcherTableau<real_type>( 4, data);
 
 1141template<
class real_type>
 
 1142ButcherTableau<real_type> cash_5_2_4()
 
 1144    real_type data[] = {
 
 1145          0.435866521508 , 0.435866521508 , 0 , 0 , 0 , 0 ,
 
 1146  -0.7 , -1.13586652150 , 0.435866521508 , 0 , 0 , 0 ,
 
 1147  0.8 , 1.08543330679 , -0.721299828287 , 0.435866521508 , 0 , 0 ,
 
 1148  0.924556761814 , 0.416349501547 , 0.190984004184 , -0.118643265417 , 0.435866521508 , 0 ,
 
 1149  1 , 0.896869652944 , 0.0182725272734 , -0.0845900310706 , -0.266418670647 , 0.435866521508 ,
 
 1150  4 , 0.896869652944 , 0.0182725272734 , -0.0845900310706 , -0.266418670647 , 0.435866521508 ,
 
 1151  2 , 1.05646216107052 , -0.0564621610705236 , 0 , 0 , 0
 
 1153    return ButcherTableau<real_type>( 5, data);
 
 1155template<
class real_type>
 
 1156ButcherTableau<real_type> cash_5_3_4()
 
 1158    real_type data[] = {
 
 1159          0.435866521508 , 0.435866521508 , 0 , 0 , 0 , 0 ,
 
 1160  -0.7 , -1.13586652150 , 0.435866521508 , 0 , 0 , 0 ,
 
 1161  0.8 , 1.08543330679 , -0.721299828287 , 0.435866521508 , 0 , 0 ,
 
 1162  0.924556761814 , 0.416349501547 , 0.190984004184 , -0.118643265417 , 0.435866521508 , 0 ,
 
 1163  1 , 0.896869652944 , 0.0182725272734 , -0.0845900310706 , -0.266418670647 , 0.435866521508 ,
 
 1164  4 , 0.896869652944 , 0.0182725272734 , -0.0845900310706 , -0.266418670647 , 0.435866521508 ,
 
 1165  3 , 0.776691932910 , 0.0297472791484 , -0.0267440239074 , 0.220304811849 , 0
 
 1167    return ButcherTableau<real_type>( 5, data);
 
 1169template<
class real_type>
 
 1170ButcherTableau<real_type> sdirk_5_3_4()
 
 1172    real_type data[] = {
 
 1173        1./4. , 1./4. , 0 , 0 , 0 , 0 ,
 
 1174  3./4. , 1./2. , 1./4. , 0 , 0 , 0 ,
 
 1175  11./20. , 17./50. , -1./25. , 1./4. , 0 , 0 ,
 
 1176  1./2. , 371./1360. , -137./2720. , 15./544. , 1./4. , 0 ,
 
 1177  1 , 25./24. , -49./48. , 125./16. , -85./12. , 1./4. ,
 
 1178  4 , 25./24. , -49./48. , 125./16. , -85./12. , 1./4. ,
 
 1179  3 , 59./48. , -17./96. , 225./32. , -85./12. , 0
 
 1181    return ButcherTableau<real_type>( 5, data);
 
 1183template<
class real_type>
 
 1184ButcherTableau<real_type> kvaerno_5_3_4()
 
 1187    real_type data[] = {
 
 1188        0 , 0 , 0 , 0 , 0 , 0 ,
 
 1189  0.871733043 , 0.4358665215  , 0.4358665215  , 0 , 0 , 0 ,
 
 1190  0.468238744853136 , 0.140737774731968 , -0.108365551378832 , 0.4358665215 , 0 , 0 ,
 
 1191  1 , 0.102399400616089 , -0.376878452267324 , 0.838612530151233 , 0.4358665215 , 0 ,
 
 1192  1 , 0.157024897860995 , 0.117330441357768 , 0.61667803039168 , -0.326899891110444 , 0.4358665215 ,
 
 1193  4 , 0.157024897860995 , 0.117330441357768 , 0.61667803039168 , -0.326899891110444 , 0.4358665215 ,
 
 1194  3 , 0.102399400616089 , -0.376878452267324 , 0.838612530151233 , 0.4358665215 , 0
 
 1196    return ButcherTableau<real_type>( 5, data);
 
 1198template<
class real_type>
 
 1199ButcherTableau<real_type> ark436l2sa_dirk_6_3_4()
 
 1201    real_type data[] = {
 
 1202        0 , 0 , 0 , 0 , 0 , 0 , 0 ,
 
 1203  1./2. , 1./4. , 1./4. , 0 , 0 , 0 , 0 ,
 
 1204  83./250. , 8611./62500. , -1743./31250. , 1./4. , 0 , 0 , 0 ,
 
 1205  31./50. , 5012029./34652500. , -654441./2922500. , 174375./388108. , 1./4. , 0 , 0 ,
 
 1206  17./20. , 15267082809./155376265600. , -71443401./120774400. , 730878875./902184768. , 2285395./8070912. , 1./4. , 0 ,
 
 1207  1 , 82889./524892. , 0 , 15625./83664. , 69875./102672. , -2260./8211. , 1./4. ,
 
 1208  4 , 82889./524892. , 0 , 15625./83664. , 69875./102672. , -2260./8211. , 1./4. ,
 
 1209  3 , 4586570599./29645900160. , 0 , 178811875./945068544. , 814220225./1159782912. , -3700637./11593932. , 61727./225920.
 
 1211    return ButcherTableau<real_type>( 6, data);
 
 1213template<
class real_type>
 
 1214ButcherTableau<real_type> kvaerno_7_4_5()
 
 1217    real_type data[] = {
 
 1218        0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 ,
 
 1219  0.52 , 0.26 , 0.26 , 0 , 0 , 0 , 0 , 0 ,
 
 1220  1.230333209967908 , 0.13 , 0.84033320996790809 , 0.26 , 0 , 0 , 0 , 0 ,
 
 1221  0.895765984350076 , 0.22371961478320505 , 0.47675532319799699 , -0.06470895363112615 , 0.26 , 0 , 0 , 0 ,
 
 1222  0.436393609858648 , 0.16648564323248321 , 0.10450018841591720 , 0.03631482272098715 , -0.13090704451073998 , 0.26 , 0 , 0 ,
 
 1223  1 , 0.13855640231268224 , 0 , -0.04245337201752043 , 0.02446657898003141 , 0.61943039072480676 , 0.26 , 0 ,
 
 1224  1 , 0.13659751177640291 , 0 , -0.05496908796538376 , -0.04118626728321046 , 0.62993304899016403 , 0.06962479448202728 , 0.26 ,
 
 1225  5 , 0.13659751177640291 , 0 , -0.05496908796538376 , -0.04118626728321046 , 0.62993304899016403 , 0.06962479448202728 , 0.26 ,
 
 1226  4 , 0.13855640231268224 , 0 , -0.04245337201752043 , 0.02446657898003141 , 0.61943039072480676 , 0.26 , 0
 
 1228    return ButcherTableau<real_type>( 7, data);
 
 1230template<
class real_type>
 
 1231ButcherTableau<real_type> ark548l2sa_dirk_8_4_5()
 
 1233    real_type data[] = {
 
 12354./9.,2./9.,2./9.,0,0,0,0,0,0,
 
 12366456083330201./8509243623797.,2366667076620./8822750406821.,2366667076620./8822750406821.,2./9.,0,0,0,0,0,
 
 12371632083962415./14158861528103.,-257962897183./4451812247028.,-257962897183./4451812247028.,128530224461./14379561246022.,2./9.,0,0,0,0,
 
 12386365430648612./17842476412687.,-486229321650./11227943450093.,-486229321650./11227943450093.,-225633144460./6633558740617.,1741320951451./6824444397158.,2./9.,0,0,0,
 
 123918./25.,621307788657./4714163060173.,621307788657./4714163060173.,-125196015625./3866852212004.,940440206406./7593089888465.,961109811699./6734810228204.,2./9.,0,0,
 
 1240191./200.,2036305566805./6583108094622.,2036305566805./6583108094622.,-3039402635899./4450598839912.,-1829510709469./31102090912115.,-286320471013./6931253422520.,8651533662697./9642993110008.,2./9.,0,
 
 12411,0,0,3517720773327./20256071687669.,4569610470461./17934693873752.,2819471173109./11655438449929.,3296210113763./10722700128969.,-1142099968913./5710983926999.,2./9.,
 
 12425,0,0,3517720773327./20256071687669.,4569610470461./17934693873752.,2819471173109./11655438449929.,3296210113763./10722700128969.,-1142099968913./5710983926999.,2./9.,
 
 12434,0,0,520639020421./8300446712847.,4550235134915./17827758688493.,1482366381361./6201654941325.,5551607622171./13911031047899.,-5266607656330./36788968843917.,1074053359553./5740751784926.
 
 1245    return ButcherTableau<real_type>( 8, data);
 
 1254template<
class real_type>
 
 1255dg::ButcherTableau<real_type> shuosher2butcher( 
unsigned stages, 
unsigned order, std::vector<real_type> alpha_v, std::vector<real_type> beta_v)
 
 1257    ShuOsherTableau<real_type> shu( stages, order, alpha_v, beta_v);
 
 1261template<
class real_type>
 
 1262ShuOsherTableau<real_type> ssprk_2_2()
 
 1264    unsigned stages=2, order = 2;
 
 1265    std::vector<double> alpha_v = {1., 0.5, 0.5};
 
 1266    std::vector<double> beta_v = {1., 0., 0.5};
 
 1267    return ShuOsherTableau<real_type>( stages, order, alpha_v, beta_v);
 
 1269template<
class real_type>
 
 1270ShuOsherTableau<real_type> ssprk_3_2()
 
 1273    unsigned stages=3, order = 2;
 
 1274    std::vector<double> alpha_v = {1., 0, 1., 1./3., 0, 2./3.};
 
 1275    std::vector<double> beta_v = {0.5, 0., 0.5, 0., 0., 1./3.};
 
 1276    return ShuOsherTableau<real_type>( stages, order, alpha_v, beta_v);
 
 1278template<
class real_type>
 
 1279ShuOsherTableau<real_type> ssprk_3_3()
 
 1282    unsigned stages=3, order = 3;
 
 1283    std::vector<double> alpha_v = {1.,3./4.,1./4.,1./3.,0.,2./3.};
 
 1284    std::vector<double> beta_v = {1., 0., 1./4.,0.,0.,2./3.};
 
 1285    return ShuOsherTableau<real_type>( stages, order, alpha_v, beta_v);
 
 1287template<
class real_type>
 
 1288ShuOsherTableau<real_type> ssprk_5_3()
 
 1292    unsigned stages=5, order = 3;
 
 1293    std::vector<double> alpha_v = {
 
 1294        1, 0, 1, 0.56656131914033, 0, 0.43343868085967, 0.09299483444413, 0.00002090369620, 0, 0.90698426185967, 0.00736132260920, 0.20127980325145, 0.00182955389682, 0, 0.78952932024253
 
 1296    std::vector<double> beta_v = {
 
 1297        0.37726891511710, 0, 0.37726891511710, 0, 0, 0.16352294089771, 0.00071997378654, 0, 0, 0.34217696850008, 0.00277719819460, 0.00001567934613, 0, 0, 0.29786487010104
 
 1299    return ShuOsherTableau<real_type>( stages, order, alpha_v, beta_v);
 
 1302template<
class real_type>
 
 1303ShuOsherTableau<real_type> ssprk_5_4()
 
 1307    unsigned stages=5, order = 4;
 
 1308    std::vector<double> alpha_v = {
 
 1309        1, 0.44437049406734, 0.55562950593266, 0.62010185138540, 0, 0.37989814861460, 0.17807995410773, 0, 0, 0.82192004589227, 0.00683325884039, 0, 0.51723167208978, 0.12759831133288, 0.34833675773694
 
 1311    std::vector<double> beta_v = {
 
 1312        0.39175222700392, 0, 0.36841059262959, 0, 0, 0.25189177424738, 0, 0, 0, 0.54497475021237, 0, 0, 0, 0.08460416338212, 0.22600748319395
 
 1314    return ShuOsherTableau<real_type>( stages, order, alpha_v, beta_v);
 
 1392inline const std::unordered_map<std::string, enum tableau_identifier> str2id{
 
 1449    auto it = str2id.find(name);
 
 1450    if( it == str2id.end())
 
 1456    for( 
auto name: str2id)
 
 1458        if( name.second == 
id)
 
 1464template<
class real_type>
 
 1470            return dg::tableau::ssprk_2_2<real_type>();
 
 1472            return dg::tableau::ssprk_3_2<real_type>();
 
 1474            return dg::tableau::ssprk_3_3<real_type>();
 
 1476            return dg::tableau::ssprk_5_3<real_type>();
 
 1478            return dg::tableau::ssprk_5_4<real_type>();
 
 1482    return ShuOsherTableau<real_type>(); 
 
 1484template<
class real_type>
 
 1489            return dg::tableau::explicit_euler_1_1<real_type>();
 
 1491            return dg::tableau::midpoint_2_2<real_type>();
 
 1493            return dg::tableau::kutta_3_3<real_type>();
 
 1495            return dg::tableau::classic_4_4<real_type>();
 
 1497            return dg::tableau::heun_euler_2_1_2<real_type>();
 
 1499            return dg::tableau::cavaglieri_exp_3_1_2<real_type>();
 
 1501            return dg::tableau::fehlberg_3_2_3<real_type>();
 
 1503            return dg::tableau::bogacki_shampine_4_2_3<real_type>();
 
 1505            return dg::tableau::cavaglieri_exp_4_2_3<real_type>();
 
 1507            return dg::tableau::ark324l2sa_erk_4_2_3<real_type>();
 
 1509            return dg::tableau::zonneveld_5_3_4<real_type>();
 
 1511            return dg::tableau::ark436l2sa_erk_6_3_4<real_type>();
 
 1513            return dg::tableau::sayfy_aburub_6_3_4<real_type>();
 
 1515            return dg::tableau::cash_karp_6_4_5<real_type>();
 
 1517            return dg::tableau::fehlberg_6_4_5<real_type>();
 
 1519            return dg::tableau::dormand_prince_7_4_5<real_type>();
 
 1521            return dg::tableau::tsitouras09_7_4_5<real_type>();
 
 1523            return dg::tableau::tsitouras11_7_4_5<real_type>();
 
 1525            return dg::tableau::ark548l2sa_erk_8_4_5<real_type>();
 
 1527            return dg::tableau::verner_9_5_6<real_type>();
 
 1529            return dg::tableau::verner_10_6_7<real_type>();
 
 1531            return dg::tableau::fehlberg_13_7_8<real_type>();
 
 1533            return dg::tableau::dormand_prince_13_7_8<real_type>();
 
 1535            return dg::tableau::feagin_17_8_10<real_type>();
 
 1537            return dg::tableau::implicit_euler_1_1<real_type>();
 
 1539            return dg::tableau::implicit_midpoint_1_2<real_type>();
 
 1541            return dg::tableau::trapezoidal_2_2<real_type>();
 
 1543            return dg::tableau::sdirk_2_1_2<real_type>();
 
 1545            return dg::tableau::cavaglieri_imp_3_1_2<real_type>();
 
 1547            return dg::tableau::kvaerno_4_2_3<real_type>();
 
 1549            return dg::tableau::sdirk_4_2_3<real_type>();
 
 1551            return dg::tableau::cavaglieri_imp_4_2_3<real_type>();
 
 1553            return dg::tableau::ark324l2sa_dirk_4_2_3<real_type>();
 
 1555            return dg::tableau::cash_5_2_4<real_type>();
 
 1557            return dg::tableau::cash_5_3_4<real_type>();
 
 1559            return dg::tableau::sdirk_5_3_4<real_type>();
 
 1561            return dg::tableau::kvaerno_5_3_4<real_type>();
 
 1563            return dg::tableau::ark436l2sa_dirk_6_3_4<real_type>();
 
 1565            return dg::tableau::kvaerno_7_4_5<real_type>();
 
 1567            return dg::tableau::ark548l2sa_dirk_8_4_5<real_type>();
 
 1569            return dg::tableau::sanchez_3_3<real_type>();
 
 1571            return dg::tableau::sanchez_3_4<real_type>();
 
 1573            return dg::tableau::sanchez_6_5<real_type>();
 
 1575            return dg::tableau::sanchez_7_6<real_type>();
 
 1577            return ButcherTableau<real_type>(shuosher_tableau<real_type>(
id));
 
 1579    return ButcherTableau<real_type>(); 
 
 1583template<
class real_type>
 
 1584ShuOsherTableau<real_type> shuosher_tableau( std::string name)
 
 1586        return shuosher_tableau<real_type>( str2tableau(name));
 
 1588template<
class real_type>
 
 1589ButcherTableau<real_type> tableau( std::string name)
 
 1591        return tableau<real_type>( str2tableau(name));
 
 1693template<
class real_type>
 
 1741template<
class real_type>
 
class intended for the use in throw statements
Definition exceptions.h:83
small class holding a stringstream
Definition exceptions.h:29
A square nxn matrix.
Definition operator.h:31
const std::vector< value_type > & data() const
access underlying data
Definition operator.h:127
#define _ping_
Definition exceptions.h:12
tableau_identifier
Identifiers for Butcher Tableaus.
Definition tableau.h:1334
@ SSPRK_2_2
SSPRK "Shu-Osher-Form"
Definition tableau.h:1382
@ CAVAGLIERI_IMPLICIT_3_1_2
Low-storage implicit/explicit Runge-Kutta schemes for the simulation of stiff high-dimensional ODE sy...
Definition tableau.h:1365
@ SSPRK_3_3
SSPRK "Shu-Osher-Form"
Definition tableau.h:1384
@ CASH_5_2_4
Cash-5-2-4
Definition tableau.h:1372
@ SSPRK_5_3
SSPRK "Shu-Osher-Form"
Definition tableau.h:1385
@ TSITOURAS11_7_4_5
Tsitouras 5(4) method from 2011 (fsal), Further improves Tsitouras09 (Note that in the paper b-bt is ...
Definition tableau.h:1353
@ KVAERNO_4_2_3
Kvaerno-4-2-3
Definition tableau.h:1367
@ DORMAND_PRINCE_13_7_8
[Hairer, Noersett, Wanner, Solving ordinary differential Equations I, 1987]
Definition tableau.h:1358
@ VERNER_10_6_7
Verner-10-6-7
Definition tableau.h:1356
@ SAYFY_ABURUB_6_3_4
Sayfy-Aburub-6-3-4
Definition tableau.h:1348
@ CASH_5_3_4
Cash-5-3-4
Definition tableau.h:1373
@ MIDPOINT_2_2
Midpoint-2-2
Definition tableau.h:1336
@ SANCHEZ_6_5
Sanchez-6-5
Definition tableau.h:1378
@ SSPRK_5_4
SSPRK "Shu-Osher-Form"
Definition tableau.h:1386
@ EXPLICIT_EULER_1_1
Euler
Definition tableau.h:1335
@ CAVAGLIERI_4_2_3
Low-storage implicit/explicit Runge-Kutta schemes for the simulation of stiff high-dimensional ODE sy...
Definition tableau.h:1344
@ IMPLICIT_EULER_1_1
Euler (implicit)
Definition tableau.h:1361
@ DORMAND_PRINCE_7_4_5
Dormand-Prince-7-4-5 (fsal)
Definition tableau.h:1351
@ SANCHEZ_3_3
Sanchez-3-3
Definition tableau.h:1366
@ ARK436L2SA_ERK_6_3_4
ARK-6-3-4 (explicit)
Definition tableau.h:1347
@ SSPRK_3_2
SSPRK "Shu-Osher-Form"
Definition tableau.h:1383
@ ARK324L2SA_DIRK_4_2_3
ARK-4-2-3 (implicit)
Definition tableau.h:1370
@ FEHLBERG_13_7_8
Fehlberg-13-7-8
Definition tableau.h:1357
@ SDIRK_2_1_2
generic 2nd order A and L-stable
Definition tableau.h:1364
@ KVAERNO_5_3_4
Kvaerno-5-3-4
Definition tableau.h:1375
@ FEHLBERG_3_2_3
The original method uses the embedding as the solution [Hairer, Noersett, Wanner, Solving ordinary di...
Definition tableau.h:1342
@ CAVAGLIERI_3_1_2
Low-storage implicit/explicit Runge-Kutta schemes for the simulation of stiff high-dimensional ODE sy...
Definition tableau.h:1341
@ CASH_KARP_6_4_5
Cash-Karp-6-4-5
Definition tableau.h:1349
@ SANCHEZ_7_6
Sanchez-7-6
Definition tableau.h:1380
@ CAVAGLIERI_IMPLICIT_4_2_3
Low-storage implicit/explicit Runge-Kutta schemes for the simulation of stiff high-dimensional ODE sy...
Definition tableau.h:1369
@ FEAGIN_17_8_10
Feagin-17-8-10
Definition tableau.h:1359
@ CLASSIC_4_4
Runge-Kutta-4-4
Definition tableau.h:1338
@ HEUN_EULER_2_1_2
Heun-Euler-2-1-2
Definition tableau.h:1340
@ IMPLICIT_MIDPOINT_1_2
implicit Midpoint
Definition tableau.h:1362
@ ARK436L2SA_DIRK_6_3_4
ARK-6-3-4 (implicit)
Definition tableau.h:1376
@ BOGACKI_SHAMPINE_4_2_3
Bogacki-Shampine-4-2-3 (fsal)
Definition tableau.h:1343
@ SDIRK_5_3_4
SDIRK-5-3-4
Definition tableau.h:1374
@ KVAERNO_7_4_5
Kvaerno-7-4-5
Definition tableau.h:1377
@ TSITOURAS09_7_4_5
Tsitouras 5(4) method from 2009 (fsal), The default method in Julia
Definition tableau.h:1352
@ ARK548L2SA_DIRK_8_4_5
Kennedy and Carpenter (2019) Optimum ARK_2 method (implicit part)
Definition tableau.h:1379
@ ZONNEVELD_5_3_4
Zonneveld-5-3-4
Definition tableau.h:1346
@ ARK324L2SA_ERK_4_2_3
ARK-4-2-3 (explicit)
Definition tableau.h:1345
@ SANCHEZ_3_4
Sanchez-3-4
Definition tableau.h:1371
@ ARK548L2SA_ERK_8_4_5
Kennedy and Carpenter (2019) Optimum ARK_2 method (explicit part)
Definition tableau.h:1354
@ FEHLBERG_6_4_5
Fehlberg-6-4-5
Definition tableau.h:1350
@ KUTTA_3_3
Kutta-3-3
Definition tableau.h:1337
@ VERNER_9_5_6
Verner-9-5-6 (fsal)
Definition tableau.h:1355
@ TRAPEZOIDAL_2_2
Crank-Nicolson method
Definition tableau.h:1363
@ SDIRK_4_2_3
Cameron2002
Definition tableau.h:1368
This is the namespace for all functions and classes defined and used by the discontinuous Galerkin li...
Manage coefficients of a (extended) Butcher tableau.
Definition tableau.h:33
unsigned order() const
global order of accuracy for the method represented by b
Definition tableau.h:132
real_type c(unsigned i) const
Read the c_i coefficients.
Definition tableau.h:99
real_type bt(unsigned j) const
Read the embedded bt_j coefficients.
Definition tableau.h:115
bool isFsal() const
Definition tableau.h:153
unsigned embedded_order() const
global order of accuracy for the embedded method represented by bt
Definition tableau.h:136
bool isEmbedded() const
True if the method has an embedding.
Definition tableau.h:140
real_type a(unsigned i, unsigned j) const
Read the a_ij coefficients.
Definition tableau.h:91
ButcherTableau(unsigned s, unsigned order, const real_type *a, const real_type *b, const real_type *c)
Construct a classic non-embedded tableau.
Definition tableau.h:46
real_type d(unsigned j) const
Return the coefficients for the error estimate Equivalent to b(j)-bt(j)
Definition tableau.h:124
real_type b(unsigned j) const
Read the b_j coefficients.
Definition tableau.h:107
bool isImplicit() const
True if an element on or above the diagonal in a is non-zero.
Definition tableau.h:144
unsigned num_stages() const
The number of stages s.
Definition tableau.h:128
ButcherTableau()=default
No memory allocation.
ButcherTableau(unsigned s, unsigned embedded_order, unsigned order, const real_type *a, const real_type *b, const real_type *bt, const real_type *c)
Construct an embedded tableau.
Definition tableau.h:59
real_type value_type
Definition tableau.h:34
ButcherTableau(unsigned s, real_type *data)
Construct from ARKode standard format.
Definition tableau.h:68
Convert identifiers to their corresponding dg::ButcherTableau.
Definition tableau.h:1695
ConvertsToButcherTableau(enum tableau_identifier id)
Create ButcherTableau from dg::tableau_identifier.
Definition tableau.h:1706
real_type value_type
Definition tableau.h:1696
ConvertsToButcherTableau(ButcherTableau< real_type > tableau)
Definition tableau.h:1699
ConvertsToButcherTableau(std::string name)
Create ButcherTableau from its name (very useful)
Definition tableau.h:1717
ConvertsToButcherTableau(const char *name)
Create ButcherTableau from its name (very useful)
Definition tableau.h:1719
Convert identifiers to their corresponding dg::ShuOsherTableau.
Definition tableau.h:1743
ConvertsToShuOsherTableau(std::string name)
Create ShuOsherTableau from its name (very useful)
Definition tableau.h:1765
real_type value_type
Definition tableau.h:1744
ConvertsToShuOsherTableau(enum tableau_identifier id)
Create ShuOsherTableau from dg::tableau_identifier.
Definition tableau.h:1754
ConvertsToShuOsherTableau(ShuOsherTableau< real_type > tableau)
Definition tableau.h:1747
ConvertsToShuOsherTableau(const char *name)
Create ShuOsherTableau from its name (very useful)
Definition tableau.h:1767
Manage coefficients in Shu-Osher form.
Definition tableau.h:181
real_type beta(unsigned i, unsigned j)
Read the beta_ij coefficients.
Definition tableau.h:257
real_type value_type
Definition tableau.h:182
ShuOsherTableau()=default
No memory allocation.
unsigned num_stages() const
The number of stages s.
Definition tableau.h:259
unsigned order() const
global order of accuracy for the method
Definition tableau.h:263
real_type alpha(unsigned i, unsigned j)
Read the alpha_ij coefficients.
Definition tableau.h:250
ShuOsherTableau(unsigned stages, unsigned order, const std::vector< real_type > &alpha_v, const std::vector< real_type > &beta_v)
Construct a non-embedded explicit tableau.
Definition tableau.h:191