OGS
CreateEvolutionaryPIDcontroller.cpp
Go to the documentation of this file.
1
12
#include "
CreateEvolutionaryPIDcontroller.h
"
13
14
#include "
BaseLib/Algorithm.h
"
15
#include "
BaseLib/ConfigTree.h
"
16
#include "
EvolutionaryPIDcontroller.h
"
17
#include "
TimeStepAlgorithm.h
"
18
19
namespace
NumLib
20
{
21
class
TimeStepAlgorithm;
22
std::unique_ptr<TimeStepAlgorithm>
createEvolutionaryPIDcontroller
(
23
BaseLib::ConfigTree
const
& config,
24
std::vector<double>
const
& fixed_times_for_output)
25
{
27
config.
checkConfigParameter
(
"type"
,
"EvolutionaryPIDcontroller"
);
28
30
auto
const
t0 = config.
getConfigParameter
<
double
>(
"t_initial"
);
32
auto
const
t_end = config.
getConfigParameter
<
double
>(
"t_end"
);
34
auto
const
h0 = config.
getConfigParameter
<
double
>(
"dt_guess"
);
35
37
auto
const
h_min = config.
getConfigParameter
<
double
>(
"dt_min"
);
39
auto
const
h_max = config.
getConfigParameter
<
double
>(
"dt_max"
);
41
auto
const
rel_h_min = config.
getConfigParameter
<
double
>(
"rel_dt_min"
);
43
auto
const
rel_h_max = config.
getConfigParameter
<
double
>(
"rel_dt_max"
);
44
46
auto
const
tol = config.
getConfigParameter
<
double
>(
"tol"
);
47
48
return
std::make_unique<EvolutionaryPIDcontroller>(t0,
49
t_end,
50
h0,
51
h_min,
52
h_max,
53
rel_h_min,
54
rel_h_max,
55
tol,
56
fixed_times_for_output);
57
}
58
}
// end of namespace NumLib
Algorithm.h
ConfigTree.h
CreateEvolutionaryPIDcontroller.h
EvolutionaryPIDcontroller.h
TimeStepAlgorithm.h
BaseLib::ConfigTree
Definition
ConfigTree.h:107
BaseLib::ConfigTree::getConfigParameter
T getConfigParameter(std::string const ¶m) const
Definition
ConfigTree-impl.h:41
BaseLib::ConfigTree::checkConfigParameter
void checkConfigParameter(std::string const ¶m, std::string_view const value) const
Definition
ConfigTree.cpp:151
NumLib
Definition
ProjectData.h:46
NumLib::createEvolutionaryPIDcontroller
std::unique_ptr< TimeStepAlgorithm > createEvolutionaryPIDcontroller(BaseLib::ConfigTree const &config, std::vector< double > const &fixed_times_for_output)
Definition
CreateEvolutionaryPIDcontroller.cpp:22
NumLib
TimeStepping
Algorithms
CreateEvolutionaryPIDcontroller.cpp
Generated by
1.10.0