[P]arallel [Hi]gh-order [Li]brary for [P]DEs  Latest
Parallel High-Order Library for PDEs through hp-adaptive Discontinuous Galerkin methods
low_storage_rk_tableau_base.h
1 #ifndef __LOW_STORAGE_RK_TABLEAU_BASE__
2 #define __LOW_STORAGE_RK_TABLEAU_BASE__
3 
4 #include <deal.II/base/conditional_ostream.h>
5 
6 #include <deal.II/grid/tria.h>
7 #include <deal.II/distributed/shared_tria.h>
8 #include <deal.II/distributed/tria.h>
9 #include <deal.II/lac/full_matrix.h>
10 #include <deal.II/lac/vector.h>
11 
12 #include "rk_tableau_base.h"
13 
14 namespace PHiLiP {
15 namespace ODE {
16 
18 #if PHILIP_DIM==1
19 template <int dim, typename real, typename MeshType = dealii::Triangulation<dim>>
20 #else
21 template <int dim, typename real, typename MeshType = dealii::parallel::distributed::Triangulation<dim>>
22 #endif
23 class LowStorageRKTableauBase : public RKTableauBase<dim,real,MeshType>
24 {
25 public:
27  LowStorageRKTableauBase(const int n_rk_stages, const int num_delta, const std::string rk_method_string_input);
28 
30  virtual ~LowStorageRKTableauBase() = default;
31 
32 public:
34  double get_gamma(const int i, const int j) const;
35 
37  double get_beta(const int i) const;
38 
40  double get_delta(const int i) const;
41 
43  double get_b_hat(const int i) const;
44 
46  void set_tableau() override;
47 
48 protected:
49 
51  const int num_delta;
52 
54  dealii::Table<2,double> butcher_tableau_gamma;
55 
57  dealii::Table<1,double> butcher_tableau_beta;
58 
60  dealii::Table<1,double> butcher_tableau_delta;
61 
63  dealii::Table<1,double> butcher_tableau_b_hat;
64 
66  virtual void set_gamma() = 0;
67 
69  virtual void set_beta() = 0;
70 
72  virtual void set_delta() = 0;
73 
75  virtual void set_b_hat() = 0;
76 
77 };
78 
79 } // ODE namespace
80 } // PHiLiP namespace
81 
82 #endif
LowStorageRKTableauBase(const int n_rk_stages, const int num_delta, const std::string rk_method_string_input)
Default constructor that will set the constants.
double get_b_hat(const int i) const
Returns Butcher tableau "b hat" coefficient at position [i].
const int n_rk_stages
Store number of stages.
double get_beta(const int i) const
Returns Butcher tableau "beta" coefficient at position [i].
dealii::Table< 1, double > butcher_tableau_b_hat
Butcher tableau "b hat".
double get_gamma(const int i, const int j) const
Returns Butcher tableau "gamma" coefficient at position [i][j].
dealii::Table< 2, double > butcher_tableau_gamma
Butcher tableau "gamma".
Files for the baseline physics.
Definition: ADTypes.hpp:10
Base class for storing the RK method.
void set_tableau() override
Calls setters for butcher tableau.
virtual void set_gamma()=0
Setter for gamma.
virtual void set_b_hat()=0
Setter for b hat.
dealii::Table< 1, double > butcher_tableau_beta
Butcher tableau "beta".
virtual void set_beta()=0
Setter for beta.
Base class for storing the RK method.
dealii::Table< 1, double > butcher_tableau_delta
Butcher tableau "delta".
virtual void set_delta()=0
Setter for delta.
double get_delta(const int i) const
Returns Butcher tableau "delta" coefficient at position [i].
virtual ~LowStorageRKTableauBase()=default
Destructor.