1 #include "parameters_manufactured_solution.h"     3 #include <deal.II/base/tensor.h>    11     prm.declare_entry(
"use_manufactured_source_term", 
"false",
    12                       dealii::Patterns::Bool(),
    13                       "Uses non-zero source term based on the manufactured solution and the PDE.");
    15     prm.declare_entry(
"manufactured_solution_type",
"exp_solution",
    16                       dealii::Patterns::Selection(
    20                       " additive_solution | "    23                       " even_poly_solution | "    25                       " boundary_layer_solution | "    26                       " s_shock_solution | "    27                       " quadratic_solution | "    28                       " example_solution | "    29                       " navah_solution_1 | "    30                       " navah_solution_2 | "    31                       " navah_solution_3 | "    32                       " navah_solution_4 | "    35                       "The manufactured solution we want to use (if use_manufactured_source_term==true). "    40                       "  additive_solution | "    43                       "  even_poly_solution | "    45                       "  boundary_layer_solution | "    46                       "  s_shock_solution | "    47                       "  quadratic_solution | "    48                       "  navah_solution_1 | "    49                       "  navah_solution_2 | "    50                       "  navah_solution_3 | "    51                       "  navah_solution_4 | "    52                       "  navah_solution_5>.");
    56     for(
int i = 0; i < 3; ++i)
    58         for(
int j = 0; j < 3; ++j)
    60             const std::string str_i = std::to_string(i);
    61             const std::string str_j = std::to_string(j);
    62             const std::string name = 
    63                 "diffusion_" + str_i + str_j;
    64             const std::string description = 
    65                 "[" + str_i + 
"," + str_j + 
"] term of diffusion tensor.";
    66             prm.declare_entry(name, std::to_string(default_diffusion_tensor[i][j]),
    67                               dealii::Patterns::Double(),
    74     for(
int i = 0; i < 3; ++i)
    76         const std::string str_i = std::to_string(i);
    77         const std::string name = 
    79         const std::string description = 
    80             "[" + str_i + 
"] term of advection vector.";
    81         prm.declare_entry(name, std::to_string(default_advection_vector[i]),
    82                           dealii::Patterns::Double(),
    88                       dealii::Patterns::Double(),
    89                       "Set the diffusion matrix coefficient.");
    97     const std::string manufactured_solution_string = prm.get(
"manufactured_solution_type");
   135     dealii::Tensor<2,3,double> default_diffusion_tensor;
   149     default_diffusion_tensor[0][0] = 12;
   150     default_diffusion_tensor[0][1] = 3;
   151     default_diffusion_tensor[1][0] = 3;
   152     default_diffusion_tensor[1][1] = 20;
   153     default_diffusion_tensor[0][2] = -2;
   154     default_diffusion_tensor[2][0] = 2;
   155     default_diffusion_tensor[2][1] = 5;
   156     default_diffusion_tensor[1][2] = -5;
   157     default_diffusion_tensor[2][2] = 18;
   159     return default_diffusion_tensor;
   164     dealii::Tensor<1,3,double> default_advection_vector;
   166     const double pi = atan(1)*4.0;
   167     const double ee = exp(1);
   169     default_advection_vector[0] = 1.1;
   170     default_advection_vector[1] = -pi/ee;
   171     default_advection_vector[2] = ee/pi;
   173     return default_advection_vector;
   178     const double pi = atan(1)*4.0;
   179     const double ee = exp(1);
 double diffusion_coefficient
Diffusion coefficient. 
static dealii::Tensor< 1, 3, double > get_default_advection_vector()
gets the default advection vector 
void parse_parameters(dealii::ParameterHandler &prm)
Parses input file and sets the variables. 
Files for the baseline physics. 
static dealii::Tensor< 2, 3, double > get_default_diffusion_tensor()
gets the default diffusion tensor 
bool use_manufactured_source_term
Uses non-zero source term based on the manufactured solution and the PDE. 
dealii::Tensor< 1, 3, double > advection_vector
Advection velocity. 
dealii::Tensor< 2, 3, double > diffusion_tensor
Diffusion tensor. 
static double get_default_diffusion_coefficient()
gets the default diffusion coefficient; 
ManufacturedSolutionType manufactured_solution_type
Selected ManufacturedSolutionType from the input file. 
static void declare_parameters(dealii::ParameterHandler &prm)
Declares the possible variables and sets the defaults.