ExaDG
Loading...
Searching...
No Matches
mean_scalar_calculation.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_POSTPROCESSOR_MEAN_SCALAR_CALCULATION_H_
23#define EXADG_POSTPROCESSOR_MEAN_SCALAR_CALCULATION_H_
24
25// ExaDG
26#include <exadg/matrix_free/integrators.h>
27
28namespace ExaDG
29{
30template<int dim, typename Number>
31class MeanScalarCalculator
32{
33public:
34 typedef dealii::LinearAlgebra::distributed::Vector<Number> VectorType;
35
36 typedef FaceIntegrator<dim, 1, Number> FaceIntegratorScalar;
37
38 typedef dealii::VectorizedArray<Number> scalar;
39
40 MeanScalarCalculator(dealii::MatrixFree<dim, Number> const & matrix_free_in,
41 unsigned int dof_index_in,
42 unsigned int quad_index_in,
43 MPI_Comm const & mpi_comm_in);
44
45 Number
46 calculate_mean_scalar(VectorType const & solution,
47 std::map<dealii::types::boundary_id, Number> & mean_scalar);
48
49private:
50 dealii::MatrixFree<dim, Number> const & matrix_free;
51 unsigned int dof_index, quad_index;
52
53 MPI_Comm const mpi_comm;
54};
55
56} // namespace ExaDG
57
58#endif /* EXADG_POSTPROCESSOR_MEAN_SCALAR_CALCULATION_H_ */
Definition driver.cpp:33