OGS
TimeDiscretizationBuilder.cpp
Go to the documentation of this file.
1
12
13#include "BaseLib/ConfigTree.h"
14#include "BaseLib/Error.h"
15#include "TimeDiscretization.h"
16
17namespace NumLib
18{
19std::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
#define OGS_FATAL(...)
Definition Error.h:26
T getConfigParameter(std::string const &param) const
std::unique_ptr< TimeDiscretization > createTimeDiscretization(BaseLib::ConfigTree const &config)