OGS
CreateCreepBGRa.cpp
Go to the documentation of this file.
1
12#include "CreateCreepBGRa.h"
13
14#include "BaseLib/ConfigTree.h"
16#include "CreepBGRa.h"
17#include "MechanicsBase.h"
20#include "ParameterLib/Utils.h"
21
22namespace MaterialLib
23{
24namespace Solids
25{
26namespace Creep
27{
28template <int DisplacementDim>
29std::unique_ptr<MaterialLib::Solids::MechanicsBase<DisplacementDim>>
31 std::vector<std::unique_ptr<ParameterLib::ParameterBase>> const& parameters,
32 BaseLib::ConfigTree const& config)
33{
35 config.checkConfigParameter("type", "CreepBGRa");
36 DBUG("Create CreepBGRa material");
37
38 // Read elastic data first.
39 const bool skip_type_checking = true;
40 auto elastic_data =
42 parameters, config, skip_type_checking);
43
46 config, "a", parameters, 1);
47
50 config, "n", parameters, 1);
51
54 config, "sigma0", parameters, 1);
55
58 config, "q", parameters, 1);
59
60 auto const& nonlinear_solver_config =
62 config.getConfigSubtree("nonlinear_solver");
63 auto const nonlinear_solver_parameters =
64 NumLib::createNewtonRaphsonSolverParameters(nonlinear_solver_config);
65
66 return std::unique_ptr<CreepBGRa<DisplacementDim>>{
68 nonlinear_solver_parameters, A, n,
69 sigma0, Q}};
70}
71
72template std::unique_ptr<MaterialLib::Solids::MechanicsBase<2>>
74 std::vector<std::unique_ptr<ParameterLib::ParameterBase>> const& parameters,
75 BaseLib::ConfigTree const& config);
76
77template std::unique_ptr<MaterialLib::Solids::MechanicsBase<3>>
79 std::vector<std::unique_ptr<ParameterLib::ParameterBase>> const& parameters,
80 BaseLib::ConfigTree const& config);
81} // namespace Creep
82} // namespace Solids
83} // namespace MaterialLib
void DBUG(fmt::format_string< Args... > fmt, Args &&... args)
Definition Logging.h:30
ConfigTree getConfigSubtree(std::string const &root) const
void checkConfigParameter(std::string const &param, std::string_view const value) const
A class for computing the BGRa creep model, which reads.
Definition CreepBGRa.h:40
template std::unique_ptr< MaterialLib::Solids::MechanicsBase< 2 > > createCreepBGRa< 2 >(std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const &parameters, BaseLib::ConfigTree const &config)
template std::unique_ptr< MaterialLib::Solids::MechanicsBase< 3 > > createCreepBGRa< 3 >(std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const &parameters, BaseLib::ConfigTree const &config)
std::unique_ptr< MaterialLib::Solids::MechanicsBase< DisplacementDim > > createCreepBGRa(std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const &parameters, BaseLib::ConfigTree const &config)
std::unique_ptr< LinearElasticIsotropic< DisplacementDim > > createLinearElasticIsotropic(std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const &parameters, BaseLib::ConfigTree const &config, const bool skip_type_checking)
NewtonRaphsonSolverParameters createNewtonRaphsonSolverParameters(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