ExaDG
Loading...
Searching...
No Matches
include
exadg
postprocessor
time_control.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 INCLUDE_COMPRESSIBLE_NAVIER_STOKES_POSTPROCESSOR_TIME_CONTROL_H_
23
#define INCLUDE_COMPRESSIBLE_NAVIER_STOKES_POSTPROCESSOR_TIME_CONTROL_H_
24
30
31
// deal.ii
32
#include <deal.II/base/conditional_ostream.h>
33
34
// ExaDG
35
#include <exadg/utilities/numbers.h>
36
37
namespace
ExaDG
38
{
39
struct
TimeControlData
40
{
41
TimeControlData();
42
43
bool
is_active;
44
double
start_time;
45
double
end_time;
46
double
trigger_interval;
47
types::time_step trigger_every_time_steps;
48
49
enum
UnsteadyEvalType
50
{
51
None,
52
Interval,
53
Timestep
54
};
55
56
void
57
print(dealii::ConditionalOStream & pcout,
bool
const
unsteady)
const
;
58
};
59
60
TimeControlData::UnsteadyEvalType
61
get_unsteady_evaluation_type(
TimeControlData
const
& data);
62
63
class
TimeControl
64
{
65
public
:
66
TimeControl();
67
68
void
69
setup(
TimeControlData
const
& time_control_data);
70
71
bool
72
needs_evaluation(
double
const
time, types::time_step
const
time_step_number)
const
;
73
74
unsigned
int
75
get_counter()
const
;
76
77
bool
78
reached_end_time()
const
;
79
80
bool
81
get_epsilon()
const
;
82
83
private
:
84
// small number which is much smaller than the time step size
85
double
const
EPSILON;
86
mutable
bool
reset_counter;
87
mutable
unsigned
int
counter;
88
mutable
bool
end_time_reached;
89
90
TimeControlData
time_control_data;
91
};
92
93
94
}
// namespace ExaDG
95
96
97
#endif
/*INCLUDE_COMPRESSIBLE_NAVIER_STOKES_POSTPROCESSOR_TIME_CONTROL_H_*/
ExaDG
Definition
driver.cpp:33
ExaDG::TimeControlData
Definition
time_control.h:40
Generated by
1.13.2