[P]arallel [Hi]gh-order [Li]brary for [P]DEs  Latest
Parallel High-Order Library for PDEs through hp-adaptive Discontinuous Galerkin methods
periodic_entropy_tests.h
1 #ifndef __PERIODIC_ENTROPY_TESTS_H__
2 #define __PERIODIC_ENTROPY_TESTS_H__
3 
4 #include "periodic_cube_flow.h"
5 #include "physics/euler.h"
6 
7 namespace PHiLiP {
8 namespace FlowSolver {
9 
10 template <int dim, int nstate>
11 class PeriodicEntropyTests : public PeriodicCubeFlow<dim,nstate>
12 {
13 public:
14 
16  explicit PeriodicEntropyTests(const Parameters::AllParameters *const parameters_input);
17 
20  double compute_entropy(const std::shared_ptr <DGBase<dim, double>> dg) const;
21 
23 
24  double get_constant_time_step(std::shared_ptr<DGBase<dim,double>> dg) const override;
25 protected:
26 
28  enum IntegratedQuantityEnum { kinetic_energy, max_wave_speed, numerical_entropy};
29 
31 
39  IntegratedQuantityEnum quantity,
40  const int overintegrate=10 // Overintegrate for KE, don't for num. entropy
41  ) const;
42 
46  const std::shared_ptr<ODE::ODESolverBase<dim, double>> ode_solver,
47  const std::shared_ptr <DGBase<dim, double>> dg,
48  const std::shared_ptr<dealii::TableHandler> unsteady_data_table) override;
49 
52 
55 
58 
60  double previous_time=0;
61 
62  // euler physics pointer for computing physical quantities.
63  std::shared_ptr < Physics::Euler<dim, nstate, double > > euler_physics;
64 
65 };
66 
67 
68 } // FlowSolver namespace
69 } // PHiLiP namespace
70 #endif
double compute_integrated_quantities(DGBase< dim, double > &dg, IntegratedQuantityEnum quantity, const int overintegrate=10) const
Compute and update integrated quantities.
PeriodicEntropyTests(const Parameters::AllParameters *const parameters_input)
Constructor.
double previous_time
Last time (for calculating relaxation factor)
std::string unsteady_data_table_filename_with_extension
Filename for unsteady data.
Files for the baseline physics.
Definition: ADTypes.hpp:10
Base class ODE solver.
double previous_numerical_entropy
Store previous entropy.
Main parameter class that contains the various other sub-parameter classes.
IntegratedQuantityEnum
Enum of integrated quantities to calculate.
double initial_entropy
Storing entropy at first step.
double get_constant_time_step(std::shared_ptr< DGBase< dim, double >> dg) const override
Function to compute the constant time step.
double compute_entropy(const std::shared_ptr< DGBase< dim, double >> dg) const
void compute_unsteady_data_and_write_to_table(const std::shared_ptr< ODE::ODESolverBase< dim, double >> ode_solver, const std::shared_ptr< DGBase< dim, double >> dg, const std::shared_ptr< dealii::TableHandler > unsteady_data_table) override
Compute the desired unsteady data and write it to a table.
DGBase is independent of the number of state variables.
Definition: dg_base.hpp:82