OGS
ProcessLib::LIE::SmallDeformation Namespace Reference

Namespaces

namespace  detail

Classes

struct  IntegrationPointDataFracture
struct  IntegrationPointDataMatrix
class  LocalDataInitializer
struct  SecondaryData
class  SmallDeformationLocalAssemblerFracture
class  SmallDeformationLocalAssemblerInterface
class  SmallDeformationLocalAssemblerMatrix
class  SmallDeformationLocalAssemblerMatrixNearFracture
class  SmallDeformationProcess
struct  SmallDeformationProcessData

Functions

template<int DisplacementDim>
std::unique_ptr< ProcesscreateSmallDeformationProcess (std::string const &name, MeshLib::Mesh &mesh, std::unique_ptr< ProcessLib::AbstractJacobianAssembler > &&jacobian_assembler, std::vector< ProcessVariable > const &variables, std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const &parameters, std::optional< ParameterLib::CoordinateSystem > const &local_coordinate_system, unsigned const integration_order, BaseLib::ConfigTree const &config)
template std::unique_ptr< ProcesscreateSmallDeformationProcess< 2 > (std::string const &name, MeshLib::Mesh &mesh, std::unique_ptr< ProcessLib::AbstractJacobianAssembler > &&jacobian_assembler, std::vector< ProcessVariable > const &variables, std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const &parameters, std::optional< ParameterLib::CoordinateSystem > const &local_coordinate_system, unsigned const integration_order, BaseLib::ConfigTree const &config)
template std::unique_ptr< ProcesscreateSmallDeformationProcess< 3 > (std::string const &name, MeshLib::Mesh &mesh, std::unique_ptr< ProcessLib::AbstractJacobianAssembler > &&jacobian_assembler, std::vector< ProcessVariable > const &variables, std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const &parameters, std::optional< ParameterLib::CoordinateSystem > const &local_coordinate_system, unsigned const integration_order, BaseLib::ConfigTree const &config)
template<int DisplacementDim, template< typename, int > class LocalAssemblerMatrixImplementation, template< typename, int > class LocalAssemblerMatrixNearFractureImplementation, template< typename, int > class LocalAssemblerFractureImplementation, typename LocalAssemblerInterface, typename... ExtraCtorArgs>
void createLocalAssemblers (std::vector< MeshLib::Element * > const &mesh_elements, NumLib::LocalToGlobalIndexMap const &dof_table, std::vector< std::unique_ptr< LocalAssemblerInterface > > &local_assemblers, NumLib::IntegrationOrder const integration_order, ExtraCtorArgs &&... extra_ctor_args)

Function Documentation

◆ createLocalAssemblers()

template<int DisplacementDim, template< typename, int > class LocalAssemblerMatrixImplementation, template< typename, int > class LocalAssemblerMatrixNearFractureImplementation, template< typename, int > class LocalAssemblerFractureImplementation, typename LocalAssemblerInterface, typename... ExtraCtorArgs>
void ProcessLib::LIE::SmallDeformation::createLocalAssemblers ( std::vector< MeshLib::Element * > const & mesh_elements,
NumLib::LocalToGlobalIndexMap const & dof_table,
std::vector< std::unique_ptr< LocalAssemblerInterface > > & local_assemblers,
NumLib::IntegrationOrder const integration_order,
ExtraCtorArgs &&... extra_ctor_args )

Creates local assemblers for each element of the given mesh.

Template Parameters
LocalAssemblerImplementationthe individual local assembler type
LocalAssemblerInterfacethe general local assembler interface
ExtraCtorArgstypes of additional constructor arguments. Those arguments will be passed to the constructor of LocalAssemblerImplementation.

The first two template parameters cannot be deduced from the arguments. Therefore they always have to be provided manually.

Definition at line 72 of file LIE/SmallDeformation/LocalAssembler/CreateLocalAssemblers.h.

78{
79 DBUG("Create local assemblers.");
80
82 DisplacementDim, LocalAssemblerMatrixImplementation,
83 LocalAssemblerMatrixNearFractureImplementation,
84 LocalAssemblerFractureImplementation>(
85 dof_table, mesh_elements, local_assemblers, integration_order,
86 std::forward<ExtraCtorArgs>(extra_ctor_args)...);
87}
void DBUG(fmt::format_string< Args... > fmt, Args &&... args)
Definition Logging.h:22
void createLocalAssemblers(NumLib::LocalToGlobalIndexMap const &dof_table, std::vector< MeshLib::Element * > const &mesh_elements, std::vector< std::unique_ptr< LocalAssemblerInterface > > &local_assemblers, NumLib::IntegrationOrder const integration_order, ExtraCtorArgs &&... extra_ctor_args)

References ProcessLib::LIE::SmallDeformation::detail::createLocalAssemblers(), and DBUG().

Referenced by ProcessLib::LIE::SmallDeformation::SmallDeformationProcess< DisplacementDim >::initializeConcreteProcess().

