AStableDirk4.h
Go to the documentation of this file.
1 /****************************************************************/
2 /* DO NOT MODIFY THIS HEADER */
3 /* MOOSE - Multiphysics Object Oriented Simulation Environment */
4 /* */
5 /* (c) 2010 Battelle Energy Alliance, LLC */
7 /* */
8 /* Prepared by Battelle Energy Alliance, LLC */
9 /* Under Contract No. DE-AC07-05ID14517 */
10 /* With the U. S. Department of Energy */
11 /* */
12 /* See COPYRIGHT for full restrictions */
13 /****************************************************************/
14
15 #ifndef ASTABLEDIRK4_H
16 #define ASTABLEDIRK4_H
17
18 #include "TimeIntegrator.h"
19
20 // Forward declarations
21 class AStableDirk4;
22 class LStableDirk4;
23
24 template <>
26
63 {
64 public:
66  virtual ~AStableDirk4();
67
68  virtual int order() { return 4; }
69  virtual void computeTimeDerivatives();
70  virtual void solve();
71  virtual void postStep(NumericVector<Number> & residual);
72
73 protected:
74  // Indicates the current stage.
75  unsigned int _stage;
76
77  // Store pointers to the various stage residuals
78  NumericVector<Number> * _stage_residuals[3];
79
80  // The parameter of the method, set at construction time and cannot be changed.
81  const Real _gamma; // 1.06857902130162881
82
83  // Butcher tableau "C" parameters derived from _gamma
84  // 1.06857902130162881, 0.5, -.06857902130162881
85  Real _c[3];
86
87  // Butcher tableau "A" values derived from _gamma. We only use the
88  // lower triangle of this.
89  // 1.06857902130162881
90  // -.56857902130162881, 1.06857902130162881
91  // 2.13715804260325762, -3.27431608520651524, 1.06857902130162881
92  Real _a[3][3];
93
94  // The Butcher tableau "b" parameters derived from _gamma;
95  // 1.2888640051572051e-01, 7.4222719896855893e-01, 1.2888640051572051e-01
96  Real _b[3];
97
98  // If true, we use a more expensive method (LStableDirk4) to
99  // "bootstrap" the first timestep of this method and avoid
100  // evaluating residuals before the initial time.
102
103  // A pointer to the "bootstrapping" method to use if _safe_start==true.
104  std::shared_ptr<LStableDirk4> _bootstrap_method;
105 };
106
107 #endif // ASTABLEDIRK4_H
virtual void computeTimeDerivatives()
Definition: AStableDirk4.C:84
Fourth-order diagonally implicit Runge Kutta method (Dirk) with five stages.
Definition: LStableDirk4.h:62
std::shared_ptr< LStableDirk4 > _bootstrap_method
Definition: AStableDirk4.h:104
Real _a[3][3]
Definition: AStableDirk4.h:92
virtual int order()
Definition: AStableDirk4.h:68
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
AStableDirk4(const InputParameters &parameters)
Definition: AStableDirk4.C:31
virtual void postStep(NumericVector< Number > &residual)
Callback to the TimeIntegrator called immediately after the residuals are computed in NonlinearSystem...
Definition: AStableDirk4.C:138
Real _b[3]
Definition: AStableDirk4.h:96
const Real _gamma
Definition: AStableDirk4.h:81
unsigned int _stage
Definition: AStableDirk4.h:75
NumericVector< Number > * _stage_residuals[3]
Definition: AStableDirk4.h:78
Fourth-order diagonally implicit Runge Kutta method (Dirk) with three stages plus an update...
Definition: AStableDirk4.h:62
Base class for time integrators.
virtual void solve()
Definition: AStableDirk4.C:97
virtual ~AStableDirk4()
Definition: AStableDirk4.C:81
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseObject.h:53
Real _c[3]
Definition: AStableDirk4.h:85
InputParameters validParams< AStableDirk4 >()
Definition: AStableDirk4.C:24