ExaDG
Loading...
Searching...
No Matches
inverse_mass_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_OPERATORS_INVERSE_MASS_PARAMETERS_H_
23#define EXADG_OPERATORS_INVERSE_MASS_PARAMETERS_H_
24
25// ExaDG
26#include <exadg/solvers_and_preconditioners/multigrid/multigrid_parameters.h>
27#include <exadg/solvers_and_preconditioners/solvers/solver_data.h>
28
29namespace ExaDG
30{
31enum class InverseMassType
32{
33 MatrixfreeOperator, // currently only available via deal.II for Hypercube elements with n_nodes_1d
34 // = n_q_points_1d
35 ElementwiseKrylovSolver,
36 BlockMatrices,
37 GlobalKrylovSolver
38};
39
40enum class PreconditionerMass
41{
42 None,
43 PointJacobi,
44 BlockJacobi,
45 AMG
46};
47
55struct InverseMassParameters
56{
57 InverseMassParameters()
58 : implementation_type(InverseMassType::MatrixfreeOperator),
59 preconditioner(PreconditionerMass::PointJacobi),
60 solver_data(SolverData(1000, 1e-12, 1e-12)),
61 amg_data(AMGData())
62 {
63 }
64
65 // The implementation type used to invert the mass operator.
66 InverseMassType implementation_type;
67
68 // This parameter is only relevant if the mass operator is inverted by an iterative solver with
69 // matrix-free implementation, `InverseMassType::ElementwiseKrylovSolver` or
70 // `InverseMassType::GlobalKrylovSolver`.
71 PreconditionerMass preconditioner;
72
73 // solver data for iterative solver in case of implementation type
74 // `InverseMassType::ElementwiseKrylovSolver` or `InverseMassType::GlobalKrylovSolver`.
75 SolverData solver_data;
76
77 // Configuration of AMG settings for `PreconditionerMass::AMG`.
78 AMGData amg_data;
79};
80
81} // namespace ExaDG
82
83#endif /* EXADG_OPERATORS_INVERSE_MASS_PARAMETERS_H_ */
Definition driver.cpp:33
Definition multigrid_parameters.h:98
Definition solver_data.h:34