OGS
TimeDiscretizationBuilder.cpp
Go to the documentation of this file.
1
11
#include "
TimeDiscretizationBuilder.h
"
12
13
#include "
BaseLib/ConfigTree.h
"
14
#include "
BaseLib/Error.h
"
15
#include "
TimeDiscretization.h
"
16
17
namespace
NumLib
18
{
19
std::unique_ptr<TimeDiscretization>
createTimeDiscretization
(
20
BaseLib::ConfigTree
const
& config)
21
{
23
auto
const
type = config.
getConfigParameter
<std::string>(
"type"
);
24
26
if
(type ==
"BackwardEuler"
)
27
{
28
return
std::make_unique<BackwardEuler>();
29
}
30
OGS_FATAL
(
"Unrecognized time discretization type `{:s}'"
, type);
31
}
32
}
// namespace NumLib
ConfigTree.h
Error.h
OGS_FATAL
#define OGS_FATAL(...)
Definition
Error.h:26
TimeDiscretizationBuilder.h
TimeDiscretization.h
BaseLib::ConfigTree
Definition
ConfigTree.h:107
BaseLib::ConfigTree::getConfigParameter
T getConfigParameter(std::string const ¶m) const
Definition
ConfigTree-impl.h:41
NumLib
Definition
ProjectData.h:46
NumLib::createTimeDiscretization
std::unique_ptr< TimeDiscretization > createTimeDiscretization(BaseLib::ConfigTree const &config)
Definition
TimeDiscretizationBuilder.cpp:19
NumLib
ODESolver
TimeDiscretizationBuilder.cpp
Generated by
1.11.0