OGS
CreateLinearSaturationSwellingStress.cpp
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) OpenGeoSys Community (opengeosys.org)
2// SPDX-License-Identifier: BSD-3-Clause
3
5
9
10namespace MaterialPropertyLib
11{
12std::unique_ptr<Property> createLinearSaturationSwellingStress(
13 BaseLib::ConfigTree const& config)
14{
16 config.checkConfigParameter("type", "LinearSaturationSwellingStress");
17
19 auto property_name = config.peekConfigParameter<std::string>("name");
20
21 DBUG("Create LinearSaturationSwellingStress phase property {:s}.",
22 property_name);
23
24 auto const coefficient =
26 config.getConfigParameter<double>("coefficient");
27
28 auto const reference_saturation =
30 config.getConfigParameter<double>("reference_saturation");
31
32 return std::make_unique<LinearSaturationSwellingStress>(
33 property_name, coefficient, reference_saturation);
34}
35} // namespace MaterialPropertyLib
void DBUG(fmt::format_string< Args... > fmt, Args &&... args)
Definition Logging.h:22
T peekConfigParameter(std::string const &param) const
T getConfigParameter(std::string const &param) const
void checkConfigParameter(std::string const &param, std::string_view const value) const
std::unique_ptr< Property > createLinearSaturationSwellingStress(BaseLib::ConfigTree const &config)