37{
38
39
40
41 std::string mesh_name;
42
43
44#ifdef DOXYGEN_DOCU_ONLY
46 config.getConfigParameterOptional<std::string>("mesh");
47#endif
48
49 auto optional_mesh_name =
51 config.getConfigParameterOptional<std::string>("mesh");
52 if (optional_mesh_name)
53 {
54 mesh_name = *optional_mesh_name;
55 }
56 else
57 {
58#ifdef DOXYGEN_DOCU_ONLY
60 config.getConfigParameterOptional<std::string>("geometrical_set");
62 config.getConfigParameter<std::string>("geometry");
63#endif
64
65
66 auto const geometrical_set_name =
68 config.getConfigParameter<std::string>("geometrical_set");
69 auto const geometry_name =
71 config.getConfigParameter<std::string>("geometry");
72
74 geometry_name);
75 }
76
77
78
79
81 begin(meshes), end(meshes),
82 [&mesh_name](auto const& mesh)
83 {
84 assert(mesh != nullptr);
85 return mesh->getName() == mesh_name;
86 },
87 "Required mesh with name '" + mesh_name + "' not found.");
88 DBUG(
"Found mesh '{:s}' with id {:d}.", mesh.getName(), mesh.getID());
89
90 return mesh;
91}
void DBUG(fmt::format_string< Args... > fmt, Args &&... args)
std::iterator_traits< InputIt >::reference findElementOrError(InputIt begin, InputIt end, Predicate predicate, std::string const &error="")