Nektar++
IMEXdirkTimeIntegrationSchemes.h
Go to the documentation of this file.
1 ///////////////////////////////////////////////////////////////////////////////
2 //
3 // File: IMEXdirkTimeIntegrationSchemes.h
4 //
5 // For more information, please see: http://www.nektar.info
6 //
7 // The MIT License
8 //
9 // Copyright (c) 2018 Division of Applied Mathematics, Brown University (USA),
10 // Department of Aeronautics, Imperial College London (UK), and Scientific
11 // Computing and Imaging Institute, University of Utah (USA).
12 //
13 // License for the specific language governing rights and limitations under
14 // Permission is hereby granted, free of charge, to any person obtaining a
15 // copy of this software and associated documentation files (the "Software"),
16 // to deal in the Software without restriction, including without limitation
17 // the rights to use, copy, modify, merge, publish, distribute, sublicense,
18 // and/or sell copies of the Software, and to permit persons to whom the
19 // Software is furnished to do so, subject to the following conditions:
20 //
21 // The above copyright notice and this permission notice shall be included
22 // in all copies or substantial portions of the Software.
23 //
24 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
25 // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
26 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
27 // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
28 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
29 // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
30 // DEALINGS IN THE SOFTWARE.
31 //
32 // Description: Combined header file for all IMEX Dirk based time integration
33 // schemes.
34 //
35 ///////////////////////////////////////////////////////////////////////////////
36 
37 // Note : If adding a new integrator be sure to register the
38 // integrator with the Time Integration Scheme Facatory in
39 // SchemeInitializor.cpp.
40 
41 #ifndef NEKTAR_LIB_UTILITIES_TIME_INTEGRATION_IMEX_DIRK_TIME_INTEGRATION_SCHEME
42 #define NEKTAR_LIB_UTILITIES_TIME_INTEGRATION_IMEX_DIRK_TIME_INTEGRATION_SCHEME
43 
44 #define LUE LIB_UTILITIES_EXPORT
45 
48 
49 namespace Nektar
50 {
51 namespace LibUtilities
52 {
53 
54 ///////////////////////////////////////////////////////////////////////////////
55 // IMEXDirk-(s, sigma, p), where s is the number of stages of the
56 // implicit scheme, sigma is the number of stages of the explicit
57 // scheme and p is the combined order of the scheme.
58 
60 {
61 public:
62  IMEXdirkTimeIntegrationScheme(std::string variant, unsigned int order,
63  std::vector<NekDouble> freeParams)
64  : TimeIntegrationSchemeGLM(variant, order, freeParams)
65  {
66  ASSERTL1(freeParams.size() == 2,
67  "IMEX DIRK Time integration scheme invalid number "
68  "of free parameters, expected two "
69  "<implicit stages, explicit stages>, received " +
70  std::to_string(freeParams.size()));
71 
72  int s = freeParams[0];
73  int sigma = freeParams[1];
74 
77  new TimeIntegrationAlgorithmGLM(this));
78 
79  if (order == 1 && s == 1 && sigma == 1)
80  {
81  // This phase is Forward Backward Euler which has two steps.
84  }
85  else
86  {
88  m_integration_phases[0], order, freeParams);
89  }
90  }
91 
93  {
94  }
95 
97  std::string variant, unsigned int order,
98  std::vector<NekDouble> freeParams)
99  {
102  variant, order, freeParams);
103 
104  return p;
105  }
106 
107  static std::string className;
108 
110  unsigned int order,
111  std::vector<NekDouble> freeParams)
112  {
113  ASSERTL1(freeParams.size() == 2,
114  "IMEX DIRK Time integration scheme invalid number "
115  "of free parameters, expected two "
116  "<implicit stages, explicit stages>, received " +
117  std::to_string(freeParams.size()) + ".");
118 
119  int s = freeParams[0];
120  int sigma = freeParams[1];
121 
122  phase->m_schemeType = eIMEX;
123  phase->m_variant = "DIRK";
124  phase->m_order = order;
125  phase->m_name = "IMEX_DIRK"
126  "_" +
127  std::to_string(s) + "_" + std::to_string(sigma) + "_" +
128  std::to_string(phase->m_order);
129 
130  phase->m_numsteps = 1;
131  phase->m_numstages = s + 1;
132 
133  phase->m_A = Array<OneD, Array<TwoD, NekDouble>>(2);
134  phase->m_B = Array<OneD, Array<TwoD, NekDouble>>(2);
135 
136  phase->m_A[0] =
137  Array<TwoD, NekDouble>(phase->m_numstages, phase->m_numstages, 0.0);
138  phase->m_B[0] =
139  Array<TwoD, NekDouble>(phase->m_numsteps, phase->m_numstages, 0.0);
140  phase->m_A[1] =
141  Array<TwoD, NekDouble>(phase->m_numstages, phase->m_numstages, 0.0);
142  phase->m_B[1] =
143  Array<TwoD, NekDouble>(phase->m_numsteps, phase->m_numstages, 0.0);
144  phase->m_U =
145  Array<TwoD, NekDouble>(phase->m_numstages, phase->m_numsteps, 1.0);
146  phase->m_V =
147  Array<TwoD, NekDouble>(phase->m_numsteps, phase->m_numsteps, 1.0);
148 
149  if (s == 1 && sigma == 2 && order == 1)
150  {
151  SetupSchemeData_1_2_1(phase);
152  }
153  else if (s == 1 && sigma == 2 && order == 2)
154  {
155  SetupSchemeData_1_2_2(phase);
156  }
157  else if (s == 2 && sigma == 2 && order == 2)
158  {
159  SetupSchemeData_2_2_2(phase);
160  }
161  else if (s == 2 && sigma == 3 && order == 2)
162  {
163  SetupSchemeData_2_3_2(phase);
164  }
165  else if (s == 2 && sigma == 3 && order == 3)
166  {
167  SetupSchemeData_2_3_3(phase);
168  }
169  else if (s == 3 && sigma == 4 && order == 3)
170  {
171  SetupSchemeData_3_4_3(phase);
172  }
173  else if (s == 4 && sigma == 4 && order == 3)
174  {
175  SetupSchemeData_4_4_3(phase);
176  }
177  else
178  {
179  ASSERTL1(false,
180  "IMEX DIRK Time integration scheme bad type "
181  "(s, sigma, order) : (" +
182  std::to_string(s) + "," + std::to_string(sigma) + "," +
183  std::to_string(order) + "). " +
184  "Allowed combinations: (1,1,1), (1,2,1), (1,2,2), "
185  "(2,2,2), (2,3,2), (2,3,3), (3,4,3), (4,4,3)");
186  }
187 
188  phase->m_numMultiStepValues = 1;
189  phase->m_numMultiStepImplicitDerivs = 0;
190  phase->m_numMultiStepDerivs = 0;
191 
192  phase->m_timeLevelOffset = Array<OneD, unsigned int>(phase->m_numsteps);
193  phase->m_timeLevelOffset[0] = 0;
194 
195  phase->CheckAndVerify();
196  }
197 
198  ///////////////////////////////////////////////////////////////////////////////
199  // IMEX Dirk 1 1 1 : Forward - Backward Euler IMEX
202  {
203  phase->m_schemeType = eIMEX;
204  phase->m_order = 1;
205  phase->m_name =
206  std::string("IMEXdirk_1_1_" + std::to_string(phase->m_order));
207 
208  phase->m_numsteps = 2;
209  phase->m_numstages = 1;
210 
211  phase->m_A = Array<OneD, Array<TwoD, NekDouble>>(2);
212  phase->m_B = Array<OneD, Array<TwoD, NekDouble>>(2);
213 
214  phase->m_A[0] =
215  Array<TwoD, NekDouble>(phase->m_numstages, phase->m_numstages, 0.0);
216  phase->m_B[0] =
217  Array<TwoD, NekDouble>(phase->m_numsteps, phase->m_numstages, 0.0);
218  phase->m_A[1] =
219  Array<TwoD, NekDouble>(phase->m_numstages, phase->m_numstages, 0.0);
220  phase->m_B[1] =
221  Array<TwoD, NekDouble>(phase->m_numsteps, phase->m_numstages, 0.0);
222  phase->m_U =
223  Array<TwoD, NekDouble>(phase->m_numstages, phase->m_numsteps, 0.0);
224  phase->m_V =
225  Array<TwoD, NekDouble>(phase->m_numsteps, phase->m_numsteps, 0.0);
226 
227  phase->m_A[0][0][0] = 1.0;
228 
229  phase->m_B[0][0][0] = 1.0;
230  phase->m_B[1][1][0] = 1.0;
231 
232  phase->m_U[0][0] = 1.0;
233  phase->m_U[0][1] = 1.0;
234 
235  phase->m_V[0][0] = 1.0;
236  phase->m_V[0][1] = 1.0;
237 
238  phase->m_numMultiStepValues = 1;
239  phase->m_numMultiStepImplicitDerivs = 0;
240  phase->m_numMultiStepDerivs = 1;
241 
242  phase->m_timeLevelOffset = Array<OneD, unsigned int>(phase->m_numsteps);
243  phase->m_timeLevelOffset[0] = 0;
244  phase->m_timeLevelOffset[1] = 0;
245 
246  phase->CheckAndVerify();
247  }
248 
249  ///////////////////////////////////////////////////////////////////////////////
250  // IMEX Dirk 1 2 1 : Forward - Backward Euler IMEX w/B implicit == B
251  // explicit
254  {
255  phase->m_A[0][1][1] = 1.0;
256  phase->m_B[0][0][1] = 1.0;
257 
258  phase->m_A[1][1][0] = 1.0;
259  phase->m_B[1][0][1] = 1.0;
260 
261  // U and V set to 1 when allocated.
262  }
263 
264  ////////////////////////////////////////////////////////////////////////////
265  // IMEX Dirk 1 2 2 : Implict-Explicit Midpoint IMEX
268  {
269  phase->m_A[0][1][1] = 1.0 / 2.0;
270  phase->m_B[0][0][1] = 1.0;
271 
272  phase->m_A[1][1][0] = 1.0 / 2.0;
273  phase->m_B[1][0][1] = 1.0;
274 
275  // U and V set to 1 when allocated.
276  }
277 
278  ////////////////////////////////////////////////////////////////////////////
279  // IMEX Dirk 2 2 2 : L Stable, two stage, second order IMEX
282  {
283  NekDouble glambda = 1.0 - sqrt(2.0) / 2.0;
284  NekDouble gdelta = -sqrt(2.0) / 2.0;
285 
286  phase->m_A[0][1][1] = glambda;
287  phase->m_A[0][2][1] = 1.0 - glambda;
288  phase->m_A[0][2][2] = glambda;
289 
290  phase->m_B[0][0][1] = 1.0 - glambda;
291  phase->m_B[0][0][2] = glambda;
292 
293  phase->m_A[1][1][0] = glambda;
294  phase->m_A[1][2][0] = gdelta;
295  phase->m_A[1][2][1] = 1.0 - gdelta;
296 
297  phase->m_B[1][0][0] = gdelta;
298  phase->m_B[1][0][1] = 1.0 - gdelta;
299 
300  // U and V set to 1 when allocated.
301  }
302 
303  ////////////////////////////////////////////////////////////////////////////
304  // IMEX Dirk 2 3 2 : L Stable, two stage, second order IMEX
307  {
308  NekDouble lambda = (2.0 - sqrt(2.0)) / 2.0;
309  NekDouble delta = -2.0 * sqrt(2.0) / 3.0;
310 
311  phase->m_A[0][1][1] = lambda;
312  phase->m_A[0][2][1] = 1.0 - lambda;
313  phase->m_A[0][2][2] = lambda;
314 
315  phase->m_B[0][0][1] = 1.0 - lambda;
316  phase->m_B[0][0][2] = lambda;
317 
318  phase->m_A[1][1][0] = lambda;
319  phase->m_A[1][2][0] = delta;
320  phase->m_A[1][2][1] = 1.0 - delta;
321 
322  phase->m_B[1][0][1] = 1.0 - lambda;
323  phase->m_B[1][0][2] = lambda;
324 
325  // U and V set to 1 when allocated.
326  }
327 
328  ////////////////////////////////////////////////////////////////////////////
329  // IMEX Dirk 2 3 3 : L Stable, two stage, third order IMEX
332  {
333  NekDouble glambda = (3.0 + sqrt(3.0)) / 6.0;
334 
335  phase->m_A[0][1][1] = glambda;
336  phase->m_A[0][2][1] = 1.0 - 2.0 * glambda;
337  phase->m_A[0][2][2] = glambda;
338 
339  phase->m_B[0][0][1] = 0.5;
340  phase->m_B[0][0][2] = 0.5;
341 
342  phase->m_A[1][1][0] = glambda;
343  phase->m_A[1][2][0] = glambda - 1.0;
344  phase->m_A[1][2][1] = 2.0 * (1.0 - glambda);
345 
346  phase->m_B[1][0][1] = 0.5;
347  phase->m_B[1][0][2] = 0.5;
348 
349  // U and V set to 1 when allocated.
350  }
351 
352  ////////////////////////////////////////////////////////////////////////////
353  // IMEX Dirk 3 4 3 : L Stable, three stage, third order IMEX
356  {
357  NekDouble lambda = 0.4358665215;
358 
359  phase->m_A[0][1][1] = lambda;
360  phase->m_A[0][2][1] = 0.5 * (1.0 - lambda);
361  phase->m_A[0][2][2] = lambda;
362  phase->m_A[0][3][1] =
363  0.25 * (-6.0 * lambda * lambda + 16.0 * lambda - 1.0);
364  phase->m_A[0][3][2] =
365  0.25 * (6.0 * lambda * lambda - 20.0 * lambda + 5.0);
366  phase->m_A[0][3][3] = lambda;
367 
368  phase->m_B[0][0][1] =
369  0.25 * (-6.0 * lambda * lambda + 16.0 * lambda - 1.0);
370  phase->m_B[0][0][2] =
371  0.25 * (6.0 * lambda * lambda - 20.0 * lambda + 5.0);
372  phase->m_B[0][0][3] = lambda;
373 
374  phase->m_A[1][1][0] = 0.4358665215;
375  phase->m_A[1][2][0] = 0.3212788860;
376  phase->m_A[1][2][1] = 0.3966543747;
377  phase->m_A[1][3][0] = -0.105858296;
378  phase->m_A[1][3][1] = 0.5529291479;
379  phase->m_A[1][3][2] = 0.5529291479;
380 
381  phase->m_B[1][0][1] =
382  0.25 * (-6.0 * lambda * lambda + 16.0 * lambda - 1.0);
383  phase->m_B[1][0][2] =
384  0.25 * (6.0 * lambda * lambda - 20.0 * lambda + 5.0);
385  phase->m_B[1][0][3] = lambda;
386 
387  // U and V set to 1 when allocated.
388  }
389 
390  ////////////////////////////////////////////////////////////////////////////
391  // IMEX Dirk 4 4 3 : L Stable, four stage, third order IMEX
394  {
395  phase->m_A[0][1][1] = 1.0 / 2.0;
396  phase->m_A[0][2][1] = 1.0 / 6.0;
397  phase->m_A[0][2][2] = 1.0 / 2.0;
398  phase->m_A[0][3][1] = -1.0 / 2.0;
399  phase->m_A[0][3][2] = 1.0 / 2.0;
400  phase->m_A[0][3][3] = 1.0 / 2.0;
401  phase->m_A[0][4][1] = 3.0 / 2.0;
402  phase->m_A[0][4][2] = -3.0 / 2.0;
403  phase->m_A[0][4][3] = 1.0 / 2.0;
404  phase->m_A[0][4][4] = 1.0 / 2.0;
405 
406  phase->m_B[0][0][1] = 3.0 / 2.0;
407  phase->m_B[0][0][2] = -3.0 / 2.0;
408  phase->m_B[0][0][3] = 1.0 / 2.0;
409  phase->m_B[0][0][4] = 1.0 / 2.0;
410 
411  phase->m_A[1][1][0] = 1.0 / 2.0;
412  phase->m_A[1][2][0] = 11.0 / 18.0;
413  phase->m_A[1][2][1] = 1.0 / 18.0;
414  phase->m_A[1][3][0] = 5.0 / 6.0;
415  phase->m_A[1][3][1] = -5.0 / 6.0;
416  phase->m_A[1][3][2] = 1.0 / 2.0;
417  phase->m_A[1][4][0] = 1.0 / 4.0;
418  phase->m_A[1][4][1] = 7.0 / 4.0;
419  phase->m_A[1][4][2] = 3.0 / 4.0;
420  phase->m_A[1][4][3] = -7.0 / 4.0;
421 
422  phase->m_B[1][0][0] = 1.0 / 4.0;
423  phase->m_B[1][0][1] = 7.0 / 4.0;
424  phase->m_B[1][0][2] = 3.0 / 4.0;
425  phase->m_B[1][0][3] = -7.0 / 4.0;
426 
427  // U and V set to 1 when allocated.
428  }
429 
430 protected:
431  LUE virtual std::string v_GetFullName() const override
432  {
433  return m_integration_phases[m_integration_phases.size() - 1]->m_name;
434  }
435 
436  LUE virtual std::string v_GetName() const override
437  {
438  return std::string("IMEX");
439  }
440 
441  LUE virtual NekDouble v_GetTimeStability() const override
442  {
443  return 1.0;
444  }
445 
446 }; // end class IMEXdirkTimeIntegrationScheme
447 
448 ///////////////////////////////////////////////////////////////////////////////
449 // IMEX Dirk 1 1 1 : Forward - Backward Euler IMEX
451 {
452 public:
453  IMEXdirk_1_1_1TimeIntegrationScheme(std::string variant, unsigned int order,
454  std::vector<NekDouble> freeParams)
455  : IMEXdirkTimeIntegrationScheme("", 1, std::vector<NekDouble>{1, 1})
456  {
457  boost::ignore_unused(variant);
458  boost::ignore_unused(order);
459  boost::ignore_unused(freeParams);
460  }
461 
463  {
464  }
465 
467  std::string variant, unsigned int order,
468  std::vector<NekDouble> freeParams)
469  {
470  boost::ignore_unused(variant);
471  boost::ignore_unused(order);
472  boost::ignore_unused(freeParams);
473 
476  AllocateSharedPtr("", 1, std::vector<NekDouble>{1, 1});
477 
478  return p;
479  }
480 
481  static std::string className;
482 
483 }; // end class IMEXdirk_1_1_1TimeIntegrator
484 
485 // IMEX Dirk 1 2 1 : Forward - Backward Euler IMEX w/B implicit == B explicit
487 {
488 public:
489  IMEXdirk_1_2_1TimeIntegrationScheme(std::string variant, unsigned int order,
490  std::vector<NekDouble> freeParams)
491  : IMEXdirkTimeIntegrationScheme("", 1, std::vector<NekDouble>{1, 2})
492  {
493  boost::ignore_unused(variant);
494  boost::ignore_unused(order);
495  boost::ignore_unused(freeParams);
496  }
497 
499  {
500  }
501 
503  std::string variant, unsigned int order,
504  std::vector<NekDouble> freeParams)
505  {
506  boost::ignore_unused(variant);
507  boost::ignore_unused(order);
508  boost::ignore_unused(freeParams);
509 
512  "", 1, std::vector<NekDouble>{1, 2});
513 
514  return p;
515  }
516 
517  static std::string className;
518 
519 }; // end class IMEXdirk_1_2_1TimeIntegrator
520 
521 // IMEX Dirk 1 2 2 : Implict-Explicit Midpoint IMEX
523 {
524 public:
525  IMEXdirk_1_2_2TimeIntegrationScheme(std::string variant, unsigned int order,
526  std::vector<NekDouble> freeParams)
527  : IMEXdirkTimeIntegrationScheme("", 2, std::vector<NekDouble>{1, 2})
528  {
529  boost::ignore_unused(variant);
530  boost::ignore_unused(order);
531  boost::ignore_unused(freeParams);
532  }
533 
535  {
536  }
537 
539  std::string variant, unsigned int order,
540  std::vector<NekDouble> freeParams)
541  {
542  boost::ignore_unused(variant);
543  boost::ignore_unused(order);
544  boost::ignore_unused(freeParams);
545 
548  "", 2, std::vector<NekDouble>{1, 2});
549 
550  return p;
551  }
552 
553  static std::string className;
554 
555 }; // end class IMEXdirk_1_2_2TimeIntegrator
556 
557 // IMEX Dirk 2 2 2 : L Stable, two stage, second order IMEX
559 {
560 public:
561  IMEXdirk_2_2_2TimeIntegrationScheme(std::string variant, unsigned int order,
562  std::vector<NekDouble> freeParams)
563  : IMEXdirkTimeIntegrationScheme("", 2, std::vector<NekDouble>{2, 2})
564  {
565  boost::ignore_unused(variant);
566  boost::ignore_unused(order);
567  boost::ignore_unused(freeParams);
568  }
569 
571  {
572  }
573 
575  std::string variant, unsigned int order,
576  std::vector<NekDouble> freeParams)
577  {
578  boost::ignore_unused(variant);
579  boost::ignore_unused(order);
580  boost::ignore_unused(freeParams);
581 
584  AllocateSharedPtr("", 2, std::vector<NekDouble>{2, 2});
585 
586  return p;
587  }
588 
589  static std::string className;
590 
591 }; // end class IMEXdirk_2_2_2TimeIntegrationScheme
592 
593 // IMEX Dirk 2 3 2 : L Stable, two stage, second order IMEX
595 {
596 public:
597  IMEXdirk_2_3_2TimeIntegrationScheme(std::string variant, unsigned int order,
598  std::vector<NekDouble> freeParams)
599  : IMEXdirkTimeIntegrationScheme("", 2, std::vector<NekDouble>{2, 3})
600  {
601  boost::ignore_unused(variant);
602  boost::ignore_unused(order);
603  boost::ignore_unused(freeParams);
604  }
605 
607  {
608  }
609 
611  std::string variant, unsigned int order,
612  std::vector<NekDouble> freeParams)
613  {
614  boost::ignore_unused(variant);
615  boost::ignore_unused(order);
616  boost::ignore_unused(freeParams);
617 
620  "", 2, std::vector<NekDouble>{2, 3});
621 
622  return p;
623  }
624 
625  static std::string className;
626 
627 }; // end class IMEXdirk_2_3_2TimeIntegrationScheme
628 
629 ///////////////////////////////////////////////////////////////////////////////
630 // IMEX Dirk 2 3 3 : L Stable, two stage, third order IMEX
632 {
633 public:
634  IMEXdirk_2_3_3TimeIntegrationScheme(std::string variant, unsigned int order,
635  std::vector<NekDouble> freeParams)
636  : IMEXdirkTimeIntegrationScheme("", 3, std::vector<NekDouble>{2, 3})
637  {
638  boost::ignore_unused(variant);
639  boost::ignore_unused(order);
640  boost::ignore_unused(freeParams);
641  }
642 
644  {
645  }
646 
648  std::string variant, unsigned int order,
649  std::vector<NekDouble> freeParams)
650  {
651  boost::ignore_unused(variant);
652  boost::ignore_unused(order);
653  boost::ignore_unused(freeParams);
654 
657  "", 3, std::vector<NekDouble>{2, 3});
658 
659  return p;
660  }
661 
662  static std::string className;
663 
664 }; // end class IMEXdirk_2_3_3TimeIntegrationScheme
665 
666 ///////////////////////////////////////////////////////////////////////////////
667 // IMEX Dirk 3 4 3 : L Stable, three stage, third order IMEX
669 {
670 public:
671  IMEXdirk_3_4_3TimeIntegrationScheme(std::string variant, unsigned int order,
672  std::vector<NekDouble> freeParams)
673  : IMEXdirkTimeIntegrationScheme("", 3, std::vector<NekDouble>{3, 4})
674  {
675  boost::ignore_unused(variant);
676  boost::ignore_unused(order);
677  boost::ignore_unused(freeParams);
678  }
679 
681  {
682  }
683 
685  std::string variant, unsigned int order,
686  std::vector<NekDouble> freeParams)
687  {
688  boost::ignore_unused(variant);
689  boost::ignore_unused(order);
690  boost::ignore_unused(freeParams);
691 
694  "", 3, std::vector<NekDouble>{3, 4});
695 
696  return p;
697  }
698 
699  static std::string className;
700 
701 }; // end class IMEXdirk_3_4_3TimeIntegrationScheme
702 
703 ///////////////////////////////////////////////////////////////////////////////
704 // IMEX Dirk 4 4 3 : L Stable, four stage, third order IMEX
706 {
707 public:
708  IMEXdirk_4_4_3TimeIntegrationScheme(std::string variant, unsigned int order,
709  std::vector<NekDouble> freeParams)
710  : IMEXdirkTimeIntegrationScheme("", 3, std::vector<NekDouble>{4, 4})
711  {
712  boost::ignore_unused(order);
713  boost::ignore_unused(variant);
714  boost::ignore_unused(freeParams);
715  }
716 
718  {
719  }
720 
722  std::string variant, unsigned int order,
723  std::vector<NekDouble> freeParams)
724  {
725  boost::ignore_unused(order);
726  boost::ignore_unused(variant);
727  boost::ignore_unused(freeParams);
728 
731  "", 3, std::vector<NekDouble>{4, 4});
732 
733  return p;
734  }
735 
736  static std::string className;
737 
738 }; // end class IMEXdirk_4_4_3TimeIntegrationScheme
739 
740 } // end namespace LibUtilities
741 } // end namespace Nektar
742 
743 #endif
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode....
Definition: ErrorUtil.hpp:249
static TimeIntegrationSchemeSharedPtr create(std::string variant, unsigned int order, std::vector< NekDouble > freeParams)
IMEXdirk_1_1_1TimeIntegrationScheme(std::string variant, unsigned int order, std::vector< NekDouble > freeParams)
IMEXdirk_1_2_1TimeIntegrationScheme(std::string variant, unsigned int order, std::vector< NekDouble > freeParams)
static TimeIntegrationSchemeSharedPtr create(std::string variant, unsigned int order, std::vector< NekDouble > freeParams)
static TimeIntegrationSchemeSharedPtr create(std::string variant, unsigned int order, std::vector< NekDouble > freeParams)
IMEXdirk_1_2_2TimeIntegrationScheme(std::string variant, unsigned int order, std::vector< NekDouble > freeParams)
static TimeIntegrationSchemeSharedPtr create(std::string variant, unsigned int order, std::vector< NekDouble > freeParams)
IMEXdirk_2_2_2TimeIntegrationScheme(std::string variant, unsigned int order, std::vector< NekDouble > freeParams)
static TimeIntegrationSchemeSharedPtr create(std::string variant, unsigned int order, std::vector< NekDouble > freeParams)
IMEXdirk_2_3_2TimeIntegrationScheme(std::string variant, unsigned int order, std::vector< NekDouble > freeParams)
static TimeIntegrationSchemeSharedPtr create(std::string variant, unsigned int order, std::vector< NekDouble > freeParams)
IMEXdirk_2_3_3TimeIntegrationScheme(std::string variant, unsigned int order, std::vector< NekDouble > freeParams)
IMEXdirk_3_4_3TimeIntegrationScheme(std::string variant, unsigned int order, std::vector< NekDouble > freeParams)
static TimeIntegrationSchemeSharedPtr create(std::string variant, unsigned int order, std::vector< NekDouble > freeParams)
IMEXdirk_4_4_3TimeIntegrationScheme(std::string variant, unsigned int order, std::vector< NekDouble > freeParams)
static TimeIntegrationSchemeSharedPtr create(std::string variant, unsigned int order, std::vector< NekDouble > freeParams)
static TimeIntegrationSchemeSharedPtr create(std::string variant, unsigned int order, std::vector< NekDouble > freeParams)
static LUE void SetupSchemeData_2_2_2(TimeIntegrationAlgorithmGLMSharedPtr &phase)
IMEXdirkTimeIntegrationScheme(std::string variant, unsigned int order, std::vector< NekDouble > freeParams)
static LUE void SetupSchemeData_1_2_2(TimeIntegrationAlgorithmGLMSharedPtr &phase)
static LUE void SetupSchemeData_2_3_3(TimeIntegrationAlgorithmGLMSharedPtr &phase)
static LUE void SetupSchemeData_2_3_2(TimeIntegrationAlgorithmGLMSharedPtr &phase)
static LUE void SetupSchemeData_3_4_3(TimeIntegrationAlgorithmGLMSharedPtr &phase)
static LUE void SetupSchemeData(TimeIntegrationAlgorithmGLMSharedPtr &phase, unsigned int order, std::vector< NekDouble > freeParams)
static LUE void SetupSchemeData_1_1_1(TimeIntegrationAlgorithmGLMSharedPtr &phase)
static LUE void SetupSchemeData_4_4_3(TimeIntegrationAlgorithmGLMSharedPtr &phase)
static LUE void SetupSchemeData_1_2_1(TimeIntegrationAlgorithmGLMSharedPtr &phase)
Base class for GLM time integration schemes.
TimeIntegrationAlgorithmGLMVector m_integration_phases
static std::shared_ptr< DataType > AllocateSharedPtr(const Args &...args)
Allocate a shared pointer from the memory pool.
std::shared_ptr< TimeIntegrationAlgorithmGLM > TimeIntegrationAlgorithmGLMSharedPtr
@ eIMEX
Implicit Explicit General Linear Method.
std::vector< TimeIntegrationAlgorithmGLMSharedPtr > TimeIntegrationAlgorithmGLMVector
std::shared_ptr< TimeIntegrationScheme > TimeIntegrationSchemeSharedPtr
The above copyright notice and this permission notice shall be included.
Definition: CoupledSolver.h:2
double NekDouble
scalarT< T > sqrt(scalarT< T > in)
Definition: scalar.hpp:294