STYLE: reorder/refactor stream format options

- IOstreamOption class to encapsulate format, compression, version.
  This is ordered to avoid internal padding in the structure, which
  reduces several bytes of memory overhead for stream objects
  and other things using this combination of data.

  Byte-sizes:
      old  IOstream:48  PstreamBuffers:88  Time:928
      new  IOstream:24  PstreamBuffers:72  Time:904

====

STYLE: remove support for deprecated uncompressed/compressed selectors

In older versions, the system/controlDict used these types of
specifications:

    writeCompression uncompressed;
    writeCompression compressed;

As of DEC-2009, these were deprecated in favour of using normal switch
names:

    writeCompression true;
    writeCompression false;
    writeCompression on;
    writeCompression off;

Now removed these deprecated names and treat like any other unknown
input and issue a warning. Eg,

   Unknown compression specifier 'compressed', assuming no compression

====

STYLE: provide Enum of stream format names (ascii, binary)

====

COMP: fixed incorrect IFstream construct in FIREMeshReader

- spurious bool argument (presumably meant as uncompressed) was being
  implicitly converted to a versionNumber. Now caught by making
  IOstreamOption::versionNumber constructor explicit.

- bad version specifier in changeDictionary
This commit is contained in:
Mark Olesen
2018-04-12 20:32:20 +02:00
parent 756502da87
commit 4cf932b230
28 changed files with 781 additions and 652 deletions

View File

@ -73,9 +73,12 @@ Foam::functionObjects::ensightWrite::ensightWrite
fvMeshFunctionObject(name, runTime, dict),
writeOpts_
(
dict.found("format")
? IOstream::formatEnum(dict.lookup("format"))
: runTime.writeFormat()
IOstreamOption::formatNames.lookupOrFailsafe
(
"format",
dict,
runTime.writeFormat()
)
),
caseOpts_(writeOpts_.format()),
selectFields_(),