117 std::tuple<unsigned int, unsigned int, unsigned int>(degree, l, n_subdivisions_1d));
136 std::tuple<unsigned int, unsigned int, unsigned int>(degree, l, n_subdivisions_1d));
158 std::tuple<unsigned int, unsigned int, unsigned int>(degree, l, n_subdivisions_1d));
189 dealii::ParameterHandler prm;
191 prm.parse_input(input_file,
"",
true,
true);
197 add_parameters(dealii::ParameterHandler & prm)
199 prm.enter_subsection(
"Resolution");
202 "RunType", run_type,
"Type of throughput study.", Patterns::Enum<RunType>(),
true);
204 "ElementType", element_type,
"Type of elements.", Patterns::Enum<ElementType>(),
true);
205 prm.add_parameter(
"DegreeMin",
207 "Minimal polynomial degree of shape functions.",
208 dealii::Patterns::Integer(1),
210 prm.add_parameter(
"DegreeMax",
212 "Maximal polynomial degree of shape functions.",
213 dealii::Patterns::Integer(1),
215 prm.add_parameter(
"RefineSpaceMin",
217 "Minimal number of mesh refinements.",
218 dealii::Patterns::Integer(0, 20),
220 prm.add_parameter(
"RefineSpaceMax",
222 "Maximal number of mesh refinements.",
223 dealii::Patterns::Integer(0, 20),
225 prm.add_parameter(
"DofsMin",
227 "Minimal number of degrees of freedom.",
228 dealii::Patterns::Integer(1),
230 prm.add_parameter(
"DofsMax",
232 "Maximal number of degrees of freedom.",
233 dealii::Patterns::Integer(1),
236 prm.leave_subsection();
242 if(run_type == RunType::RefineHAndP)
244 AssertThrow(degree_max >= degree_min, dealii::ExcMessage(
"Invalid parameters."));
245 AssertThrow(refine_space_max >= refine_space_min, dealii::ExcMessage(
"Invalid parameters."));
247 else if(run_type == RunType::FixedProblemSize)
249 AssertThrow(degree_max >= degree_min, dealii::ExcMessage(
"Invalid parameters."));
250 AssertThrow(n_dofs_max >= n_dofs_min, dealii::ExcMessage(
"Invalid parameters."));
252 else if(run_type == RunType::IncreasingProblemSize)
255 degree_min == degree_max,
257 "Only a single polynomial degree can be considered for RunType::IncreasingProblemSize"));
259 AssertThrow(n_dofs_max >= n_dofs_min, dealii::ExcMessage(
"Invalid parameters."));
263 AssertThrow(
false, dealii::ExcMessage(
"not implemented."));
268 fill_resolution_vector(
269 std::function<
unsigned int(
unsigned int,
unsigned int, ElementType)>
const &
270 get_dofs_per_element)
272 if(run_type == RunType::RefineHAndP)
274 unsigned int const n_cells_1d = 1;
277 for(
unsigned int degree = degree_min; degree <= degree_max; ++degree)
280 for(
unsigned int refine_space = refine_space_min; refine_space <= refine_space_max;
283 resolutions.push_back(
284 std::tuple<unsigned int, unsigned int, unsigned int>(degree, refine_space, n_cells_1d));
288 else if(run_type == RunType::FixedProblemSize or run_type == RunType::IncreasingProblemSize)
290 for(
unsigned int degree = degree_min; degree <= degree_max; ++degree)
292 unsigned int dofs_per_element = get_dofs_per_element(dim, degree, element_type);
293 fill_resolutions_vector(resolutions,
305 AssertThrow(
false, dealii::ExcMessage(
"Not implemented."));
309 unsigned int dim = 2;
311 RunType run_type = RunType::RefineHAndP;
313 ElementType element_type = ElementType::Hypercube;
315 unsigned int degree_min = 3;
316 unsigned int degree_max = 3;
318 unsigned int refine_space_min = 0;
319 unsigned int refine_space_max = 0;
321 dealii::types::global_dof_index n_dofs_min = 1e4;
322 dealii::types::global_dof_index n_dofs_max = 3e4;
325 std::vector<std::tuple<unsigned int, unsigned int, unsigned int>> resolutions;