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 GlobalDim, 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 GlobalDim, 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 76 of file CreateLocalAssemblers.h.

82{
83 DBUG("Create local assemblers.");
84
85 detail::createLocalAssemblers<
86 GlobalDim, LocalAssemblerMatrixImplementation,
87 LocalAssemblerMatrixNearFractureImplementation,
88 LocalAssemblerFractureImplementation>(
89 dof_table, mesh_elements, local_assemblers, integration_order,
90 std::forward<ExtraCtorArgs>(extra_ctor_args)...);
91}
void DBUG(fmt::format_string< Args... > fmt, Args &&... args)
Definition Logging.h:30

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 31 of file CreateSmallDeformationProcess.cpp.

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