OGS
CreateIterationNumberBasedTimeStepping.cpp
Go to the documentation of this file.
1
10
#include "
CreateIterationNumberBasedTimeStepping.h
"
11
12
#include <string>
13
14
#include "
BaseLib/Algorithm.h
"
15
#include "
BaseLib/ConfigTree.h
"
16
#include "
IterationNumberBasedTimeStepping.h
"
17
#include "
TimeStepAlgorithm.h
"
18
19
namespace
NumLib
20
{
21
class
TimeStepAlgorithm;
22
std::unique_ptr<TimeStepAlgorithm>
createIterationNumberBasedTimeStepping
(
23
BaseLib::ConfigTree
const
& config,
24
std::vector<double>
const
& fixed_times_for_output)
25
{
27
config.
checkConfigParameter
(
"type"
,
"IterationNumberBasedTimeStepping"
);
28
30
auto
const
t_initial = config.
getConfigParameter
<
double
>(
"t_initial"
);
32
auto
const
t_end = config.
getConfigParameter
<
double
>(
"t_end"
);
34
auto
const
initial_dt = config.
getConfigParameter
<
double
>(
"initial_dt"
);
36
auto
const
minimum_dt = config.
getConfigParameter
<
double
>(
"minimum_dt"
);
38
auto
const
maximum_dt = config.
getConfigParameter
<
double
>(
"maximum_dt"
);
39
40
auto
number_iterations =
42
config.
getConfigParameter
<std::vector<int>>(
"number_iterations"
);
43
auto
multiplier =
45
config.
getConfigParameter
<std::vector<double>>(
"multiplier"
);
46
47
return
std::make_unique<IterationNumberBasedTimeStepping>(
48
t_initial, t_end, minimum_dt, maximum_dt, initial_dt,
49
std::move(number_iterations), std::move(multiplier),
50
fixed_times_for_output);
51
}
52
}
// namespace NumLib
Algorithm.h
ConfigTree.h
CreateIterationNumberBasedTimeStepping.h
IterationNumberBasedTimeStepping.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::createIterationNumberBasedTimeStepping
std::unique_ptr< TimeStepAlgorithm > createIterationNumberBasedTimeStepping(BaseLib::ConfigTree const &config, std::vector< double > const &fixed_times_for_output)
Definition
CreateIterationNumberBasedTimeStepping.cpp:22
NumLib
TimeStepping
Algorithms
CreateIterationNumberBasedTimeStepping.cpp
Generated by
1.10.0