OGS 6.1.0-1699-ge946d4c5f
createStorageModel.cpp
Go to the documentation of this file.
1
13
#include "
createStorageModel.h
"
14
15
#include "
BaseLib/Error.h
"
16
#include "
BaseLib/ConfigTree.h
"
17
18
#include "
Storage.h
"
19
#include "
ConstantStorage.h
"
20
21
namespace
MaterialLib
22
{
23
namespace
PorousMedium
24
{
25
std::unique_ptr<Storage>
createStorageModel
(
BaseLib::ConfigTree
const
& config)
26
{
28
auto
const
type = config.
getConfigParameter
<std::string>(
"type"
);
29
30
if
(type ==
"Constant"
)
31
return
std::make_unique<ConstantStorage>(
33
config.
getConfigParameter
<
double
>(
"value"
));
34
35
OGS_FATAL
(
"The storage type %s is unavailable.\n"
, type.data(),
36
"The available type is Constant."
);
37
}
38
39
}
// end namespace
40
}
// end namespace
MaterialLib
Definition:
ConstantFluidProperty.h:17
MaterialLib::PorousMedium::createStorageModel
std::unique_ptr< Storage > createStorageModel(BaseLib::ConfigTree const &config)
Definition:
createStorageModel.cpp:25
BaseLib::ConfigTree::getConfigParameter
T getConfigParameter(std::string const ¶m) const
Definition:
ConfigTree-impl.h:40
Error.h
Storage.h
ConstantStorage.h
BaseLib::ConfigTree
Definition:
ConfigTree.h:95
createStorageModel.h
OGS_FATAL
#define OGS_FATAL(fmt,...)
Definition:
Error.h:71
ConfigTree.h
MaterialLib
PorousMedium
Storage
createStorageModel.cpp
Generated by
1.8.13