Discontinuous Galerkin Library
#include "dg/algorithm.h"
multistep_tableau.h
Go to the documentation of this file.
1#pragma once
2
3#include <vector>
4#include <string>
5#include <unordered_map>
6
7namespace dg{
32template<class real_type>
34{
35 using value_type = real_type;
46 MultistepTableau( unsigned steps, unsigned order, const
47 std::vector<real_type>& a_v, const std::vector<real_type>& b_v,
48 const std::vector<real_type>& c_v): m_steps(steps), m_order(order),
49 m_a(a_v), m_b(b_v), m_c(c_v){
50 if( m_c.empty())
51 m_c.assign( steps+1, 0);
52 if( m_b.empty())
53 m_b.assign( steps, 0);
54 }
55
61 real_type a( unsigned i){ return m_a[i];}
67 real_type ex( unsigned i){ return m_b[i];}
73 real_type im( unsigned i){ return m_c[i];}
75 unsigned steps() const {
76 return m_steps;
77 }
79 unsigned order() const {
80 return m_order;
81 }
83 bool isExplicit() const{
84 for( unsigned i=0; i<m_steps; i++)
85 if( m_b[i]!=0)
86 return true;
87 return false;
88 }
90 bool isImplicit() const{
91 for( unsigned i=0; i<m_steps+1; i++)
92 if( m_c[i]!=0)
93 return true;
94 return false;
95 }
96 private:
97 unsigned m_steps, m_order;
98 std::vector<real_type> m_a, m_b, m_c;
99};
100
102namespace tableau
103{
104template<class real_type>
105MultistepTableau<real_type> imex_euler_1_1()
106{
107 unsigned steps = 1, order = 1;
108 std::vector<real_type> a(steps,0), b(steps, 0), c(steps+1,0);
109 a[0] = b[0] = c[0] = 1;
110 return MultistepTableau<real_type>( steps, order, a, b, c);
111}
112template<class real_type>
113MultistepTableau<real_type> imex_adams_2_2()
114{
115 // 2nd order AB method extended to ImEx
116 // C = 4/9 ~ 0.444 D = 0.33
117 unsigned steps = 2, order = 2;
118 std::vector<real_type> a(steps,0), b(steps, 0), c(steps+1,0);
119 a[0] = 1.;
120 b[0] = 3./2.;
121 b[1] = -1./2.;
122 c[0] = 9./16.;
123 c[1] = 3./8.;
124 c[2] = 1./16.;
125 return MultistepTableau<real_type>( steps, order, a, b, c);
126}
127template<class real_type>
128MultistepTableau<real_type> imex_adams_3_3()
129{
130 // 3rd order AB method extended to ImEx
131 // C ~ 0.16, D = 0.67
132 unsigned steps = 3, order = 3;
133 std::vector<real_type> a(steps,0), b(steps, 0), c(steps+1,0);
134 a[0] = 1.;
135 b[0] = 23./12.;
136 b[1] = -4./3.;
137 b[2] = 5./12.;
138 c[0] = 4661./10000.;
139 c[1] = 15551./30000.;
140 c[2] = 1949/30000;
141 c[3] = -1483./30000.;
142 return MultistepTableau<real_type>( steps, order, a, b, c);
143}
144template<class real_type>
145MultistepTableau<real_type> imex_koto_2_2()
146{
147 // stabilized 2nd order method
148 unsigned steps = 2, order = 2;
149 std::vector<real_type> am(steps,0), bm(steps, 0), cm(steps+1,0);
150 std::vector<real_type> ap(steps+1,0), bp(steps+1, 0), cp(steps+1,0);
151 //real_type a = 1.5, b = 1.5;
152 real_type a = 20., b = 20.;
153 ap[0] = a;
154 ap[1] = 1-2.*a;
155 ap[2] = a-1;
156 cp[0] = b;
157 cp[1] = 0.5+a-2*b;
158 cp[2] = 0.5-a+b;
159 bp[1] = 0.5+a;
160 bp[2] = 0.5-a;
161 am[0] = -ap[1]/a, am[1] = -ap[2]/a;
162 bm[0] = bp[1]/a, bm[1] = bp[2]/a;
163 cm[0] = cp[0]/a, cm[1] = cp[1]/a, cm[2] = cp[2]/a;
164 return MultistepTableau<real_type>( steps, order, am, bm, cm);
165}
166
167template<class real_type>
168MultistepTableau<real_type> imex_bdf(unsigned steps)
169{
170 unsigned order = steps;
171 std::vector<real_type> a(steps,0), b(steps, 0), c(steps+1,0);
172 switch( steps)
173 {
174 case( 2):
175 // C = 5/8 ~ 0.625 D = 0
176 a[0] = 4./3.; b[0] = 4./3.;
177 a[1] = -1./3.; b[1] = -2./3.;
178 c[0] = 2./3.;
179 break;
180 case(3):
181 //The Karniadakis method
182 // C = 7/18 ~ 0.39 D = 0
183 a[0] = 18./11.; b[0] = 18./11.;
184 a[1] = -9./11.; b[1] = -18./11.;
185 a[2] = 2./11.; b[2] = 6./11.;
186 c[0] = 6./11.;
187 break;
188 case(4):
189 // C = 7/32 ~ 0.22 , D = 0
190 a[0] = 48./25.; b[0] = 48./25.;
191 a[1] = -36./25.; b[1] = -72./25.;
192 a[2] = 16./25.; b[2] = 48./25.;
193 a[3] = - 3./25.; b[3] = -12./25.;
194 c[0] = 12./25.;
195 break;
196 case(5):
197 // C = 0.0867 , D = 0
198 a[0] = 300./137.; b[0] = 300./137.;
199 a[1] = -300./137.; b[1] = -600./137.;
200 a[2] = 200./137.; b[2] = 600./137.;
201 a[3] = -75./137.; b[3] = -300./137.;
202 a[4] = 12./137.; b[4] = 60./137.;
203 c[0] = 60./137.;
204 break;
205 case (6):
206 a = {360./147.,-450./147.,400./147.,-225./147.,72./147.,-10./147.};
207 b = {360./147.,-900./147.,1200./147.,-900./147.,360./147.,-60./147.};
208 c[0] = 60./147.;
209 break;
210 }
211 return MultistepTableau<real_type>( steps, order, a, b, c);
212}
213
214template<class real_type>
215MultistepTableau<real_type> imex_tvb(unsigned steps)
216{
217 unsigned order = steps;
218 std::vector<real_type> a(steps,0), b(steps, 0), c(steps+1,0);
219 switch( steps)
220 {
221 case(3):
222 // C = 0.536 D = 0.639
223 a[0] = 3909./2048.; b[0] = 18463./12288.;
224 a[1] = -1367./1024.; b[1] = -1271./768.;
225 a[2] = 873./2048.; b[2] = 8233./12288.;
226 c[0] = 1089./2048.;
227 c[1] = -1139./12288.;
228 c[2] = -367./6144.;
229 c[3] = 1699./12288.;
230 break;
231 case(4):
232 // C = 0.458 , D = 0.685
233 a[0] = 21531./8192.; b[0] = 13261./8192.;
234 a[1] = -22753./8192.; b[1] = -75029./24576.;
235 a[2] = 12245./8192.; b[2] = 54799./24576.;
236 a[3] = -2831./8192. ; b[3] = -15245./24576.;
237 c[0] = 4207./8192.;
238 c[1] = -3567./8192.;
239 c[2] = 697./24576.;
240 c[3] = 4315./24576.;
241 c[4] = -41./384.;
242 break;
243 case(5):
244 // C = 0.376 , D = 0.709
245 a[0] = 13553./4096.; b[0] = 10306951./5898240.;
246 a[1] = -38121./8192.; b[1] = -13656497./2949120.;
247 a[2] = 7315./2048.; b[2] = 1249949./245760.;
248 a[3] = -6161/4096. ; b[3] = -7937687./2949120.;
249 a[4] = 2269./8192.; b[4] = 3387361./5898240.;
250 c[0] = 4007./8192.;
251 c[1] = -4118249./5898240.;
252 c[2] = 768703./2949120.;
253 c[3] = 47849./245760.;
254 c[4] = -725087./2949120.;
255 c[5] = 502321./5898240.;
256 break;
257 }
258 return MultistepTableau<real_type>( steps, order, a, b, c);
259}
260
261template<class real_type>
262MultistepTableau<real_type> ab(unsigned order)
263{
264 unsigned steps = order;
265 std::vector<real_type> a(steps,0), b(steps, 0), c(steps+1,0);
266 a[0]= 1.;
267 switch (order){
268 case 1: b = {1}; break;
269 case 2: b = {1.5, -0.5}; break;
270 case 3: b = { 23./12., -4./3., 5./12.}; break;
271 case 4: b = {55./24., -59./24., 37./24., -3./8.}; break;
272 case 5: b = { 1901./720., -1387./360., 109./30., -637./360., 251./720.}; break;
273 default: throw dg::Error(dg::Message()<<"Order "<<order<<" not implemented in AdamsBashforth!");
274 }
275 return MultistepTableau<real_type>( steps, order, a, b, c);
276}
277
278template<class real_type>
279MultistepTableau<real_type> tvb(unsigned steps)
280{
281 unsigned order = steps;
282 std::vector<real_type> a(steps,0), b(steps, 0), c(steps+1,0);
283 switch (steps){
284 case 1:
285 a = {1.};
286 b = {1.}; break;
287 case 2:
288 a = {4./3., -1./3.};
289 b = {4./3., -2./3.}; break; //CLM = 0.5
290 case 3: //CLM = 0.54...
291 a[0] = 1.908535476882378; b[0] = 1.502575553858997;
292 a[1] = -1.334951446162515; b[1] = -1.654746338401493;
293 a[2] = 0.426415969280137; b[2] = 0.670051276940255;
294 break;
295 case 4: //CLM = 0.45...
296 a[0] = 2.628241000683208; b[0] = 1.618795874276609;
297 a[1] = -2.777506277494861; b[1] = -3.052866947601049;
298 a[2] = 1.494730011212510; b[2] = 2.229909318681302;
299 a[3] = -0.345464734400857; b[3] = -0.620278703629274;
300 break;
301 case 5: //CLM = 0.37...
302 a[0] = 3.308891758551210; b[0] = 1.747442076919292;
303 a[1] = -4.653490937946655; b[1] = -4.630745565661800;
304 a[2] = 3.571762873789854; b[2] = 5.086056171401077;
305 a[3] = -1.504199914126327; b[3] = -2.691494591660196;
306 a[4] = 0.277036219731918; b[4] = 0.574321855183372;
307 break;
308 case 6: //CLM = 0.32...
309 a[0] = 4.113382628475685; b[0] = 1.825457674048542;
310 a[1] = -7.345730559324184; b[1] = -6.414174588309508;
311 a[2] = 7.393648314992094; b[2] = 9.591671249204753;
312 a[3] = -4.455158576186636; b[3] = -7.583521888026967;
313 a[4] = 1.523638279938299; b[4] = 3.147082225022105;
314 a[5] = -0.229780087895259; b[5] = -0.544771649561925;
315 break;
316 default: throw dg::Error(dg::Message()<<"Order "<<steps<<" not implemented in TVB scheme!");
317 }
318 return MultistepTableau<real_type>( steps, order, a, b, c);
319}
320template<class real_type>
321MultistepTableau<real_type> ssp(unsigned steps)
322{
323 std::vector<real_type> a(steps,0), b(steps, 0), c(steps+1,0);
324 unsigned order = 0;
325 switch (steps){
326 case 1: order = 1;
327 a = {1.};
328 b = {1.}; break;
329 case 2: order = 2;
330 a = {4./5., 1./5.};
331 b = {8./5., -2./5.}; break; //CLM = 0.5 ... ,order 2
332 case 3: order = 2;
333 a = { 3./4., 0., 1./4.};
334 b = { 3./2., 0., 0. }; break; //CLM = 0.5..., order 2
335 case 4: order = 2;
336 a = {8./9., 0., 0., 1./9.};
337 b = {4./3., 0., 0., 0.}; break; //CLM = 0.66..., order 2
338 case 5: order = 3;
339 a = {25./32., 0., 0., 0., 7./32.};
340 b = {25./16.,0.,0.,0.,5./16.}; break; //CLM 0.5, order 3
341 case 6: order = 3;
342 a = {108./125.,0.,0.,0.,0.,17./125.};
343 b = {36./25.,0.,0.,0.,0.,6./25.}; break; //CLM 0.567, order 3
344 default: throw dg::Error(dg::Message()<<"Stage "<<steps<<" not implemented in SSP scheme!");
345 }
346 return MultistepTableau<real_type>( steps, order, a, b, c);
347}
348
349}//namespace tableau
351
364 //IMEX methods
377 // Explicit methods
401 // implicit methods
408};
409
411namespace create{
412
413static std::unordered_map<std::string, enum multistep_identifier> str2lmsid{
414 //Implicit-Explicit methods
415 {"Euler", IMEX_EULER_1_1},
416 {"Euler-1-1", IMEX_EULER_1_1},
417 {"ImEx-Adams-2-2", IMEX_ADAMS_2_2},
418 {"ImEx-Adams-3-3", IMEX_ADAMS_3_3},
419 {"ImEx-Koto-2-2", IMEX_KOTO_2_2},
420 {"ImEx-BDF-2-2", IMEX_BDF_2_2},
421 {"ImEx-BDF-3-3", IMEX_BDF_3_3},
422 {"Karniadakis", IMEX_BDF_3_3},
423 {"ImEx-BDF-4-4", IMEX_BDF_4_4},
424 {"ImEx-BDF-5-5", IMEX_BDF_5_5},
425 {"ImEx-BDF-6-6", IMEX_BDF_6_6},
426 {"ImEx-TVB-3-3", IMEX_TVB_3_3},
427 {"ImEx-TVB-4-4", IMEX_TVB_4_4},
428 {"ImEx-TVB-5-5", IMEX_TVB_5_5},
429 //Explicit methods
430 {"AB-1-1", AB_1_1},
431 {"AB-2-2", AB_2_2},
432 {"AB-3-3", AB_3_3},
433 {"AB-4-4", AB_4_4},
434 {"AB-5-5", AB_5_5},
435 {"eBDF-1-1", eBDF_1_1},
436 {"eBDF-2-2", eBDF_2_2},
437 {"eBDF-3-3", eBDF_3_3},
438 {"eBDF-4-4", eBDF_4_4},
439 {"eBDF-5-5", eBDF_5_5},
440 {"eBDF-6-6", eBDF_6_6},
441 {"TVB-1-1", TVB_1_1},
442 {"TVB-2-2", TVB_2_2},
443 {"TVB-3-3", TVB_3_3},
444 {"TVB-4-4", TVB_4_4},
445 {"TVB-5-5", TVB_5_5},
446 {"TVB-6-6", TVB_6_6},
447 {"SSP-1-1", SSP_1_1},
448 {"SSP-2-2", SSP_2_2},
449 {"SSP-3-2", SSP_3_2},
450 {"SSP-4-2", SSP_4_2},
451 {"SSP-5-3", SSP_5_3},
452 {"SSP-6-3", SSP_6_3},
453 // implicit methods
454 {"BDF-1-1", BDF_1_1},
455 {"BDF-2-2", BDF_2_2},
456 {"BDF-3-3", BDF_3_3},
457 {"BDF-4-4", BDF_4_4},
458 {"BDF-5-5", BDF_5_5},
459 {"BDF-6-6", BDF_6_6},
460};
461static inline enum multistep_identifier str2lmstableau( std::string name)
462{
463 if( str2lmsid.find(name) == str2lmsid.end())
464 throw dg::Error(dg::Message(_ping_)<<"Multistep coefficients for "<<name<<" not found!");
465 else
466 return str2lmsid[name];
467}
468static inline std::string lmstableau2str( enum multistep_identifier id)
469{
470 for( auto name: str2lmsid)
471 {
472 if( name.second == id)
473 return name.first;
474 }
475 throw dg::Error(dg::Message(_ping_)<<"Tableau conversion failed!");
476}
477
478template<class real_type>
479MultistepTableau<real_type> lmstableau( enum multistep_identifier id)
480{
481 switch(id){
482 case IMEX_EULER_1_1:
483 return dg::tableau::imex_euler_1_1<real_type>();
484 case IMEX_ADAMS_2_2:
485 return dg::tableau::imex_adams_2_2<real_type>();
486 case IMEX_ADAMS_3_3:
487 return dg::tableau::imex_adams_3_3<real_type>();
488 case IMEX_KOTO_2_2:
489 return dg::tableau::imex_koto_2_2<real_type>();
490 case IMEX_BDF_2_2:
491 return dg::tableau::imex_bdf<real_type>(2);
492 case IMEX_BDF_3_3:
493 return dg::tableau::imex_bdf<real_type>(3);
494 case IMEX_BDF_4_4:
495 return dg::tableau::imex_bdf<real_type>(4);
496 case IMEX_BDF_5_5:
497 return dg::tableau::imex_bdf<real_type>(5);
498 case IMEX_BDF_6_6:
499 return dg::tableau::imex_bdf<real_type>(6);
500 case IMEX_TVB_3_3:
501 return dg::tableau::imex_tvb<real_type>(3);
502 case IMEX_TVB_4_4:
503 return dg::tableau::imex_tvb<real_type>(4);
504 case IMEX_TVB_5_5:
505 return dg::tableau::imex_tvb<real_type>(5);
506 case AB_1_1:
507 return dg::tableau::ab<real_type>(1);
508 case AB_2_2:
509 return dg::tableau::ab<real_type>(2);
510 case AB_3_3:
511 return dg::tableau::ab<real_type>(3);
512 case AB_4_4:
513 return dg::tableau::ab<real_type>(4);
514 case AB_5_5:
515 return dg::tableau::ab<real_type>(5);
516 case eBDF_1_1:
517 return dg::tableau::imex_euler_1_1<real_type>();
518 case eBDF_2_2:
519 return dg::tableau::imex_bdf<real_type>(2);
520 case eBDF_3_3:
521 return dg::tableau::imex_bdf<real_type>(3);
522 case eBDF_4_4:
523 return dg::tableau::imex_bdf<real_type>(4);
524 case eBDF_5_5:
525 return dg::tableau::imex_bdf<real_type>(5);
526 case eBDF_6_6:
527 return dg::tableau::imex_bdf<real_type>(6);
528 case TVB_1_1:
529 return dg::tableau::imex_euler_1_1<real_type>();
530 case TVB_2_2:
531 return dg::tableau::tvb<real_type>(2);
532 case TVB_3_3:
533 return dg::tableau::tvb<real_type>(3);
534 case TVB_4_4:
535 return dg::tableau::tvb<real_type>(4);
536 case TVB_5_5:
537 return dg::tableau::tvb<real_type>(5);
538 case TVB_6_6:
539 return dg::tableau::tvb<real_type>(6);
540 case SSP_1_1:
541 return dg::tableau::ssp<real_type>(1);
542 case SSP_2_2:
543 return dg::tableau::ssp<real_type>(2);
544 case SSP_3_2:
545 return dg::tableau::ssp<real_type>(3);
546 case SSP_4_2:
547 return dg::tableau::ssp<real_type>(4);
548 case SSP_5_3:
549 return dg::tableau::ssp<real_type>(5);
550 case SSP_6_3:
551 return dg::tableau::ssp<real_type>(6);
552 case BDF_1_1:
553 return dg::tableau::imex_euler_1_1<real_type>();
554 case BDF_2_2:
555 return dg::tableau::imex_bdf<real_type>(2);
556 case BDF_3_3:
557 return dg::tableau::imex_bdf<real_type>(3);
558 case BDF_4_4:
559 return dg::tableau::imex_bdf<real_type>(4);
560 case BDF_5_5:
561 return dg::tableau::imex_bdf<real_type>(5);
562 case BDF_6_6:
563 return dg::tableau::imex_bdf<real_type>(6);
564 }
565 return MultistepTableau<real_type>(); //avoid compiler warning
566}
567
568
569template<class real_type>
570MultistepTableau<real_type> lmstableau( std::string name)
571{
572 return lmstableau<real_type>( str2lmstableau(name));
573}
574
575}//namespace create
577
649template<class real_type>
651{
652 using value_type = real_type;
656
662 ConvertsToMultistepTableau( enum tableau_identifier id):m_t( dg::create::lmstableau<real_type>(id)){}
673 ConvertsToMultistepTableau( std::string name):m_t(
674 dg::create::lmstableau<real_type>(name)){}
675
677 ConvertsToMultistepTableau( const char* name):m_t(
678 dg::create::lmstableau<real_type>(std::string(name))){}
683 return m_t;
684 }
685 private:
687};
688
689}//namespace dg
class intended for the use in throw statements
Definition: exceptions.h:83
small class holding a stringstream
Definition: exceptions.h:29
#define _ping_
Definition: exceptions.h:12
tableau_identifier
Identifiers for Butcher Tableaus.
Definition: tableau.h:1328
multistep_identifier
Identifiers for Multistep Tableaus.
Definition: multistep_tableau.h:363
@ AB_5_5
Definition: multistep_tableau.h:382
@ IMEX_BDF_6_6
Definition: multistep_tableau.h:373
@ IMEX_TVB_5_5
Definition: multistep_tableau.h:376
@ BDF_6_6
Definition: multistep_tableau.h:407
@ SSP_2_2
Definition: multistep_tableau.h:396
@ eBDF_4_4
Definition: multistep_tableau.h:386
@ BDF_2_2
Definition: multistep_tableau.h:403
@ BDF_5_5
Definition: multistep_tableau.h:406
@ SSP_3_2
Definition: multistep_tableau.h:397
@ TVB_4_4
Definition: multistep_tableau.h:392
@ IMEX_KOTO_2_2
Definition: multistep_tableau.h:368
@ SSP_4_2
Definition: multistep_tableau.h:398
@ eBDF_5_5
Definition: multistep_tableau.h:387
@ IMEX_ADAMS_3_3
Definition: multistep_tableau.h:367
@ TVB_1_1
Definition: multistep_tableau.h:389
@ eBDF_1_1
Definition: multistep_tableau.h:383
@ eBDF_3_3
Definition: multistep_tableau.h:385
@ TVB_3_3
Definition: multistep_tableau.h:391
@ SSP_1_1
Definition: multistep_tableau.h:395
@ IMEX_TVB_3_3
Definition: multistep_tableau.h:374
@ AB_4_4
Definition: multistep_tableau.h:381
@ eBDF_6_6
Definition: multistep_tableau.h:388
@ BDF_3_3
Definition: multistep_tableau.h:404
@ IMEX_EULER_1_1
Definition: multistep_tableau.h:365
@ AB_3_3
Definition: multistep_tableau.h:380
@ AB_2_2
Definition: multistep_tableau.h:379
@ IMEX_BDF_5_5
Definition: multistep_tableau.h:372
@ IMEX_ADAMS_2_2
Definition: multistep_tableau.h:366
@ BDF_4_4
Definition: multistep_tableau.h:405
@ IMEX_TVB_4_4
Definition: multistep_tableau.h:375
@ SSP_5_3
Definition: multistep_tableau.h:399
@ AB_1_1
Definition: multistep_tableau.h:378
@ eBDF_2_2
Definition: multistep_tableau.h:384
@ BDF_1_1
Definition: multistep_tableau.h:402
@ TVB_2_2
Definition: multistep_tableau.h:390
@ SSP_6_3
Definition: multistep_tableau.h:400
@ TVB_5_5
Definition: multistep_tableau.h:393
@ IMEX_BDF_2_2
Definition: multistep_tableau.h:369
@ TVB_6_6
Definition: multistep_tableau.h:394
@ IMEX_BDF_3_3
Definition: multistep_tableau.h:370
@ IMEX_BDF_4_4
Definition: multistep_tableau.h:371
This is the namespace for all functions and classes defined and used by the discontinuous Galerkin li...
Convert identifiers to their corresponding dg::MultistepTableau.
Definition: multistep_tableau.h:651
ConvertsToMultistepTableau(enum tableau_identifier id)
Create MultistepTableau from dg::tableau_identifier.
Definition: multistep_tableau.h:662
ConvertsToMultistepTableau(std::string name)
Create MultistepTableau from its name (very useful)
Definition: multistep_tableau.h:673
real_type value_type
Definition: multistep_tableau.h:652
ConvertsToMultistepTableau(const char *name)
Create MultistepTableau from its name (very useful)
Definition: multistep_tableau.h:677
ConvertsToMultistepTableau(MultistepTableau< real_type > tableau)
Definition: multistep_tableau.h:655
Manage coefficients of Multistep methods.
Definition: multistep_tableau.h:34
unsigned steps() const
The number of stages s.
Definition: multistep_tableau.h:75
bool isImplicit() const
True if any of the implicit coefficients c_i are non-zero.
Definition: multistep_tableau.h:90
real_type a(unsigned i)
Read the a_i coefficients.
Definition: multistep_tableau.h:61
real_type ex(unsigned i)
Read the explicit (b_i) coefficients.
Definition: multistep_tableau.h:67
unsigned order() const
global order of accuracy for the method
Definition: multistep_tableau.h:79
real_type im(unsigned i)
Read the implicit (c_i) coefficients.
Definition: multistep_tableau.h:73
MultistepTableau()
No memory allocation.
Definition: multistep_tableau.h:37
real_type value_type
Definition: multistep_tableau.h:35
MultistepTableau(unsigned steps, unsigned order, const std::vector< real_type > &a_v, const std::vector< real_type > &b_v, const std::vector< real_type > &c_v)
Construct a tableau.
Definition: multistep_tableau.h:46
bool isExplicit() const
True if any of the explicit coefficients b_i are non-zero.
Definition: multistep_tableau.h:83