OGS
CreateSaturationVanGenuchten.cpp
Go to the documentation of this file.
1 
11 #include "BaseLib/ConfigTree.h"
12 #include "SaturationVanGenuchten.h"
13 
14 namespace MaterialPropertyLib
15 {
16 std::unique_ptr<SaturationVanGenuchten> createSaturationVanGenuchten(
17  BaseLib::ConfigTree const& config)
18 {
20  config.checkConfigParameter("type", "SaturationVanGenuchten");
21 
22  // Second access for storage.
24  auto property_name = config.peekConfigParameter<std::string>("name");
25 
26  DBUG("Create SaturationVanGenuchten medium property {:s}.", property_name);
27 
28  auto const residual_liquid_saturation =
30  config.getConfigParameter<double>("residual_liquid_saturation");
31  auto const residual_gas_saturation =
33  config.getConfigParameter<double>("residual_gas_saturation");
34  auto const exponent =
36  config.getConfigParameter<double>("exponent");
38  auto const p_b = config.getConfigParameter<double>("p_b");
39 
40  return std::make_unique<SaturationVanGenuchten>(
41  std::move(property_name), residual_liquid_saturation,
42  residual_gas_saturation, exponent, p_b);
43 }
44 } // 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< SaturationVanGenuchten > createSaturationVanGenuchten(BaseLib::ConfigTree const &config)