ExaDG
Toggle main menu visibility
Loading...
Searching...
No Matches
include
exadg
compressible_navier_stokes
postprocessor
output_generator.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_COMPRESSIBLE_NAVIER_STOKES_POSTPROCESSOR_OUTPUT_GENERATOR_H_
23
#define EXADG_COMPRESSIBLE_NAVIER_STOKES_POSTPROCESSOR_OUTPUT_GENERATOR_H_
24
25
// C/C++
26
#include <fstream>
27
28
// ExaDG
29
#include <exadg/postprocessor/output_data_base.h>
30
#include <exadg/postprocessor/solution_field.h>
31
#include <exadg/postprocessor/time_control.h>
32
33
namespace
ExaDG
34
{
35
namespace
CompNS
36
{
37
struct
OutputData :
public
OutputDataBase
38
{
39
OutputData()
40
: write_velocity(
false
),
41
write_pressure(
false
),
42
write_temperature(
false
),
43
write_vorticity(
false
),
44
write_divergence(
false
),
45
write_shear_rate(
false
),
46
write_processor_id(
false
)
47
{
48
}
49
50
void
51
print(dealii::ConditionalOStream & pcout,
bool
unsteady)
52
{
53
OutputDataBase::print(pcout, unsteady);
54
55
print_parameter(pcout,
"Write velocity"
, write_velocity);
56
print_parameter(pcout,
"Write pressure"
, write_pressure);
57
print_parameter(pcout,
"Write temperature"
, write_temperature);
58
print_parameter(pcout,
"Write vorticity"
, write_vorticity);
59
print_parameter(pcout,
"Write divergence"
, write_divergence);
60
print_parameter(pcout,
"Write shear rate"
, write_shear_rate);
61
print_parameter(pcout,
"Write processor ID"
, write_processor_id);
62
}
63
64
// write velocity
65
bool
write_velocity;
66
67
// write pressure
68
bool
write_pressure;
69
70
// write temperature
71
bool
write_temperature;
72
73
// write vorticity of velocity field
74
bool
write_vorticity;
75
76
// write divergence of velocity field
77
bool
write_divergence;
78
79
// write shear rate of velocity field
80
bool
write_shear_rate;
81
82
// write processor ID to scalar field in order to visualize the
83
// distribution of cells to processors
84
bool
write_processor_id;
85
};
86
87
template
<
int
dim,
typename
Number>
88
class
OutputGenerator
89
{
90
public
:
91
typedef
dealii::LinearAlgebra::distributed::Vector<Number> VectorType;
92
93
OutputGenerator(MPI_Comm
const
& comm);
94
95
void
96
setup(dealii::DoFHandler<dim>
const
& dof_handler_in,
97
dealii::Mapping<dim>
const
& mapping_in,
98
OutputData
const
& output_data_in);
99
100
void
101
evaluate(
102
VectorType
const
& solution_conserved,
103
std::vector<dealii::ObserverPointer<
SolutionField<dim, Number>
>>
const
& additional_fields,
104
double
const
time,
105
bool
const
unsteady);
106
107
TimeControl
time_control;
108
109
private
:
110
MPI_Comm
const
mpi_comm;
111
112
dealii::ObserverPointer<dealii::DoFHandler<dim>
const
> dof_handler;
113
dealii::ObserverPointer<dealii::Mapping<dim>
const
> mapping;
114
OutputData
output_data;
115
};
116
117
}
// namespace CompNS
118
}
// namespace ExaDG
119
120
#endif
/* EXADG_COMPRESSIBLE_NAVIER_STOKES_POSTPROCESSOR_OUTPUT_GENERATOR_H_ */
ExaDG::SolutionField
Definition
solution_field.h:40
ExaDG::TimeControl
Definition
time_control.h:64
ExaDG
Definition
driver.cpp:33
ExaDG::CompNS::OutputData
Definition
output_generator.h:38
Generated by
1.17.0