31{
32
33
34
35 std::vector<std::string>
36 mesh_names;
37
38
39#ifdef DOXYGEN_DOCU_ONLY
41 config.getConfigParameterOptional<std::string>("mesh");
42#endif
43
44 auto optional_mesh_name =
46 config.getConfigParameterOptional<std::string>("mesh");
47
48 if (optional_mesh_name)
49 {
50 mesh_names.emplace_back(*optional_mesh_name);
51 INFO(
"Configure mesh '{}' for boundary condition or source term.",
52 mesh_names.back());
53 }
54 else if (
55 auto const geometrical_set_name =
58 config.getConfigParameterOptional<std::string>("geometrical_set"))
59 {
60#ifdef DOXYGEN_DOCU_ONLY
62 config.getConfigParameterOptional<std::string>("geometrical_set");
64 config.getConfigParameter<std::string>("geometry");
65#endif
66
67 auto const geometry_name =
69 config.getConfigParameter<std::string>("geometry");
70
72 *geometrical_set_name, geometry_name));
73 }
74 else if (
75 auto const meshes_config =
77 config.getConfigSubtreeOptional("meshes"))
78 {
80 for (auto mesh_config : meshes_config->getConfigParameterList("mesh"))
81 {
82 mesh_names.push_back(mesh_config.getValue<std::string>());
83 INFO(
"Configure mesh '{:s}' for boundary condition.",
84 mesh_names.back());
85 }
86 }
87
88
89
90
91 std::vector<std::reference_wrapper<const MeshLib::Mesh>> bc_meshes;
92 for (auto const& mesh_name : mesh_names)
93 {
95 DBUG(
"Found mesh '{:s}' with id {:d}.", mesh_name,
96 bc_meshes.back().get().getID());
97 }
98
99 return bc_meshes;
100}
void INFO(fmt::format_string< Args... > fmt, Args &&... args)
void DBUG(fmt::format_string< Args... > fmt, Args &&... args)
Mesh & findMeshByName(std::vector< std::unique_ptr< Mesh > > const &meshes, std::string_view const name)