7#include <deal.II/base/parameter_handler.h>
8#include <deal.II/base/patterns.h>
17 <<
"QMOM boundary id: " << arg1
18 <<
" has already been declared as a boundary condition");
25 ParameterHandler &prm,
26 const types::boundary_id default_boundary_id)
31 "Type of boundary condition for the QMOM fields.");
33 prm.declare_entry(
"id",
34 Utilities::int_to_string(default_boundary_id, 2),
35 Patterns::List(Patterns::Integer()),
36 "Mesh id for boundary conditions");
38 prm.enter_subsection(
"dirichlet");
40 prm.leave_subsection();
46 ParameterHandler &prm,
49 prm.enter_subsection(
"boundary conditions qmom");
51 prm.declare_entry(
"number",
54 "Number of boundary conditions");
60 "Bool to define if the boundary condition is time-dependent");
64 prm.enter_subsection(
"bc " + std::to_string(i_bc));
68 prm.leave_subsection();
71 prm.leave_subsection();
78 const std::vector<types::boundary_id> boundary_ids =
82 boundary_ids.size() > 0,
84 "A boundary id has not been set for one of the QMOM boundary conditions. Please ensure that the id is set for every boundary condition."));
88 for (
const auto boundary_id : boundary_ids)
90 AssertThrow(this->
type.find(boundary_id) == this->type.end(),
91 QMOMBoundaryDuplicated(boundary_id));
93 this->
type[boundary_id] = boundary_type;
96 prm.enter_subsection(
"dirichlet");
97 dirichlet[boundary_id].parse_parameters(prm);
98 prm.leave_subsection();
107 prm.enter_subsection(
"boundary conditions qmom");
115 prm.enter_subsection(
"bc " + std::to_string(i_bc));
119 prm.leave_subsection();
122 prm.leave_subsection();
std::map< types::boundary_id, QMOMBoundaryType > type
unsigned int number_of_boundary_conditions
Boundary conditions of the QMOM physics. They apply to the advective flux of all the QMOM fields (sca...
void declare_default_entry(ParameterHandler &prm, const types::boundary_id default_boundary_id)
Declare the parameters of one boundary condition.
void declare_parameters(ParameterHandler &prm, const unsigned int number_of_boundary_conditions)
Declare the "boundary conditions qmom" subsection.
void parse_parameters(ParameterHandler &prm)
Parse the "boundary conditions qmom" subsection.
void parse_boundary(ParameterHandler &prm)
Parse one boundary condition.
std::map< types::boundary_id, Parameters::QMOMFunctions< dim > > dirichlet
std::vector< T > convert_string_to_vector(const ParameterHandler &prm, const std::string &entry_string)
Return the vector of size N of entry @entry_string. If the entry is specified in the ....
EnumType string_to_enum(const std::string &name)
Return the enumerator whose identifier is name, e.g. to parse the value of a parameter entry into its...
void declare_enum_entry(ParameterHandler &prm, const std::string &entry_name, const EnumType default_value, const std::string &description, const DeprecatedEnumNames< EnumType > &deprecated_names={}, const std::vector< EnumType > &allowed_values={})
Declare a parameter entry whose value is an enumerator. The default value, the accepted values and th...
QMOMBoundaryType
Boundary condition types of the QMOM physics.
DeclException1(QMOMBoundaryDuplicated, types::boundary_id,<< "QMOM boundary id: "<< arg1<< " has already been declared as a boundary condition")
static void declare_parameters(ParameterHandler &prm)
Declare the "scalars" and "distribution" subsections in the current subsection. All the functions are...