Skip to content
Snippets Groups Projects
Commit 5fc3d3ca authored by Dmitri Naumov's avatar Dmitri Naumov
Browse files

NWMP; Rename applyToPropertyVectors().

parent 185aff6d
No related branches found
No related tags found
No related merge requests found
...@@ -332,8 +332,8 @@ bool copyPropertyVector(MeshLib::Properties const& original_properties, ...@@ -332,8 +332,8 @@ bool copyPropertyVector(MeshLib::Properties const& original_properties,
/// At least one of the functions must return the 'true' value, but at most one /// At least one of the functions must return the 'true' value, but at most one
/// is executed. /// is executed.
template <typename Function> template <typename Function>
void applyPropertyVectors(std::vector<std::string> const& property_names, void applyToPropertyVectors(std::vector<std::string> const& property_names,
Function f) Function f)
{ {
for (auto const& name : property_names) for (auto const& name : property_names)
{ {
...@@ -373,7 +373,7 @@ void NodeWiseMeshPartitioner::processProperties( ...@@ -373,7 +373,7 @@ void NodeWiseMeshPartitioner::processProperties(
// 3 copy the values according to the partition info // 3 copy the values according to the partition info
auto const& original_properties(_mesh->getProperties()); auto const& original_properties(_mesh->getProperties());
applyPropertyVectors( applyToPropertyVectors(
original_properties.getPropertyVectorNames(mesh_item_type), original_properties.getPropertyVectorNames(mesh_item_type),
[&](auto type, std::string const& name) { [&](auto type, std::string const& name) {
return copyPropertyVector<decltype(type)>( return copyPropertyVector<decltype(type)>(
...@@ -486,7 +486,7 @@ void writePropertiesBinary(const std::string& file_name_base, ...@@ -486,7 +486,7 @@ void writePropertiesBinary(const std::string& file_name_base,
std::size_t const number_of_properties(property_names.size()); std::size_t const number_of_properties(property_names.size());
BaseLib::writeValueBinary(out, number_of_properties); BaseLib::writeValueBinary(out, number_of_properties);
applyPropertyVectors(property_names, applyToPropertyVectors(property_names,
[&](auto type, std::string const& name) { [&](auto type, std::string const& name) {
return writePropertyVectorBinary<decltype(type)>( return writePropertyVectorBinary<decltype(type)>(
partitioned_properties, name, out_val, out); partitioned_properties, name, out_val, out);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment