@@ -142,24 +142,37 @@ std::map<std::string, Core::IO::InputSpec> Input::valid_parameters()
142142 .default_value = -1 })},
143143 {.defaultable = true });
144144
145- specs[" STRUCTURE GEOMETRY" ] = group (" STRUCTURE GEOMETRY" ,
146- {
147- parameter<std::filesystem::path>(
148- " FILE" , {.description = " Path to the exodus geometry file. Either absolute or "
149- " relative to the input file." }),
150- // Once we support more format, we should add a "TYPE" parameter for the file format.
151- list (" ELEMENT_BLOCKS" ,
152- all_of ({
153- parameter<int >(
154- " ID" , {.description = " ID of the element block in the exodus file." }),
155- parameter<std::string>(" ELEMENT_NAME" ,
156- {.description =
157- " The name of the element that should be assigned to the block." }),
158- parameter<std::string>(" ELEMENT_DATA" ,
159- {.description = " A dat-style string of parameters for the element." }),
160- })),
161- },
162- {.required = false });
145+ const auto add_geometry_section = [](auto & specs, const std::string& field_identifier)
146+ {
147+ specs[field_identifier + " GEOMETRY" ] = group (field_identifier + " GEOMETRY" ,
148+ {
149+ parameter<std::filesystem::path>(
150+ " FILE" , {.description = " Path to the exodus geometry file. Either absolute or "
151+ " relative to the input file." }),
152+ // Once we support more format, we should add a "TYPE" parameter for the file format.
153+ list (" ELEMENT_BLOCKS" ,
154+ all_of ({
155+ parameter<int >(
156+ " ID" , {.description = " ID of the element block in the exodus file." }),
157+ parameter<std::string>(" ELEMENT_NAME" ,
158+ {.description =
159+ " The name of the element that should be assigned to the block." }),
160+ parameter<std::string>(" ELEMENT_DATA" ,
161+ {.description = " A dat-style string of parameters for the element." }),
162+ })),
163+ },
164+ {.description = " Settings related to the geometry of discretization " + field_identifier,
165+ .required = false });
166+ };
167+
168+ const std::vector known_fields = {" STRUCTURE" , " FLUID" , " LUBRICATION" , " TRANSPORT" , " TRANSPORT2" ,
169+ " ALE" , " ARTERY" , " REDUCED D AIRWAYS" , " THERMO" , " PERIODIC BOUNDINGBOX" };
170+ for (const auto & field : known_fields)
171+ {
172+ add_geometry_section (specs, field);
173+ }
174+
175+
163176
164177 Inpar::Solid::set_valid_parameters (specs);
165178 Inpar::IO::set_valid_parameters (specs);
0 commit comments