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 EXADG_FLUID_STRUCTURE_INTERACTION_ACCELERATION_SCHEMES_PARAMETERS_H_
23#define EXADG_FLUID_STRUCTURE_INTERACTION_ACCELERATION_SCHEMES_PARAMETERS_H_
24
25// deal.II
26#include <deal.II/base/parameter_handler.h>
27#include <deal.II/base/patterns.h>
28
29// ExaDG
30#include <exadg/utilities/enum_patterns.h>
31
32namespace ExaDG
33{
34namespace FSI
35{
36enum class AccelerationMethod
37{
38 Undefined,
39 Aitken,
40 IQN_ILS,
41 IQN_IMVLS
42};
43
44// The initial guess used in the FSI coupling loop is computed using an extrapolation of suitable
45// order (defined within the single-field time integrators) or the last iterate from the previous
46// time step.
47enum class InitialGuessCouplingScheme
48{
49 SolutionExtrapolatedToEndOfTimeStep,
50 ConvergedSolutionOfPreviousTimeStep
51};
52
53struct Parameters
54{
55 Parameters()
56 : acceleration_method(AccelerationMethod::Undefined),
57 abs_tol(1.e-12),
58 rel_tol(1.e-3),
59 omega_init(0.1),
60 initial_guess_coupling_scheme(
61 InitialGuessCouplingScheme::SolutionExtrapolatedToEndOfTimeStep),
62 reused_time_steps(0),
63 partitioned_iter_max(100),
64 geometric_tolerance(1.e-10)
65 {
66 }
67
68 void
69 add_parameters(dealii::ParameterHandler & prm, std::string const & subsection_name = "FSI")
70 {
71 prm.enter_subsection(subsection_name);
72 {
73 prm.add_parameter("AccelerationMethod",
74 acceleration_method,
75 "Acceleration method.",
76 Patterns::Enum<AccelerationMethod>(),
77 true);
78 prm.add_parameter(
79 "AbsTol", abs_tol, "Absolute solver tolerance.", dealii::Patterns::Double(0.0, 1.0), true);
80 prm.add_parameter(
81 "RelTol", rel_tol, "Relative solver tolerance.", dealii::Patterns::Double(0.0, 1.0), true);
82 prm.add_parameter("OmegaInit",
83 omega_init,
84 "Initial relaxation parameter.",
85 dealii::Patterns::Double(0.0, 1.0),
86 true);
87 prm.add_parameter("InitialGuessCouplingScheme",
88 initial_guess_coupling_scheme,
89 "Scheme for initial guess for the FSI coupling loop at every time step.",
90 Patterns::Enum<InitialGuessCouplingScheme>(),
91 false);
92 prm.add_parameter("ReusedTimeSteps",
93 reused_time_steps,
94 "Number of time steps reused for acceleration.",
95 dealii::Patterns::Integer(0, 100),
96 false);
97 prm.add_parameter("PartitionedIterMax",
98 partitioned_iter_max,
99 "Maximum number of fixed-point iterations.",
100 dealii::Patterns::Integer(1, 1000),
101 true);
102 prm.add_parameter("GeometricTolerance",
103 geometric_tolerance,
104 "Tolerance used to locate points at FSI interface.",
105 dealii::Patterns::Double(0.0, 1.0),
106 false);
107 }
108 prm.leave_subsection();
109 }
110
111 AccelerationMethod acceleration_method;
112 double abs_tol;
113 double rel_tol;
114 double omega_init;
115 InitialGuessCouplingScheme initial_guess_coupling_scheme;
116 unsigned int reused_time_steps;
117 unsigned int partitioned_iter_max;
118
119 // tolerance used to locate points at the fluid-structure interface
120 double geometric_tolerance;
121};
122
123} // namespace FSI
124} // namespace ExaDG
125
126#endif /* EXADG_FLUID_STRUCTURE_INTERACTION_ACCELERATION_SCHEMES_PARAMETERS_H_ */
Definition driver.cpp:33