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_STRUCTURE_USER_INTERFACE_INPUT_PARAMETERS_H_
23#define INCLUDE_EXADG_STRUCTURE_USER_INTERFACE_INPUT_PARAMETERS_H_
24
25// ExaDG
26#include <exadg/grid/grid_data.h>
27#include <exadg/solvers_and_preconditioners/multigrid/multigrid_parameters.h>
28#include <exadg/solvers_and_preconditioners/newton/newton_solver_data.h>
29#include <exadg/solvers_and_preconditioners/solvers/solver_data.h>
30#include <exadg/structure/user_interface/enum_types.h>
31#include <exadg/time_integration/enum_types.h>
32#include <exadg/time_integration/restart_data.h>
33#include <exadg/time_integration/solver_info_data.h>
34
35namespace ExaDG
36{
37namespace Structure
38{
40{
41public:
42 // standard constructor that initializes parameters with default values
43 Parameters();
44
45 void
46 check() const;
47
48 bool
49 involves_h_multigrid() const;
50
51 void
52 print(dealii::ConditionalOStream const & pcout, std::string const & name) const;
53
54private:
55 void
56 print_parameters_mathematical_model(dealii::ConditionalOStream const & pcout) const;
57
58 void
59 print_parameters_physical_quantities(dealii::ConditionalOStream const & pcout) const;
60
61 void
62 print_parameters_temporal_discretization(dealii::ConditionalOStream const & pcout) const;
63
64 void
65 print_parameters_spatial_discretization(dealii::ConditionalOStream const & pcout) const;
66
67 void
68 print_parameters_solver(dealii::ConditionalOStream const & pcout) const;
69
70public:
71 /**************************************************************************************/
72 /* */
73 /* MATHEMATICAL MODEL */
74 /* */
75 /**************************************************************************************/
76
77 // description: see enum declaration
78 ProblemType problem_type;
79
80 // set true in order to consider body forces
81 bool body_force;
82
83 // are large deformations to be expected, than compute with non linear method
84 bool large_deformation;
85
86 // For nonlinear problems with large deformations, it is important to specify whether
87 // the body forces are formulated with respect to the current deformed configuration
88 // or the reference configuration.
89 //
90 // Option 1: pull_back_body_force = false
91 // In this case, the body force is specified as force per undeformed volume. A typical
92 // use case are density-proportional forces such as the gravitational force. The body
93 // is then directly described in reference space, b_0 = rho_0 * g, and the pull-back to
94 // the reference configuration is deactivated.
95 //
96 // Option 2: pull_back_body_force = true
97 // The body force is specified as force per deformed volume, and the body force needs
98 // to be pulled-back according to b_0 = dv/dV * b, where the volume ratio dv/dV depends
99 // on the current state of deformation.
100 bool pull_back_body_force;
101
102 // For nonlinear problems with large deformations, it is important to specify whether
103 // the traction Neumann boundary condition is formulated with respect to the current
104 // deformed configuration or the reference configuration. Both cases appear in practice,
105 // so it needs to be specified by the user which formulation is to be used.
106 //
107 // Option 1: pull_back_traction = false
108 // In this case, the traction is specified as a force per undeformed area, e.g., a
109 // force of fixed amount distributed uniformly over a surface of the body. The force per
110 // deformed area is an unknown. Hence, it is more natural to specify the traction in the
111 // reference configuration and deactivate the pull-back from the current to the reference
112 // configuration.
113 //
114 // Option 2: pull_back_traction = true
115 // The traction is known as a force per area of the deformed body. In this case, the
116 // traction needs to be pulled-back to the reference configuration, i.e., t_0 = da/dA * t,
117 // where the surface area ratio da/dA depends on the current state of deformation.
118 // A typical use case would be fluid-structure-interaction problems where the fluid
119 // stresses are applied as traction boundary conditions for the structure. Note that
120 // the direction of the traction vector does not change by this pull-back operation.
121 bool pull_back_traction;
122
123 /**************************************************************************************/
124 /* */
125 /* PHYSICAL QUANTITIES */
126 /* */
127 /**************************************************************************************/
128
129 // density rho_0 in initial configuration (only relevant for unsteady problems)
130 double density;
131
132 // linear weak damping coefficient (mass proportional) for unsteady problems
133 bool weak_damping_active;
134 double weak_damping_coefficient;
135
136 /**************************************************************************************/
137 /* */
138 /* TEMPORAL DISCRETIZATION */
139 /* */
140 /**************************************************************************************/
141
142 double start_time;
143 double end_time;
144 double time_step_size;
145 unsigned int max_number_of_time_steps;
146
147 // number of refinements for temporal discretization
148 unsigned int n_refine_time;
149
150 GenAlphaType gen_alpha_type;
151
152 // spectral radius rho_infty for generalized alpha time integration scheme
153 double spectral_radius;
154
155 // configure printing of solver performance (wall time, number of iterations)
156 SolverInfoData solver_info_data;
157
158 // set this variable to true to start the simulation from restart files
159 bool restarted_simulation;
160
161 // restart
162 RestartData restart_data;
163
164 // quasi-static solver
165
166 // choose a value in [0,1] where 1 = maximum load (Neumann or Dirichlet)
167 double load_increment;
168
169 /**************************************************************************************/
170 /* */
171 /* SPATIAL DISCRETIZATION */
172 /* */
173 /**************************************************************************************/
174
175 // Grid data
176 GridData grid;
177
178 // Mapping
179 unsigned int mapping_degree;
180
181 // mapping degree for coarser grids in h-multigrid
182 unsigned int mapping_degree_coarse_grids;
183
184 // polynomial degree of shape functions
185 unsigned int degree;
186
187 /**************************************************************************************/
188 /* */
189 /* SOLVER */
190 /* */
191 /**************************************************************************************/
192
193 // Newton solver data (only relevant for nonlinear problems)
194 Newton::SolverData newton_solver_data;
195
196 // description: see enum declaration
197 Solver solver;
198
199 // solver data
200 SolverData solver_data;
201
202 // description: see enum declaration
203 Preconditioner preconditioner;
204
205 // Applies to time-dependent OR nonlinear problems: update of preconditioner
206
207 // Should the preconditioner be updated at all (set to false to never update the
208 // preconditioner)?
209 bool update_preconditioner;
210 // If the above option is set to true, one can specify in more detail when to update
211 // the preconditioner exactly:
212 // - every ... time steps (or load steps for QuasiStatic problems)
213 unsigned int update_preconditioner_every_time_steps;
214 // and within a time step or load step:
215 // - every ... Newton iterations (first update is invoked in the first Newton iteration)
216 unsigned int update_preconditioner_every_newton_iterations;
217 // - or once the Newton solver converged successfully (this option is currently used
218 // in order to avoid invalid deformation states in non-converged Newton iterations)
219 bool update_preconditioner_once_newton_converged;
220
221 // description: see declaration of MultigridData
222 MultigridData multigrid_data;
223};
224
225} // namespace Structure
226} // namespace ExaDG
227
228#endif
Definition parameters.h:40
Definition driver.cpp:33
Definition grid_data.h:88
Definition multigrid_parameters.h:259
Definition newton_solver_data.h:36
Definition restart_data.h:38
Definition solver_data.h:34
Definition solver_info_data.h:38