OGS
CreateCohesiveZoneModeI.cpp
Go to the documentation of this file.
1
11
12#include "CohesiveZoneModeI.h"
13#include "ParameterLib/Utils.h"
14
15namespace MaterialLib
16{
17namespace Fracture
18{
19namespace CohesiveZoneModeI
20{
21template <int DisplacementDim>
22std::unique_ptr<FractureModelBase<DisplacementDim>> createCohesiveZoneModeI(
23 std::vector<std::unique_ptr<ParameterLib::ParameterBase>> const& parameters,
24 BaseLib::ConfigTree const& config)
25{
27 config.checkConfigParameter("type", "CohesiveZoneModeI");
28 DBUG("Create CohesiveZoneModeI material");
29
32 config, "normal_stiffness", parameters, 1);
33
36 config, "shear_stiffness", parameters, 1);
37
40 config, "fracture_toughness", parameters, 1);
41
42 auto const& t_np = ParameterLib::findParameter<double>(
44 config, "peak_normal_traction", parameters, 1);
45
46 auto const penalty_aperture_cutoff =
48 config.getConfigParameter<double>("penalty_aperture_cutoff");
49
50 auto const tension_cutoff =
52 config.getConfigParameter<bool>("tension_cutoff");
53
54 MaterialPropertiesParameters mp{Kn, Ks, Gc, t_np};
55
56 return std::make_unique<CohesiveZoneModeI<DisplacementDim>>(
57 penalty_aperture_cutoff, tension_cutoff, mp);
58}
59
60template std::unique_ptr<FractureModelBase<2>> createCohesiveZoneModeI(
61 std::vector<std::unique_ptr<ParameterLib::ParameterBase>> const& parameters,
62 BaseLib::ConfigTree const& config);
63
64template std::unique_ptr<FractureModelBase<3>> createCohesiveZoneModeI(
65 std::vector<std::unique_ptr<ParameterLib::ParameterBase>> const& parameters,
66 BaseLib::ConfigTree const& config);
67
68} // namespace CohesiveZoneModeI
69} // namespace Fracture
70} // 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 > > createCohesiveZoneModeI(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