OGS
CreateConstantPermeability.cpp
Go to the documentation of this file.
1
10
#include "
CreateConstantPermeability.h
"
11
12
#include "
BaseLib/ConfigTree.h
"
13
#include "
BaseLib/Error.h
"
14
#include "
ConstantPermeability.h
"
15
16
namespace
MaterialLib::Fracture::Permeability
17
{
18
std::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
{
30
OGS_FATAL
(
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
ConfigTree.h
ConstantPermeability.h
CreateConstantPermeability.h
Error.h
OGS_FATAL
#define OGS_FATAL(...)
Definition
Error.h:26
BaseLib::ConfigTree
Definition
ConfigTree.h:107
BaseLib::ConfigTree::getConfigParameter
T getConfigParameter(std::string const ¶m) const
Definition
ConfigTree-impl.h:41
BaseLib::ConfigTree::checkConfigParameter
void checkConfigParameter(std::string const ¶m, std::string_view const value) const
Definition
ConfigTree.cpp:151
MaterialLib::Fracture::Permeability
Definition
ConstantPermeability.cpp:13
MaterialLib::Fracture::Permeability::createConstantPermeability
std::unique_ptr< Permeability > createConstantPermeability(BaseLib::ConfigTree const &config)
Definition
CreateConstantPermeability.cpp:18
MaterialLib
FractureModels
Permeability
CreateConstantPermeability.cpp
Generated by
1.11.0