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