27 std::string
const group_id_property_name =
30 DBUG(
"Using group_id_property {:s}", group_id_property_name);
32 auto const& group_id_property =
36 using Values = std::vector<double>;
37 std::map<int, Values> vec_index_values;
42 auto const index = p.getConfigParameter<
int>(
"index");
45 auto const value = p.getConfigParameterOptional<
double>(
"value");
49 Values values(1, *value);
50 vec_index_values.emplace(index, values);
57 Values
const values = p.getConfigParameter<Values>(
"values");
61 OGS_FATAL(
"No value available for constant parameter.");
64 vec_index_values.emplace(index, values);
68 for (
auto p : vec_index_values)
73 if (std::find(group_id_property->begin(), group_id_property->end(),
74 p.first) == group_id_property->end())
77 "Specified property index {:d} does not exist in the property "
79 p.first, group_id_property_name);
83 auto const n_values = vec_index_values.begin()->second.size();
84 if (p.second.size() != n_values)
87 "The length of some values ({:d}) is different from the first "
88 "one ({:d}). The length should be same for all index_values.",
89 p.second.size(), n_values);
95 return std::make_unique<
97 name, mesh, *group_id_property, vec_index_values);
101 return std::make_unique<
103 name, mesh, *group_id_property, vec_index_values);
106 OGS_FATAL(
"Mesh item type of the specified property is not supported.");