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 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 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 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, typename, int > class LocalAssemblerMatrixImplementation, template< typename, typename, int > class LocalAssemblerMatrixNearFractureImplementation, template< typename, 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, ExtraCtorArgs &&... extra_ctor_args)
 

Function Documentation

◆ createLocalAssemblers()

template<int GlobalDim, template< typename, typename, int > class LocalAssemblerMatrixImplementation, template< typename, typename, int > class LocalAssemblerMatrixNearFractureImplementation, template< typename, 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,
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 81 of file CreateLocalAssemblers.h.

86{
87 DBUG("Create local assemblers.");
88
90 GlobalDim, LocalAssemblerMatrixImplementation,
91 LocalAssemblerMatrixNearFractureImplementation,
92 LocalAssemblerFractureImplementation>(
93 dof_table, mesh_elements, local_assemblers,
94 std::forward<ExtraCtorArgs>(extra_ctor_args)...);
95}
void DBUG(char const *fmt, Args const &... args)
Definition: Logging.h:29
void createLocalAssemblers(const unsigned dimension, std::vector< MeshLib::Element * > const &mesh_elements, NumLib::LocalToGlobalIndexMap const &dof_table, std::vector< std::unique_ptr< LocalAssemblerInterface > > &local_assemblers, 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  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

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" && pv_name.find("displacement_jump") != 0)
59 {
61 "Found a process variable name '{:s}'. It should be "
62 "'displacement' or 'displacement_jumpN' or "
63 "'displacement_junctionN'");
64 }
65 if (pv_name.find("displacement_jump") == 0)
66 {
67 n_var_du++;
68 }
69
70 auto variable = std::find_if(variables.cbegin(), variables.cend(),
71 [&pv_name](ProcessVariable const& v)
72 { return v.getName() == pv_name; });
73
74 if (variable == variables.end())
75 {
77 "Could not find process variable '{:s}' in the provided "
78 "variables "
79 "list for config tag <{:s}>.",
80 pv_name, "process_variable");
81 }
82 DBUG("Found process variable '{:s}' for config tag <{:s}>.",
83 variable->getName(), "process_variable");
84
85 per_process_variables.emplace_back(
86 const_cast<ProcessVariable&>(*variable));
87 }
88
89 if (n_var_du < 1)
90 {
91 OGS_FATAL("No displacement jump variables are specified");
92 }
93
94 DBUG("Associate displacement with process variable '{:s}'.",
95 per_process_variables.back().get().getName());
96
97 if (per_process_variables.back().get().getNumberOfGlobalComponents() !=
98 DisplacementDim)
99 {
100 OGS_FATAL(
101 "Number of components of the process variable '{:s}' is different "
102 "from the displacement dimension: got {:d}, expected {:d}",
103 per_process_variables.back().get().getName(),
104 per_process_variables.back().get().getNumberOfGlobalComponents(),
105 DisplacementDim);
106 }
107 std::vector<std::vector<std::reference_wrapper<ProcessVariable>>>
108 process_variables;
109 process_variables.push_back(std::move(per_process_variables));
110
112 auto solid_constitutive_relations =
113 MaterialLib::Solids::createConstitutiveRelations<DisplacementDim>(
114 parameters, local_coordinate_system, config);
115
116 // Fracture constitutive relation.
117 // read type;
118 auto const fracture_model_config =
120 config.getConfigSubtree("fracture_model");
121
122 auto const frac_type =
124 fracture_model_config.peekConfigParameter<std::string>("type");
125
126 std::unique_ptr<MaterialLib::Fracture::FractureModelBase<DisplacementDim>>
127 fracture_model = nullptr;
128 if (frac_type == "LinearElasticIsotropic")
129 {
131 DisplacementDim>(parameters, fracture_model_config);
132 }
133 else if (frac_type == "Coulomb")
134 {
135 fracture_model = MaterialLib::Fracture::createCoulomb<DisplacementDim>(
136 parameters, fracture_model_config);
137 }
138 else if (frac_type == "CohesiveZoneModeI")
139 {
140 fracture_model =
142 DisplacementDim>(parameters, fracture_model_config);
143 }
144 else
145 {
146 OGS_FATAL(
147 "Cannot construct fracture constitutive relation of given type "
148 "'{:s}'.",
149 frac_type);
150 }
151
152 // Fracture properties
153 std::vector<FractureProperty> fracture_properties;
154 for (
155 auto fracture_properties_config :
157 config.getConfigSubtreeList("fracture_properties"))
158 {
159 fracture_properties.emplace_back(
160 fracture_properties.size(),
162 fracture_properties_config.getConfigParameter<int>("material_id"),
163 ParameterLib::findParameter<double>(
165 fracture_properties_config, "initial_aperture", parameters, 1,
166 &mesh));
167 }
168
169 if (n_var_du < fracture_properties.size())
170 {
171 OGS_FATAL(
172 "The number of displacement jumps and the number of "
173 "<fracture_properties> are not consistent");
174 }
175
176 // Reference temperature
177 const auto& reference_temperature =
179 config.getConfigParameter<double>(
180 "reference_temperature", std::numeric_limits<double>::quiet_NaN());
181
182 SmallDeformationProcessData<DisplacementDim> process_data(
183 materialIDs(mesh), std::move(solid_constitutive_relations),
184 std::move(fracture_model), std::move(fracture_properties),
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: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)
static const double v
PropertyVector< int > const * materialIDs(Mesh const &mesh)
Definition: Mesh.cpp:264
void createSecondaryVariables(BaseLib::ConfigTree const &config, SecondaryVariableCollection &secondary_variables)

References BaseLib::ConfigTree::checkConfigParameter(), MaterialLib::Fracture::CohesiveZoneModeI::createCohesiveZoneModeI(), MaterialLib::Fracture::createLinearElasticIsotropic(), ProcessLib::createSecondaryVariables(), DBUG(), BaseLib::ConfigTree::getConfigParameter(), BaseLib::ConfigTree::getConfigParameterList(), BaseLib::ConfigTree::getConfigSubtree(), BaseLib::ConfigTree::getConfigSubtreeList(), MeshLib::materialIDs(), MaterialPropertyLib::name, OGS_FATAL, BaseLib::ConfigTree::peekConfigParameter(), MaterialPropertyLib::reference_temperature, and MathLib::v.

◆ createSmallDeformationProcess< 2 >()

template std::unique_ptr< Process > ProcessLib::LIE::SmallDeformation::createSmallDeformationProcess< 2 > ( std::string  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  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 
)