diff --git a/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/PDRDragModel/PDRDragModel.C b/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/PDRDragModel/PDRDragModel.C index 175c5f4f1c..670ab1ed83 100644 --- a/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/PDRDragModel/PDRDragModel.C +++ b/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/PDRDragModel/PDRDragModel.C @@ -81,7 +81,7 @@ bool Foam::PDRDragModel::read(const dictionary& PDRProperties) { PDRDragModelCoeffs_ = PDRProperties.optionalSubDict(type() + "Coeffs"); - PDRDragModelCoeffs_.read("drag", on_); + PDRDragModelCoeffs_.readEntry("drag", on_); return true; } diff --git a/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/basic/basic.C b/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/basic/basic.C index 821380fe04..9c053b2acc 100644 --- a/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/basic/basic.C +++ b/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/basic/basic.C @@ -165,8 +165,8 @@ bool Foam::PDRDragModels::basic::read(const dictionary& PDRProperties) { PDRDragModel::read(PDRProperties); - PDRDragModelCoeffs_.read("Csu", Csu.value()); - PDRDragModelCoeffs_.read("Csk", Csk.value()); + PDRDragModelCoeffs_.readEntry("Csu", Csu.value()); + PDRDragModelCoeffs_.readEntry("Csk", Csk.value()); return true; } diff --git a/applications/solvers/combustion/chemFoam/readControls.H b/applications/solvers/combustion/chemFoam/readControls.H index 09937a19a6..cec0b9867f 100644 --- a/applications/solvers/combustion/chemFoam/readControls.H +++ b/applications/solvers/combustion/chemFoam/readControls.H @@ -1,3 +1,3 @@ -runTime.controlDict().read("adjustTimeStep", adjustTimeStep); +runTime.controlDict().readEntry("adjustTimeStep", adjustTimeStep); -runTime.controlDict().read("maxDeltaT", maxDeltaT); +runTime.controlDict().readEntry("maxDeltaT", maxDeltaT); diff --git a/applications/solvers/multiphase/cavitatingFoam/cavitatingDyMFoam/readControls.H b/applications/solvers/multiphase/cavitatingFoam/cavitatingDyMFoam/readControls.H index 3e8a87d1a9..d0b85b18a1 100644 --- a/applications/solvers/multiphase/cavitatingFoam/cavitatingDyMFoam/readControls.H +++ b/applications/solvers/multiphase/cavitatingFoam/cavitatingDyMFoam/readControls.H @@ -1,4 +1,4 @@ #include "readDyMControls.H" correctPhi = pimple.dict().lookupOrDefault("correctPhi", true); -maxAcousticCo = readScalar(runTime.controlDict().lookup("maxAcousticCo")); +maxAcousticCo = runTime.controlDict().get("maxAcousticCo"); diff --git a/applications/solvers/multiphase/cavitatingFoam/readControls.H b/applications/solvers/multiphase/cavitatingFoam/readControls.H index a2d4dc80a7..7ac3274041 100644 --- a/applications/solvers/multiphase/cavitatingFoam/readControls.H +++ b/applications/solvers/multiphase/cavitatingFoam/readControls.H @@ -1,3 +1,3 @@ #include "readTimeControls.H" -maxAcousticCo = readScalar(runTime.controlDict().lookup("maxAcousticCo")); +maxAcousticCo = runTime.controlDict().get("maxAcousticCo"); diff --git a/applications/utilities/preProcessing/createZeroDirectory/boundaryInfo.C b/applications/utilities/preProcessing/createZeroDirectory/boundaryInfo.C index a95a1e28c5..487adb3fde 100644 --- a/applications/utilities/preProcessing/createZeroDirectory/boundaryInfo.C +++ b/applications/utilities/preProcessing/createZeroDirectory/boundaryInfo.C @@ -112,7 +112,7 @@ Foam::boundaryInfo::boundaryInfo(const Time& runTime, const word& regionName) const dictionary& dict = boundaryDict_[patchI].dict(); names_[patchI] = dict.dictName(); - dict.read("type", types_[patchI]); + dict.readEntry("type", types_[patchI]); if (polyPatch::constraintType(types_[patchI])) { constraint_[patchI] = true; diff --git a/applications/utilities/preProcessing/createZeroDirectory/solverTemplate.C b/applications/utilities/preProcessing/createZeroDirectory/solverTemplate.C index bbc8807994..678c1e5b49 100644 --- a/applications/utilities/preProcessing/createZeroDirectory/solverTemplate.C +++ b/applications/utilities/preProcessing/createZeroDirectory/solverTemplate.C @@ -120,12 +120,12 @@ Foam::dictionary Foam::solverTemplate::readFluidFieldTemplates else if (modelType == "RAS") { turbPropDict.subDict(modelType) - .read("RASModel", turbulenceModel); + .readEntry("RASModel", turbulenceModel); } else if (modelType == "LES") { turbPropDict.subDict(modelType) - .read("LESModel", turbulenceModel); + .readEntry("LESModel", turbulenceModel); } else { diff --git a/modules/catalyst b/modules/catalyst index 2ac2c5ec6e..4575b54c6f 160000 --- a/modules/catalyst +++ b/modules/catalyst @@ -1 +1 @@ -Subproject commit 2ac2c5ec6e3bec25b3e4b641781adcd78d8dd20b +Subproject commit 4575b54c6f9ce3bfcbeee246b46b0fb8f69529e0 diff --git a/src/OpenFOAM/db/IOobject/IOobjectReadHeader.C b/src/OpenFOAM/db/IOobject/IOobjectReadHeader.C index 3147e59380..b794f6c209 100644 --- a/src/OpenFOAM/db/IOobject/IOobjectReadHeader.C +++ b/src/OpenFOAM/db/IOobject/IOobjectReadHeader.C @@ -67,11 +67,17 @@ bool Foam::IOobject::readHeader(Istream& is) { const dictionary headerDict(is); - is.version(headerDict.lookup("version")); - is.format(headerDict.lookup("format")); - headerClassName_ = word(headerDict.lookup("class")); + is.version + ( + IOstreamOption::versionNumber + ( + headerDict.get("version") + ) + ); + is.format(headerDict.get("format")); + headerClassName_ = headerDict.get("class"); - const word headerObject(headerDict.lookup("object")); + const word headerObject(headerDict.get("object")); if (IOobject::debug && headerObject != name()) { IOWarningInFunction(is) diff --git a/src/OpenFOAM/db/IOobjects/decomposedBlockData/decomposedBlockData.C b/src/OpenFOAM/db/IOobjects/decomposedBlockData/decomposedBlockData.C index a99547c2e3..3ff5b05c2f 100644 --- a/src/OpenFOAM/db/IOobjects/decomposedBlockData/decomposedBlockData.C +++ b/src/OpenFOAM/db/IOobjects/decomposedBlockData/decomposedBlockData.C @@ -1166,8 +1166,14 @@ Foam::label Foam::decomposedBlockData::numBlocks(const fileName& fName) ) { dictionary headerDict(is); - is.version(headerDict.lookup("version")); - is.format(headerDict.lookup("format")); + is.version + ( + IOstreamOption::versionNumber + ( + headerDict.get("version") + ) + ); + is.format(headerDict.get("format")); // Obtain number of blocks directly if (headerDict.readIfPresent("blocks", nBlocks)) diff --git a/src/OpenFOAM/db/Time/Time.C b/src/OpenFOAM/db/Time/Time.C index 9057cefbdd..d85d0e3389 100644 --- a/src/OpenFOAM/db/Time/Time.C +++ b/src/OpenFOAM/db/Time/Time.C @@ -149,7 +149,7 @@ void Foam::Time::setControls() if (startFrom == "startTime") { - controlDict_.lookup("startTime") >> startTime_; + controlDict_.readEntry("startTime", startTime_); } else { @@ -938,7 +938,7 @@ bool Foam::Time::stopAt(const stopAtControls stopCtrl) const // Adjust endTime if (stopCtrl == stopAtControls::saEndTime) { - controlDict_.lookup("endTime") >> endTime_; + controlDict_.readEntry("endTime", endTime_); } return changed; diff --git a/src/OpenFOAM/db/Time/TimeIO.C b/src/OpenFOAM/db/Time/TimeIO.C index da68ab7606..e982a92884 100644 --- a/src/OpenFOAM/db/Time/TimeIO.C +++ b/src/OpenFOAM/db/Time/TimeIO.C @@ -344,7 +344,7 @@ void Foam::Time::readDict() if (!deltaTchanged_) { - deltaT_ = readScalar(controlDict_.lookup("deltaT")); + controlDict_.readEntry("deltaT", deltaT_); } if (controlDict_.found("writeControl")) @@ -369,7 +369,7 @@ void Foam::Time::readDict() } else { - controlDict_.lookup("writeFrequency") >> writeInterval_; + controlDict_.readEntry("writeFrequency", writeInterval_); } @@ -409,7 +409,7 @@ void Foam::Time::readDict() if (controlDict_.found("timeFormat")) { - const word formatName(controlDict_.lookup("timeFormat")); + const word formatName(controlDict_.get("timeFormat")); if (formatName == "general") { @@ -441,7 +441,7 @@ void Foam::Time::readDict() if (stopAt_ == saEndTime) { - controlDict_.lookup("endTime") >> endTime_; + controlDict_.readEntry("endTime", endTime_); } else { @@ -468,14 +468,14 @@ void Foam::Time::readDict() if (controlDict_.found("writeFormat")) { - writeStreamOption_.format(word(controlDict_.lookup("writeFormat"))); + writeStreamOption_.format(controlDict_.get("writeFormat")); } if (controlDict_.found("writePrecision")) { IOstream::defaultPrecision ( - readUint(controlDict_.lookup("writePrecision")) + controlDict_.get("writePrecision") ); Sout.precision(IOstream::defaultPrecision()); @@ -495,7 +495,7 @@ void Foam::Time::readDict() { writeStreamOption_.compression ( - word(controlDict_.lookup("writeCompression")) + controlDict_.get("writeCompression") ); if diff --git a/src/OpenFOAM/db/dictionary/dictionary.C b/src/OpenFOAM/db/dictionary/dictionary.C index f0230ab1af..580744d06c 100644 --- a/src/OpenFOAM/db/dictionary/dictionary.C +++ b/src/OpenFOAM/db/dictionary/dictionary.C @@ -477,7 +477,7 @@ Foam::dictionary& Foam::dictionary::subDict(const word& keyword) Foam::dictionary Foam::dictionary::subOrEmptyDict ( const word& keyword, - const bool mustRead + const bool mandatory ) const { // Find non-recursive with patterns @@ -489,7 +489,7 @@ Foam::dictionary Foam::dictionary::subOrEmptyDict return finder.dict(); } - if (mustRead) + if (mandatory) { FatalIOErrorInFunction(*this) << "'" << keyword diff --git a/src/OpenFOAM/db/dictionary/dictionary.H b/src/OpenFOAM/db/dictionary/dictionary.H index cf3f175583..384efa081b 100644 --- a/src/OpenFOAM/db/dictionary/dictionary.H +++ b/src/OpenFOAM/db/dictionary/dictionary.H @@ -405,7 +405,7 @@ public: explicit dictionary(const fileName& name); //- Construct given the entry name, parent dictionary and Istream, - // reading entries until EOF + //- reading entries until EOF dictionary ( const fileName& name, @@ -414,11 +414,11 @@ public: ); //- Construct top-level dictionary from Istream, - // reading entries until EOF + //- reading entries until EOF dictionary(Istream& is); //- Construct top-level dictionary from Istream, - // reading entries until EOF, optionally keeping the header + //- reading entries until EOF, optionally keeping the header dictionary(Istream& is, bool keepHeader); //- Copy construct given the parent dictionary @@ -604,7 +604,7 @@ public: // // \return true if the entry was found. template - bool read + bool readEntry ( const word& keyword, T& val, @@ -682,7 +682,7 @@ public: dictionary subOrEmptyDict ( const word& keyword, - const bool mustRead = false + const bool mandatory = false ) const; //- Find and return a sub-dictionary, otherwise return this dictionary. diff --git a/src/OpenFOAM/db/dictionary/dictionaryTemplates.C b/src/OpenFOAM/db/dictionary/dictionaryTemplates.C index 3e3cf27266..95cd8ab8a7 100644 --- a/src/OpenFOAM/db/dictionary/dictionaryTemplates.C +++ b/src/OpenFOAM/db/dictionary/dictionaryTemplates.C @@ -58,7 +58,7 @@ T Foam::dictionary::get ) const { T val; - read(keyword, val, recursive, patternMatch); + readEntry(keyword, val, recursive, patternMatch); return val; } @@ -196,7 +196,7 @@ T Foam::dictionary::lookupOrAddDefault template -bool Foam::dictionary::read +bool Foam::dictionary::readEntry ( const word& keyword, T& val, @@ -238,7 +238,7 @@ bool Foam::dictionary::readIfPresent ) const { // Read is non-mandatory - return read(keyword, val, recursive, patternMatch, false); + return readEntry(keyword, val, recursive, patternMatch, false); } diff --git a/src/OpenFOAM/db/error/IOerror.C b/src/OpenFOAM/db/error/IOerror.C index 9b6eea93c9..8f3f40e4f8 100644 --- a/src/OpenFOAM/db/error/IOerror.C +++ b/src/OpenFOAM/db/error/IOerror.C @@ -44,9 +44,9 @@ Foam::IOerror::IOerror(const string& title) Foam::IOerror::IOerror(const dictionary& errDict) : error(errDict), - ioFileName_(errDict.lookup("ioFileName")), - ioStartLineNumber_(readLabel(errDict.lookup("ioStartLineNumber"))), - ioEndLineNumber_(readLabel(errDict.lookup("ioEndLineNumber"))) + ioFileName_(errDict.get("ioFileName")), + ioStartLineNumber_(errDict.get