OGS
CreateCohesiveZoneModeI.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 "CohesiveZoneModeI.h"
8
9namespace MaterialLib
10{
11namespace Fracture
12{
13namespace CohesiveZoneModeI
14{
15template <int DisplacementDim>
16std::unique_ptr<FractureModelBase<DisplacementDim>> createCohesiveZoneModeI(
17 std::vector<std::unique_ptr<ParameterLib::ParameterBase>> const& parameters,
18 BaseLib::ConfigTree const& config)
19{
21 config.checkConfigParameter("type", "CohesiveZoneModeI");
22 DBUG("Create CohesiveZoneModeI material");
23
26 config, "normal_stiffness", parameters, 1);
27
30 config, "shear_stiffness", parameters, 1);
31
34 config, "fracture_toughness", parameters, 1);
35
36 auto const& t_np = ParameterLib::findParameter<double>(
38 config, "peak_normal_traction", parameters, 1);
39
40 auto const penalty_aperture_cutoff =
42 config.getConfigParameter<double>("penalty_aperture_cutoff");
43
44 auto const tension_cutoff =
46 config.getConfigParameter<bool>("tension_cutoff");
47
48 MaterialPropertiesParameters mp{Kn, Ks, Gc, t_np};
49
50 return std::make_unique<CohesiveZoneModeI<DisplacementDim>>(
51 penalty_aperture_cutoff, tension_cutoff, mp);
52}
53
54template std::unique_ptr<FractureModelBase<2>> createCohesiveZoneModeI(
55 std::vector<std::unique_ptr<ParameterLib::ParameterBase>> const& parameters,
56 BaseLib::ConfigTree const& config);
57
58template std::unique_ptr<FractureModelBase<3>> createCohesiveZoneModeI(
59 std::vector<std::unique_ptr<ParameterLib::ParameterBase>> const& parameters,
60 BaseLib::ConfigTree const& config);
61
62} // namespace CohesiveZoneModeI
63} // namespace Fracture
64} // 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 > > 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)