32 std::string
const& name,
34 std::unique_ptr<ProcessLib::AbstractJacobianAssembler>&& jacobian_assembler,
35 std::vector<ProcessVariable>
const& variables,
36 std::vector<std::unique_ptr<ParameterLib::ParameterBase>>
const& parameters,
37 std::optional<ParameterLib::CoordinateSystem>
const&
38 local_coordinate_system,
39 unsigned const integration_order,
44 DBUG(
"Create SmallDeformationProcess with LIE.");
53 std::vector<std::reference_wrapper<ProcessVariable>> per_process_variables;
55 std::size_t n_var_du = 0;
56 for (std::string
const& pv_name : range)
58 if (pv_name !=
"displacement" &&
59 !pv_name.starts_with(
"displacement_jump"))
62 "Found a process variable name '{:s}'. It should be "
63 "'displacement' or 'displacement_jumpN' or "
64 "'displacement_junctionN'",
67 if (pv_name.starts_with(
"displacement_jump"))
72 auto variable = std::find_if(variables.cbegin(), variables.cend(),
74 { return v.getName() == pv_name; });
76 if (variable == variables.end())
79 "Could not find process variable '{:s}' in the provided "
81 "list for config tag <{:s}>.",
82 pv_name,
"process_variable");
84 DBUG(
"Found process variable '{:s}' for config tag <{:s}>.",
85 variable->getName(),
"process_variable");
87 per_process_variables.emplace_back(
93 OGS_FATAL(
"No displacement jump variables are specified");
96 DBUG(
"Associate displacement with process variable '{:s}'.",
97 per_process_variables.back().get().getName());
99 if (per_process_variables.back().get().getNumberOfGlobalComponents() !=
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(),
109 std::vector<std::vector<std::reference_wrapper<ProcessVariable>>>
111 process_variables.push_back(std::move(per_process_variables));
114 auto solid_constitutive_relations =
116 parameters, local_coordinate_system, materialIDs(mesh), config);
120 auto const fracture_model_config =
124 auto const frac_type =
128 std::unique_ptr<MaterialLib::Fracture::FractureModelBase<DisplacementDim>>
129 fracture_model =
nullptr;
130 if (frac_type ==
"LinearElasticIsotropic")
133 DisplacementDim>(parameters, fracture_model_config);
135 else if (frac_type ==
"Coulomb")
138 parameters, fracture_model_config);
140 else if (frac_type ==
"CohesiveZoneModeI")
144 DisplacementDim>(parameters, fracture_model_config);
149 "Cannot construct fracture constitutive relation of given type "
155 std::vector<FractureProperty> fracture_properties;
157 auto fracture_properties_config :
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,
171 if (n_var_du < fracture_properties.size())
174 "The number of displacement jumps and the number of "
175 "<fracture_properties> are not consistent");
179 const auto& reference_temperature =
182 "reference_temperature", std::numeric_limits<double>::quiet_NaN());
188 materialIDs(mesh), std::move(solid_constitutive_relations),
189 std::move(fracture_model), std::move(fracture_properties),
190 reference_temperature, use_b_bar};
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));