OGS
CreateLinearElasticIsotropic.cpp
Go to the documentation of this file.
1
11
13#include "ParameterLib/Utils.h"
14
15namespace MaterialLib
16{
17namespace Fracture
18{
19template <int DisplacementDim>
20std::unique_ptr<FractureModelBase<DisplacementDim>>
22 std::vector<std::unique_ptr<ParameterLib::ParameterBase>> const& parameters,
23 BaseLib::ConfigTree const& config)
24{
26 config.checkConfigParameter("type", "LinearElasticIsotropic");
27 DBUG("Create LinearElasticIsotropic material");
28
31 config, "normal_stiffness", parameters, 1);
32
35 config, "shear_stiffness", parameters, 1);
36
37 auto const penalty_aperture_cutoff =
39 config.getConfigParameter<double>("penalty_aperture_cutoff");
40
41 auto const tension_cutoff =
43 config.getConfigParameter<bool>("tension_cutoff");
44
46 Ks};
47
48 return std::make_unique<LinearElasticIsotropic<DisplacementDim>>(
49 penalty_aperture_cutoff, tension_cutoff, mp);
50}
51
52template std::unique_ptr<FractureModelBase<2>> createLinearElasticIsotropic(
53 std::vector<std::unique_ptr<ParameterLib::ParameterBase>> const& parameters,
54 BaseLib::ConfigTree const& config);
55
56template std::unique_ptr<FractureModelBase<3>> createLinearElasticIsotropic(
57 std::vector<std::unique_ptr<ParameterLib::ParameterBase>> const& parameters,
58 BaseLib::ConfigTree const& config);
59
60} // namespace Fracture
61} // namespace MaterialLib
void DBUG(fmt::format_string< Args... > fmt, Args &&... args)
Definition Logging.h:30
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)
Definition Utils.h:102