IOdictionary: changed read stream type to binary for parallel transfer efficiency
This commit is contained in:
@ -63,7 +63,7 @@ Foam::IOdictionary::IOdictionary(const IOobject& io)
|
||||
{
|
||||
dictionary::name() = IOobject::objectPath();
|
||||
|
||||
readHeaderOk(IOstream::ASCII, typeName);
|
||||
readHeaderOk(IOstream::BINARY, typeName);
|
||||
|
||||
// For if MUST_READ_IF_MODIFIED
|
||||
addWatch();
|
||||
@ -80,7 +80,7 @@ Foam::IOdictionary::IOdictionary
|
||||
{
|
||||
dictionary::name() = IOobject::objectPath();
|
||||
|
||||
if (!readHeaderOk(IOstream::ASCII, typeName))
|
||||
if (!readHeaderOk(IOstream::BINARY, typeName))
|
||||
{
|
||||
dictionary::operator=(dict);
|
||||
}
|
||||
|
||||
@ -34,7 +34,7 @@ Foam::localIOdictionary::localIOdictionary
|
||||
:
|
||||
IOdictionary(io, typeName)
|
||||
{
|
||||
readHeaderOk(IOstream::ASCII, typeName);
|
||||
readHeaderOk(IOstream::BINARY, typeName);
|
||||
|
||||
// For if MUST_READ_IF_MODIFIED
|
||||
addWatch();
|
||||
@ -49,7 +49,7 @@ Foam::localIOdictionary::localIOdictionary
|
||||
:
|
||||
IOdictionary(io, typeName)
|
||||
{
|
||||
if (!readHeaderOk(IOstream::ASCII, typeName))
|
||||
if (!readHeaderOk(IOstream::BINARY, typeName))
|
||||
{
|
||||
dictionary::operator=(dict);
|
||||
}
|
||||
@ -67,7 +67,7 @@ Foam::localIOdictionary::localIOdictionary
|
||||
:
|
||||
IOdictionary(io, actualType)
|
||||
{
|
||||
readHeaderOk(IOstream::ASCII, actualType);
|
||||
readHeaderOk(IOstream::BINARY, actualType);
|
||||
|
||||
// For if MUST_READ_IF_MODIFIED
|
||||
addWatch();
|
||||
|
||||
@ -192,7 +192,7 @@ void Foam::dictionary::write(Ostream& os, bool subDict) const
|
||||
os << e;
|
||||
|
||||
// Add extra new line between entries for "top-level" dictionaries
|
||||
if (!subDict && parent() == dictionary::null && e != *last())
|
||||
if (!subDict && parent() == dictionary::null && (&e != last()))
|
||||
{
|
||||
os << nl;
|
||||
}
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -42,9 +42,6 @@ SourceFiles
|
||||
#ifndef primitiveEntry_H
|
||||
#define primitiveEntry_H
|
||||
|
||||
#include "IStringStream.H"
|
||||
#include "OStringStream.H"
|
||||
|
||||
#include "entry.H"
|
||||
#include "ITstream.H"
|
||||
#include "InfoProxy.H"
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -25,6 +25,8 @@ License
|
||||
|
||||
#include "primitiveEntry.H"
|
||||
#include "dictionary.H"
|
||||
#include "IStringStream.H"
|
||||
#include "OStringStream.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
@ -100,7 +100,7 @@ Foam::fv::options::options
|
||||
optionList(mesh)
|
||||
{
|
||||
dictionary::name() = IOobject::objectPath();
|
||||
readHeaderOk(IOstream::ASCII, typeName);
|
||||
readHeaderOk(IOstream::BINARY, typeName);
|
||||
|
||||
// Add file watch on the fvOptions dictionary for MUST_READ_IF_MODIFIED
|
||||
addWatch();
|
||||
|
||||
Reference in New Issue
Block a user