ExaDG
Toggle main menu visibility
Loading...
Searching...
No Matches
include
exadg
solvers_and_preconditioners
preconditioners
inverse_mass_preconditioner.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_SOLVERS_AND_PRECONDITIONERS_PRECONDITIONERS_INVERSE_MASS_PRECONDITIONER_H_
23
#define EXADG_SOLVERS_AND_PRECONDITIONERS_PRECONDITIONERS_INVERSE_MASS_PRECONDITIONER_H_
24
25
// ExaDG
26
#include <exadg/operators/inverse_mass_operator.h>
27
#include <exadg/solvers_and_preconditioners/preconditioners/preconditioner_base.h>
28
29
namespace
ExaDG
30
{
41
template
<
int
dim,
int
n_components,
typename
Number>
42
class
InverseMassPreconditioner :
public
PreconditionerBase<Number>
43
{
44
public
:
45
typedef
typename
PreconditionerBase<Number>::VectorType VectorType;
46
47
InverseMassPreconditioner(dealii::MatrixFree<dim, Number>
const
& matrix_free,
48
InverseMassOperatorData<Number>
const
inverse_mass_operator_data)
49
{
50
inverse_mass_operator.initialize(matrix_free, inverse_mass_operator_data);
51
52
this->update_needed =
false
;
53
}
54
55
void
56
vmult(VectorType & dst, VectorType
const
& src)
const
final
57
{
58
inverse_mass_operator.apply(dst, src);
59
}
60
61
void
62
update()
final
63
{
64
inverse_mass_operator.update();
65
66
this->update_needed =
false
;
67
}
68
69
private
:
70
InverseMassOperator<dim, n_components, Number>
inverse_mass_operator;
71
};
72
73
}
// namespace ExaDG
74
75
#endif
/* EXADG_SOLVERS_AND_PRECONDITIONERS_PRECONDITIONERS_INVERSE_MASS_PRECONDITIONER_H_ */
ExaDG::InverseMassOperator
Definition
inverse_mass_operator.h:97
ExaDG
Definition
driver.cpp:33
ExaDG::InverseMassOperatorData
Definition
inverse_mass_operator.h:44
Generated by
1.17.0