Skip to content
Snippets Groups Projects
Commit 8ab37e13 authored by mattijs's avatar mattijs
Browse files

ENH: foamFormatConvert: leave boundary intact. Fixes #1358.

parent 8e63f084
No related merge requests found
...@@ -90,7 +90,13 @@ namespace Foam ...@@ -90,7 +90,13 @@ namespace Foam
// Hack to do zones which have Lists in them. See above. // Hack to do zones which have Lists in them. See above.
bool writeZones(const word& name, const fileName& meshDir, Time& runTime) bool writeZones
(
const word& name,
const fileName& meshDir,
Time& runTime,
const IOstreamOption::compressionType compression
)
{ {
IOobject io IOobject io
( (
...@@ -156,7 +162,7 @@ bool writeZones(const word& name, const fileName& meshDir, Time& runTime) ...@@ -156,7 +162,7 @@ bool writeZones(const word& name, const fileName& meshDir, Time& runTime)
( (
IOstream::ASCII, IOstream::ASCII,
IOstream::currentVersion, IOstream::currentVersion,
runTime.writeCompression(), compression,
true true
); );
} }
...@@ -330,7 +336,7 @@ int main(int argc, char *argv[]) ...@@ -330,7 +336,7 @@ int main(int argc, char *argv[])
writeMeshObject<pointIOField>("points", meshDir, runTime); writeMeshObject<pointIOField>("points", meshDir, runTime);
// Write boundary in ascii. This is only needed for fileHandler to // Write boundary in ascii. This is only needed for fileHandler to
// kick in. Should not give problems since always writing ascii. // kick in. Should not give problems since always writing ascii.
writeZones("boundary", meshDir, runTime); writeZones("boundary", meshDir, runTime, IOstreamOption::UNCOMPRESSED);
writeMeshObject<labelIOList>("pointProcAddressing", meshDir, runTime); writeMeshObject<labelIOList>("pointProcAddressing", meshDir, runTime);
writeMeshObject<labelIOList>("faceProcAddressing", meshDir, runTime); writeMeshObject<labelIOList>("faceProcAddressing", meshDir, runTime);
writeMeshObject<labelIOList>("cellProcAddressing", meshDir, runTime); writeMeshObject<labelIOList>("cellProcAddressing", meshDir, runTime);
...@@ -353,9 +359,11 @@ int main(int argc, char *argv[]) ...@@ -353,9 +359,11 @@ int main(int argc, char *argv[])
{ {
// Only do zones when converting from binary to ascii // Only do zones when converting from binary to ascii
// The other way gives problems since working on dictionary level. // The other way gives problems since working on dictionary level.
writeZones("cellZones", meshDir, runTime); const IOstreamOption::compressionType compress =
writeZones("faceZones", meshDir, runTime); runTime.writeCompression();
writeZones("pointZones", meshDir, runTime); writeZones("cellZones", meshDir, runTime, compress);
writeZones("faceZones", meshDir, runTime, compress);
writeZones("pointZones", meshDir, runTime, compress);
} }
// Get list of objects from the database // Get list of objects from the database
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment