ExaDG
Loading...
Searching...
No Matches
parameters.h
1/* ______________________________________________________________________
2 *
3 * ExaDG - High-Order Discontinuous Galerkin for the Exa-Scale
4 *
5 * Copyright (C) 2021 by the ExaDG authors
6 *
7 * This program is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program. If not, see <https://www.gnu.org/licenses/>.
19 * ______________________________________________________________________
20 */
21
22#ifndef INCLUDE_EXADG_FLUID_STRUCTURE_INTERACTION_ACCELERATION_SCHEMES_PARAMETERS_H_
23#define INCLUDE_EXADG_FLUID_STRUCTURE_INTERACTION_ACCELERATION_SCHEMES_PARAMETERS_H_
24
25namespace ExaDG
26{
27namespace FSI
28{
29enum class AccelerationMethod
30{
31 Undefined,
32 Aitken,
33 IQN_ILS,
34 IQN_IMVLS
35};
36
38{
40 : acceleration_method(AccelerationMethod::Undefined),
41 abs_tol(1.e-12),
42 rel_tol(1.e-3),
43 omega_init(0.1),
44 reused_time_steps(0),
45 partitioned_iter_max(100),
46 geometric_tolerance(1.e-10)
47 {
48 }
49
50 void
51 add_parameters(dealii::ParameterHandler & prm, std::string const & subsection_name = "FSI")
52 {
53 prm.enter_subsection(subsection_name);
54 {
55 prm.add_parameter("AccelerationMethod",
56 acceleration_method,
57 "Acceleration method.",
58 Patterns::Enum<AccelerationMethod>(),
59 true);
60 prm.add_parameter(
61 "AbsTol", abs_tol, "Absolute solver tolerance.", dealii::Patterns::Double(0.0, 1.0), true);
62 prm.add_parameter(
63 "RelTol", rel_tol, "Relative solver tolerance.", dealii::Patterns::Double(0.0, 1.0), true);
64 prm.add_parameter("OmegaInit",
65 omega_init,
66 "Initial relaxation parameter.",
67 dealii::Patterns::Double(0.0, 1.0),
68 true);
69 prm.add_parameter("ReusedTimeSteps",
70 reused_time_steps,
71 "Number of time steps reused for acceleration.",
72 dealii::Patterns::Integer(0, 100),
73 false);
74 prm.add_parameter("PartitionedIterMax",
75 partitioned_iter_max,
76 "Maximum number of fixed-point iterations.",
77 dealii::Patterns::Integer(1, 1000),
78 true);
79 prm.add_parameter("GeometricTolerance",
80 geometric_tolerance,
81 "Tolerance used to locate points at FSI interface.",
82 dealii::Patterns::Double(0.0, 1.0),
83 false);
84 }
85 prm.leave_subsection();
86 }
87
88 AccelerationMethod acceleration_method;
89 double abs_tol;
90 double rel_tol;
91 double omega_init;
92 unsigned int reused_time_steps;
93 unsigned int partitioned_iter_max;
94
95 // tolerance used to locate points at the fluid-structure interface
96 double geometric_tolerance;
97};
98} // namespace FSI
99} // namespace ExaDG
100
101
102
103#endif /* INCLUDE_EXADG_FLUID_STRUCTURE_INTERACTION_ACCELERATION_SCHEMES_PARAMETERS_H_ */
Definition driver.cpp:33
Definition parameters.h:38