OGS
CreateBishopsPowerLaw.cpp
Go to the documentation of this file.
1 
10 #include "BaseLib/ConfigTree.h"
11 #include "BishopsPowerLaw.h"
12 
13 namespace MaterialPropertyLib
14 {
15 std::unique_ptr<BishopsPowerLaw> createBishopsPowerLaw(
16  BaseLib::ConfigTree const& config)
17 {
19  config.checkConfigParameter("type", "BishopsPowerLaw");
20 
21  // Second access for storage.
23  auto property_name = config.peekConfigParameter<std::string>("name");
24 
25  DBUG("Create BishopsPowerLaw property {:s}.", property_name);
26 
27  auto const exponent =
29  config.getConfigParameter<double>("exponent");
30 
31  return std::make_unique<MaterialPropertyLib::BishopsPowerLaw>(
32  std::move(property_name), exponent);
33 }
34 } // namespace MaterialPropertyLib
void DBUG(char const *fmt, Args const &... args)
Definition: Logging.h:27
T peekConfigParameter(std::string const &param) const
void checkConfigParameter(std::string const &param, T const &value) const
T getConfigParameter(std::string const &param) const
std::unique_ptr< BishopsPowerLaw > createBishopsPowerLaw(BaseLib::ConfigTree const &config)