20 std::string
const group_id_property_name =
23 DBUG(
"Using group_id_property {:s}", group_id_property_name);
25 auto const& group_id_property =
29 using Values = std::vector<double>;
30 std::map<int, Values> vec_index_values;
35 auto const index = p.getConfigParameter<
int>(
"index");
38 auto const value = p.getConfigParameterOptional<
double>(
"value");
42 Values values(1, *value);
43 vec_index_values.emplace(index, values);
50 Values
const values = p.getConfigParameter<Values>(
"values");
54 OGS_FATAL(
"No value available for constant parameter.");
57 vec_index_values.emplace(index, values);
61 for (
auto p : vec_index_values)
66 if (std::find(group_id_property->begin(), group_id_property->end(),
67 p.first) == group_id_property->end())
70 "Specified property index {:d} does not exist in the property "
72 p.first, group_id_property_name);
76 auto const n_values = vec_index_values.begin()->second.size();
77 if (p.second.size() != n_values)
80 "The length of some values ({:d}) is different from the first "
81 "one ({:d}). The length should be same for all index_values.",
82 p.second.size(), n_values);
88 return std::make_unique<
90 name, mesh, *group_id_property, vec_index_values);
94 return std::make_unique<
96 name, mesh, *group_id_property, vec_index_values);
99 OGS_FATAL(
"Mesh item type of the specified property is not supported.");