25 std::string
const& name,
27 std::unique_ptr<ProcessLib::AbstractJacobianAssembler>&& jacobian_assembler,
28 std::vector<ProcessVariable>
const& variables,
29 std::vector<std::unique_ptr<ParameterLib::ParameterBase>>
const& parameters,
30 std::optional<ParameterLib::CoordinateSystem>
const&
31 local_coordinate_system,
32 unsigned const integration_order,
37 DBUG(
"Create SmallDeformationProcess with LIE.");
46 std::vector<std::reference_wrapper<ProcessVariable>> per_process_variables;
48 std::size_t n_var_du = 0;
49 for (std::string
const& pv_name : range)
51 if (pv_name !=
"displacement" &&
52 !pv_name.starts_with(
"displacement_jump"))
55 "Found a process variable name '{:s}'. It should be "
56 "'displacement' or 'displacement_jumpN' or "
57 "'displacement_junctionN'",
60 if (pv_name.starts_with(
"displacement_jump"))
65 auto variable = std::find_if(variables.cbegin(), variables.cend(),
67 { return v.getName() == pv_name; });
69 if (variable == variables.end())
72 "Could not find process variable '{:s}' in the provided "
74 "list for config tag <{:s}>.",
75 pv_name,
"process_variable");
77 DBUG(
"Found process variable '{:s}' for config tag <{:s}>.",
78 variable->getName(),
"process_variable");
80 per_process_variables.emplace_back(
86 OGS_FATAL(
"No displacement jump variables are specified");
89 DBUG(
"Associate displacement with process variable '{:s}'.",
90 per_process_variables.back().get().getName());
92 if (per_process_variables.back().get().getNumberOfGlobalComponents() !=
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(),
102 std::vector<std::vector<std::reference_wrapper<ProcessVariable>>>
104 process_variables.push_back(std::move(per_process_variables));
107 auto solid_constitutive_relations =
109 parameters, local_coordinate_system, materialIDs(mesh), config);
113 auto const fracture_model_config =
117 auto const frac_type =
121 std::unique_ptr<MaterialLib::Fracture::FractureModelBase<DisplacementDim>>
122 fracture_model =
nullptr;
123 if (frac_type ==
"LinearElasticIsotropic")
126 DisplacementDim>(parameters, fracture_model_config);
128 else if (frac_type ==
"Coulomb")
131 parameters, fracture_model_config);
133 else if (frac_type ==
"CohesiveZoneModeI")
137 DisplacementDim>(parameters, fracture_model_config);
142 "Cannot construct fracture constitutive relation of given type "
148 std::vector<FractureProperty> fracture_properties;
150 auto fracture_properties_config :
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,
164 if (n_var_du < fracture_properties.size())
167 "The number of displacement jumps {} and the number of "
168 "<fracture_properties> {} are not consistent.",
170 fracture_properties.size());
174 const auto& reference_temperature =
177 "reference_temperature", std::numeric_limits<double>::quiet_NaN());
183 materialIDs(mesh), std::move(solid_constitutive_relations),
184 std::move(fracture_model), std::move(fracture_properties),
185 reference_temperature, use_b_bar};
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));