ExaDG
Toggle main menu visibility
Loading...
Searching...
No Matches
include
exadg
compressible_navier_stokes
driver.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_DRIVER_H_
23
#define EXADG_COMPRESSIBLE_NAVIER_STOKES_DRIVER_H_
24
25
// ExaDG
26
#include <exadg/compressible_navier_stokes/spatial_discretization/operator.h>
27
#include <exadg/compressible_navier_stokes/time_integration/time_int_explicit_runge_kutta.h>
28
#include <exadg/compressible_navier_stokes/user_interface/analytical_solution.h>
29
#include <exadg/compressible_navier_stokes/user_interface/application_base.h>
30
#include <exadg/compressible_navier_stokes/user_interface/boundary_descriptor.h>
31
#include <exadg/compressible_navier_stokes/user_interface/field_functions.h>
32
#include <exadg/compressible_navier_stokes/user_interface/parameters.h>
33
#include <exadg/functions_and_boundary_conditions/verify_boundary_conditions.h>
34
#include <exadg/grid/mapping_dof_vector.h>
35
#include <exadg/matrix_free/matrix_free_data.h>
36
#include <exadg/utilities/print_general_infos.h>
37
38
namespace
ExaDG
39
{
40
namespace
CompNS
41
{
42
// Select the operator to be applied
43
enum class
OperatorType
44
{
45
ConvectiveTerm,
46
ViscousTerm,
47
ViscousAndConvectiveTerms,
48
InverseMassOperator,
49
InverseMassOperatorDstDst,
50
VectorUpdate,
51
EvaluateOperatorExplicit
52
};
53
54
template
<
int
dim,
typename
Number =
double
>
55
class
Driver
56
{
57
public
:
58
typedef
dealii::LinearAlgebra::distributed::Vector<Number> VectorType;
59
60
Driver(MPI_Comm
const
& comm,
61
std::shared_ptr<
ApplicationBase<dim, Number>
> application,
62
bool
const
is_test,
63
bool
const
is_throughput_study);
64
65
void
66
setup();
67
68
void
69
solve();
70
71
void
72
print_performance_results(
double
const
total_time)
const
;
73
74
/*
75
* Throughput study
76
*/
77
std::tuple<unsigned int, dealii::types::global_dof_index, double>
78
apply_operator(OperatorType
const
& operator_type,
79
unsigned
int
const
n_repetitions_inner,
80
unsigned
int
const
n_repetitions_outer)
const
;
81
82
private
:
83
MPI_Comm
const
mpi_comm;
84
85
dealii::ConditionalOStream pcout;
86
87
// do not print wall times if is_test
88
bool
const
is_test;
89
90
// do not set up certain data structures (solver, postprocessor) in case of throughput study
91
bool
const
is_throughput_study;
92
93
std::shared_ptr<ApplicationBase<dim, Number>> application;
94
95
// Grid and mapping
96
std::shared_ptr<Grid<dim>> grid;
97
98
std::shared_ptr<dealii::Mapping<dim>> mapping;
99
100
std::shared_ptr<Operator<dim, Number>> pde_operator;
101
102
std::shared_ptr<PostProcessorBase<dim, Number>> postprocessor;
103
104
std::shared_ptr<TimeIntExplRK<Number>> time_integrator;
105
106
// Computation time (wall clock time)
107
mutable
TimerTree
timer_tree;
108
};
109
110
}
// namespace CompNS
111
}
// namespace ExaDG
112
113
#endif
/* EXADG_COMPRESSIBLE_NAVIER_STOKES_DRIVER_H_ */
ExaDG::CompNS::ApplicationBase
Definition
application_base.h:48
ExaDG::TimerTree
Definition
timer_tree.h:36
ExaDG
Definition
driver.cpp:33
Generated by
1.17.0