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