OGS
CreateLinearElasticIsotropic.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
8
9namespace MaterialLib
10{
11namespace Fracture
12{
13template <int DisplacementDim>
14std::unique_ptr<FractureModelBase<DisplacementDim>>
16 std::vector<std::unique_ptr<ParameterLib::ParameterBase>> const& parameters,
17 BaseLib::ConfigTree const& config)
18{
20 config.checkConfigParameter("type", "LinearElasticIsotropic");
21 DBUG("Create LinearElasticIsotropic material");
22
25 config, "normal_stiffness", parameters, 1);
26
29 config, "shear_stiffness", parameters, 1);
30
31 auto const penalty_aperture_cutoff =
33 config.getConfigParameter<double>("penalty_aperture_cutoff");
34
35 auto const tension_cutoff =
37 config.getConfigParameter<bool>("tension_cutoff");
38
40 Ks};
41
42 return std::make_unique<LinearElasticIsotropic<DisplacementDim>>(
43 penalty_aperture_cutoff, tension_cutoff, mp);
44}
45
46template std::unique_ptr<FractureModelBase<2>> createLinearElasticIsotropic(
47 std::vector<std::unique_ptr<ParameterLib::ParameterBase>> const& parameters,
48 BaseLib::ConfigTree const& config);
49
50template std::unique_ptr<FractureModelBase<3>> createLinearElasticIsotropic(
51 std::vector<std::unique_ptr<ParameterLib::ParameterBase>> const& parameters,
52 BaseLib::ConfigTree const& config);
53
54} // namespace Fracture
55} // namespace MaterialLib
void DBUG(fmt::format_string< Args... > fmt, Args &&... args)
Definition Logging.h:22
T getConfigParameter(std::string const &param) const
void checkConfigParameter(std::string const &param, std::string_view const value) const
std::unique_ptr< FractureModelBase< DisplacementDim > > createLinearElasticIsotropic(std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const &parameters, BaseLib::ConfigTree const &config)
OGS_NO_DANGLING Parameter< ParameterDataType > & findParameter(std::string const &parameter_name, std::vector< std::unique_ptr< ParameterBase > > const &parameters, int const num_components, MeshLib::Mesh const *const mesh=nullptr)