Commit 7a7fa435 authored by Henry Weller's avatar Henry Weller
Browse files

Time: when "writeFormat" is set to "binary" disallow compression

Compressing and decompressing binary files introduces a significant IO overhead
without a providing significant reduction in file-size.
parent 7612b518
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -347,6 +347,20 @@ void Foam::Time::readDict()
(
controlDict_.lookup("writeCompression")
);
if
(
writeFormat_ == IOstream::BINARY
&& writeCompression_ == IOstream::COMPRESSED
)
{
IOWarningInFunction(controlDict_)
<< "Selecting compressed binary is inefficient and ineffective"
", resetting to uncompressed binary"
<< endl;
writeCompression_ = IOstream::UNCOMPRESSED;
}
}
controlDict_.readIfPresent("graphFormat", graphFormat_);
......
Supports Markdown
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