mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
COMP: rename dictionary::read<T> to dictionary::readEntry<T>
- avoids compiler ambiguity when virtual methods such as IOdictionary::read() exist. - the method was introduced in 1806, and was thus not yet widely used
This commit is contained in:
@ -81,7 +81,7 @@ bool Foam::PDRDragModel::read(const dictionary& PDRProperties)
|
|||||||
{
|
{
|
||||||
PDRDragModelCoeffs_ = PDRProperties.optionalSubDict(type() + "Coeffs");
|
PDRDragModelCoeffs_ = PDRProperties.optionalSubDict(type() + "Coeffs");
|
||||||
|
|
||||||
PDRDragModelCoeffs_.read("drag", on_);
|
PDRDragModelCoeffs_.readEntry("drag", on_);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -165,8 +165,8 @@ bool Foam::PDRDragModels::basic::read(const dictionary& PDRProperties)
|
|||||||
{
|
{
|
||||||
PDRDragModel::read(PDRProperties);
|
PDRDragModel::read(PDRProperties);
|
||||||
|
|
||||||
PDRDragModelCoeffs_.read("Csu", Csu.value());
|
PDRDragModelCoeffs_.readEntry("Csu", Csu.value());
|
||||||
PDRDragModelCoeffs_.read("Csk", Csk.value());
|
PDRDragModelCoeffs_.readEntry("Csk", Csk.value());
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,3 +1,3 @@
|
|||||||
runTime.controlDict().read("adjustTimeStep", adjustTimeStep);
|
runTime.controlDict().readEntry("adjustTimeStep", adjustTimeStep);
|
||||||
|
|
||||||
runTime.controlDict().read("maxDeltaT", maxDeltaT);
|
runTime.controlDict().readEntry("maxDeltaT", maxDeltaT);
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
#include "readDyMControls.H"
|
#include "readDyMControls.H"
|
||||||
|
|
||||||
correctPhi = pimple.dict().lookupOrDefault("correctPhi", true);
|
correctPhi = pimple.dict().lookupOrDefault("correctPhi", true);
|
||||||
maxAcousticCo = readScalar(runTime.controlDict().lookup("maxAcousticCo"));
|
maxAcousticCo = runTime.controlDict().get<scalar>("maxAcousticCo");
|
||||||
|
|||||||
@ -1,3 +1,3 @@
|
|||||||
#include "readTimeControls.H"
|
#include "readTimeControls.H"
|
||||||
|
|
||||||
maxAcousticCo = readScalar(runTime.controlDict().lookup("maxAcousticCo"));
|
maxAcousticCo = runTime.controlDict().get<scalar>("maxAcousticCo");
|
||||||
|
|||||||
@ -112,7 +112,7 @@ Foam::boundaryInfo::boundaryInfo(const Time& runTime, const word& regionName)
|
|||||||
const dictionary& dict = boundaryDict_[patchI].dict();
|
const dictionary& dict = boundaryDict_[patchI].dict();
|
||||||
|
|
||||||
names_[patchI] = dict.dictName();
|
names_[patchI] = dict.dictName();
|
||||||
dict.read("type", types_[patchI]);
|
dict.readEntry("type", types_[patchI]);
|
||||||
if (polyPatch::constraintType(types_[patchI]))
|
if (polyPatch::constraintType(types_[patchI]))
|
||||||
{
|
{
|
||||||
constraint_[patchI] = true;
|
constraint_[patchI] = true;
|
||||||
|
|||||||
@ -120,12 +120,12 @@ Foam::dictionary Foam::solverTemplate::readFluidFieldTemplates
|
|||||||
else if (modelType == "RAS")
|
else if (modelType == "RAS")
|
||||||
{
|
{
|
||||||
turbPropDict.subDict(modelType)
|
turbPropDict.subDict(modelType)
|
||||||
.read("RASModel", turbulenceModel);
|
.readEntry("RASModel", turbulenceModel);
|
||||||
}
|
}
|
||||||
else if (modelType == "LES")
|
else if (modelType == "LES")
|
||||||
{
|
{
|
||||||
turbPropDict.subDict(modelType)
|
turbPropDict.subDict(modelType)
|
||||||
.read("LESModel", turbulenceModel);
|
.readEntry("LESModel", turbulenceModel);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
Submodule modules/catalyst updated: 2ac2c5ec6e...4575b54c6f
@ -67,11 +67,17 @@ bool Foam::IOobject::readHeader(Istream& is)
|
|||||||
{
|
{
|
||||||
const dictionary headerDict(is);
|
const dictionary headerDict(is);
|
||||||
|
|
||||||
is.version(headerDict.lookup("version"));
|
is.version
|
||||||
is.format(headerDict.lookup("format"));
|
(
|
||||||
headerClassName_ = word(headerDict.lookup("class"));
|
IOstreamOption::versionNumber
|
||||||
|
(
|
||||||
|
headerDict.get<float>("version")
|
||||||
|
)
|
||||||
|
);
|
||||||
|
is.format(headerDict.get<word>("format"));
|
||||||
|
headerClassName_ = headerDict.get<word>("class");
|
||||||
|
|
||||||
const word headerObject(headerDict.lookup("object"));
|
const word headerObject(headerDict.get<word>("object"));
|
||||||
if (IOobject::debug && headerObject != name())
|
if (IOobject::debug && headerObject != name())
|
||||||
{
|
{
|
||||||
IOWarningInFunction(is)
|
IOWarningInFunction(is)
|
||||||
|
|||||||
@ -1166,8 +1166,14 @@ Foam::label Foam::decomposedBlockData::numBlocks(const fileName& fName)
|
|||||||
)
|
)
|
||||||
{
|
{
|
||||||
dictionary headerDict(is);
|
dictionary headerDict(is);
|
||||||
is.version(headerDict.lookup("version"));
|
is.version
|
||||||
is.format(headerDict.lookup("format"));
|
(
|
||||||
|
IOstreamOption::versionNumber
|
||||||
|
(
|
||||||
|
headerDict.get<float>("version")
|
||||||
|
)
|
||||||
|
);
|
||||||
|
is.format(headerDict.get<word>("format"));
|
||||||
|
|
||||||
// Obtain number of blocks directly
|
// Obtain number of blocks directly
|
||||||
if (headerDict.readIfPresent("blocks", nBlocks))
|
if (headerDict.readIfPresent("blocks", nBlocks))
|
||||||
|
|||||||
@ -149,7 +149,7 @@ void Foam::Time::setControls()
|
|||||||
|
|
||||||
if (startFrom == "startTime")
|
if (startFrom == "startTime")
|
||||||
{
|
{
|
||||||
controlDict_.lookup("startTime") >> startTime_;
|
controlDict_.readEntry("startTime", startTime_);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -938,7 +938,7 @@ bool Foam::Time::stopAt(const stopAtControls stopCtrl) const
|
|||||||
// Adjust endTime
|
// Adjust endTime
|
||||||
if (stopCtrl == stopAtControls::saEndTime)
|
if (stopCtrl == stopAtControls::saEndTime)
|
||||||
{
|
{
|
||||||
controlDict_.lookup("endTime") >> endTime_;
|
controlDict_.readEntry("endTime", endTime_);
|
||||||
}
|
}
|
||||||
|
|
||||||
return changed;
|
return changed;
|
||||||
|
|||||||
@ -344,7 +344,7 @@ void Foam::Time::readDict()
|
|||||||
|
|
||||||
if (!deltaTchanged_)
|
if (!deltaTchanged_)
|
||||||
{
|
{
|
||||||
deltaT_ = readScalar(controlDict_.lookup("deltaT"));
|
controlDict_.readEntry("deltaT", deltaT_);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (controlDict_.found("writeControl"))
|
if (controlDict_.found("writeControl"))
|
||||||
@ -369,7 +369,7 @@ void Foam::Time::readDict()
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
controlDict_.lookup("writeFrequency") >> writeInterval_;
|
controlDict_.readEntry("writeFrequency", writeInterval_);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -409,7 +409,7 @@ void Foam::Time::readDict()
|
|||||||
|
|
||||||
if (controlDict_.found("timeFormat"))
|
if (controlDict_.found("timeFormat"))
|
||||||
{
|
{
|
||||||
const word formatName(controlDict_.lookup("timeFormat"));
|
const word formatName(controlDict_.get<word>("timeFormat"));
|
||||||
|
|
||||||
if (formatName == "general")
|
if (formatName == "general")
|
||||||
{
|
{
|
||||||
@ -441,7 +441,7 @@ void Foam::Time::readDict()
|
|||||||
|
|
||||||
if (stopAt_ == saEndTime)
|
if (stopAt_ == saEndTime)
|
||||||
{
|
{
|
||||||
controlDict_.lookup("endTime") >> endTime_;
|
controlDict_.readEntry("endTime", endTime_);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -468,14 +468,14 @@ void Foam::Time::readDict()
|
|||||||
|
|
||||||
if (controlDict_.found("writeFormat"))
|
if (controlDict_.found("writeFormat"))
|
||||||
{
|
{
|
||||||
writeStreamOption_.format(word(controlDict_.lookup("writeFormat")));
|
writeStreamOption_.format(controlDict_.get<word>("writeFormat"));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (controlDict_.found("writePrecision"))
|
if (controlDict_.found("writePrecision"))
|
||||||
{
|
{
|
||||||
IOstream::defaultPrecision
|
IOstream::defaultPrecision
|
||||||
(
|
(
|
||||||
readUint(controlDict_.lookup("writePrecision"))
|
controlDict_.get<unsigned int>("writePrecision")
|
||||||
);
|
);
|
||||||
|
|
||||||
Sout.precision(IOstream::defaultPrecision());
|
Sout.precision(IOstream::defaultPrecision());
|
||||||
@ -495,7 +495,7 @@ void Foam::Time::readDict()
|
|||||||
{
|
{
|
||||||
writeStreamOption_.compression
|
writeStreamOption_.compression
|
||||||
(
|
(
|
||||||
word(controlDict_.lookup("writeCompression"))
|
controlDict_.get<word>("writeCompression")
|
||||||
);
|
);
|
||||||
|
|
||||||
if
|
if
|
||||||
|
|||||||
@ -477,7 +477,7 @@ Foam::dictionary& Foam::dictionary::subDict(const word& keyword)
|
|||||||
Foam::dictionary Foam::dictionary::subOrEmptyDict
|
Foam::dictionary Foam::dictionary::subOrEmptyDict
|
||||||
(
|
(
|
||||||
const word& keyword,
|
const word& keyword,
|
||||||
const bool mustRead
|
const bool mandatory
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
// Find non-recursive with patterns
|
// Find non-recursive with patterns
|
||||||
@ -489,7 +489,7 @@ Foam::dictionary Foam::dictionary::subOrEmptyDict
|
|||||||
return finder.dict();
|
return finder.dict();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mustRead)
|
if (mandatory)
|
||||||
{
|
{
|
||||||
FatalIOErrorInFunction(*this)
|
FatalIOErrorInFunction(*this)
|
||||||
<< "'" << keyword
|
<< "'" << keyword
|
||||||
|
|||||||
@ -405,7 +405,7 @@ public:
|
|||||||
explicit dictionary(const fileName& name);
|
explicit dictionary(const fileName& name);
|
||||||
|
|
||||||
//- Construct given the entry name, parent dictionary and Istream,
|
//- Construct given the entry name, parent dictionary and Istream,
|
||||||
// reading entries until EOF
|
//- reading entries until EOF
|
||||||
dictionary
|
dictionary
|
||||||
(
|
(
|
||||||
const fileName& name,
|
const fileName& name,
|
||||||
@ -414,11 +414,11 @@ public:
|
|||||||
);
|
);
|
||||||
|
|
||||||
//- Construct top-level dictionary from Istream,
|
//- Construct top-level dictionary from Istream,
|
||||||
// reading entries until EOF
|
//- reading entries until EOF
|
||||||
dictionary(Istream& is);
|
dictionary(Istream& is);
|
||||||
|
|
||||||
//- Construct top-level dictionary from Istream,
|
//- 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);
|
dictionary(Istream& is, bool keepHeader);
|
||||||
|
|
||||||
//- Copy construct given the parent dictionary
|
//- Copy construct given the parent dictionary
|
||||||
@ -604,7 +604,7 @@ public:
|
|||||||
//
|
//
|
||||||
// \return true if the entry was found.
|
// \return true if the entry was found.
|
||||||
template<class T>
|
template<class T>
|
||||||
bool read
|
bool readEntry
|
||||||
(
|
(
|
||||||
const word& keyword,
|
const word& keyword,
|
||||||
T& val,
|
T& val,
|
||||||
@ -682,7 +682,7 @@ public:
|
|||||||
dictionary subOrEmptyDict
|
dictionary subOrEmptyDict
|
||||||
(
|
(
|
||||||
const word& keyword,
|
const word& keyword,
|
||||||
const bool mustRead = false
|
const bool mandatory = false
|
||||||
) const;
|
) const;
|
||||||
|
|
||||||
//- Find and return a sub-dictionary, otherwise return this dictionary.
|
//- Find and return a sub-dictionary, otherwise return this dictionary.
|
||||||
|
|||||||
@ -58,7 +58,7 @@ T Foam::dictionary::get
|
|||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
T val;
|
T val;
|
||||||
read<T>(keyword, val, recursive, patternMatch);
|
readEntry<T>(keyword, val, recursive, patternMatch);
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -196,7 +196,7 @@ T Foam::dictionary::lookupOrAddDefault
|
|||||||
|
|
||||||
|
|
||||||
template<class T>
|
template<class T>
|
||||||
bool Foam::dictionary::read
|
bool Foam::dictionary::readEntry
|
||||||
(
|
(
|
||||||
const word& keyword,
|
const word& keyword,
|
||||||
T& val,
|
T& val,
|
||||||
@ -238,7 +238,7 @@ bool Foam::dictionary::readIfPresent
|
|||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
// Read is non-mandatory
|
// Read is non-mandatory
|
||||||
return read<T>(keyword, val, recursive, patternMatch, false);
|
return readEntry<T>(keyword, val, recursive, patternMatch, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -44,9 +44,9 @@ Foam::IOerror::IOerror(const string& title)
|
|||||||
Foam::IOerror::IOerror(const dictionary& errDict)
|
Foam::IOerror::IOerror(const dictionary& errDict)
|
||||||
:
|
:
|
||||||
error(errDict),
|
error(errDict),
|
||||||
ioFileName_(errDict.lookup("ioFileName")),
|
ioFileName_(errDict.get<string>("ioFileName")),
|
||||||
ioStartLineNumber_(readLabel(errDict.lookup("ioStartLineNumber"))),
|
ioStartLineNumber_(errDict.get<label>("ioStartLineNumber")),
|
||||||
ioEndLineNumber_(readLabel(errDict.lookup("ioEndLineNumber")))
|
ioEndLineNumber_(errDict.get<label>("ioEndLineNumber"))
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -92,9 +92,9 @@ Foam::error::error(const dictionary& errDict)
|
|||||||
:
|
:
|
||||||
std::exception(),
|
std::exception(),
|
||||||
messageStream(errDict),
|
messageStream(errDict),
|
||||||
functionName_(errDict.lookup("functionName")),
|
functionName_(errDict.get<string>("functionName")),
|
||||||
sourceFileName_(errDict.lookup("sourceFileName")),
|
sourceFileName_(errDict.get<string>("sourceFileName")),
|
||||||
sourceFileLineNumber_(readLabel(errDict.lookup("sourceFileLineNumber"))),
|
sourceFileLineNumber_(errDict.get<label>("sourceFileLineNumber")),
|
||||||
throwExceptions_(false),
|
throwExceptions_(false),
|
||||||
messageStreamPtr_(new OStringStream())
|
messageStreamPtr_(new OStringStream())
|
||||||
{
|
{
|
||||||
|
|||||||
@ -54,7 +54,7 @@ Foam::messageStream::messageStream
|
|||||||
|
|
||||||
Foam::messageStream::messageStream(const dictionary& dict)
|
Foam::messageStream::messageStream(const dictionary& dict)
|
||||||
:
|
:
|
||||||
title_(dict.lookup("title")),
|
title_(dict.get<string>("title")),
|
||||||
severity_(FATAL),
|
severity_(FATAL),
|
||||||
maxErrors_(0),
|
maxErrors_(0),
|
||||||
errorCount_(0)
|
errorCount_(0)
|
||||||
|
|||||||
@ -66,7 +66,7 @@ Foam::autoPtr<Foam::functionObject> Foam::functionObject::New
|
|||||||
const dictionary& dict
|
const dictionary& dict
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
const word functionType(dict.lookup("type"));
|
const word functionType(dict.get<word>("type"));
|
||||||
|
|
||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -309,11 +309,11 @@ bool Foam::functionObjectList::readFunctionObject
|
|||||||
}
|
}
|
||||||
else if (funcDict.found("field"))
|
else if (funcDict.found("field"))
|
||||||
{
|
{
|
||||||
requiredFields.insert(wordRe(funcDict.lookup("field")));
|
requiredFields.insert(funcDict.get<wordRe>("field"));
|
||||||
}
|
}
|
||||||
else if (funcDict.found("fields"))
|
else if (funcDict.found("fields"))
|
||||||
{
|
{
|
||||||
requiredFields.insert(wordReList(funcDict.lookup("fields")));
|
requiredFields.insert(funcDict.get<wordRes>("fields"));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Insert named arguments
|
// Insert named arguments
|
||||||
|
|||||||
@ -139,7 +139,7 @@ void Foam::timeControl::read(const dictionary& dict)
|
|||||||
case ocCpuTime:
|
case ocCpuTime:
|
||||||
case ocAdjustableRunTime:
|
case ocAdjustableRunTime:
|
||||||
{
|
{
|
||||||
const scalar userTime = readScalar(dict.lookup(intervalName));
|
const scalar userTime = dict.get<scalar>(intervalName);
|
||||||
interval_ = time_.userTimeToTime(userTime);
|
interval_ = time_.userTimeToTime(userTime);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -316,7 +316,7 @@ void Foam::dimensioned<Type>::replace
|
|||||||
template<class Type>
|
template<class Type>
|
||||||
void Foam::dimensioned<Type>::read(const dictionary& dict)
|
void Foam::dimensioned<Type>::read(const dictionary& dict)
|
||||||
{
|
{
|
||||||
dict.read(name_, value_);
|
dict.readEntry(name_, value_);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -1187,7 +1187,7 @@ void Foam::argList::parse
|
|||||||
if (decompDict.lookupOrDefault("distributed", false))
|
if (decompDict.lookupOrDefault("distributed", false))
|
||||||
{
|
{
|
||||||
distributed_ = true;
|
distributed_ = true;
|
||||||
decompDict.read("roots", roots);
|
decompDict.readEntry("roots", roots);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1758,7 +1758,7 @@ void Foam::argList::displayDoc(bool source) const
|
|||||||
string docBrowser = getEnv("FOAM_DOC_BROWSER");
|
string docBrowser = getEnv("FOAM_DOC_BROWSER");
|
||||||
if (docBrowser.empty())
|
if (docBrowser.empty())
|
||||||
{
|
{
|
||||||
docDict.read("docBrowser", docBrowser);
|
docDict.readEntry("docBrowser", docBrowser);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Can use FOAM_DOC_BROWSER='application file://%f' if required
|
// Can use FOAM_DOC_BROWSER='application file://%f' if required
|
||||||
|
|||||||
@ -1041,7 +1041,7 @@ void Foam::ccm::reader::readMonitoring
|
|||||||
word zoneName;
|
word zoneName;
|
||||||
if (iter.found())
|
if (iter.found())
|
||||||
{
|
{
|
||||||
iter().read("Label", zoneName);
|
iter().readEntry("Label", zoneName);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -2425,8 +2425,8 @@ void Foam::ccm::reader::addPatches
|
|||||||
|
|
||||||
if (citer.found())
|
if (citer.found())
|
||||||
{
|
{
|
||||||
citer().read("Label", patchName);
|
citer().readEntry("Label", patchName);
|
||||||
citer().read("BoundaryType", patchType);
|
citer().readEntry("BoundaryType", patchType);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@ -226,7 +226,7 @@ void Foam::ccm::writer::writeCellTable
|
|||||||
// Tags containing 'Id' are integers
|
// Tags containing 'Id' are integers
|
||||||
if (pos > 0)
|
if (pos > 0)
|
||||||
{
|
{
|
||||||
dict.read(keyword, intVal);
|
dict.readEntry(keyword, intVal);
|
||||||
|
|
||||||
CCMIOWriteOpti
|
CCMIOWriteOpti
|
||||||
(
|
(
|
||||||
|
|||||||
@ -91,7 +91,7 @@ Foam::mappedPatchFieldBase<Type>::mappedPatchFieldBase
|
|||||||
{
|
{
|
||||||
if (mapper_.mode() == mappedPatchBase::NEARESTCELL)
|
if (mapper_.mode() == mappedPatchBase::NEARESTCELL)
|
||||||
{
|
{
|
||||||
dict.read("interpolationScheme", interpolationScheme_);
|
dict.readEntry("interpolationScheme", interpolationScheme_);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -85,7 +85,7 @@ void Foam::fv::rotorDiskSource::checkData()
|
|||||||
{
|
{
|
||||||
case ifFixed:
|
case ifFixed:
|
||||||
{
|
{
|
||||||
coeffs_.read("inletVelocity", inletVelocity_);
|
coeffs_.readEntry("inletVelocity", inletVelocity_);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case ifSurfaceNormal:
|
case ifSurfaceNormal:
|
||||||
@ -331,7 +331,7 @@ void Foam::fv::rotorDiskSource::createCoordinateSystem()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
coeffs_.read("refDirection", refDir);
|
coeffs_.readEntry("refDirection", refDir);
|
||||||
|
|
||||||
cylindrical_.reset
|
cylindrical_.reset
|
||||||
(
|
(
|
||||||
@ -352,9 +352,9 @@ void Foam::fv::rotorDiskSource::createCoordinateSystem()
|
|||||||
}
|
}
|
||||||
case gmSpecified:
|
case gmSpecified:
|
||||||
{
|
{
|
||||||
coeffs_.read("origin", origin);
|
coeffs_.readEntry("origin", origin);
|
||||||
coeffs_.read("axis", axis);
|
coeffs_.readEntry("axis", axis);
|
||||||
coeffs_.read("refDirection", refDir);
|
coeffs_.readEntry("refDirection", refDir);
|
||||||
|
|
||||||
cylindrical_.reset
|
cylindrical_.reset
|
||||||
(
|
(
|
||||||
@ -521,7 +521,7 @@ void Foam::fv::rotorDiskSource::addSup
|
|||||||
);
|
);
|
||||||
|
|
||||||
// Read the reference density for incompressible flow
|
// Read the reference density for incompressible flow
|
||||||
coeffs_.read("rhoRef", rhoRef_);
|
coeffs_.readEntry("rhoRef", rhoRef_);
|
||||||
|
|
||||||
const vectorField Uin(inflowVelocity(eqn.psi()));
|
const vectorField Uin(inflowVelocity(eqn.psi()));
|
||||||
trim_->correct(Uin, force);
|
trim_->correct(Uin, force);
|
||||||
@ -574,17 +574,17 @@ bool Foam::fv::rotorDiskSource::read(const dictionary& dict)
|
|||||||
{
|
{
|
||||||
if (cellSetOption::read(dict))
|
if (cellSetOption::read(dict))
|
||||||
{
|
{
|
||||||
coeffs_.read("fields", fieldNames_);
|
coeffs_.readEntry("fields", fieldNames_);
|
||||||
applied_.setSize(fieldNames_.size(), false);
|
applied_.setSize(fieldNames_.size(), false);
|
||||||
|
|
||||||
// Read coordinate system/geometry invariant properties
|
// Read coordinate system/geometry invariant properties
|
||||||
omega_ = rpmToRads(coeffs_.get<scalar>("rpm"));
|
omega_ = rpmToRads(coeffs_.get<scalar>("rpm"));
|
||||||
|
|
||||||
coeffs_.read("nBlades", nBlades_);
|
coeffs_.readEntry("nBlades", nBlades_);
|
||||||
|
|
||||||
inletFlow_ = inletFlowTypeNames_.lookup("inletFlowType", coeffs_);
|
inletFlow_ = inletFlowTypeNames_.lookup("inletFlowType", coeffs_);
|
||||||
|
|
||||||
coeffs_.read("tipEffect", tipEffect_);
|
coeffs_.readEntry("tipEffect", tipEffect_);
|
||||||
|
|
||||||
const dictionary& flapCoeffs(coeffs_.subDict("flapCoeffs"));
|
const dictionary& flapCoeffs(coeffs_.subDict("flapCoeffs"));
|
||||||
flap_.beta0 = degToRad(flapCoeffs.get<scalar>("beta0"));
|
flap_.beta0 = degToRad(flapCoeffs.get<scalar>("beta0"));
|
||||||
|
|||||||
@ -266,7 +266,7 @@ void Foam::lumpedPointMovement::readDict(const dictionary& dict)
|
|||||||
// assume the worst
|
// assume the worst
|
||||||
deleteDemandDrivenData(thresholdPtr_);
|
deleteDemandDrivenData(thresholdPtr_);
|
||||||
|
|
||||||
dict.read("axis", axis_);
|
dict.readEntry("axis", axis_);
|
||||||
|
|
||||||
division_ = 0;
|
division_ = 0;
|
||||||
if (dict.readIfPresent("division", division_))
|
if (dict.readIfPresent("division", division_))
|
||||||
@ -283,7 +283,7 @@ void Foam::lumpedPointMovement::readDict(const dictionary& dict)
|
|||||||
|
|
||||||
dict.readIfPresent("relax", relax_);
|
dict.readIfPresent("relax", relax_);
|
||||||
|
|
||||||
dict.read("locations", locations_);
|
dict.readEntry("locations", locations_);
|
||||||
|
|
||||||
if (dict.readIfPresent("interpolationScheme", interpolationScheme_))
|
if (dict.readIfPresent("interpolationScheme", interpolationScheme_))
|
||||||
{
|
{
|
||||||
@ -304,8 +304,8 @@ void Foam::lumpedPointMovement::readDict(const dictionary& dict)
|
|||||||
|
|
||||||
// TODO: calcFrequency_ = dict.lookupOrDefault("calcFrequency", 1);
|
// TODO: calcFrequency_ = dict.lookupOrDefault("calcFrequency", 1);
|
||||||
|
|
||||||
commDict.read("inputName", inputName_);
|
commDict.readEntry("inputName", inputName_);
|
||||||
commDict.read("outputName", outputName_);
|
commDict.readEntry("outputName", outputName_);
|
||||||
commDict.readIfPresent("logName", logName_);
|
commDict.readIfPresent("logName", logName_);
|
||||||
|
|
||||||
inputFormat_ = lumpedPointState::formatNames.lookup
|
inputFormat_ = lumpedPointState::formatNames.lookup
|
||||||
|
|||||||
@ -83,8 +83,8 @@ void Foam::lumpedPointState::calcRotations() const
|
|||||||
|
|
||||||
void Foam::lumpedPointState::readDict(const dictionary& dict)
|
void Foam::lumpedPointState::readDict(const dictionary& dict)
|
||||||
{
|
{
|
||||||
dict.read("points", points_);
|
dict.readEntry("points", points_);
|
||||||
dict.read("angles", angles_);
|
dict.readEntry("angles", angles_);
|
||||||
degrees_ = dict.lookupOrDefault("degrees", false);
|
degrees_ = dict.lookupOrDefault("degrees", false);
|
||||||
deleteDemandDrivenData(rotationPtr_);
|
deleteDemandDrivenData(rotationPtr_);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -195,7 +195,7 @@ Foam::searchableSurfaceCollection::searchableSurfaceCollection
|
|||||||
|
|
||||||
const dictionary& subDict = dict.subDict(instance_[surfI]);
|
const dictionary& subDict = dict.subDict(instance_[surfI]);
|
||||||
|
|
||||||
subDict.read("scale", scale_[surfI]);
|
subDict.readEntry("scale", scale_[surfI]);
|
||||||
transform_.set
|
transform_.set
|
||||||
(
|
(
|
||||||
surfI,
|
surfI,
|
||||||
|
|||||||
@ -90,11 +90,11 @@ Foam::boxToCell::boxToCell
|
|||||||
if (dict.found("box"))
|
if (dict.found("box"))
|
||||||
{
|
{
|
||||||
bbs_.resize(1);
|
bbs_.resize(1);
|
||||||
dict.read("box", bbs_.first());
|
dict.readEntry("box", bbs_.first());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
dict.read("boxes", bbs_);
|
dict.readEntry("boxes", bbs_);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -90,11 +90,11 @@ Foam::boxToFace::boxToFace
|
|||||||
if (dict.found("box"))
|
if (dict.found("box"))
|
||||||
{
|
{
|
||||||
bbs_.resize(1);
|
bbs_.resize(1);
|
||||||
dict.read("box", bbs_.first());
|
dict.readEntry("box", bbs_.first());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
dict.read("boxes", bbs_);
|
dict.readEntry("boxes", bbs_);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -90,11 +90,11 @@ Foam::boxToPoint::boxToPoint
|
|||||||
if (dict.found("box"))
|
if (dict.found("box"))
|
||||||
{
|
{
|
||||||
bbs_.resize(1);
|
bbs_.resize(1);
|
||||||
dict.read("box", bbs_.first());
|
dict.readEntry("box", bbs_.first());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
dict.read("boxes", bbs_);
|
dict.readEntry("boxes", bbs_);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -260,7 +260,7 @@ bool pointNoise::read(const dictionary& dict)
|
|||||||
inputFileNames_.resize(1);
|
inputFileNames_.resize(1);
|
||||||
|
|
||||||
// Note: lookup uses same keyword as used by the CSV constructor
|
// Note: lookup uses same keyword as used by the CSV constructor
|
||||||
dict.read("file", inputFileNames_.first());
|
dict.readEntry("file", inputFileNames_.first());
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@ -431,15 +431,16 @@ bool surfaceNoise::read(const dictionary& dict)
|
|||||||
if (!dict.readIfPresent("files", inputFileNames_))
|
if (!dict.readIfPresent("files", inputFileNames_))
|
||||||
{
|
{
|
||||||
inputFileNames_.resize(1);
|
inputFileNames_.resize(1);
|
||||||
dict.read("file", inputFileNames_.first());
|
dict.readEntry("file", inputFileNames_.first());
|
||||||
}
|
}
|
||||||
|
|
||||||
dict.readIfPresent("fftWriteInterval", fftWriteInterval_);
|
dict.readIfPresent("fftWriteInterval", fftWriteInterval_);
|
||||||
dict.readIfPresent("p", pName_);
|
dict.readIfPresent("p", pName_);
|
||||||
|
|
||||||
dict.read("reader", readerType_);
|
readerType_ = dict.get<word>("reader");
|
||||||
|
|
||||||
const word writerType(dict.get<word>("writer"));
|
const word writerType(dict.get<word>("writer"));
|
||||||
|
|
||||||
dictionary optDict
|
dictionary optDict
|
||||||
(
|
(
|
||||||
dict.subOrEmptyDict("writeOptions").subOrEmptyDict(writerType)
|
dict.subOrEmptyDict("writeOptions").subOrEmptyDict(writerType)
|
||||||
|
|||||||
@ -315,8 +315,8 @@ Foam::probes::probes
|
|||||||
|
|
||||||
bool Foam::probes::read(const dictionary& dict)
|
bool Foam::probes::read(const dictionary& dict)
|
||||||
{
|
{
|
||||||
dict.read("probeLocations", static_cast<pointField&>(*this));
|
dict.readEntry("probeLocations", static_cast<pointField&>(*this));
|
||||||
dict.read("fields", fieldSelection_);
|
dict.readEntry("fields", fieldSelection_);
|
||||||
|
|
||||||
dict.readIfPresent("fixedLocations", fixedLocations_);
|
dict.readIfPresent("fixedLocations", fixedLocations_);
|
||||||
if (dict.readIfPresent("interpolationScheme", interpolationScheme_))
|
if (dict.readIfPresent("interpolationScheme", interpolationScheme_))
|
||||||
|
|||||||
@ -226,11 +226,11 @@ bool Foam::sampledSets::read(const dictionary& dict)
|
|||||||
|
|
||||||
if (dict_.found("sets"))
|
if (dict_.found("sets"))
|
||||||
{
|
{
|
||||||
dict_.read("fields", fieldSelection_);
|
dict_.readEntry("fields", fieldSelection_);
|
||||||
clearFieldGroups();
|
clearFieldGroups();
|
||||||
|
|
||||||
dict.read("interpolationScheme", interpolationScheme_);
|
dict.readEntry("interpolationScheme", interpolationScheme_);
|
||||||
dict.read("setFormat", writeFormat_);
|
dict.readEntry("setFormat", writeFormat_);
|
||||||
|
|
||||||
PtrList<sampledSet> newList
|
PtrList<sampledSet> newList
|
||||||
(
|
(
|
||||||
|
|||||||
@ -493,7 +493,7 @@ Foam::sampledIsoSurface::sampledIsoSurface
|
|||||||
|
|
||||||
if (zoneID_.index() != -1)
|
if (zoneID_.index() != -1)
|
||||||
{
|
{
|
||||||
dict.read("exposedPatchName", exposedPatchName_);
|
dict.readEntry("exposedPatchName", exposedPatchName_);
|
||||||
|
|
||||||
if (mesh.boundaryMesh().findPatchID(exposedPatchName_) == -1)
|
if (mesh.boundaryMesh().findPatchID(exposedPatchName_) == -1)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -312,7 +312,7 @@ Foam::sampledCuttingPlane::sampledCuttingPlane
|
|||||||
{
|
{
|
||||||
if (zoneID_.index() != -1)
|
if (zoneID_.index() != -1)
|
||||||
{
|
{
|
||||||
dict.read("exposedPatchName", exposedPatchName_);
|
dict.readEntry("exposedPatchName", exposedPatchName_);
|
||||||
|
|
||||||
if (mesh.boundaryMesh().findPatchID(exposedPatchName_) == -1)
|
if (mesh.boundaryMesh().findPatchID(exposedPatchName_) == -1)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -259,9 +259,8 @@ bool Foam::sampledSurfaces::read(const dictionary& dict)
|
|||||||
{
|
{
|
||||||
sampleFaceScheme_ = dict.lookupOrDefault<word>("sampleScheme", "cell");
|
sampleFaceScheme_ = dict.lookupOrDefault<word>("sampleScheme", "cell");
|
||||||
|
|
||||||
dict.read("interpolationScheme", sampleNodeScheme_);
|
dict.readEntry("interpolationScheme", sampleNodeScheme_);
|
||||||
|
dict.readEntry("fields", fieldSelection_);
|
||||||
dict.read("fields", fieldSelection_);
|
|
||||||
|
|
||||||
const word writeType(dict.get<word>("surfaceFormat"));
|
const word writeType(dict.get<word>("surfaceFormat"));
|
||||||
|
|
||||||
|
|||||||
@ -159,7 +159,7 @@ void Foam::ensightSurfaceWriter::updateMesh
|
|||||||
IFstream is(baseDir/"fieldsDict");
|
IFstream is(baseDir/"fieldsDict");
|
||||||
if (is.good() && dict.read(is))
|
if (is.good() && dict.read(is))
|
||||||
{
|
{
|
||||||
dict.read(is);
|
// ... any futher actions
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -343,7 +343,7 @@ Foam::nastranSurfaceWriter::nastranSurfaceWriter(const dictionary& options)
|
|||||||
}
|
}
|
||||||
|
|
||||||
List<Pair<word>> fieldPairs;
|
List<Pair<word>> fieldPairs;
|
||||||
options.read("fields", fieldPairs);
|
options.readEntry("fields", fieldPairs);
|
||||||
|
|
||||||
for (const Pair<word>& item : fieldPairs)
|
for (const Pair<word>& item : fieldPairs)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -348,7 +348,7 @@ bool Foam::surfMeshSamplers::read(const dictionary& dict)
|
|||||||
{
|
{
|
||||||
sampleScheme_ = dict.lookupOrDefault<word>("sampleScheme", "cell");
|
sampleScheme_ = dict.lookupOrDefault<word>("sampleScheme", "cell");
|
||||||
|
|
||||||
dict.read("fields", fieldSelection_);
|
dict.readEntry("fields", fieldSelection_);
|
||||||
fieldSelection_.uniq();
|
fieldSelection_.uniq();
|
||||||
|
|
||||||
Info<< type() << " fields: " << flatOutput(fieldSelection_) << nl;
|
Info<< type() << " fields: " << flatOutput(fieldSelection_) << nl;
|
||||||
|
|||||||
@ -237,10 +237,10 @@ bool Foam::fv::multiphaseMangrovesSource::read(const dictionary& dict)
|
|||||||
<< exit(FatalError);
|
<< exit(FatalError);
|
||||||
}
|
}
|
||||||
|
|
||||||
modelDict.read("a", aZone_[i]);
|
modelDict.readEntry("a", aZone_[i]);
|
||||||
modelDict.read("N", NZone_[i]);
|
modelDict.readEntry("N", NZone_[i]);
|
||||||
modelDict.read("Cm", CmZone_[i]);
|
modelDict.readEntry("Cm", CmZone_[i]);
|
||||||
modelDict.read("Cd", CdZone_[i]);
|
modelDict.readEntry("Cd", CdZone_[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@ -231,7 +231,7 @@ bool Foam::fv::multiphaseMangrovesTurbulenceModel::read(const dictionary& dict)
|
|||||||
if (coeffs_.found("epsilon"))
|
if (coeffs_.found("epsilon"))
|
||||||
{
|
{
|
||||||
fieldNames_.resize(1);
|
fieldNames_.resize(1);
|
||||||
coeffs_.read("epsilon", fieldNames_.first());
|
coeffs_.readEntry("epsilon", fieldNames_.first());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -269,11 +269,11 @@ bool Foam::fv::multiphaseMangrovesTurbulenceModel::read(const dictionary& dict)
|
|||||||
<< exit(FatalError);
|
<< exit(FatalError);
|
||||||
}
|
}
|
||||||
|
|
||||||
modelDict.read("a", aZone_[i]);
|
modelDict.readEntry("a", aZone_[i]);
|
||||||
modelDict.read("N", NZone_[i]);
|
modelDict.readEntry("N", NZone_[i]);
|
||||||
modelDict.read("Ckp", CkpZone_[i]);
|
modelDict.readEntry("Ckp", CkpZone_[i]);
|
||||||
modelDict.read("Cep", CepZone_[i]);
|
modelDict.readEntry("Cep", CepZone_[i]);
|
||||||
modelDict.read("Cd", CdZone_[i]);
|
modelDict.readEntry("Cd", CdZone_[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@ -262,10 +262,10 @@ bool Foam::waveModels::irregularMultiDirectional::readDict
|
|||||||
{
|
{
|
||||||
if (irregularWaveModel::readDict(overrideDict))
|
if (irregularWaveModel::readDict(overrideDict))
|
||||||
{
|
{
|
||||||
dictionary::read("wavePeriods", irregWavePeriods_);
|
readEntry("wavePeriods", irregWavePeriods_);
|
||||||
dictionary::read("waveHeights", irregWaveHeights_);
|
readEntry("waveHeights", irregWaveHeights_);
|
||||||
dictionary::read("wavePhases", irregWavePhases_);
|
readEntry("wavePhases", irregWavePhases_);
|
||||||
dictionary::read("waveDirs", irregWaveDirs_);
|
readEntry("waveDirs", irregWaveDirs_);
|
||||||
|
|
||||||
irregWaveLengths_ = irregWaveHeights_;
|
irregWaveLengths_ = irregWaveHeights_;
|
||||||
|
|
||||||
|
|||||||
@ -223,10 +223,10 @@ bool Foam::waveModels::streamFunction::readDict(const dictionary& overrideDict)
|
|||||||
{
|
{
|
||||||
if (regularWaveModel::readDict(overrideDict))
|
if (regularWaveModel::readDict(overrideDict))
|
||||||
{
|
{
|
||||||
overrideDict.read("uMean", uMean_);
|
overrideDict.readEntry("uMean", uMean_);
|
||||||
overrideDict.read("waveLength", waveLength_);
|
overrideDict.readEntry("waveLength", waveLength_);
|
||||||
overrideDict.read("Bjs", Bjs_);
|
overrideDict.readEntry("Bjs", Bjs_);
|
||||||
overrideDict.read("Ejs", Ejs_);
|
overrideDict.readEntry("Ejs", Ejs_);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -51,7 +51,7 @@ Foam::autoPtr<Foam::waveModel> Foam::waveModel::New
|
|||||||
if (waveDict.found(patch.name()))
|
if (waveDict.found(patch.name()))
|
||||||
{
|
{
|
||||||
patchDict = waveDict.subDict(patch.name());
|
patchDict = waveDict.subDict(patch.name());
|
||||||
patchDict.read("waveModel", modelType);
|
modelType = patchDict.get<word>("waveModel");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
#-------------------------------*- makefile -*---------------------------------
|
#-------------------------------*- makefile -*---------------------------------
|
||||||
WM_VERSION = OPENFOAM=1806
|
WM_VERSION = OPENFOAM=1807
|
||||||
|
|
||||||
AR = ar
|
AR = ar
|
||||||
ARFLAGS = cr
|
ARFLAGS = cr
|
||||||
|
|||||||
Reference in New Issue
Block a user