Revision ecdb52cd49f99a5a6cdd9c7ff4277340c3406f6d authored by Wenqing Wang on 01 October 2021, 14:19:08 UTC, committed by Dmitry Yu. Naumov on 11 November 2021, 10:53:01 UTC
1 parent 46a4437
CreateCohesiveZoneModeI.cpp
/**
* \file
* \copyright
* Copyright (c) 2012-2021, OpenGeoSys Community (http://www.opengeosys.org)
* Distributed under a Modified BSD License.
* See accompanying file LICENSE.txt or
* http://www.opengeosys.org/project/license
*/
#include "CreateCohesiveZoneModeI.h"
#include "CohesiveZoneModeI.h"
#include "ParameterLib/Utils.h"
namespace MaterialLib
{
namespace Fracture
{
namespace CohesiveZoneModeI
{
template <int DisplacementDim>
std::unique_ptr<FractureModelBase<DisplacementDim>> createCohesiveZoneModeI(
std::vector<std::unique_ptr<ParameterLib::ParameterBase>> const& parameters,
BaseLib::ConfigTree const& config)
{
//! \ogs_file_param{material__fracture_model__type}
config.checkConfigParameter("type", "CohesiveZoneModeI");
DBUG("Create CohesiveZoneModeI material");
auto const& Kn = ParameterLib::findParameter<double>(
//! \ogs_file_param_special{material__fracture_model__CohesiveZoneModeI__normal_stiffness}
config, "normal_stiffness", parameters, 1);
auto const& Ks = ParameterLib::findParameter<double>(
//! \ogs_file_param_special{material__fracture_model__CohesiveZoneModeI__shear_stiffness}
config, "shear_stiffness", parameters, 1);
auto const& Gc = ParameterLib::findParameter<double>(
//! \ogs_file_param_special{material__fracture_model__CohesiveZoneModeI__fracture_toughness}
config, "fracture_toughness", parameters, 1);
auto const& t_np = ParameterLib::findParameter<double>(
//! \ogs_file_param_special{material__fracture_model__CohesiveZoneModeI__peak_normal_traction}
config, "peak_normal_traction", parameters, 1);
auto const penalty_aperture_cutoff =
//! \ogs_file_param{material__fracture_model__CohesiveZoneModeI__penalty_aperture_cutoff}
config.getConfigParameter<double>("penalty_aperture_cutoff");
auto const tension_cutoff =
//! \ogs_file_param{material__fracture_model__CohesiveZoneModeI__tension_cutoff}
config.getConfigParameter<bool>("tension_cutoff");
MaterialPropertiesParameters mp{Kn, Ks, Gc, t_np};
return std::make_unique<CohesiveZoneModeI<DisplacementDim>>(
penalty_aperture_cutoff, tension_cutoff, mp);
}
template std::unique_ptr<FractureModelBase<2>> createCohesiveZoneModeI(
std::vector<std::unique_ptr<ParameterLib::ParameterBase>> const& parameters,
BaseLib::ConfigTree const& config);
template std::unique_ptr<FractureModelBase<3>> createCohesiveZoneModeI(
std::vector<std::unique_ptr<ParameterLib::ParameterBase>> const& parameters,
BaseLib::ConfigTree const& config);
} // namespace CohesiveZoneModeI
} // namespace Fracture
} // namespace MaterialLib
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...