ExaDG
Toggle main menu visibility
Loading...
Searching...
No Matches
include
exadg
incompressible_navier_stokes
preconditioners
multigrid_preconditioner_momentum.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_INCOMPRESSIBLE_NAVIER_STOKES_PRECONDITIONERS_MULTIGRID_PRECONDITIONER_MOMENTUM_H_
23
#define EXADG_INCOMPRESSIBLE_NAVIER_STOKES_PRECONDITIONERS_MULTIGRID_PRECONDITIONER_MOMENTUM_H_
24
25
// ExaDG
26
#include <exadg/incompressible_navier_stokes/spatial_discretization/operators/momentum_operator.h>
27
#include <exadg/operators/multigrid_operator.h>
28
#include <exadg/solvers_and_preconditioners/multigrid/multigrid_preconditioner_base.h>
29
30
namespace
ExaDG
31
{
32
namespace
IncNS
33
{
34
/*
35
* Multigrid preconditioner for momentum operator of the incompressible Navier-Stokes equations.
36
*/
37
template
<
int
dim,
typename
Number>
38
class
MultigridPreconditioner :
public
MultigridPreconditionerBase<dim, Number>
39
{
40
private
:
41
typedef
MultigridPreconditionerBase<dim, Number> Base;
42
43
public
:
44
typedef
typename
Base::MultigridNumber MultigridNumber;
45
46
private
:
47
typedef
MomentumOperator<dim, Number>
PDEOperator;
48
typedef
MomentumOperator<dim, MultigridNumber>
PDEOperatorMG;
49
typedef
MultigridOperatorBase<dim, MultigridNumber>
MGOperatorBase;
50
typedef
MultigridOperator<dim, MultigridNumber, PDEOperatorMG>
MGOperator;
51
52
typedef
typename
Base::Map_DBC Map_DBC;
53
typedef
typename
Base::Map_DBC_ComponentMask Map_DBC_ComponentMask;
54
typedef
typename
Base::PeriodicFacePairs PeriodicFacePairs;
55
typedef
typename
Base::VectorType VectorType;
56
typedef
typename
Base::VectorTypeMG VectorTypeMG;
57
58
public
:
59
MultigridPreconditioner(MPI_Comm
const
& comm);
60
61
void
62
initialize(
MultigridData
const
& mg_data,
63
std::shared_ptr<
Grid<dim>
const
> grid,
64
std::shared_ptr<
MultigridMappings<dim, Number>
>
const
multigrid_mappings,
65
dealii::FiniteElement<dim>
const
& fe,
66
PDEOperator
const
& pde_operator,
67
MultigridOperatorType
const
& mg_operator_type,
68
bool
const
mesh_is_moving,
69
Map_DBC
const
& dirichlet_bc,
70
Map_DBC_ComponentMask
const
& dirichlet_bc_component_mask);
71
72
/*
73
* This function updates the multigrid preconditioner.
74
*/
75
void
76
update()
final
;
77
78
private
:
79
void
80
fill_matrix_free_data(
MatrixFreeData<dim, MultigridNumber>
& matrix_free_data,
81
unsigned
int
const
level,
82
unsigned
int
const
dealii_tria_level)
final
;
83
84
std::shared_ptr<MGOperatorBase>
85
initialize_operator(
unsigned
int
const
level,
86
bool
const
use_matrix_based_operator_level,
87
bool
const
assemble_matrix)
final
;
88
89
std::shared_ptr<PDEOperatorMG>
90
get_operator(
unsigned
int
level);
91
92
MomentumOperatorData<dim>
data;
93
94
PDEOperator
const
* pde_operator;
95
96
MultigridOperatorType mg_operator_type;
97
98
bool
mesh_is_moving;
99
};
100
101
}
// namespace IncNS
102
}
// namespace ExaDG
103
104
#endif
/* EXADG_INCOMPRESSIBLE_NAVIER_STOKES_PRECONDITIONERS_MULTIGRID_PRECONDITIONER_MOMENTUM_H_ \
105
*/
ExaDG::Grid
Definition
grid.h:40
ExaDG::IncNS::MomentumOperator
Definition
momentum_operator.h:61
ExaDG::MultigridMappings
Definition
grid.h:84
ExaDG::MultigridOperatorBase
Definition
multigrid_operator_base.h:36
ExaDG::MultigridOperator
Definition
multigrid_operator.h:32
ExaDG
Definition
driver.cpp:33
ExaDG::IncNS::MomentumOperatorData
Definition
momentum_operator.h:40
ExaDG::MatrixFreeData
Definition
matrix_free_data.h:40
ExaDG::MultigridData
Definition
multigrid_parameters.h:259
Generated by
1.17.0