OGS
CreateSimplifiedElasticityModel.cpp
Go to the documentation of this file.
1
12
13#include <Eigen/Core>
14
15#include "BaseLib/ConfigTree.h"
16#include "BaseLib/Logging.h"
22
23namespace ProcessLib
24{
25namespace ThermoRichardsFlow
26{
27std::unique_ptr<SimplifiedElasticityModel> createElasticityModel(
28 BaseLib::ConfigTree const& config)
29{
30 std::unique_ptr<SimplifiedElasticityModel> simplified_elasticity =
31 std::make_unique<RigidElasticityModel>();
32 if (auto const simplified_elasticity_switch =
34 config.getConfigParameterOptional<std::string>("simplified_elasticity"))
35 {
36 DBUG("Using simplified_elasticity for the Richards flow equation");
37 if (*simplified_elasticity_switch == "uniaxial")
38 {
39 DBUG("assuming local uniaxial deformation only.");
40 simplified_elasticity = std::make_unique<UniaxialElasticityModel>();
41 }
42 else if (*simplified_elasticity_switch == "hydrostatic")
43 {
44 DBUG("assuming constant hydrostatic stress locally.");
45 simplified_elasticity =
46 std::make_unique<HydrostaticElasticityModel>();
47 }
48 else if (*simplified_elasticity_switch == "user_defined")
49 {
50 DBUG("using user defined elasticity model.");
51 simplified_elasticity =
52 std::make_unique<UserDefinedElasticityModel>();
53 }
54 else if (*simplified_elasticity_switch == "rigid")
55 {
56 DBUG("using user defined elasticity model.");
57 simplified_elasticity = std::make_unique<RigidElasticityModel>();
58 }
59 }
60 return simplified_elasticity;
61}
62} // namespace ThermoRichardsFlow
63} // namespace ProcessLib
void DBUG(fmt::format_string< Args... > fmt, Args &&... args)
Definition Logging.h:30
std::optional< T > getConfigParameterOptional(std::string const &param) const
std::unique_ptr< SimplifiedElasticityModel > createElasticityModel(BaseLib::ConfigTree const &config)