ExaDG
Loading...
Searching...
No Matches
normal_flux_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#ifndef INCLUDE_EXADG_POSTPROCESSOR_NORMAL_FLUX_CALCULATION_H
22#define INCLUDE_EXADG_POSTPROCESSOR_NORMAL_FLUX_CALCULATION_H
23
24// ExaDG
25#include <exadg/matrix_free/integrators.h>
26
27namespace ExaDG
28{
30{
31 NormalFluxCalculatorData() : evaluate(false)
32 {
33 }
34
35 bool evaluate;
36 std::set<dealii::types::boundary_id> boundary_ids;
37
38 // specify where to write output files
39 std::string directory;
40 std::string filename;
41};
42
43template<int dim, typename Number>
45{
46public:
47 typedef dealii::LinearAlgebra::distributed::Vector<Number> VectorType;
48
49 typedef FaceIntegrator<dim, 1, Number> FaceIntegratorScalar;
50
51 typedef dealii::VectorizedArray<Number> scalar;
52
53 NormalFluxCalculator(dealii::MatrixFree<dim, Number> const & matrix_free_in,
54 unsigned int dof_index_in,
55 unsigned int quad_index_in,
56 NormalFluxCalculatorData const & data,
57 MPI_Comm const & mpi_comm_in);
58
59 void
60 evaluate(VectorType const & solution, double const time, bool const unsteady);
61
62private:
63 dealii::MatrixFree<dim, Number> const & matrix_free;
64 unsigned int dof_index, quad_index;
65
67
68 bool clear_files;
69
70 std::map<dealii::types::boundary_id, double> flux;
71
72 MPI_Comm const mpi_comm;
73};
74
75} // namespace ExaDG
76
77
78
79#endif // INCLUDE_EXADG_POSTPROCESSOR_NORMAL_FLUX_CALCULATION_H
Definition normal_flux_calculation.h:45
Definition driver.cpp:33
Definition normal_flux_calculation.h:30