◆ createSmallDeformationProcess()

template<int DisplacementDim>
std::unique_ptr< Process > ProcessLib::LIE::SmallDeformation::createSmallDeformationProcess ( std::string const & name,
MeshLib::Mesh & mesh,
std::unique_ptr< ProcessLib::AbstractJacobianAssembler > && jacobian_assembler,
std::vector< ProcessVariable > const & variables,
std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const & parameters,
std::optional< ParameterLib::CoordinateSystem > const & local_coordinate_system,
unsigned const integration_order,
BaseLib::ConfigTree const & config )
Input File Parameter
prj__processes__process__type

Process Variables

Input File Parameter
prj__processes__process__SMALL_DEFORMATION_WITH_LIE__process_variables

Primary process variables as they appear in the global component vector:

Input File Parameter
prj__processes__process__SMALL_DEFORMATION_WITH_LIE__process_variables__process_variable

Process Parameters

Input File Parameter
prj__processes__process__SMALL_DEFORMATION_WITH_LIE__fracture_model
Input File Parameter
prj__processes__process__SMALL_DEFORMATION_WITH_LIE__fracture_model__type
Input File Parameter
prj__processes__process__SMALL_DEFORMATION_WITH_LIE__fracture_properties
Input File Parameter
prj__processes__process__SMALL_DEFORMATION_WITH_LIE__fracture_properties__material_id
Input File Parameter
prj__processes__process__SMALL_DEFORMATION_WITH_LIE__fracture_properties__initial_aperture
Input File Parameter
prj__processes__process__SMALL_DEFORMATION_WITH_LIE__reference_temperature
Input File Parameter
prj__processes__process__SMALL_DEFORMATION_WITH_LIE__use_b_bar

Definition at line 24 of file LIE/SmallDeformation/CreateSmallDeformationProcess.cpp.

34{
36 config.checkConfigParameter("type", "SMALL_DEFORMATION_WITH_LIE");
37 DBUG("Create SmallDeformationProcess with LIE.");
38
41 auto const pv_conf = config.getConfigSubtree("process_variables");
43 auto range =
45 pv_conf.getConfigParameterList<std::string>("process_variable");
46 std::vector<std::reference_wrapper<ProcessVariable>> per_process_variables;
47
48 std::size_t n_var_du = 0;
49 for (std::string const& pv_name : range)
50 {
51 if (pv_name != "displacement" &&
52 !pv_name.starts_with("displacement_jump"))
53 {
55 "Found a process variable name '{:s}'. It should be "
56 "'displacement' or 'displacement_jumpN' or "
57 "'displacement_junctionN'",
58 pv_name);
59 }
60 if (pv_name.starts_with("displacement_jump"))
61 {
62 n_var_du++;
63 }
64
65 auto variable = std::find_if(variables.cbegin(), variables.cend(),
66 [&pv_name](ProcessVariable const& v)
67 { return v.getName() == pv_name; });
68
69 if (variable == variables.end())
70 {
72 "Could not find process variable '{:s}' in the provided "
73 "variables "
74 "list for config tag <{:s}>.",
75 pv_name, "process_variable");
76 }
77 DBUG("Found process variable '{:s}' for config tag <{:s}>.",
78 variable->getName(), "process_variable");
79
80 per_process_variables.emplace_back(
81 const_cast<ProcessVariable&>(*variable));
82 }
83
84 if (n_var_du < 1)
85 {
86 OGS_FATAL("No displacement jump variables are specified");
87 }
88
89 DBUG("Associate displacement with process variable '{:s}'.",
90 per_process_variables.back().get().getName());
91
92 if (per_process_variables.back().get().getNumberOfGlobalComponents() !=
93 DisplacementDim)
94 {
96 "Number of components of the process variable '{:s}' is different "
97 "from the displacement dimension: got {:d}, expected {:d}",
98 per_process_variables.back().get().getName(),
99 per_process_variables.back().get().getNumberOfGlobalComponents(),
100 DisplacementDim);
101 }
102 std::vector<std::vector<std::reference_wrapper<ProcessVariable>>>
103 process_variables;
104 process_variables.push_back(std::move(per_process_variables));
105
107 auto solid_constitutive_relations =
109 parameters, local_coordinate_system, materialIDs(mesh), config);
110
111 // Fracture constitutive relation.
112 // read type;
113 auto const fracture_model_config =
115 config.getConfigSubtree("fracture_model");
116
117 auto const frac_type =
119 fracture_model_config.peekConfigParameter<std::string>("type");
120
121 std::unique_ptr<MaterialLib::Fracture::FractureModelBase<DisplacementDim>>
122 fracture_model = nullptr;
123 if (frac_type == "LinearElasticIsotropic")
124 {
126 DisplacementDim>(parameters, fracture_model_config);
127 }
128 else if (frac_type == "Coulomb")
129 {
131 parameters, fracture_model_config);
132 }
133 else if (frac_type == "CohesiveZoneModeI")
134 {
135 fracture_model =
137 DisplacementDim>(parameters, fracture_model_config);
138 }
139 else
140 {
141 OGS_FATAL(
142 "Cannot construct fracture constitutive relation of given type "
143 "'{:s}'.",
144 frac_type);
145 }
146
147 // Fracture properties
148 std::vector<FractureProperty> fracture_properties;
149 for (
150 auto fracture_properties_config :
152 config.getConfigSubtreeList("fracture_properties"))
153 {
154 fracture_properties.emplace_back(
155 fracture_properties.size(),
157 fracture_properties_config.getConfigParameter<int>("material_id"),
160 fracture_properties_config, "initial_aperture", parameters, 1,
161 &mesh));
162 }
163
164 if (n_var_du < fracture_properties.size())
165 {
166 OGS_FATAL(
167 "The number of displacement jumps {} and the number of "
168 "<fracture_properties> {} are not consistent.",
169 n_var_du,
170 fracture_properties.size());
171 }
172
173 // Reference temperature
174 const auto& reference_temperature =
176 config.getConfigParameter<double>(
177 "reference_temperature", std::numeric_limits<double>::quiet_NaN());
178
180 auto const use_b_bar = config.getConfigParameter<bool>("use_b_bar", false);
181
183 materialIDs(mesh), std::move(solid_constitutive_relations),
184 std::move(fracture_model), std::move(fracture_properties),
185 reference_temperature, use_b_bar};
186
187 SecondaryVariableCollection secondary_variables;
188
189 ProcessLib::createSecondaryVariables(config, secondary_variables);
190
191 return std::make_unique<SmallDeformationProcess<DisplacementDim>>(
192 std::move(name), mesh, std::move(jacobian_assembler), parameters,
193 integration_order, std::move(process_variables),
194 std::move(process_data), std::move(secondary_variables));
195}
#define OGS_FATAL(...)
Definition Error.h:19
std::unique_ptr< FractureModelBase< DisplacementDim > > createCohesiveZoneModeI(std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const &parameters, BaseLib::ConfigTree const &config)
std::unique_ptr< FractureModelBase< DisplacementDim > > createLinearElasticIsotropic(std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const &parameters, BaseLib::ConfigTree const &config)
std::unique_ptr< FractureModelBase< DisplacementDim > > createCoulomb(std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const &parameters, BaseLib::ConfigTree const &config)
std::map< int, std::shared_ptr< MaterialLib::Solids::MechanicsBase< DisplacementDim > > > createConstitutiveRelations(std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const &parameters, std::optional< ParameterLib::CoordinateSystem > const &local_coordinate_system, MeshLib::PropertyVector< int > const *const material_ids, BaseLib::ConfigTree const &config)
PropertyVector< int > const * materialIDs(Mesh const &mesh)
Definition Mesh.cpp:258
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)
void createSecondaryVariables(BaseLib::ConfigTree const &config, SecondaryVariableCollection &secondary_variables)

