OGS
CreateSimplifiedElasticityModel.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
6#include <Eigen/Core>
7
9#include "BaseLib/Logging.h"
15
16namespace ProcessLib
17{
19{
20std::unique_ptr<SimplifiedElasticityModel> createElasticityModel(
21 BaseLib::ConfigTree const& config)
22{
23 std::unique_ptr<SimplifiedElasticityModel> simplified_elasticity =
24 std::make_unique<RigidElasticityModel>();
25 if (auto const simplified_elasticity_switch =
27 config.getConfigParameterOptional<std::string>("simplified_elasticity"))
28 {
29 DBUG("Using simplified_elasticity for the Richards flow equation");
30 if (*simplified_elasticity_switch == "uniaxial")
31 {
32 DBUG("assuming local uniaxial deformation only.");
33 simplified_elasticity = std::make_unique<UniaxialElasticityModel>();
34 }
35 else if (*simplified_elasticity_switch == "hydrostatic")
36 {
37 DBUG("assuming constant hydrostatic stress locally.");
38 simplified_elasticity =
39 std::make_unique<HydrostaticElasticityModel>();
40 }
41 else if (*simplified_elasticity_switch == "user_defined")
42 {
43 DBUG("using user defined elasticity model.");
44 simplified_elasticity =
45 std::make_unique<UserDefinedElasticityModel>();
46 }
47 else if (*simplified_elasticity_switch == "rigid")
48 {
49 DBUG("using user defined elasticity model.");
50 simplified_elasticity = std::make_unique<RigidElasticityModel>();
51 }
52 }
53 return simplified_elasticity;
54}
55} // namespace ThermoRichardsFlow
56} // namespace ProcessLib
void DBUG(fmt::format_string< Args... > fmt, Args &&... args)
Definition Logging.h:22
std::optional< T > getConfigParameterOptional(std::string const &param) const
std::unique_ptr< SimplifiedElasticityModel > createElasticityModel(BaseLib::ConfigTree const &config)