[P]arallel [Hi]gh-order [Li]brary for [P]DEs  Latest
Parallel High-Order Library for PDEs through hp-adaptive Discontinuous Galerkin methods
PHiLiP::Tests::GridStudy< dim, nstate > Class Template Reference

Performs grid convergence for various polynomial degrees. More...

#include <grid_study.h>

Inheritance diagram for PHiLiP::Tests::GridStudy< dim, nstate >:
Collaboration diagram for PHiLiP::Tests::GridStudy< dim, nstate >:

Public Member Functions

 GridStudy ()=delete
 Constructor. Deleted the default constructor since it should not be used.
 
 GridStudy (const Parameters::AllParameters *const parameters_input)
 Constructor. More...
 
int run_test () const
 Manufactured grid convergence. More...
 
- Public Member Functions inherited from PHiLiP::Tests::TestsBase
 TestsBase ()=delete
 Constructor. Deleted the default constructor since it should not be used.
 
 TestsBase (const Parameters::AllParameters *const parameters_input)
 Constructor. More...
 
virtual ~TestsBase ()=default
 Destructor.
 

Protected Member Functions

void print_mesh_info (const dealii::Triangulation< dim > &triangulation, const std::string &filename) const
 Prints our mesh info and generates eps file if 2D grid.
 
void initialize_perturbed_solution (DGBase< dim, double > &dg, const Physics::PhysicsBase< dim, nstate, double > &physics) const
 Initialize the solution with the exact solution. More...
 
double integrate_solution_over_domain (DGBase< dim, double > &dg) const
 L2-Integral of the solution over the entire domain. More...
 
std::string get_convergence_tables_baseline_filename (const Parameters::AllParameters *const parameters_input) const
 Returns the baseline filename for outputted convergence tables.
 
void write_convergence_table_to_output_file (const std::string error_filename_baseline, const dealii::ConvergenceTable convergence_table, const unsigned int poly_degree) const
 Writes the convergence table output file.
 
- Protected Member Functions inherited from PHiLiP::Tests::TestsBase
std::vector< int > get_number_1d_cells (const int ngrids) const
 Evaluates the number of cells to generate the grids for 1D grid based on input file. More...
 
std::string get_pde_string (const Parameters::AllParameters *const param) const
 Returns a string describing which PDE is being used.
 
std::string get_conv_num_flux_string (const Parameters::AllParameters *const param) const
 Returns a string describing which convective numerical flux is being used.
 
std::string get_diss_num_flux_string (const Parameters::AllParameters *const param) const
 Returns a string describing which dissipative numerical flux is being used.
 
std::string get_manufactured_solution_string (const Parameters::AllParameters *const param) const
 Returns a string describing which manufactured solution is being used.
 

Static Protected Member Functions

static dealii::Point< dim > warp (const dealii::Point< dim > &p)
 Warps mesh into sinusoidal. More...
 

Additional Inherited Members

- Public Attributes inherited from PHiLiP::Tests::TestsBase
const Parameters::AllParameters *const all_parameters
 Pointer to all parameters.
 
- Protected Attributes inherited from PHiLiP::Tests::TestsBase
const MPI_Comm mpi_communicator
 MPI communicator.
 
const int mpi_rank
 MPI rank.
 
const int n_mpi
 
dealii::ConditionalOStream pcout
 ConditionalOStream. More...
 

Detailed Description

template<int dim, int nstate>
class PHiLiP::Tests::GridStudy< dim, nstate >

Performs grid convergence for various polynomial degrees.

Definition at line 16 of file grid_study.h.

Constructor & Destructor Documentation

◆ GridStudy()

template<int dim, int nstate>
PHiLiP::Tests::GridStudy< dim, nstate >::GridStudy ( const Parameters::AllParameters *const  parameters_input)
explicit

Constructor.

Simply calls the TestsBase constructor to set its parameters = parameters_input

Definition at line 42 of file grid_study.cpp.

Member Function Documentation

◆ initialize_perturbed_solution()

template<int dim, int nstate>
void PHiLiP::Tests::GridStudy< dim, nstate >::initialize_perturbed_solution ( DGBase< dim, double > &  dg,
const Physics::PhysicsBase< dim, nstate, double > &  physics 
) const
protected

Initialize the solution with the exact solution.

This is not an issue since the discretized solution will not be the exact solution. Therefore, the residual does not start at 0.

Definition at line 49 of file grid_study.cpp.

◆ integrate_solution_over_domain()

template<int dim, int nstate>
double PHiLiP::Tests::GridStudy< dim, nstate >::integrate_solution_over_domain ( DGBase< dim, double > &  dg) const
protected

L2-Integral of the solution over the entire domain.

Used to evaluate error of a functional.

Definition at line 65 of file grid_study.cpp.

◆ run_test()

template<int dim, int nstate>
int PHiLiP::Tests::GridStudy< dim, nstate >::run_test ( ) const
virtual

Manufactured grid convergence.

Will run the a grid convergence test for various p on multiple grids to determine the order of convergence.

Expecting the solution to converge at p+1. and output to converge at 2p+1. Note that the output solution currently convergens slightly suboptimally depending on the case (around 2p). The implementation of the boundary conditions play a large role on this adjoint consistency.

The exact solution is given by the Physics module.

Implements PHiLiP::Tests::TestsBase.

Definition at line 153 of file grid_study.cpp.

◆ warp()

template<int dim, int nstate>
dealii::Point< dim > PHiLiP::Tests::GridStudy< dim, nstate >::warp ( const dealii::Point< dim > &  p)
staticprotected

Warps mesh into sinusoidal.

Useful to check non-cartesian linear meshes

Definition at line 640 of file grid_study.cpp.


The documentation for this class was generated from the following files: