Skip to content
Snippets Groups Projects
Commit 28b94996 authored by Tom Fischer's avatar Tom Fischer
Browse files

[A/U/MP] For debugging: readPropertiesConfigDataBin.

parent e0de25f0
No related branches found
No related tags found
No related merge requests found
...@@ -324,6 +324,26 @@ void NodeWiseMeshPartitioner::writePropertiesBinary( ...@@ -324,6 +324,26 @@ void NodeWiseMeshPartitioner::writePropertiesBinary(
MeshLib::IO::writePropertyVectorMetaDataBinary(out, pvmd); MeshLib::IO::writePropertyVectorMetaDataBinary(out, pvmd);
} }
out.close(); out.close();
}
void NodeWiseMeshPartitioner::readPropertiesConfigDataBinary(
const std::string& file_name_base) const
{
const std::string fname = file_name_base + "_partitioned_properties_cfg"
+ std::to_string(_npartitions) + ".bin";
std::ifstream is(fname.c_str(), std::ios::binary | std::ios::in);
if (!is)
{
ERR("Could not open file '%s' in binary mode.", fname.c_str());
}
while (is)
{
boost::optional<MeshLib::IO::PropertyVectorMetaData> pvmd(
MeshLib::IO::readPropertyVectorMetaData(is));
if (pvmd) {
INFO("readPropertiesConfigMetaDataBinary:");
MeshLib::IO::writePropertyVectorMetaData(*pvmd);
}
} }
} }
......
...@@ -130,6 +130,9 @@ private: ...@@ -130,6 +130,9 @@ private:
void writePropertiesBinary(std::string const& file_name_base) const; void writePropertiesBinary(std::string const& file_name_base) const;
void readPropertiesConfigDataBinary(
std::string const& file_name_base) const;
/*! /*!
\brief Write the configuration data of the partition data in \brief Write the configuration data of the partition data in
binary files. binary files.
......
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