References BaseLib::ConfigTree::checkConfigParameter(), MaterialLib::Fracture::CohesiveZoneModeI::createCohesiveZoneModeI(), MaterialLib::Solids::createConstitutiveRelations(), MaterialLib::Fracture::createCoulomb(), MaterialLib::Fracture::createLinearElasticIsotropic(), ProcessLib::createSecondaryVariables(), DBUG(), ParameterLib::findParameter(), BaseLib::ConfigTree::getConfigParameter(), BaseLib::ConfigTree::getConfigParameterList(), BaseLib::ConfigTree::getConfigSubtree(), BaseLib::ConfigTree::getConfigSubtreeList(), OGS_FATAL, and BaseLib::ConfigTree::peekConfigParameter().

◆ createSmallDeformationProcess< 2 >()

template std::unique_ptr< Process > ProcessLib::LIE::SmallDeformation::createSmallDeformationProcess< 2 > ( std::string const & name,
MeshLib::Mesh & mesh,
std::unique_ptr< ProcessLib::AbstractJacobianAssembler > && jacobian_assembler,
std::vector< ProcessVariable > const & variables,
std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const & parameters,
std::optional< ParameterLib::CoordinateSystem > const & local_coordinate_system,
unsigned const integration_order,
BaseLib::ConfigTree const & config )

◆ createSmallDeformationProcess< 3 >()

template std::unique_ptr< Process > ProcessLib::LIE::SmallDeformation::createSmallDeformationProcess< 3 > ( std::string const & name,
MeshLib::Mesh & mesh,
std::unique_ptr< ProcessLib::AbstractJacobianAssembler > && jacobian_assembler,
std::vector< ProcessVariable > const & variables,
std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const & parameters,
std::optional< ParameterLib::CoordinateSystem > const & local_coordinate_system,
unsigned const integration_order,
BaseLib::ConfigTree const & config )