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_POISSON_USER_INTERFACE_PARAMETERS_H_
23#define EXADG_POISSON_USER_INTERFACE_PARAMETERS_H_
24
25// ExaDG
26#include <exadg/grid/grid_data.h>
27#include <exadg/operators/enum_types.h>
28#include <exadg/poisson/user_interface/enum_types.h>
29#include <exadg/solvers_and_preconditioners/multigrid/multigrid_parameters.h>
30#include <exadg/solvers_and_preconditioners/solvers/solver_data.h>
31#include <exadg/utilities/print_functions.h>
32
33namespace ExaDG
34{
35namespace Poisson
36{
37class Parameters
38{
39public:
40 // standard constructor that initializes parameters with default values
41 Parameters();
42
43 void
44 check() const;
45
46 bool
47 involves_h_multigrid() const;
48
49 void
50 print(dealii::ConditionalOStream const & pcout, std::string const & name) const;
51
52private:
53 void
54 print_parameters_mathematical_model(dealii::ConditionalOStream const & pcout) const;
55
56 void
57 print_parameters_spatial_discretization(dealii::ConditionalOStream const & pcout) const;
58
59 void
60 print_parameters_solver(dealii::ConditionalOStream const & pcout) const;
61
62 void
63 print_parameters_numerical_parameters(dealii::ConditionalOStream const & pcout) const;
64
65public:
66 /**************************************************************************************/
67 /* */
68 /* MATHEMATICAL MODEL */
69 /* */
70 /**************************************************************************************/
71
72 // if the right-hand side f is unequal zero, set right_hand_side = true
73 bool right_hand_side;
74
75 /**************************************************************************************/
76 /* */
77 /* SPATIAL DISCRETIZATION */
78 /* */
79 /**************************************************************************************/
80
81 // Grid data
82 GridData grid;
83
84 // Mapping
85 unsigned int mapping_degree;
86
87 // mapping degree for coarser grids in h-multigrid
88 unsigned int mapping_degree_coarse_grids;
89
90 // type of spatial discretization approach
91 SpatialDiscretization spatial_discretization;
92
93 // polynomial degree of shape functions
94 unsigned int degree;
95
96 // Symmetric interior penalty Galerkin (SIPG) discretization
97 // interior penalty parameter scaling factor: default value is 1.0
98 double IP_factor;
99
100 // use a matrix-based implementation of linear(ized) operators
101 bool use_matrix_based_implementation;
102
103 // this parameter is only relevant if use_matrix_based_implementation == true
104 SparseMatrixType sparse_matrix_type;
105
106
107 /**************************************************************************************/
108 /* */
109 /* SOLVER */
110 /* */
111 /**************************************************************************************/
112
113 // description: see enum declaration
114 LinearSolver solver;
115
116 // solver data
117 SolverData solver_data;
118 bool compute_performance_metrics;
119
120 // description: see enum declaration
121 Preconditioner preconditioner;
122
123 // description: see declaration of MultigridData
124 MultigridData multigrid_data;
125
126 /**************************************************************************************/
127 /* */
128 /* NUMERICAL PARAMETERS */
129 /* */
130 /**************************************************************************************/
131
132 // By default, the matrix-free implementation performs separate loops over all cells,
133 // interior faces, and boundary faces. For a certain type of operations, however, it
134 // is necessary to perform the face-loop as a loop over all faces of a cell with an
135 // outer loop over all cells, e.g., preconditioners operating on the level of
136 // individual cells (for example block Jacobi). With this parameter, the loop structure
137 // can be changed to such an algorithm (cell_based_face_loops).
138 bool enable_cell_based_face_loops;
139};
140
141} // namespace Poisson
142} // namespace ExaDG
143
144#endif /* EXADG_POISSON_USER_INTERFACE_PARAMETERS_H_ */
Definition driver.cpp:33
Definition grid_data.h:88
Definition multigrid_parameters.h:259
Definition solver_data.h:34