diff --git a/Applications/Utils/ModelPreparation/PartitionMesh/NodeWiseMeshPartitioner.cpp b/Applications/Utils/ModelPreparation/PartitionMesh/NodeWiseMeshPartitioner.cpp index 2d9c5bf8c827624560197e1966f2d2beee7710b5..e8e0602a1da4708993445d504809d47ca3fed950 100644 --- a/Applications/Utils/ModelPreparation/PartitionMesh/NodeWiseMeshPartitioner.cpp +++ b/Applications/Utils/ModelPreparation/PartitionMesh/NodeWiseMeshPartitioner.cpp @@ -326,6 +326,12 @@ void NodeWiseMeshPartitioner::writePropertiesBinary( } MeshLib::IO::writePropertyVectorMetaDataBinary(out, pvmd); } + for (const auto& partition : _partitions) + { + MeshLib::IO::PropertyVectorPartitionMetaData pvpmd; + pvpmd.number_of_tuples = partition.number_of_non_ghost_nodes; + MeshLib::IO::writePropertyVectorPartitionMetaData(out, pvpmd); + } out.close(); } @@ -350,6 +356,17 @@ void NodeWiseMeshPartitioner::readPropertiesConfigDataBinary( MeshLib::IO::writePropertyVectorMetaData(*pvmd); } } + auto pos = is.tellg(); + for (std::size_t i(0); i < _npartitions; ++i) { + auto offset = + pos + static_cast<std::streampos>( + i * sizeof(MeshLib::IO::PropertyVectorPartitionMetaData)); + is.seekg(offset); + unsigned long number_of_tuples = 0; + is.read(reinterpret_cast<char*>(&number_of_tuples), + sizeof(unsigned long)); + INFO("%u tuples in partition %u.", number_of_tuples, i); + } } std::tuple<std::vector<NodeWiseMeshPartitioner::IntegerType>,