ExaDG
Loading...
Searching...
No Matches
mass_operator.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_OPERATORS_MASS_OPERATOR_H_
23#define INCLUDE_OPERATORS_MASS_OPERATOR_H_
24
25#include <exadg/matrix_free/integrators.h>
26#include <exadg/operators/mass_kernel.h>
27#include <exadg/operators/operator_base.h>
28
29namespace ExaDG
30{
31template<int dim>
33{
35 {
36 }
37};
38
39template<int dim, int n_components, typename Number>
40class MassOperator : public OperatorBase<dim, Number, n_components>
41{
42public:
43 typedef Number value_type;
44
46
47 typedef typename Base::VectorType VectorType;
48 typedef typename Base::IntegratorCell IntegratorCell;
49
51
52 void
53 initialize(dealii::MatrixFree<dim, Number> const & matrix_free,
54 dealii::AffineConstraints<Number> const & affine_constraints,
55 MassOperatorData<dim> const & data);
56
57 void
58 set_scaling_factor(Number const & number);
59
60 void
61 apply_scale(VectorType & dst, Number const & factor, VectorType const & src) const;
62
63 void
64 apply_scale_add(VectorType & dst, Number const & factor, VectorType const & src) const;
65
66private:
67 void
68 do_cell_integral(IntegratorCell & integrator) const final;
69
71
72 mutable double scaling_factor;
73};
74
75} // namespace ExaDG
76
77#endif /* INCLUDE_OPERATORS_MASS_OPERATOR_H_ */
Definition mass_kernel.h:33
Definition mass_operator.h:41
Definition operator_base.h:98
Definition driver.cpp:33
Definition mass_operator.h:33
Definition operator_base.h:59