ExaDG
Toggle main menu visibility
Loading...
Searching...
No Matches
include
exadg
acoustic_conservation_equations
postprocessor
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
29
namespace
ExaDG
30
{
31
namespace
Acoustics
32
{
33
struct
OutputData :
public
OutputDataBase
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
52
template
<
int
dim,
typename
Number>
53
class
OutputGenerator
54
{
55
public
:
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
74
private
:
75
MPI_Comm
const
mpi_comm;
76
77
OutputData
output_data;
78
79
dealii::ObserverPointer<dealii::DoFHandler<dim>
const
> dof_handler_pressure;
80
dealii::ObserverPointer<dealii::DoFHandler<dim>
const
> dof_handler_velocity;
81
dealii::ObserverPointer<dealii::Mapping<dim>
const
> mapping;
82
};
83
84
}
// namespace Acoustics
85
}
// namespace ExaDG
86
87
#endif
/* EXADG_ACOUSTIC_CONSERVATION_EQUATIONS_POSTPROCESSOR_OUTPUT_GENERATOR_H_ */
ExaDG::TimeControl
Definition
time_control.h:64
ExaDG
Definition
driver.cpp:33
ExaDG::Acoustics::OutputData
Definition
output_generator.h:34
Generated by
1.17.0