diff --git a/applications/utilities/miscellaneous/foamFormatConvert/foamFormatConvert.C b/applications/utilities/miscellaneous/foamFormatConvert/foamFormatConvert.C index 895ab6545f..fb94503d83 100644 --- a/applications/utilities/miscellaneous/foamFormatConvert/foamFormatConvert.C +++ b/applications/utilities/miscellaneous/foamFormatConvert/foamFormatConvert.C @@ -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-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -183,7 +183,7 @@ bool writeOptionalMeshObject const word& name, const fileName& meshDir, Time& runTime, - const bool valid + const bool write ) { IOobject io @@ -210,10 +210,10 @@ bool writeOptionalMeshObject { Info<< " Reading " << classNames[0] << " : " << name << endl; - T meshObject(io, valid && haveFile); + T meshObject(io, write && haveFile); Info<< " Writing " << name << endl; - writeOk = meshObject.regIOobject::write(valid && haveFile); + writeOk = meshObject.regIOobject::write(write && haveFile); } return writeOk; diff --git a/applications/utilities/parallelProcessing/decomposePar/lagrangianFieldDecomposerDecomposeFields.C b/applications/utilities/parallelProcessing/decomposePar/lagrangianFieldDecomposerDecomposeFields.C index 47335803f4..5f643b709a 100644 --- a/applications/utilities/parallelProcessing/decomposePar/lagrangianFieldDecomposerDecomposeFields.C +++ b/applications/utilities/parallelProcessing/decomposePar/lagrangianFieldDecomposerDecomposeFields.C @@ -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-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -188,13 +188,10 @@ void Foam::lagrangianFieldDecomposer::decomposeFields const PtrList& fields ) const { - // if (particleIndices_.size()) + const bool write = particleIndices_.size() > 0; + forAll(fields, fieldi) { - bool valid = particleIndices_.size() > 0; - forAll(fields, fieldi) - { - decomposeField(cloudName, fields[fieldi])().write(valid); - } + decomposeField(cloudName, fields[fieldi])().write(write); } } @@ -206,13 +203,10 @@ void Foam::lagrangianFieldDecomposer::decomposeFieldFields const PtrList& fields ) const { - // if (particleIndices_.size()) + const bool write = particleIndices_.size() > 0; + forAll(fields, fieldi) { - bool valid = particleIndices_.size() > 0; - forAll(fields, fieldi) - { - decomposeFieldField(cloudName, fields[fieldi])().write(valid); - } + decomposeFieldField(cloudName, fields[fieldi])().write(write); } } diff --git a/src/OpenFOAM/db/IOobjects/CompactIOField/CompactIOField.C b/src/OpenFOAM/db/IOobjects/CompactIOField/CompactIOField.C index 5eb06c93bf..268ab1355a 100644 --- a/src/OpenFOAM/db/IOobjects/CompactIOField/CompactIOField.C +++ b/src/OpenFOAM/db/IOobjects/CompactIOField/CompactIOField.C @@ -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-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -29,11 +29,11 @@ License // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // template -void Foam::CompactIOField::readFromStream(const bool valid) +void Foam::CompactIOField::readFromStream(const bool read) { - Istream& is = readStream(word::null, valid); + Istream& is = readStream(word::null, read); - if (valid) + if (read) { if (headerClassName() == IOField::typeName) { @@ -82,19 +82,19 @@ template Foam::CompactIOField::CompactIOField ( const IOobject& io, - const bool valid + const bool read ) : regIOobject(io) { if (io.readOpt() == IOobject::MUST_READ) { - readFromStream(valid); + readFromStream(read); } else if (io.readOpt() == IOobject::READ_IF_PRESENT) { bool haveFile = headerOk(); - readFromStream(valid && haveFile); + readFromStream(read && haveFile); } } @@ -185,7 +185,7 @@ bool Foam::CompactIOField::writeObject IOstream::streamFormat fmt, IOstream::versionNumber ver, IOstream::compressionType cmp, - const bool valid + const bool write ) const { if (fmt == IOstream::ASCII) @@ -195,7 +195,7 @@ bool Foam::CompactIOField::writeObject const_cast(typeName) = IOField::typeName; - bool good = regIOobject::writeObject(fmt, ver, cmp, valid); + bool good = regIOobject::writeObject(fmt, ver, cmp, write); // Change type back const_cast(typeName) = oldTypeName; @@ -204,7 +204,7 @@ bool Foam::CompactIOField::writeObject } else { - return regIOobject::writeObject(fmt, ver, cmp, valid); + return regIOobject::writeObject(fmt, ver, cmp, write); } } diff --git a/src/OpenFOAM/db/IOobjects/CompactIOField/CompactIOField.H b/src/OpenFOAM/db/IOobjects/CompactIOField/CompactIOField.H index b187ca81bf..6cf1527cfe 100644 --- a/src/OpenFOAM/db/IOobjects/CompactIOField/CompactIOField.H +++ b/src/OpenFOAM/db/IOobjects/CompactIOField/CompactIOField.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-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -75,7 +75,7 @@ class CompactIOField // Private Member Functions //- Read according to header type - void readFromStream(const bool valid = true); + void readFromStream(const bool read = true); public: @@ -89,7 +89,7 @@ public: CompactIOField(const IOobject&); //- Construct from IOobject; does local processor require reading? - CompactIOField(const IOobject&, const bool valid); + CompactIOField(const IOobject&, const bool read); //- Construct from IOobject and size CompactIOField(const IOobject&, const label); @@ -113,7 +113,7 @@ public: IOstream::streamFormat, IOstream::versionNumber, IOstream::compressionType, - const bool valid + const bool write ) const; virtual bool writeData(Ostream&) const; diff --git a/src/OpenFOAM/db/IOobjects/CompactIOList/CompactIOList.C b/src/OpenFOAM/db/IOobjects/CompactIOList/CompactIOList.C index 99862dad15..f062d27d79 100644 --- a/src/OpenFOAM/db/IOobjects/CompactIOList/CompactIOList.C +++ b/src/OpenFOAM/db/IOobjects/CompactIOList/CompactIOList.C @@ -161,7 +161,7 @@ bool Foam::CompactIOList::writeObject IOstream::streamFormat fmt, IOstream::versionNumber ver, IOstream::compressionType cmp, - const bool valid + const bool write ) const { if (fmt == IOstream::ASCII) @@ -171,7 +171,7 @@ bool Foam::CompactIOList::writeObject const_cast(typeName) = IOList::typeName; - bool good = regIOobject::writeObject(fmt, ver, cmp, valid); + bool good = regIOobject::writeObject(fmt, ver, cmp, write); // Change type back const_cast(typeName) = oldTypeName; @@ -190,7 +190,7 @@ bool Foam::CompactIOList::writeObject const_cast(typeName) = IOList::typeName; - bool good = regIOobject::writeObject(IOstream::ASCII, ver, cmp, valid); + bool good = regIOobject::writeObject(IOstream::ASCII, ver, cmp, write); // Change type back const_cast(typeName) = oldTypeName; @@ -199,7 +199,7 @@ bool Foam::CompactIOList::writeObject } else { - return regIOobject::writeObject(fmt, ver, cmp, valid); + return regIOobject::writeObject(fmt, ver, cmp, write); } } diff --git a/src/OpenFOAM/db/IOobjects/CompactIOList/CompactIOList.H b/src/OpenFOAM/db/IOobjects/CompactIOList/CompactIOList.H index 210f34b4fa..1ffc467f24 100644 --- a/src/OpenFOAM/db/IOobjects/CompactIOList/CompactIOList.H +++ b/src/OpenFOAM/db/IOobjects/CompactIOList/CompactIOList.H @@ -95,7 +95,7 @@ public: IOstream::streamFormat, IOstream::versionNumber, IOstream::compressionType, - const bool valid + const bool write ) const; virtual bool writeData(Ostream&) const; diff --git a/src/OpenFOAM/db/IOobjects/IOField/IOField.C b/src/OpenFOAM/db/IOobjects/IOField/IOField.C index e9854743e4..9e0d06122f 100644 --- a/src/OpenFOAM/db/IOobjects/IOField/IOField.C +++ b/src/OpenFOAM/db/IOobjects/IOField/IOField.C @@ -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-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -51,7 +51,7 @@ Foam::IOField::IOField(const IOobject& io) template -Foam::IOField::IOField(const IOobject& io, const bool valid) +Foam::IOField::IOField(const IOobject& io, const bool read) : regIOobject(io) { @@ -64,9 +64,9 @@ Foam::IOField::IOField(const IOobject& io, const bool valid) || io.readOpt() == IOobject::MUST_READ_IF_MODIFIED ) { - Istream& is = readStream(typeName, valid); + Istream& is = readStream(typeName, read); - if (valid) + if (read) { is >> *this; } @@ -76,9 +76,9 @@ Foam::IOField::IOField(const IOobject& io, const bool valid) { bool haveFile = headerOk(); - Istream& is = readStream(typeName, haveFile && valid); + Istream& is = readStream(typeName, haveFile && read); - if (valid && haveFile) + if (read && haveFile) { is >> *this; } diff --git a/src/OpenFOAM/db/IOobjects/IOField/IOField.H b/src/OpenFOAM/db/IOobjects/IOField/IOField.H index 3e4f555d21..b2ee5ad778 100644 --- a/src/OpenFOAM/db/IOobjects/IOField/IOField.H +++ b/src/OpenFOAM/db/IOobjects/IOField/IOField.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-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -65,7 +65,7 @@ public: IOField(const IOobject&); //- Construct from IOobject; does local processor require reading? - IOField(const IOobject&, const bool valid); + IOField(const IOobject&, const bool read); //- Construct from IOobject and size (does not set values) IOField(const IOobject&, const label size); diff --git a/src/OpenFOAM/db/IOobjects/decomposedBlockData/decomposedBlockData.C b/src/OpenFOAM/db/IOobjects/decomposedBlockData/decomposedBlockData.C index a07a71d157..05485f3a61 100644 --- a/src/OpenFOAM/db/IOobjects/decomposedBlockData/decomposedBlockData.C +++ b/src/OpenFOAM/db/IOobjects/decomposedBlockData/decomposedBlockData.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2017-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2017-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -1028,7 +1028,7 @@ bool Foam::decomposedBlockData::writeObject IOstream::streamFormat fmt, IOstream::versionNumber ver, IOstream::compressionType cmp, - const bool valid + const bool write ) const { autoPtr osPtr; diff --git a/src/OpenFOAM/db/IOobjects/decomposedBlockData/decomposedBlockData.H b/src/OpenFOAM/db/IOobjects/decomposedBlockData/decomposedBlockData.H index 613386a1e2..870af3ea34 100644 --- a/src/OpenFOAM/db/IOobjects/decomposedBlockData/decomposedBlockData.H +++ b/src/OpenFOAM/db/IOobjects/decomposedBlockData/decomposedBlockData.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2017-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2017-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -139,7 +139,7 @@ public: IOstream::streamFormat, IOstream::versionNumber, IOstream::compressionType, - const bool valid + const bool write ) const; diff --git a/src/OpenFOAM/db/IOstreams/Fstreams/masterOFstream.C b/src/OpenFOAM/db/IOstreams/Fstreams/masterOFstream.C index 1773e990b0..b8a01dab36 100644 --- a/src/OpenFOAM/db/IOstreams/Fstreams/masterOFstream.C +++ b/src/OpenFOAM/db/IOstreams/Fstreams/masterOFstream.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2017-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2017-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -75,14 +75,14 @@ Foam::masterOFstream::masterOFstream versionNumber version, compressionType compression, const bool append, - const bool valid + const bool write ) : OStringStream(format, version), pathName_(pathName), compression_(compression), append_(append), - valid_(valid) + write_(write) {} @@ -106,15 +106,15 @@ Foam::masterOFstream::~masterOFstream() if (uniform) { - if (Pstream::master() && valid_) + if (Pstream::master() && write_) { checkWrite(pathName_, str()); } return; } - boolList valid(Pstream::nProcs()); - valid[Pstream::myProcNo()] = valid_; - Pstream::gatherList(valid); + boolList write(Pstream::nProcs()); + write[Pstream::myProcNo()] = write_; + Pstream::gatherList(write); // Different files @@ -135,7 +135,7 @@ Foam::masterOFstream::~masterOFstream() { // Write my own data { - if (valid[Pstream::myProcNo()]) + if (write[Pstream::myProcNo()]) { checkWrite(filePaths[Pstream::myProcNo()], str()); } @@ -148,7 +148,7 @@ Foam::masterOFstream::~masterOFstream() is.read(buf.begin(), buf.size()); - if (valid[proci]) + if (write[proci]) { checkWrite ( diff --git a/src/OpenFOAM/db/IOstreams/Fstreams/masterOFstream.H b/src/OpenFOAM/db/IOstreams/Fstreams/masterOFstream.H index d7ba526055..d13ab0abdb 100644 --- a/src/OpenFOAM/db/IOstreams/Fstreams/masterOFstream.H +++ b/src/OpenFOAM/db/IOstreams/Fstreams/masterOFstream.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2017-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2017-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -59,7 +59,7 @@ class masterOFstream const bool append_; //- Should file be written - const bool valid_; + const bool write_; // Private Member Functions @@ -80,7 +80,7 @@ public: versionNumber version=currentVersion, compressionType compression=UNCOMPRESSED, const bool append = false, - const bool valid = true + const bool write = true ); diff --git a/src/OpenFOAM/db/Time/Time.H b/src/OpenFOAM/db/Time/Time.H index ee7af093b9..258aa30022 100644 --- a/src/OpenFOAM/db/Time/Time.H +++ b/src/OpenFOAM/db/Time/Time.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-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -364,7 +364,7 @@ public: IOstream::streamFormat, IOstream::versionNumber, IOstream::compressionType, - const bool valid + const bool write ) const; //- Write the objects now (not at end of iteration) and continue diff --git a/src/OpenFOAM/db/Time/TimeIO.C b/src/OpenFOAM/db/Time/TimeIO.C index bbe254fc95..d9e58b90ff 100644 --- a/src/OpenFOAM/db/Time/TimeIO.C +++ b/src/OpenFOAM/db/Time/TimeIO.C @@ -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-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -543,7 +543,7 @@ bool Foam::Time::writeObject IOstream::streamFormat fmt, IOstream::versionNumber ver, IOstream::compressionType cmp, - const bool valid + const bool write ) const { if (writeTime()) @@ -552,7 +552,7 @@ bool Foam::Time::writeObject if (writeOK) { - writeOK = objectRegistry::writeObject(fmt, ver, cmp, valid); + writeOK = objectRegistry::writeObject(fmt, ver, cmp, write); } if (writeOK) diff --git a/src/OpenFOAM/db/functionObjects/IOOutputFilter/IOOutputFilter.C b/src/OpenFOAM/db/functionObjects/IOOutputFilter/IOOutputFilter.C index f672050cdb..e72841b690 100644 --- a/src/OpenFOAM/db/functionObjects/IOOutputFilter/IOOutputFilter.C +++ b/src/OpenFOAM/db/functionObjects/IOOutputFilter/IOOutputFilter.C @@ -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-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -122,9 +122,9 @@ bool Foam::IOOutputFilter::read() template -bool Foam::IOOutputFilter::write(const bool valid) +bool Foam::IOOutputFilter::write(const bool write) { - return OutputFilter::write(valid); + return OutputFilter::write(write); } diff --git a/src/OpenFOAM/db/functionObjects/IOOutputFilter/IOOutputFilter.H b/src/OpenFOAM/db/functionObjects/IOOutputFilter/IOOutputFilter.H index bd482fd696..a09c42ec5e 100644 --- a/src/OpenFOAM/db/functionObjects/IOOutputFilter/IOOutputFilter.H +++ b/src/OpenFOAM/db/functionObjects/IOOutputFilter/IOOutputFilter.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-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -126,7 +126,7 @@ public: using regIOobject::write; //- Sample and write - virtual bool write(const bool valid = true); + virtual bool write(const bool write = true); //- Update for changes of mesh virtual void updateMesh(const mapPolyMesh& mpm); diff --git a/src/OpenFOAM/db/objectRegistry/objectRegistry.C b/src/OpenFOAM/db/objectRegistry/objectRegistry.C index 8f8d66e112..926c4b43b0 100644 --- a/src/OpenFOAM/db/objectRegistry/objectRegistry.C +++ b/src/OpenFOAM/db/objectRegistry/objectRegistry.C @@ -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-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -350,7 +350,7 @@ bool Foam::objectRegistry::writeObject IOstream::streamFormat fmt, IOstream::versionNumber ver, IOstream::compressionType cmp, - const bool valid + const bool write ) const { bool ok = true; @@ -370,7 +370,7 @@ bool Foam::objectRegistry::writeObject if (iter()->writeOpt() != NO_WRITE) { - ok = iter()->writeObject(fmt, ver, cmp, valid) && ok; + ok = iter()->writeObject(fmt, ver, cmp, write) && ok; } } diff --git a/src/OpenFOAM/db/objectRegistry/objectRegistry.H b/src/OpenFOAM/db/objectRegistry/objectRegistry.H index c8eb5d5483..adf6e5449e 100644 --- a/src/OpenFOAM/db/objectRegistry/objectRegistry.H +++ b/src/OpenFOAM/db/objectRegistry/objectRegistry.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-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -232,7 +232,7 @@ public: IOstream::streamFormat fmt, IOstream::versionNumber ver, IOstream::compressionType cmp, - const bool valid + const bool write ) const; }; diff --git a/src/OpenFOAM/db/regIOobject/regIOobject.H b/src/OpenFOAM/db/regIOobject/regIOobject.H index f951993f8d..9c6f8633e2 100644 --- a/src/OpenFOAM/db/regIOobject/regIOobject.H +++ b/src/OpenFOAM/db/regIOobject/regIOobject.H @@ -91,7 +91,7 @@ private: // Private Member Functions //- Return Istream - Istream& readStream(const bool valid = true); + Istream& readStream(const bool read = true); //- Dissallow assignment void operator=(const regIOobject&); @@ -226,7 +226,7 @@ public: bool headerOk(); //- Return Istream and check object type against that given - Istream& readStream(const word&, const bool valid = true); + Istream& readStream(const word&, const bool read = true); //- Close Istream void close(); @@ -273,11 +273,11 @@ public: IOstream::streamFormat, IOstream::versionNumber, IOstream::compressionType, - const bool valid + const bool write ) const; //- Write using setting from DB - virtual bool write(const bool valid = true) const; + virtual bool write(const bool write = true) const; // Member operators diff --git a/src/OpenFOAM/db/regIOobject/regIOobjectRead.C b/src/OpenFOAM/db/regIOobject/regIOobjectRead.C index 6acf1c2c8d..52d70d4170 100644 --- a/src/OpenFOAM/db/regIOobject/regIOobjectRead.C +++ b/src/OpenFOAM/db/regIOobject/regIOobjectRead.C @@ -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-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -85,7 +85,7 @@ bool Foam::regIOobject::readHeaderOk // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -Foam::Istream& Foam::regIOobject::readStream(const bool valid) +Foam::Istream& Foam::regIOobject::readStream(const bool read) { if (IFstream::debug) { @@ -127,7 +127,7 @@ Foam::Istream& Foam::regIOobject::readStream(const bool valid) } } - isPtr_ = fileHandler().readStream(*this, objPath, type(), valid); + isPtr_ = fileHandler().readStream(*this, objPath, type(), read); } return isPtr_(); @@ -137,7 +137,7 @@ Foam::Istream& Foam::regIOobject::readStream(const bool valid) Foam::Istream& Foam::regIOobject::readStream ( const word& expectName, - const bool valid + const bool read ) { if (IFstream::debug) @@ -150,14 +150,14 @@ Foam::Istream& Foam::regIOobject::readStream // Construct IFstream if not already constructed if (!isPtr_.valid()) { - readStream(valid); + readStream(read); // Check the className of the regIOobject // dictionary is an allowable name in case the actual class // instantiated is a dictionary if ( - valid + read && expectName.size() && headerClassName() != expectName && headerClassName() != "dictionary" diff --git a/src/OpenFOAM/db/regIOobject/regIOobjectWrite.C b/src/OpenFOAM/db/regIOobject/regIOobjectWrite.C index 25b96d72bf..fc1d23d8a5 100644 --- a/src/OpenFOAM/db/regIOobject/regIOobjectWrite.C +++ b/src/OpenFOAM/db/regIOobject/regIOobjectWrite.C @@ -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-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -38,7 +38,7 @@ bool Foam::regIOobject::writeObject IOstream::streamFormat fmt, IOstream::versionNumber ver, IOstream::compressionType cmp, - const bool valid + const bool write ) const { if (!good()) @@ -141,7 +141,7 @@ bool Foam::regIOobject::writeObject // // osGood = os.good(); //} - osGood = fileHandler().writeObject(*this, fmt, ver, cmp, valid); + osGood = fileHandler().writeObject(*this, fmt, ver, cmp, write); } else { @@ -165,14 +165,14 @@ bool Foam::regIOobject::writeObject } -bool Foam::regIOobject::write(const bool valid) const +bool Foam::regIOobject::write(const bool write) const { return writeObject ( time().writeFormat(), IOstream::currentVersion, time().writeCompression(), - valid + write ); } diff --git a/src/OpenFOAM/global/fileOperations/collatedFileOperation/collatedFileOperation.C b/src/OpenFOAM/global/fileOperations/collatedFileOperation/collatedFileOperation.C index ecffbd1f5a..18539d630e 100644 --- a/src/OpenFOAM/global/fileOperations/collatedFileOperation/collatedFileOperation.C +++ b/src/OpenFOAM/global/fileOperations/collatedFileOperation/collatedFileOperation.C @@ -453,7 +453,7 @@ bool Foam::fileOperations::collatedFileOperation::writeObject IOstream::streamFormat fmt, IOstream::versionNumber ver, IOstream::compressionType cmp, - const bool valid + const bool write ) const { const Time& tm = io.time(); @@ -479,7 +479,7 @@ bool Foam::fileOperations::collatedFileOperation::writeObject ver, cmp, false, - valid + write ); // If any of these fail, return (leave error handling to Ostream class) @@ -525,7 +525,7 @@ bool Foam::fileOperations::collatedFileOperation::writeObject ver, cmp, false, - valid + write ); // If any of these fail, return (leave error handling to Ostream diff --git a/src/OpenFOAM/global/fileOperations/collatedFileOperation/collatedFileOperation.H b/src/OpenFOAM/global/fileOperations/collatedFileOperation/collatedFileOperation.H index a11a8dfa99..81a0e3ef8f 100644 --- a/src/OpenFOAM/global/fileOperations/collatedFileOperation/collatedFileOperation.H +++ b/src/OpenFOAM/global/fileOperations/collatedFileOperation/collatedFileOperation.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2017-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2017-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -150,7 +150,7 @@ public: IOstream::streamFormat format=IOstream::ASCII, IOstream::versionNumber version=IOstream::currentVersion, IOstream::compressionType compression=IOstream::UNCOMPRESSED, - const bool valid = true + const bool write = true ) const; // Other diff --git a/src/OpenFOAM/global/fileOperations/fileOperation/fileOperation.C b/src/OpenFOAM/global/fileOperations/fileOperation/fileOperation.C index 18afff4460..9254b1465c 100644 --- a/src/OpenFOAM/global/fileOperations/fileOperation/fileOperation.C +++ b/src/OpenFOAM/global/fileOperations/fileOperation/fileOperation.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2017-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2017-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -460,10 +460,10 @@ bool Foam::fileOperation::writeObject IOstream::streamFormat fmt, IOstream::versionNumber ver, IOstream::compressionType cmp, - const bool valid + const bool write ) const { - if (valid) + if (write) { fileName pathName(io.objectPath()); diff --git a/src/OpenFOAM/global/fileOperations/fileOperation/fileOperation.H b/src/OpenFOAM/global/fileOperations/fileOperation/fileOperation.H index 900c98d6ac..0bee4bafa1 100644 --- a/src/OpenFOAM/global/fileOperations/fileOperation/fileOperation.H +++ b/src/OpenFOAM/global/fileOperations/fileOperation/fileOperation.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2017-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2017-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -363,7 +363,7 @@ public: regIOobject&, const fileName&, const word& typeName, - const bool valid = true + const bool read = true ) const = 0; //- Top-level read @@ -377,7 +377,7 @@ public: //- Writes a regIOobject (so header, contents and divider). // Returns success state. Default action is to write to - // the objectPath using writeData. If !valid the + // the objectPath using writeData. If !write the // file does not need to be written (this is used e.g. to // suppress empty local lagrangian data) virtual bool writeObject @@ -386,7 +386,7 @@ public: IOstream::streamFormat format=IOstream::ASCII, IOstream::versionNumber version=IOstream::currentVersion, IOstream::compressionType compression=IOstream::UNCOMPRESSED, - const bool valid = true + const bool write = true ) const; @@ -406,7 +406,7 @@ public: IOstream::streamFormat format=IOstream::ASCII, IOstream::versionNumber version=IOstream::currentVersion, IOstream::compressionType compression=IOstream::UNCOMPRESSED, - const bool valid = true + const bool write = true ) const = 0; diff --git a/src/OpenFOAM/global/fileOperations/masterUncollatedFileOperation/masterUncollatedFileOperation.C b/src/OpenFOAM/global/fileOperations/masterUncollatedFileOperation/masterUncollatedFileOperation.C index ce0dbf2214..8363fd5469 100644 --- a/src/OpenFOAM/global/fileOperations/masterUncollatedFileOperation/masterUncollatedFileOperation.C +++ b/src/OpenFOAM/global/fileOperations/masterUncollatedFileOperation/masterUncollatedFileOperation.C @@ -559,7 +559,7 @@ Foam::fileOperations::masterUncollatedFileOperation::read const label comm, const bool uniform, // on comms master only const fileNameList& filePaths, // on comms master only - const boolList& procValid // on comms master only + const boolList& read // on comms master only ) { autoPtr isPtr; @@ -577,7 +577,7 @@ Foam::fileOperations::masterUncollatedFileOperation::read { if (uniform) { - if (procValid[0]) + if (read[0]) { if (filePaths[0].empty()) { @@ -594,7 +594,7 @@ Foam::fileOperations::masterUncollatedFileOperation::read proci++ ) { - if (procValid[proci]) + if (read[proci]) { validProcs.append(proci); } @@ -614,7 +614,7 @@ Foam::fileOperations::masterUncollatedFileOperation::read } else { - if (procValid[0]) + if (read[0]) { if (filePaths[0].empty()) { @@ -654,7 +654,7 @@ Foam::fileOperations::masterUncollatedFileOperation::read const fileName& fPath = filePaths[proci]; - if (procValid[proci] && !fPath.empty()) + if (read[proci] && !fPath.empty()) { // Note: handle compression ourselves since size cannot // be determined without actually uncompressing @@ -671,7 +671,7 @@ Foam::fileOperations::masterUncollatedFileOperation::read // IFstream. Else the information is in the PstreamBuffers (and // the special case of a uniform file) - if (procValid[Pstream::myProcNo(comm)]) + if (read[Pstream::myProcNo(comm)]) { // This processor needs to return something @@ -1866,7 +1866,7 @@ Foam::fileOperations::masterUncollatedFileOperation::readStream regIOobject& io, const fileName& fName, const word& typeName, - const bool valid + const bool read ) const { if (debug) @@ -1874,7 +1874,7 @@ Foam::fileOperations::masterUncollatedFileOperation::readStream Pout<< "masterUncollatedFileOperation::readStream :" << " object : " << io.name() << " global : " << io.global() - << " fName : " << fName << " valid:" << valid << endl; + << " fName : " << fName << " read:" << read << endl; } @@ -2068,10 +2068,17 @@ Foam::fileOperations::masterUncollatedFileOperation::readStream filePaths[Pstream::myProcNo()] = fName; Pstream::gatherList(filePaths); boolList procValid(Pstream::nProcs()); - procValid[Pstream::myProcNo()] = valid; + procValid[Pstream::myProcNo()] = read; Pstream::gatherList(procValid); - return read(io, Pstream::worldComm, true, filePaths, procValid); + return this->read + ( + io, + Pstream::worldComm, + true, + filePaths, + procValid + ); } else { @@ -2080,13 +2087,20 @@ Foam::fileOperations::masterUncollatedFileOperation::readStream filePaths[Pstream::myProcNo(comm_)] = fName; Pstream::gatherList(filePaths, Pstream::msgType(), comm_); boolList procValid(Pstream::nProcs(comm_)); - procValid[Pstream::myProcNo(comm_)] = valid; + procValid[Pstream::myProcNo(comm_)] = read; Pstream::gatherList(procValid, Pstream::msgType(), comm_); // Uniform in local comm bool uniform = uniformFile(filePaths); - return read(io, comm_, uniform, filePaths, procValid); + return this->read + ( + io, + comm_, + uniform, + filePaths, + procValid + ); } } } @@ -2199,7 +2213,7 @@ bool Foam::fileOperations::masterUncollatedFileOperation::writeObject IOstream::streamFormat fmt, IOstream::versionNumber ver, IOstream::compressionType cmp, - const bool valid + const bool write ) const { fileName pathName(io.objectPath()); @@ -2207,7 +2221,7 @@ bool Foam::fileOperations::masterUncollatedFileOperation::writeObject if (debug) { Pout<< "masterUncollatedFileOperation::writeObject :" - << " io:" << pathName << " valid:" << valid << endl; + << " io:" << pathName << " write:" << write << endl; } // Make sure to pick up any new times @@ -2221,7 +2235,7 @@ bool Foam::fileOperations::masterUncollatedFileOperation::writeObject fmt, ver, cmp, - valid + write ) ); Ostream& os = osPtr(); @@ -2475,7 +2489,7 @@ Foam::fileOperations::masterUncollatedFileOperation::NewOFstream IOstream::streamFormat fmt, IOstream::versionNumber ver, IOstream::compressionType cmp, - const bool valid + const bool write ) const { return autoPtr @@ -2487,7 +2501,7 @@ Foam::fileOperations::masterUncollatedFileOperation::NewOFstream ver, cmp, false, // append - valid + write ) ); } diff --git a/src/OpenFOAM/global/fileOperations/masterUncollatedFileOperation/masterUncollatedFileOperation.H b/src/OpenFOAM/global/fileOperations/masterUncollatedFileOperation/masterUncollatedFileOperation.H index b99ea8bd72..158e1ed314 100644 --- a/src/OpenFOAM/global/fileOperations/masterUncollatedFileOperation/masterUncollatedFileOperation.H +++ b/src/OpenFOAM/global/fileOperations/masterUncollatedFileOperation/masterUncollatedFileOperation.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2017-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2017-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -478,7 +478,7 @@ protected: const label comm, const bool uniform, // on comms master only const fileNameList& filePaths, // on comms master only - const boolList& procValid // on comms master only + const boolList& read // on comms master only ); //- Helper: check IO for local existence. Like filePathInfo but @@ -683,7 +683,7 @@ public: regIOobject&, const fileName&, const word& typeName, - const bool valid = true + const bool read = true ) const; //- Top-level read @@ -703,7 +703,7 @@ public: IOstream::streamFormat format=IOstream::ASCII, IOstream::versionNumber version=IOstream::currentVersion, IOstream::compressionType compression=IOstream::UNCOMPRESSED, - const bool valid = true + const bool write = true ) const; //- Generate an ISstream that reads a file @@ -716,7 +716,7 @@ public: IOstream::streamFormat format=IOstream::ASCII, IOstream::versionNumber version=IOstream::currentVersion, IOstream::compressionType compression=IOstream::UNCOMPRESSED, - const bool valid = true + const bool write = true ) const; diff --git a/src/OpenFOAM/global/fileOperations/uncollatedFileOperation/uncollatedFileOperation.C b/src/OpenFOAM/global/fileOperations/uncollatedFileOperation/uncollatedFileOperation.C index 618ef8d9e4..4f8a870e66 100644 --- a/src/OpenFOAM/global/fileOperations/uncollatedFileOperation/uncollatedFileOperation.C +++ b/src/OpenFOAM/global/fileOperations/uncollatedFileOperation/uncollatedFileOperation.C @@ -522,12 +522,12 @@ Foam::fileOperations::uncollatedFileOperation::readStream regIOobject& io, const fileName& fName, const word& typeName, - const bool valid + const bool read ) const { autoPtr isPtr; - if (!valid) + if (!read) { isPtr = autoPtr(new dummyISstream()); return isPtr; @@ -704,7 +704,7 @@ Foam::fileOperations::uncollatedFileOperation::NewOFstream IOstream::streamFormat fmt, IOstream::versionNumber ver, IOstream::compressionType cmp, - const bool valid + const bool write ) const { return autoPtr(new OFstream(pathName, fmt, ver, cmp)); diff --git a/src/OpenFOAM/global/fileOperations/uncollatedFileOperation/uncollatedFileOperation.H b/src/OpenFOAM/global/fileOperations/uncollatedFileOperation/uncollatedFileOperation.H index bf78ed3714..9018bdbe49 100644 --- a/src/OpenFOAM/global/fileOperations/uncollatedFileOperation/uncollatedFileOperation.H +++ b/src/OpenFOAM/global/fileOperations/uncollatedFileOperation/uncollatedFileOperation.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2017-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2017-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -249,7 +249,7 @@ public: regIOobject&, const fileName&, const word& typeName, - const bool procValid = true + const bool read = true ) const; //- Top-level read @@ -271,7 +271,7 @@ public: IOstream::streamFormat format=IOstream::ASCII, IOstream::versionNumber version=IOstream::currentVersion, IOstream::compressionType compression=IOstream::UNCOMPRESSED, - const bool valid = true + const bool write = true ) const; }; diff --git a/src/OpenFOAM/meshes/polyMesh/polyBoundaryMesh/polyBoundaryMesh.C b/src/OpenFOAM/meshes/polyMesh/polyBoundaryMesh/polyBoundaryMesh.C index 1ad854aa03..4c57d4b51d 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyBoundaryMesh/polyBoundaryMesh.C +++ b/src/OpenFOAM/meshes/polyMesh/polyBoundaryMesh/polyBoundaryMesh.C @@ -1161,12 +1161,13 @@ bool Foam::polyBoundaryMesh::writeObject IOstream::streamFormat fmt, IOstream::versionNumber ver, IOstream::compressionType cmp, - const bool valid + const bool write ) const { - return regIOobject::writeObject(fmt, ver, IOstream::UNCOMPRESSED, valid); + return regIOobject::writeObject(fmt, ver, IOstream::UNCOMPRESSED, write); } + // * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * * // const Foam::polyPatch& Foam::polyBoundaryMesh::operator[] diff --git a/src/OpenFOAM/meshes/polyMesh/polyBoundaryMesh/polyBoundaryMesh.H b/src/OpenFOAM/meshes/polyMesh/polyBoundaryMesh/polyBoundaryMesh.H index 6a9bf1cc58..af52099915 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyBoundaryMesh/polyBoundaryMesh.H +++ b/src/OpenFOAM/meshes/polyMesh/polyBoundaryMesh/polyBoundaryMesh.H @@ -237,7 +237,7 @@ public: IOstream::streamFormat fmt, IOstream::versionNumber ver, IOstream::compressionType cmp, - const bool valid + const bool write = true ) const; diff --git a/src/dynamicFvMesh/dynamicMotionSolverFvMesh/dynamicMotionSolverFvMesh.C b/src/dynamicFvMesh/dynamicMotionSolverFvMesh/dynamicMotionSolverFvMesh.C index 23621af690..7115642335 100644 --- a/src/dynamicFvMesh/dynamicMotionSolverFvMesh/dynamicMotionSolverFvMesh.C +++ b/src/dynamicFvMesh/dynamicMotionSolverFvMesh/dynamicMotionSolverFvMesh.C @@ -79,11 +79,11 @@ bool Foam::dynamicMotionSolverFvMesh::writeObject IOstream::streamFormat fmt, IOstream::versionNumber ver, IOstream::compressionType cmp, - const bool valid + const bool write ) const { motionPtr_->write(); - return fvMesh::writeObject(fmt, ver, cmp, valid); + return fvMesh::writeObject(fmt, ver, cmp, write); } diff --git a/src/dynamicFvMesh/dynamicMotionSolverFvMesh/dynamicMotionSolverFvMesh.H b/src/dynamicFvMesh/dynamicMotionSolverFvMesh/dynamicMotionSolverFvMesh.H index 12d88e9d46..b58f685a9b 100644 --- a/src/dynamicFvMesh/dynamicMotionSolverFvMesh/dynamicMotionSolverFvMesh.H +++ b/src/dynamicFvMesh/dynamicMotionSolverFvMesh/dynamicMotionSolverFvMesh.H @@ -104,7 +104,7 @@ public: IOstream::streamFormat fmt, IOstream::versionNumber ver, IOstream::compressionType cmp, - const bool valid + const bool write = true ) const; }; diff --git a/src/dynamicFvMesh/dynamicRefineFvMesh/dynamicRefineFvMesh.C b/src/dynamicFvMesh/dynamicRefineFvMesh/dynamicRefineFvMesh.C index 981cf0bfcc..e1c2b78dde 100644 --- a/src/dynamicFvMesh/dynamicRefineFvMesh/dynamicRefineFvMesh.C +++ b/src/dynamicFvMesh/dynamicRefineFvMesh/dynamicRefineFvMesh.C @@ -1375,7 +1375,7 @@ bool Foam::dynamicRefineFvMesh::writeObject IOstream::streamFormat fmt, IOstream::versionNumber ver, IOstream::compressionType cmp, - const bool valid + const bool write ) const { // Force refinement data to go to the current time directory. @@ -1383,8 +1383,8 @@ bool Foam::dynamicRefineFvMesh::writeObject bool writeOk = ( - dynamicFvMesh::writeObject(fmt, ver, cmp, valid) - && meshCutter_.write(valid) + dynamicFvMesh::writeObject(fmt, ver, cmp, write) + && meshCutter_.write(write) ); if (dumpLevel_) diff --git a/src/dynamicFvMesh/dynamicRefineFvMesh/dynamicRefineFvMesh.H b/src/dynamicFvMesh/dynamicRefineFvMesh/dynamicRefineFvMesh.H index 8254274b4e..d3ee13e4df 100644 --- a/src/dynamicFvMesh/dynamicRefineFvMesh/dynamicRefineFvMesh.H +++ b/src/dynamicFvMesh/dynamicRefineFvMesh/dynamicRefineFvMesh.H @@ -242,7 +242,7 @@ public: IOstream::streamFormat fmt, IOstream::versionNumber ver, IOstream::compressionType cmp, - const bool valid + const bool write = true ) const; }; diff --git a/src/dynamicMesh/polyTopoChange/polyTopoChange/hexRef8/hexRef8.C b/src/dynamicMesh/polyTopoChange/polyTopoChange/hexRef8/hexRef8.C index 610d02ecb9..01307b57a4 100644 --- a/src/dynamicMesh/polyTopoChange/polyTopoChange/hexRef8/hexRef8.C +++ b/src/dynamicMesh/polyTopoChange/polyTopoChange/hexRef8/hexRef8.C @@ -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-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -5743,17 +5743,16 @@ void Foam::hexRef8::setUnrefinement } -// Write refinement to polyMesh directory. -bool Foam::hexRef8::write(const bool valid) const +bool Foam::hexRef8::write(const bool write) const { bool writeOk = - cellLevel_.write(valid) - && pointLevel_.write(valid) - && level0Edge_.write(valid); + cellLevel_.write(write) + && pointLevel_.write(write) + && level0Edge_.write(write); if (history_.active()) { - writeOk = writeOk && history_.write(valid); + writeOk = writeOk && history_.write(write); } return writeOk; diff --git a/src/dynamicMesh/polyTopoChange/polyTopoChange/hexRef8/hexRef8.H b/src/dynamicMesh/polyTopoChange/polyTopoChange/hexRef8/hexRef8.H index 09746113a2..b446791672 100644 --- a/src/dynamicMesh/polyTopoChange/polyTopoChange/hexRef8/hexRef8.H +++ b/src/dynamicMesh/polyTopoChange/polyTopoChange/hexRef8/hexRef8.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-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -566,7 +566,7 @@ public: void setInstance(const fileName& inst); //- Force writing refinement+history to polyMesh directory. - bool write(const bool valid = true) const; + bool write(const bool write = true) const; }; diff --git a/src/finiteVolume/fvMesh/fvMesh.C b/src/finiteVolume/fvMesh/fvMesh.C index 1844139c2d..2b6f22dc91 100644 --- a/src/finiteVolume/fvMesh/fvMesh.C +++ b/src/finiteVolume/fvMesh/fvMesh.C @@ -1005,28 +1005,28 @@ bool Foam::fvMesh::writeObject IOstream::streamFormat fmt, IOstream::versionNumber ver, IOstream::compressionType cmp, - const bool valid + const bool write ) const { bool ok = true; if (phiPtr_) { - ok = phiPtr_->write(valid); + ok = phiPtr_->write(write); } // Write V0 only if V00 exists if (V00Ptr_) { - ok = ok && V0Ptr_->write(valid); + ok = ok && V0Ptr_->write(write); } - return ok && polyMesh::writeObject(fmt, ver, cmp, valid); + return ok && polyMesh::writeObject(fmt, ver, cmp, write); } -bool Foam::fvMesh::write(const bool valid) const +bool Foam::fvMesh::write(const bool write) const { - return polyMesh::write(valid); + return polyMesh::write(write); } diff --git a/src/finiteVolume/fvMesh/fvMesh.H b/src/finiteVolume/fvMesh/fvMesh.H index f9fc0a4082..b04f2c5082 100644 --- a/src/finiteVolume/fvMesh/fvMesh.H +++ b/src/finiteVolume/fvMesh/fvMesh.H @@ -383,11 +383,11 @@ public: IOstream::streamFormat fmt, IOstream::versionNumber ver, IOstream::compressionType cmp, - const bool valid + const bool write = true ) const; //- Write mesh using IO settings from time - virtual bool write(const bool valid = true) const; + virtual bool write(const bool write = true) const; // Member Operators diff --git a/src/lagrangian/basic/Cloud/Cloud.H b/src/lagrangian/basic/Cloud/Cloud.H index 4da177633c..d78c995e58 100644 --- a/src/lagrangian/basic/Cloud/Cloud.H +++ b/src/lagrangian/basic/Cloud/Cloud.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-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -260,7 +260,7 @@ public: IOstream::streamFormat fmt, IOstream::versionNumber ver, IOstream::compressionType cmp, - const bool valid + const bool write = true ) const; //- Write positions to \_positions.obj file diff --git a/src/lagrangian/basic/IOPosition/IOPosition.C b/src/lagrangian/basic/IOPosition/IOPosition.C index 911e4e8952..88083ebb3f 100644 --- a/src/lagrangian/basic/IOPosition/IOPosition.C +++ b/src/lagrangian/basic/IOPosition/IOPosition.C @@ -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-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -48,7 +48,7 @@ Foam::IOPosition::IOPosition(const CloudType& c) // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // template -bool Foam::IOPosition::write(const bool valid) const +bool Foam::IOPosition::write(const bool write) const { return regIOobject::write(cloud_.size()); } diff --git a/src/lagrangian/basic/IOPosition/IOPosition.H b/src/lagrangian/basic/IOPosition/IOPosition.H index 67a8cfc87b..50fc47deba 100644 --- a/src/lagrangian/basic/IOPosition/IOPosition.H +++ b/src/lagrangian/basic/IOPosition/IOPosition.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-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -82,7 +82,7 @@ public: virtual void readData(Istream&, CloudType&); - virtual bool write(const bool valid = true) const; + virtual bool write(const bool write = true) const; virtual bool writeData(Ostream& os) const; }; diff --git a/src/lagrangian/intermediate/parcels/Templates/CollidingParcel/CollidingParcelIO.C b/src/lagrangian/intermediate/parcels/Templates/CollidingParcel/CollidingParcelIO.C index 5dafdeabfc..dce7cf648a 100644 --- a/src/lagrangian/intermediate/parcels/Templates/CollidingParcel/CollidingParcelIO.C +++ b/src/lagrangian/intermediate/parcels/Templates/CollidingParcel/CollidingParcelIO.C @@ -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-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -86,31 +86,31 @@ template template void Foam::CollidingParcel::readFields(CloudType& c) { - bool valid = c.size(); + bool write = c.size(); ParcelType::readFields(c); - IOField f(c.fieldIOobject("f", IOobject::MUST_READ), valid); + IOField f(c.fieldIOobject("f", IOobject::MUST_READ), write); c.checkFieldIOobject(c, f); IOField angularMomentum ( c.fieldIOobject("angularMomentum", IOobject::MUST_READ), - valid + write ); c.checkFieldIOobject(c, angularMomentum); IOField torque ( c.fieldIOobject("torque", IOobject::MUST_READ), - valid + write ); c.checkFieldIOobject(c, torque); labelFieldCompactIOField collisionRecordsPairAccessed ( c.fieldIOobject("collisionRecordsPairAccessed", IOobject::MUST_READ), - valid + write ); c.checkFieldFieldIOobject(c, collisionRecordsPairAccessed); @@ -121,7 +121,7 @@ void Foam::CollidingParcel::readFields(CloudType& c) "collisionRecordsPairOrigProcOfOther", IOobject::MUST_READ ), - valid + write ); c.checkFieldFieldIOobject(c, collisionRecordsPairOrigProcOfOther); @@ -132,35 +132,35 @@ void Foam::CollidingParcel::readFields(CloudType& c) "collisionRecordsPairOrigIdOfOther", IOobject::MUST_READ ), - valid + write ); c.checkFieldFieldIOobject(c, collisionRecordsPairOrigProcOfOther); pairDataFieldCompactIOField collisionRecordsPairData ( c.fieldIOobject("collisionRecordsPairData", IOobject::MUST_READ), - valid + write ); c.checkFieldFieldIOobject(c, collisionRecordsPairData); labelFieldCompactIOField collisionRecordsWallAccessed ( c.fieldIOobject("collisionRecordsWallAccessed", IOobject::MUST_READ), - valid + write ); c.checkFieldFieldIOobject(c, collisionRecordsWallAccessed); vectorFieldCompactIOField collisionRecordsWallPRel ( c.fieldIOobject("collisionRecordsWallPRel", IOobject::MUST_READ), - valid + write ); c.checkFieldFieldIOobject(c, collisionRecordsWallPRel); wallDataFieldCompactIOField collisionRecordsWallData ( c.fieldIOobject("collisionRecordsWallData", IOobject::MUST_READ), - valid + write ); c.checkFieldFieldIOobject(c, collisionRecordsWallData); @@ -269,19 +269,19 @@ void Foam::CollidingParcel::writeFields(const CloudType& c) i++; } - const bool valid = (np > 0); + const bool write = (np > 0); - f.write(valid); - angularMomentum.write(valid); - torque.write(valid); + f.write(write); + angularMomentum.write(write); + torque.write(write); - collisionRecordsPairAccessed.write(valid); - collisionRecordsPairOrigProcOfOther.write(valid); - collisionRecordsPairOrigIdOfOther.write(valid); - collisionRecordsPairData.write(valid); - collisionRecordsWallAccessed.write(valid); - collisionRecordsWallPRel.write(valid); - collisionRecordsWallData.write(valid); + collisionRecordsPairAccessed.write(write); + collisionRecordsPairOrigProcOfOther.write(write); + collisionRecordsPairOrigIdOfOther.write(write); + collisionRecordsPairData.write(write); + collisionRecordsWallAccessed.write(write); + collisionRecordsWallPRel.write(write); + collisionRecordsWallData.write(write); } diff --git a/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/KinematicParcelIO.C b/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/KinematicParcelIO.C index 9ffad9c4cb..a575e9daf3 100644 --- a/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/KinematicParcelIO.C +++ b/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/KinematicParcelIO.C @@ -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-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -98,77 +98,77 @@ template template void Foam::KinematicParcel::readFields(CloudType& c) { - bool valid = c.size(); + bool write = c.size(); ParcelType::readFields(c); IOField