ExaDG
Loading...
Searching...
No Matches
include
exadg
solvers_and_preconditioners
multigrid
levels_hybrid_multigrid.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_SOLVERS_AND_PRECONDITIONERS_MULTIGRID_LEVELS_HYBRID_MULTIGRID_H_
23
#define INCLUDE_EXADG_SOLVERS_AND_PRECONDITIONERS_MULTIGRID_LEVELS_HYBRID_MULTIGRID_H_
24
25
namespace
ExaDG
26
{
27
struct
MGDoFHandlerIdentifier
28
{
29
MGDoFHandlerIdentifier
(
unsigned
int
degree,
bool
is_dg) : degree(degree), is_dg(is_dg)
30
{
31
}
32
33
bool
34
operator<(
MGDoFHandlerIdentifier
const
& other)
const
35
{
36
return
not((degree >= other.degree) and (is_dg >= other.is_dg));
37
}
38
39
bool
40
operator==(
MGDoFHandlerIdentifier
const
& other)
const
41
{
42
return
(degree == other.degree) and (is_dg == other.is_dg);
43
}
44
45
unsigned
int
degree;
46
bool
is_dg;
47
};
48
49
struct
MGLevelInfo
50
{
51
MGLevelInfo
(
unsigned
int
h_level,
unsigned
int
dealii_tria_level,
unsigned
int
degree,
bool
is_dg)
52
: _h_level(h_level), _dealii_tria_level(dealii_tria_level), _dof_handler_id(degree, is_dg)
53
{
54
}
55
56
MGLevelInfo
(
unsigned
int
h_level,
57
unsigned
int
dealii_tria_level,
58
MGDoFHandlerIdentifier
dof_handler_id)
59
: _h_level(h_level), _dealii_tria_level(dealii_tria_level), _dof_handler_id(dof_handler_id)
60
{
61
}
62
63
unsigned
int
64
h_level()
const
65
{
66
return
_h_level;
67
}
68
69
unsigned
int
70
dealii_tria_level()
const
71
{
72
return
_dealii_tria_level;
73
}
74
75
unsigned
int
76
degree()
const
77
{
78
return
_dof_handler_id.degree;
79
}
80
81
bool
82
is_dg()
const
83
{
84
return
_dof_handler_id.is_dg;
85
}
86
87
MGDoFHandlerIdentifier
88
dof_handler_id()
const
89
{
90
return
_dof_handler_id;
91
}
92
93
private
:
97
unsigned
int
_h_level;
98
104
unsigned
int
_dealii_tria_level;
105
106
107
MGDoFHandlerIdentifier
_dof_handler_id;
108
};
109
110
}
// namespace ExaDG
111
112
113
#endif
/* INCLUDE_EXADG_SOLVERS_AND_PRECONDITIONERS_MULTIGRID_LEVELS_HYBRID_MULTIGRID_H_ */
ExaDG
Definition
driver.cpp:33
ExaDG::MGDoFHandlerIdentifier
Definition
levels_hybrid_multigrid.h:28
ExaDG::MGLevelInfo
Definition
levels_hybrid_multigrid.h:50
Generated by
1.10.0