ExaDG
Loading...
Searching...
No Matches
driver.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 INCLUDE_EXADG_AERO_ACOUSTIC_DRIVER_H_
23#define INCLUDE_EXADG_AERO_ACOUSTIC_DRIVER_H_
24
25// application
26#include <exadg/aero_acoustic/user_interface/application_base.h>
27
28// AeroAcoustic
29#include <exadg/aero_acoustic/single_field_solvers/acoustics.h>
30#include <exadg/aero_acoustic/single_field_solvers/fluid.h>
31#include <exadg/aero_acoustic/volume_coupling.h>
32
33// utilities
34#include <exadg/utilities/timer_tree.h>
35
36namespace ExaDG
37{
38namespace AeroAcoustic
39{
40template<int dim, typename Number>
41class Driver
42{
43 using VectorType = dealii::LinearAlgebra::distributed::Vector<Number>;
44
45public:
46 Driver(MPI_Comm const & comm,
47 std::shared_ptr<ApplicationBase<dim, Number>> application,
48 bool const is_test);
49
50 void
51 setup();
52
53 void
54 solve();
55
56 void
57 print_performance_results(double const total_time) const;
58
59private:
60 void
61 setup_volume_coupling();
62
63 void
64 set_start_time() const;
65
66 void
67 couple_fluid_to_acoustic();
68
69 MPI_Comm const mpi_comm;
70
71 dealii::ConditionalOStream pcout;
72
73 bool const is_test;
74
75 std::shared_ptr<ApplicationBase<dim, Number>> application;
76
77 // single field solvers
78 std::shared_ptr<SolverAcoustic<dim, Number>> acoustic;
79 std::shared_ptr<SolverFluid<dim, Number>> fluid;
80
81 // class that manages volume coupling
82 VolumeCoupling<dim, Number> volume_coupling;
83
84 // computation time
85 mutable TimerTree timer_tree;
86
87 // wall time fluid and acoustic solvers ran together
88 double time_solvers_side_by_side;
89};
90
91} // namespace AeroAcoustic
92} // namespace ExaDG
93
94
95#endif /* INCLUDE_EXADG_AERO_ACOUSTIC_DRIVER_H_ */
Definition application_base.h:313
Definition driver.h:42
Definition volume_coupling.h:39
Definition timer_tree.h:36
Definition driver.cpp:33