[P]arallel [Hi]gh-order [Li]brary for [P]DEs  Latest
Parallel High-Order Library for PDEs through hp-adaptive Discontinuous Galerkin methods
euler_split_inviscid_taylor_green_vortex.h
1 #ifndef __EULER_SPLIT_TAYLOR_GREEN_H__
2 #define __EULER_SPLIT_TAYLOR_GREEN_H__
3 
4 
5 #include <deal.II/base/tensor.h>
6 #include <deal.II/base/function.h>
7 #include <deal.II/numerics/data_out.h>
8 #include <deal.II/numerics/vector_tools.h>
9 #include <deal.II/numerics/solution_transfer.h>
10 #include <deal.II/base/numbers.h>
11 #include <deal.II/base/function_parser.h>
12 #include <deal.II/grid/grid_generator.h>
13 #include <deal.II/grid/grid_refinement.h>
14 #include <deal.II/grid/grid_tools.h>
15 #include <deal.II/grid/grid_out.h>
16 #include <deal.II/grid/grid_in.h>
17 
18 #include <deal.II/fe/mapping_q.h>
19 #include "tests.h"
20 
21 
22 #include "parameters/all_parameters.h"
23 #include "parameters/parameters.h"
24 #include "physics/physics_factory.h"
25 #include "physics/physics.h"
26 #include "ode_solver/ode_solver_factory.h"
27 
28 #include<fenv.h>
29 
30 namespace PHiLiP {
31 namespace Tests {
32 
34 
37 template <int dim, int nstate>
39 {
40 public:
42 
44  explicit EulerTaylorGreen(const Parameters::AllParameters *const parameters_input);
45 
47 
50  int run_test() const override;
51 
52 private:
54 
56  double compute_kinetic_energy(const std::shared_ptr < DGBase<dim, double> > &dg, unsigned int poly_degree) const;
58 
60  double compute_entropy(const std::shared_ptr < DGBase<dim, double> > &dg, unsigned int poly_degree) const;
62 
64  // double compute_change_in_entropy(std::shared_ptr < DGBase<dim, double> > &dg, unsigned int poly_degree) const;
65  std::array<double,2> compute_change_in_entropy(const std::shared_ptr < DGBase<dim, double> > &dg, unsigned int poly_degree) const;
67  /* Based off unpublished work can show that the volume term vanishes for kinetic energy
68  * from its corresponding shuffle condition.
69  */
70  double compute_volume_term(const std::shared_ptr < DGBase<dim, double> > &dg, unsigned int poly_degree) const;
72  double get_timestep(const std::shared_ptr < DGBase<dim, double> > &dg, unsigned int poly_degree, const double delta_x) const;
73 };
74 
75 
76 } //Tests
77 } //PHiLiP
78 
79 #endif
80 
double compute_kinetic_energy(const std::shared_ptr< DGBase< dim, double > > &dg, unsigned int poly_degree) const
Computes kinetic energy.
Files for the baseline physics.
Definition: ADTypes.hpp:10
double compute_volume_term(const std::shared_ptr< DGBase< dim, double > > &dg, unsigned int poly_degree) const
Computes the volume term kinetic energy production.
Main parameter class that contains the various other sub-parameter classes.
double get_timestep(const std::shared_ptr< DGBase< dim, double > > &dg, unsigned int poly_degree, const double delta_x) const
Computes the timestep from max eignevector.
EulerTaylorGreen(const Parameters::AllParameters *const parameters_input)
Constructor.
DGBase is independent of the number of state variables.
Definition: dg_base.hpp:82
double compute_entropy(const std::shared_ptr< DGBase< dim, double > > &dg, unsigned int poly_degree) const
Computes entropy in the norm.
Base class of all the tests.
Definition: tests.h:17
int run_test() const override
Ensure that the kinetic energy is bounded.
std::array< double, 2 > compute_change_in_entropy(const std::shared_ptr< DGBase< dim, double > > &dg, unsigned int poly_degree) const
Computes change in entropy in the norm.