Nektar++
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
TimeIntegrationWrapper.h
Go to the documentation of this file.
1 ///////////////////////////////////////////////////////////////////////////////
2 //
3 // File: TimeIntegrationWrapper.h
4 //
5 // For more information, please see: http://www.nektar.info
6 //
7 // The MIT License
8 //
9 // Copyright (c) 2006 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: Header file of time integration scheme wrappers
33 //
34 ///////////////////////////////////////////////////////////////////////////////
35 
36 #ifndef NEKTAR_LIB_UTILITIES_FOUNDATIONS_TIMEINTEGRATIONWRAPPER_H
37 #define NEKTAR_LIB_UTILITIES_FOUNDATIONS_TIMEINTEGRATIONWRAPPER_H
38 
42 
43 namespace Nektar {
44 namespace LibUtilities {
45 
47 
48  /// Datatype of the NekFactory used to instantiate classes derived from
49  /// the EquationSystem class.
50  typedef NekFactory <
51  std::string, TimeIntegrationWrapper
55 
56  typedef boost::shared_ptr<TimeIntegrationWrapper>
58 
60  {
61  public:
63 
65  {
66  v_InitObject();
67  }
68 
70  const NekDouble timestep,
72  const NekDouble time,
74  {
75  return m_intScheme[m_intSteps - 1]
76  ->InitializeScheme(timestep, y_0, time, op);
77  }
78 
81  const int timestep,
82  const NekDouble delta_t,
85  {
86  return m_intScheme[min(timestep, m_intSteps - 1)]
87  ->TimeIntegrate(delta_t, solvector, op);
88  }
89 
91  {
92  return m_method;
93  }
94 
96  {
97  return m_intSteps;
98  }
99 
100  protected:
103  std::vector<TimeIntegrationSchemeSharedPtr> m_intScheme;
104 
105  /// Constructor
107 
108  virtual void v_InitObject();
109  };
110 
111 
112  // --------
113  // IMEXOrder1
114  // --------
116  typedef boost::shared_ptr<TimeIntegrationIMEXOrder1>
118 
120  {
121  public:
123 
124  /// Creates an instance of this class
126  {
129  p->InitObject();
130  return p;
131  }
132  /// Name of class
133  static std::string className;
134 
136 
137  protected:
138  virtual void v_InitObject();
139  };
140 
142  {
143  public:
145 
146  /// Creates an instance of this class
148  {
151  p->InitObject();
152  return p;
153  }
154  /// Name of class
155  static std::string className;
156 
158 
159  protected:
160  virtual void v_InitObject();
161  };
162 
164  {
165  public:
167 
168  /// Creates an instance of this class
170  {
173  p->InitObject();
174  return p;
175  }
176  /// Name of class
177  static std::string className;
178 
180 
181  protected:
182  virtual void v_InitObject();
183  };
184 
186  {
187  public:
189 
190  /// Creates an instance of this class
192  {
196  p->InitObject();
197  return p;
198  }
199  /// Name of class
200  static std::string className;
201 
203 
204  protected:
205  virtual void v_InitObject();
206  };
207 
208 
210  {
211  public:
213 
214  /// Creates an instance of this class
216  {
220  p->InitObject();
221  return p;
222  }
223  /// Name of class
224  static std::string className;
225 
227 
228  protected:
229  virtual void v_InitObject();
230  };
231 
232 
234  {
235  public:
237 
238  /// Creates an instance of this class
240  {
244  p->InitObject();
245  return p;
246  }
247  /// Name of class
248  static std::string className;
249 
251 
252  protected:
253  virtual void v_InitObject();
254  };
255 
256 
258  {
259  public:
261 
262  /// Creates an instance of this class
264  {
268  p->InitObject();
269  return p;
270  }
271  /// Name of class
272  static std::string className;
273 
275 
276  protected:
277  virtual void v_InitObject();
278  };
279 
280 
282  {
283  public:
285 
286  /// Creates an instance of this class
288  {
292  p->InitObject();
293  return p;
294  }
295  /// Name of class
296  static std::string className;
297 
299 
300  protected:
301  virtual void v_InitObject();
302  };
303 
304 
306  {
307  public:
309 
310  /// Creates an instance of this class
312  {
316  p->InitObject();
317  return p;
318  }
319  /// Name of class
320  static std::string className;
321 
323 
324  protected:
325  virtual void v_InitObject();
326  };
327 
328 
330  {
331  public:
333 
334  /// Creates an instance of this class
336  {
340  p->InitObject();
341  return p;
342  }
343  /// Name of class
344  static std::string className;
345 
347 
348  protected:
349  virtual void v_InitObject();
350  };
351 
352 
354  {
355  public:
357 
358  /// Creates an instance of this class
360  {
364  p->InitObject();
365  return p;
366  }
367  /// Name of class
368  static std::string className;
369 
371 
372  protected:
373  virtual void v_InitObject();
374  };
375 
377  {
378  public:
380 
381  /// Creates an instance of this class
383  {
386  p->InitObject();
387  return p;
388  }
389  /// Name of class
390  static std::string className;
391 
393 
394  protected:
395  virtual void v_InitObject();
396  };
397 
398 
400  {
401  public:
403 
404  /// Creates an instance of this class
406  {
410  p->InitObject();
411  return p;
412  }
413  /// Name of class
414  static std::string className;
415 
417 
418  protected:
419  virtual void v_InitObject();
420  };
421 
422 
424  {
425  public:
427 
428  /// Creates an instance of this class
430  {
434  p->InitObject();
435  return p;
436  }
437  /// Name of class
438  static std::string className;
439 
441 
442  protected:
443  virtual void v_InitObject();
444  };
445 
446 
448  {
449  public:
451 
452  /// Creates an instance of this class
454  {
458  p->InitObject();
459  return p;
460  }
461  /// Name of class
462  static std::string className;
463 
465 
466  protected:
467  virtual void v_InitObject();
468  };
469 
470 
473  {
474  public:
476 
477  /// Creates an instance of this class
479  {
483  p->InitObject();
484  return p;
485  }
486  /// Name of class
487  static std::string className;
488 
490 
491  protected:
492  virtual void v_InitObject();
493  };
494 
497  {
498  public:
500 
501  /// Creates an instance of this class
503  {
507  p->InitObject();
508  return p;
509  }
510  /// Name of class
511  static std::string className;
512 
514 
515  protected:
516  virtual void v_InitObject();
517  };
518 
520  {
521  public:
523 
524  /// Creates an instance of this class
526  {
530  p->InitObject();
531  return p;
532  }
533  /// Name of class
534  static std::string className;
535 
537 
538  protected:
539  virtual void v_InitObject();
540  };
541 
543  {
544  public:
546 
547  /// Creates an instance of this class
549  {
552  p->InitObject();
553  return p;
554  }
555  /// Name of class
556  static std::string className;
557 
559 
560  protected:
561  virtual void v_InitObject();
562  };
563 
565  {
566  public:
568 
569  /// Creates an instance of this class
571  {
574  p->InitObject();
575  return p;
576  }
577  /// Name of class
578  static std::string className;
579 
581 
582  protected:
583  virtual void v_InitObject();
584  };
585 
587  {
588  public:
590 
591  /// Creates an instance of this class
593  {
596  p->InitObject();
597  return p;
598  }
599  /// Name of class
600  static std::string className;
601 
603 
604  protected:
605  virtual void v_InitObject();
606  };
607 
609  {
610  public:
612 
613  /// Creates an instance of this class
615  {
619  p->InitObject();
620  return p;
621  }
622  /// Name of class
623  static std::string className;
624 
626 
627  protected:
628  virtual void v_InitObject();
629  };
630 
632  {
633  public:
635 
636  /// Creates an instance of this class
638  {
642  p->InitObject();
643  return p;
644  }
645  /// Name of class
646  static std::string className;
647 
649 
650  protected:
651  virtual void v_InitObject();
652  };
653 
655  {
656  public:
658 
659  /// Creates an instance of this class
661  {
665  p->InitObject();
666  return p;
667  }
668  /// Name of class
669  static std::string className;
670 
672 
673  protected:
674  virtual void v_InitObject();
675  };
676 
678  {
679  public:
681 
682  /// Creates an instance of this class
684  {
687  p->InitObject();
688  return p;
689  }
690  /// Name of class
691  static std::string className;
692 
694 
695  protected:
696  virtual void v_InitObject();
697  };
698 
700  {
701  public:
703 
704  /// Creates an instance of this class
706  {
709  p->InitObject();
710  return p;
711  }
712  /// Name of class
713  static std::string className;
714 
715  virtual ~TimeIntegrationCNAB() {}
716 
717  protected:
718  virtual void v_InitObject();
719  };
720 
722  {
723  public:
725 
726  /// Creates an instance of this class
728  {
731  p->InitObject();
732  return p;
733  }
734  /// Name of class
735  static std::string className;
736 
738 
739  protected:
740  virtual void v_InitObject();
741  };
742 }
743 }
744 #endif