ExaDG
Toggle main menu visibility
Loading...
Searching...
No Matches
include
exadg
acoustic_conservation_equations
postprocessor
postprocessor.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_POSTPROCESSOR_H_
23
#define EXADG_ACOUSTIC_CONSERVATION_EQUATIONS_POSTPROCESSOR_POSTPROCESSOR_H_
24
25
// ExaDG
26
#include <exadg/acoustic_conservation_equations/postprocessor/output_generator.h>
27
#include <exadg/acoustic_conservation_equations/postprocessor/pointwise_output_generator.h>
28
#include <exadg/acoustic_conservation_equations/postprocessor/postprocessor_base.h>
29
#include <exadg/acoustic_conservation_equations/postprocessor/sound_energy_calculator.h>
30
#include <exadg/postprocessor/error_calculation.h>
31
32
namespace
ExaDG
33
{
34
namespace
Acoustics
35
{
36
template
<
int
dim>
37
struct
PostProcessorData
38
{
39
PostProcessorData() =
default
;
40
41
OutputData
output_data;
42
PointwiseOutputData<dim>
pointwise_output_data;
43
ErrorCalculationData<dim>
error_data_p;
44
ErrorCalculationData<dim>
error_data_u;
45
SoundEnergyCalculatorData
sound_energy_data;
46
};
47
48
template
<
int
dim,
typename
Number>
49
class
PostProcessor :
public
PostProcessorBase
<dim, Number>
50
{
51
public
:
52
using
Base =
PostProcessorBase<dim, Number>
;
53
54
using
BlockVectorType =
typename
Base::BlockVectorType;
55
56
using
AcousticsOperator =
typename
Base::AcousticsOperator;
57
58
static
unsigned
int
const
block_index_pressure = AcousticsOperator::block_index_pressure;
59
static
unsigned
int
const
block_index_velocity = AcousticsOperator::block_index_velocity;
60
61
PostProcessor(
PostProcessorData<dim>
const
& postprocessor_data, MPI_Comm
const
& mpi_comm);
62
63
// custom destructor computing convergence tables if desired
64
virtual
~PostProcessor();
65
66
void
67
setup(AcousticsOperator
const
& pde_operator)
final
;
68
69
void
70
do_postprocessing(BlockVectorType
const
& solution,
71
double
const
time = 0.0,
72
types::time_step
const
time_step_number = numbers::steady_timestep)
final
;
73
74
protected
:
75
MPI_Comm
const
mpi_comm;
76
77
private
:
78
PostProcessorData<dim>
pp_data;
79
80
// write output for visualization of results (e.g., using paraview)
81
OutputGenerator<dim, Number>
output_generator;
82
83
// writes output at certain points in space
84
PointwiseOutputGenerator<dim, Number>
pointwise_output_generator;
85
86
// calculate errors for verification purposes for problems with known analytical solution
87
ErrorCalculator<dim, Number>
error_calculator_p;
88
ErrorCalculator<dim, Number>
error_calculator_u;
89
90
// calculates the sound energy in the computational domain
91
SoundEnergyCalculator<dim, Number>
sound_energy_calculator;
92
};
93
94
}
// namespace Acoustics
95
}
// namespace ExaDG
96
97
#endif
/* EXADG_ACOUSTIC_CONSERVATION_EQUATIONS_POSTPROCESSOR_POSTPROCESSOR_H_ */
ExaDG::Acoustics::OutputGenerator
Definition
output_generator.h:54
ExaDG::Acoustics::PointwiseOutputGenerator
Definition
pointwise_output_generator.h:49
ExaDG::Acoustics::PostProcessorBase
Definition
postprocessor_base.h:41
ExaDG::Acoustics::SoundEnergyCalculator
Definition
sound_energy_calculator.h:79
ExaDG::ErrorCalculator
Definition
error_calculation.h:103
ExaDG
Definition
driver.cpp:33
ExaDG::Acoustics::OutputData
Definition
output_generator.h:34
ExaDG::Acoustics::PointwiseOutputData
Definition
pointwise_output_generator.h:37
ExaDG::Acoustics::PostProcessorData
Definition
postprocessor.h:38
ExaDG::Acoustics::SoundEnergyCalculatorData
Definition
sound_energy_calculator.h:41
ExaDG::ErrorCalculationData
Definition
error_calculation.h:39
Generated by
1.17.0