OGS
CreateConstantPermeability.cpp
Go to the documentation of this file.
1
11
12#include "BaseLib/ConfigTree.h"
13#include "BaseLib/Error.h"
15
17{
18std::unique_ptr<Permeability> createConstantPermeability(
19 BaseLib::ConfigTree const& config)
20{
22 config.checkConfigParameter("type", "ConstantPermeability");
23
24 auto const permeability =
26 config.getConfigParameter<double>("value");
27
28 if (permeability < 0)
29 {
31 "The permeability parameter must be non-negative. Given value "
32 "{:g}.",
33 permeability);
34 }
35
36 return std::make_unique<ConstantPermeability>(permeability);
37}
38} // namespace MaterialLib::Fracture::Permeability
#define OGS_FATAL(...)
Definition Error.h:26
T getConfigParameter(std::string const &param) const
void checkConfigParameter(std::string const &param, std::string_view const value) const
std::unique_ptr< Permeability > createConstantPermeability(BaseLib::ConfigTree const &config)