mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: foamFormatConvert: leave boundary intact. Fixes #1358.
This commit is contained in:
@ -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)
|
|||||||
(
|
(
|
||||||
IOstream::ASCII,
|
IOstream::ASCII,
|
||||||
IOstream::currentVersion,
|
IOstream::currentVersion,
|
||||||
runTime.writeCompression(),
|
compression,
|
||||||
true
|
true
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -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[])
|
|||||||
{
|
{
|
||||||
// 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
|
||||||
|
|||||||
Reference in New Issue
Block a user