1 #include "parameters_manufactured_convergence_study.h"     8     prm.enter_subsection(
"manufactured solution convergence study");
    12         prm.declare_entry(
"grid_type", 
"hypercube",
    13                           dealii::Patterns::Selection(
"hypercube|sinehypercube|read_grid"),
    14                           "Enum of generated grid. "    15                           "If read_grid, must have grids xxxx#.msh, where # is the grid numbering from 0 to number_of_grids-1."    16                           "Choices are <hypercube|sinehypercube|read_grid>.");
    18         prm.declare_entry(
"input_grids", 
"xxxx",
    19                           dealii::Patterns::FileName(dealii::Patterns::FileName::FileType::input),
    20                           "Prefix of Gmsh grids xxxx#.msh used in the grid convergence if read_grid is chosen as the grid_type. ");
    22         prm.declare_entry(
"output_meshes", 
"false",
    23                           dealii::Patterns::Bool(),
    24                           "Writes out meshes used for the simulation."    25                           "Output will be Gmsh grids named grid-#.msh");
    27         prm.declare_entry(
"random_distortion", 
"0.0",
    28                           dealii::Patterns::Double(0.0, 0.5),
    29                           "Randomly disturb grid."    30                           "Displaces node by percentage of longest associated edge.");
    32         prm.declare_entry(
"initial_grid_size", 
"2",
    33                           dealii::Patterns::Integer(),
    34                           "Initial grid of size (initial_grid_size)^dim");
    35         prm.declare_entry(
"number_of_grids", 
"4",
    36                           dealii::Patterns::Integer(),
    37                           "Number of grids in grid study");
    38         prm.declare_entry(
"grid_progression", 
"1.5",
    39                           dealii::Patterns::Double(),
    40                           "Multiplier on grid size. "    41                           "ith-grid will be of size (initial_grid*(i*grid_progression)+(i*grid_progression_add))^dim");
    42         prm.declare_entry(
"grid_progression_add", 
"0",
    43                           dealii::Patterns::Integer(),
    44                           "Adds number of cell to 1D grid. "    45                           "ith-grid will be of size (initial_grid*(i*grid_progression)+(i*grid_progression_add))^dim");
    47         prm.declare_entry(
"slope_deficit_tolerance", 
"0.1",
    48                           dealii::Patterns::Double(),
    49                           "Tolerance within which the convergence orders are considered to be optimal. ");
    51         prm.declare_entry(
"degree_start", 
"0",
    52                           dealii::Patterns::Integer(),
    53                           "Starting degree for convergence study");
    54         prm.declare_entry(
"degree_end", 
"3",
    55                           dealii::Patterns::Integer(),
    56                           "Last degree used for convergence study");
    58         prm.declare_entry(
"output_convergence_tables", 
"false",
    59                           dealii::Patterns::Bool(),
    60                           "Writes the convergence tables for each polynomial degree p."    61                           "Output will be txt files named convergence_table_[dim]d_[pde_string]_[conv_num_flux_string]_[diss_num_flux_string]_[manufactured_solution_string]_p[poly_degree].txt");
    63         prm.declare_entry(
"output_solution", 
"false",
    64                           dealii::Patterns::Bool(),
    65                           "Writes the solution files."    66                           "Output will be vtu and pvtu files.");
    68         prm.declare_entry(
"add_statewise_solution_error_to_convergence_tables", 
"false",
    69                           dealii::Patterns::Bool(),
    70                           "Adds the soln_L2_error of each state to the convergence table."    71                           "Field names are soln_L2_error_state_istate, where istate=[0,1,...,nstate-1]");
    73     prm.leave_subsection();
    78     prm.enter_subsection(
"manufactured solution convergence study");
    82         const std::string grid_string = prm.get(
"grid_type");
    83         if (grid_string == 
"hypercube") 
grid_type = GridEnum::hypercube;
    84         if (grid_string == 
"sinehypercube") 
grid_type = GridEnum::sinehypercube;
    85         if (grid_string == 
"read_grid") {
   107     prm.leave_subsection();
 unsigned int degree_start
First polynomial degree to start the loop. If diffusion, must be at least 1. 
double random_distortion
Will randomly distort mesh except on boundaries. 
bool output_solution
Output the solution files (for each p and grid) as vtu and pvtu files; currently only works for tests...
bool add_statewise_solution_error_to_convergence_tables
Adds the statewise solution L2 error to the convergence tables; currently only works for tests using ...
double slope_deficit_tolerance
Tolerance within which the convergence orders are considered to be optimal. 
bool output_meshes
Output the meshes as in a Gmsh format. 
unsigned int degree_end
Last polynomial degree to loop. 
void parse_parameters(dealii::ParameterHandler &prm)
Parses input file and sets the variables. 
Files for the baseline physics. 
GridEnum grid_type
Grid type. 
ManufacturedSolutionParam manufactured_solution_param
Associated manufactured solution parameters. 
unsigned int initial_grid_size
bool output_convergence_tables
Output the convergence tables (for each p) as txt files; currently only works for tests using grid_st...
void parse_parameters(dealii::ParameterHandler &prm)
Parses input file and sets the variables. 
int grid_progression_add
Adds number of cells to 1D grid. 
std::string input_grids
Name of the input grids if read_grid. 
static void declare_parameters(dealii::ParameterHandler &prm)
Declares the possible variables and sets the defaults. 
double grid_progression
Multiplies the last grid size by this amount. 
static void declare_parameters(dealii::ParameterHandler &prm)
Declares the possible variables and sets the defaults. 
unsigned int number_of_grids
Number of grid in the grid study.