ExaDG
Toggle main menu visibility
Loading...
Searching...
No Matches
include
exadg
compressible_navier_stokes
time_integration
time_int_explicit_runge_kutta.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_TIME_INTEGRATION_TIME_INT_EXPLICIT_RUNGE_KUTTA_H_
23
#define EXADG_COMPRESSIBLE_NAVIER_STOKES_TIME_INTEGRATION_TIME_INT_EXPLICIT_RUNGE_KUTTA_H_
24
25
// deal.II
26
#include <deal.II/base/timer.h>
27
#include <deal.II/lac/la_parallel_vector.h>
28
29
// ExaDG
30
#include <exadg/time_integration/explicit_runge_kutta.h>
31
#include <exadg/time_integration/ssp_runge_kutta.h>
32
#include <exadg/time_integration/time_int_explicit_runge_kutta_base.h>
33
34
namespace
ExaDG
35
{
36
namespace
CompNS
37
{
38
// forward declarations
39
class
Parameters
;
40
41
template
<
typename
Number>
42
class
PostProcessorInterface
;
43
44
namespace
Interface
45
{
46
template
<
typename
Number>
47
class
Operator
;
48
}
49
50
template
<
typename
Number>
51
class
TimeIntExplRK :
public
TimeIntExplRKBase<Number>
52
{
53
public
:
54
typedef
dealii::LinearAlgebra::distributed::Vector<Number> VectorType;
55
56
typedef
Interface::Operator<Number>
Operator;
57
58
TimeIntExplRK(std::shared_ptr<Operator> operator_in,
59
Parameters
const
& param_in,
60
MPI_Comm
const
& mpi_comm_in,
61
bool
const
print_wall_times_in,
62
std::shared_ptr<
PostProcessorInterface<Number>
> postprocessor_in);
63
64
void
65
get_wall_times(std::vector<std::string> & name, std::vector<double> & wall_time)
const
;
66
67
private
:
68
void
69
initialize_time_integrator()
final
;
70
71
void
72
initialize_vectors()
final
;
73
74
void
75
initialize_solution()
final
;
76
77
void
78
read_restart_vectors(std::vector<VectorType *>
const
& vectors)
final
;
79
80
void
81
write_restart_vectors(std::vector<VectorType const *>
const
& vectors)
const
final
;
82
83
void
84
detect_instabilities()
const
;
85
86
void
87
postprocessing()
const
final
;
88
89
void
90
do_timestep_solve()
final
;
91
92
bool
93
print_solver_info()
const
final
;
94
95
void
96
calculate_time_step_size()
final
;
97
98
double
99
recalculate_time_step_size()
const
final
;
100
101
void
102
calculate_pressure();
103
104
void
105
calculate_velocity();
106
107
void
108
calculate_temperature();
109
110
void
111
calculate_vorticity();
112
113
void
114
calculate_divergence();
115
116
std::shared_ptr<Operator> pde_operator;
117
118
std::shared_ptr<ExplicitTimeIntegrator<Operator, VectorType>> rk_time_integrator;
119
120
Parameters
const
& param;
121
122
unsigned
int
const
refine_steps_time;
123
124
std::shared_ptr<PostProcessorInterface<Number>> postprocessor;
125
126
// monitor the L2-norm of the solution vector in order to detect instabilities
127
mutable
double
l2_norm;
128
129
// time step calculation
130
double
const
cfl_number;
131
double
const
diffusion_number;
132
};
133
134
}
// namespace CompNS
135
}
// namespace ExaDG
136
137
#endif
/* EXADG_COMPRESSIBLE_NAVIER_STOKES_TIME_INTEGRATION_TIME_INT_EXPLICIT_RUNGE_KUTTA_H_ */
ExaDG::CompNS::Interface::Operator
Definition
interface.h:36
ExaDG::CompNS::Parameters
Definition
parameters.h:38
ExaDG::CompNS::PostProcessorInterface
Definition
postprocessor_base.h:40
ExaDG
Definition
driver.cpp:33
Generated by
1.17.0