From 7a2c7e57f2cbe2dd08e7368d5a3c784192b84bcc Mon Sep 17 00:00:00 2001 From: Thomas Fischer <thomas.fischer@ufz.de> Date: Fri, 7 Apr 2017 14:29:33 +0200 Subject: [PATCH] [A/U/MP] Process only node-based PropertyVectors. --- .../PartitionMesh/NodeWiseMeshPartitioner.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Applications/Utils/ModelPreparation/PartitionMesh/NodeWiseMeshPartitioner.cpp b/Applications/Utils/ModelPreparation/PartitionMesh/NodeWiseMeshPartitioner.cpp index 268dad7e59a..96936df6049 100644 --- a/Applications/Utils/ModelPreparation/PartitionMesh/NodeWiseMeshPartitioner.cpp +++ b/Applications/Utils/ModelPreparation/PartitionMesh/NodeWiseMeshPartitioner.cpp @@ -220,7 +220,8 @@ void NodeWiseMeshPartitioner::processProperties() // 2 resize the PV with total_number_of_tuples // 3 copy the values according to the partition info auto const& original_properties(_mesh->getProperties()); - auto property_names = original_properties.getPropertyVectorNames(); + auto const property_names = + original_properties.getPropertyVectorNames(MeshLib::MeshItemType::Node); for (auto const& name : property_names) { bool success = @@ -332,9 +333,13 @@ NodeWiseMeshPartitioner::getNumberOfIntegerVariablesOfElements( void NodeWiseMeshPartitioner::writeNodePropertiesBinary( const std::string& file_name_base) const { - auto const& property_names(_partitioned_properties.getPropertyVectorNames()); + auto const& property_names(_partitioned_properties.getPropertyVectorNames( + MeshLib::MeshItemType::Node)); if (property_names.empty()) return; + + std::size_t number_of_properties(property_names.size()); + const std::string fname_cfg = file_name_base + "_partitioned_node_properties_cfg" + std::to_string(_npartitions) + ".bin"; @@ -345,7 +350,6 @@ void NodeWiseMeshPartitioner::writeNodePropertiesBinary( std::to_string(_npartitions) + ".bin"; std::ofstream out_val(fname_val.c_str(), std::ios::binary | std::ios::out); - std::size_t number_of_properties(property_names.size()); out.write(reinterpret_cast<char*>(&number_of_properties), sizeof(number_of_properties)); for (auto const& name : property_names) -- GitLab