ExaDG
Loading...
Searching...
No Matches
multigrid_preconditioner_projection.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_INCOMPRESSIBLE_NAVIER_STOKES_PRECONDITIONERS_MULTIGRID_PRECONDITIONER_PROJECTION_H_
23#define INCLUDE_EXADG_INCOMPRESSIBLE_NAVIER_STOKES_PRECONDITIONERS_MULTIGRID_PRECONDITIONER_PROJECTION_H_
24
25#include <exadg/incompressible_navier_stokes/spatial_discretization/operators/projection_operator.h>
26#include <exadg/operators/multigrid_operator.h>
27#include <exadg/solvers_and_preconditioners/multigrid/multigrid_preconditioner_base.h>
28
29namespace ExaDG
30{
31namespace IncNS
32{
33/*
34 * Multigrid preconditioner for projection operator of the incompressible Navier-Stokes equations.
35 */
36template<int dim, typename Number>
38{
39private:
41
42public:
43 typedef typename Base::MultigridNumber MultigridNumber;
44
45private:
50
51 typedef typename Base::Map_DBC Map_DBC;
52 typedef typename Base::Map_DBC_ComponentMask Map_DBC_ComponentMask;
53 typedef typename Base::PeriodicFacePairs PeriodicFacePairs;
54 typedef typename Base::VectorType VectorType;
55 typedef typename Base::VectorTypeMG VectorTypeMG;
56
57public:
58 MultigridPreconditionerProjection(MPI_Comm const & mpi_comm);
59
60 void
61 initialize(MultigridData const & mg_data,
62 std::shared_ptr<Grid<dim> const> grid,
63 std::shared_ptr<MultigridMappings<dim, Number>> const multigrid_mappings,
64 dealii::FiniteElement<dim> const & fe,
65 PDEOperator const & pde_operator,
66 bool const mesh_is_moving,
67 Map_DBC const & dirichlet_bc,
68 Map_DBC_ComponentMask const & dirichlet_bc_component_mask);
69
70 /*
71 * This function updates the multigrid preconditioner.
72 */
73 void
74 update() final;
75
76private:
77 void
78 fill_matrix_free_data(MatrixFreeData<dim, MultigridNumber> & matrix_free_data,
79 unsigned int const level,
80 unsigned int const dealii_tria_level) final;
81
82 std::shared_ptr<MGOperatorBase>
83 initialize_operator(unsigned int const level) final;
84
85 std::shared_ptr<PDEOperatorMG>
86 get_operator(unsigned int level);
87
89
90 PDEOperator const * pde_operator;
91
92 bool mesh_is_moving;
93};
94
95} // namespace IncNS
96} // namespace ExaDG
97
98
99#endif /* INCLUDE_EXADG_INCOMPRESSIBLE_NAVIER_STOKES_PRECONDITIONERS_MULTIGRID_PRECONDITIONER_PROJECTION_H_ \
100 */
Definition grid.h:40
Definition multigrid_preconditioner_projection.h:38
Definition projection_operator.h:64
Definition grid.h:84
Definition multigrid_operator_base.h:35
Definition multigrid_operator.h:31
Definition multigrid_preconditioner_base.h:62
Definition driver.cpp:33
Definition projection_operator.h:45
Definition matrix_free_data.h:40
Definition multigrid_parameters.h:259