ExaDG
Loading...
Searching...
No Matches
output_generator.h
1/* ______________________________________________________________________
2 *
3 * ExaDG - High-Order Discontinuous Galerkin for the Exa-Scale
4 *
5 * Copyright (C) 2023 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_ACOUSTIC_CONSERVATION_EQUATIONS_POSTPROCESSOR_OUTPUT_GENERATOR_H_
23#define EXADG_ACOUSTIC_CONSERVATION_EQUATIONS_POSTPROCESSOR_OUTPUT_GENERATOR_H_
24
25#include <exadg/postprocessor/output_data_base.h>
26#include <exadg/postprocessor/solution_field.h>
27#include <exadg/postprocessor/time_control.h>
28
29namespace ExaDG
30{
31namespace Acoustics
32{
34{
35 OutputData() : write_pressure(false), write_velocity(false)
36 {
37 }
38
39 void
40 print(dealii::ConditionalOStream & pcout, bool unsteady)
41 {
42 OutputDataBase::print(pcout, unsteady);
43
44 print_parameter(pcout, "Write pressure", write_pressure);
45 print_parameter(pcout, "Write velocity", write_velocity);
46 }
47
48 bool write_pressure;
49 bool write_velocity;
50};
51
52template<int dim, typename Number>
54{
55public:
56 using VectorType = dealii::LinearAlgebra::distributed::Vector<Number>;
57
58 OutputGenerator(MPI_Comm const & comm);
59
60 void
61 setup(dealii::DoFHandler<dim> const & dof_handler_pressure,
62 dealii::DoFHandler<dim> const & dof_handler_velocity,
63 dealii::Mapping<dim> const & mapping,
64 OutputData const & output_data);
65
66 void
67 evaluate(VectorType const & pressure,
68 VectorType const & velocity,
69 double const time,
70 bool const unsteady) const;
71
72 TimeControl time_control;
73
74private:
75 MPI_Comm const mpi_comm;
76
77 OutputData output_data;
78
79 dealii::SmartPointer<dealii::DoFHandler<dim> const> dof_handler_pressure;
80 dealii::SmartPointer<dealii::DoFHandler<dim> const> dof_handler_velocity;
81 dealii::SmartPointer<dealii::Mapping<dim> const> mapping;
82};
83
84} // namespace Acoustics
85} // namespace ExaDG
86
87#endif /* EXADG_ACOUSTIC_CONSERVATION_EQUATIONS_POSTPROCESSOR_OUTPUT_GENERATOR_H_ */
Definition output_generator.h:54
Definition time_control.h:64
Definition driver.cpp:33
Definition output_generator.h:34
Definition output_data_base.h:31