mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
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.
This commit is contained in:
@ -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_);
|
||||
|
||||
Reference in New Issue
Block a user