[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 
10 namespace PHiLiP {
11 namespace ODE {
12 
14 #if PHILIP_DIM==1
15 template <int dim, typename real, typename MeshType = dealii::Triangulation<dim>>
16 #else
17 template <int dim, typename real, typename MeshType = dealii::parallel::distributed::Triangulation<dim>>
18 #endif
20 {
21 public:
23  LowStorageRKTableauBase(const int n_rk_stages, const int num_delta, const std::string rk_method_string_input);
24 
26  virtual ~LowStorageRKTableauBase() = default;
27 
28 protected:
30  const std::string rk_method_string;
31 
32  dealii::ConditionalOStream pcout;
33 
34 public:
36  double get_gamma(const int i, const int j) const;
37 
39  double get_beta(const int i) const;
40 
42  double get_delta(const int i) const;
43 
45  double get_b_hat(const int i) const;
46 
48  void set_tableau();
49 
50 
51 protected:
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].
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()
Calls setters for butcher tableau.
dealii::ConditionalOStream pcout
Parallel std::cout that only outputs on mpi_rank==0.
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.
const std::string rk_method_string
String identifying 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.