ExaDG
Toggle main menu visibility
Loading...
Searching...
No Matches
include
exadg
operators
mass_kernel.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_MASS_KERNEL_H_
23
#define EXADG_OPERATORS_MASS_KERNEL_H_
24
25
// ExaDG
26
#include <exadg/matrix_free/integrators.h>
27
#include <exadg/operators/integrator_flags.h>
28
#include <exadg/operators/mapping_flags.h>
29
#include <exadg/operators/variable_coefficients.h>
30
31
namespace
ExaDG
32
{
33
template
<
int
dim,
typename
Number>
34
class
MassKernel
35
{
36
public
:
37
MassKernel()
38
{
39
}
40
41
IntegratorFlags
42
get_integrator_flags()
const
43
{
44
IntegratorFlags
flags;
45
46
flags.cell_evaluate = dealii::EvaluationFlags::values;
47
flags.cell_integrate = dealii::EvaluationFlags::values;
48
49
return
flags;
50
}
51
52
static
MappingFlags
53
get_mapping_flags()
54
{
55
MappingFlags
flags;
56
57
flags.cells = dealii::update_JxW_values;
58
59
// no face integrals
60
61
return
flags;
62
}
63
64
/*
65
* Volume flux, i.e., the term occurring in the volume integral
66
*/
67
template
<
typename
T>
68
inline
DEAL_II_ALWAYS_INLINE
//
69
T
70
get_volume_flux(
double
scaling_factor, T
const
& value)
const
71
{
72
return
scaling_factor * value;
73
}
74
75
/*
76
* Variable coefficients not managed by this class.
77
*/
78
void
79
set_variable_coefficients_ptr(
80
VariableCoefficients
<dealii::VectorizedArray<Number>>
const
* variable_coefficients_in)
81
{
82
variable_coefficients = variable_coefficients_in;
83
}
84
85
VariableCoefficients<dealii::VectorizedArray<Number>
>
const
*
86
get_variable_coefficients_ptr()
const
87
{
88
return
variable_coefficients;
89
}
90
91
private
:
92
VariableCoefficients<dealii::VectorizedArray<Number>
>
const
* variable_coefficients;
93
};
94
95
}
// namespace ExaDG
96
97
#endif
/* EXADG_OPERATORS_MASS_KERNEL_H_ */
ExaDG::VariableCoefficients
Definition
variable_coefficients.h:40
ExaDG
Definition
driver.cpp:33
ExaDG::IntegratorFlags
Definition
integrator_flags.h:31
ExaDG::MappingFlags
Definition
mapping_flags.h:31
Generated by
1.17.0