ExaDG
Toggle main menu visibility
Loading...
Searching...
No Matches
include
exadg
convection_diffusion
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_CONVECTION_DIFFUSION_TIME_INTEGRATION_TIME_INT_EXPLICIT_RUNGE_KUTTA_H_
23
#define EXADG_CONVECTION_DIFFUSION_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/time_int_explicit_runge_kutta_base.h>
32
33
namespace
ExaDG
34
{
35
namespace
ConvDiff
36
{
37
// forward declarations
38
class
Parameters
;
39
40
template
<
typename
Number>
41
class
PostProcessorInterface
;
42
43
namespace
Interface
44
{
45
template
<
typename
Number>
46
class
Operator
;
47
}
48
49
template
<
typename
Number>
50
class
OperatorExplRK
;
51
52
template
<
typename
Number>
53
class
TimeIntExplRK :
public
TimeIntExplRKBase<Number>
54
{
55
public
:
56
typedef
dealii::LinearAlgebra::distributed::Vector<Number> VectorType;
57
58
TimeIntExplRK(std::shared_ptr<
Interface::Operator<Number>
> operator_in,
59
std::shared_ptr<
PostProcessorInterface<Number>
> postprocessor_in,
60
Parameters
const
& param_in,
61
MPI_Comm
const
& mpi_comm_in,
62
bool
const
is_test_in);
63
64
void
65
set_velocities_and_times(std::vector<VectorType const *>
const
& velocities_in,
66
std::vector<double>
const
& times_in);
67
68
void
69
extrapolate_solution(VectorType & vector);
70
71
VectorType
const
&
72
get_solution_np()
const
;
73
74
void
75
prepare_coarsening_and_refinement()
final
;
76
77
void
78
interpolate_after_coarsening_and_refinement()
final
;
79
80
private
:
81
std::shared_ptr<std::vector<VectorType *>>
82
get_vectors();
83
84
void
85
initialize_vectors()
final
;
86
87
void
88
initialize_solution()
final
;
89
90
void
91
postprocessing()
const
final
;
92
93
bool
94
print_solver_info()
const
final
;
95
96
void
97
do_timestep_solve()
final
;
98
99
void
100
calculate_time_step_size()
final
;
101
102
double
103
recalculate_time_step_size()
const
final
;
104
105
void
106
initialize_time_integrator()
final
;
107
108
void
109
read_restart_vectors(std::vector<VectorType *>
const
& vectors)
final
;
110
111
void
112
write_restart_vectors(std::vector<VectorType const *>
const
& vectors)
const
final
;
113
114
std::shared_ptr<Interface::Operator<Number>> pde_operator;
115
116
std::shared_ptr<OperatorExplRK<Number>> expl_rk_operator;
117
118
std::shared_ptr<ExplicitTimeIntegrator<OperatorExplRK<Number>, VectorType>> rk_time_integrator;
119
120
Parameters
const
& param;
121
122
unsigned
int
const
refine_steps_time;
123
124
std::vector<VectorType const *> velocities;
125
std::vector<double> times;
126
127
// store time step size according to diffusion condition so that it does not have to be
128
// recomputed in case of adaptive time stepping
129
double
time_step_diff;
130
131
double
const
cfl;
132
double
const
diffusion_number;
133
134
std::shared_ptr<PostProcessorInterface<Number>> postprocessor;
135
};
136
137
}
// namespace ConvDiff
138
}
// namespace ExaDG
139
140
#endif
/* EXADG_CONVECTION_DIFFUSION_TIME_INTEGRATION_TIME_INT_EXPLICIT_RUNGE_KUTTA_H_ */
ExaDG::ConvDiff::Interface::Operator
Definition
interface.h:39
ExaDG::ConvDiff::OperatorExplRK
Definition
interface.h:126
ExaDG::ConvDiff::Parameters
Definition
parameters.h:46
ExaDG::ConvDiff::PostProcessorInterface
Definition
postprocessor_base.h:44
ExaDG
Definition
driver.cpp:33
Generated by
1.17.0