mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
- instead of dict.lookup(name) >> val;
can use dict.readEntry(name, val);
for checking of input token sizes.
This helps catch certain types of input errors:
{
key1 ; // <- Missing value
key2 1234 // <- Missing ';' terminator
key3 val;
}
STYLE: readIfPresent() instead of 'if found ...' in a few more places.
This commit is contained in:
@ -104,7 +104,7 @@ bool Foam::XiGModels::basicSubGrid::read(const dictionary& XiGProperties)
|
||||
{
|
||||
XiGModel::read(XiGProperties);
|
||||
|
||||
XiGModelCoeffs_.lookup("k1") >> k1;
|
||||
XiGModelCoeffs_.readEntry("k1", k1);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -96,9 +96,9 @@ bool Foam::XiEqModels::Gulder::read(const dictionary& XiEqProperties)
|
||||
{
|
||||
XiEqModel::read(XiEqProperties);
|
||||
|
||||
XiEqModelCoeffs_.lookup("XiEqCoef") >> XiEqCoef_;
|
||||
XiEqModelCoeffs_.lookup("uPrimeCoef") >> uPrimeCoef_;
|
||||
XiEqModelCoeffs_.lookup("subGridSchelkin") >> subGridSchelkin_;
|
||||
XiEqModelCoeffs_.readEntry("XiEqCoef", XiEqCoef_);
|
||||
XiEqModelCoeffs_.readEntry("uPrimeCoef", uPrimeCoef_);
|
||||
XiEqModelCoeffs_.readEntry("subGridSchelkin", subGridSchelkin_);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -147,11 +147,11 @@ bool Foam::XiEqModels::SCOPEXiEq::read(const dictionary& XiEqProperties)
|
||||
{
|
||||
XiEqModel::read(XiEqProperties);
|
||||
|
||||
XiEqModelCoeffs_.lookup("XiEqCoef") >> XiEqCoef_;
|
||||
XiEqModelCoeffs_.lookup("XiEqExp") >> XiEqExp_;
|
||||
XiEqModelCoeffs_.lookup("lCoef") >> lCoef_;
|
||||
XiEqModelCoeffs_.lookup("uPrimeCoef") >> uPrimeCoef_;
|
||||
XiEqModelCoeffs_.lookup("subGridSchelkin") >> subGridSchelkin_;
|
||||
XiEqModelCoeffs_.readEntry("XiEqCoef", XiEqCoef_);
|
||||
XiEqModelCoeffs_.readEntry("XiEqExp", XiEqExp_);
|
||||
XiEqModelCoeffs_.readEntry("lCoef", lCoef_);
|
||||
XiEqModelCoeffs_.readEntry("uPrimeCoef", uPrimeCoef_);
|
||||
XiEqModelCoeffs_.readEntry("subGridSchelkin", subGridSchelkin_);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -73,7 +73,7 @@ bool Foam::XiEqModels::instability::read(const dictionary& XiEqProperties)
|
||||
{
|
||||
XiEqModel::read(XiEqProperties);
|
||||
|
||||
XiEqModelCoeffs_.lookup("XiEqIn") >> XiEqIn;
|
||||
XiEqModelCoeffs_.readEntry("XiEqIn", XiEqIn);
|
||||
|
||||
return XiEqModel_->read(XiEqModelCoeffs_);
|
||||
}
|
||||
|
||||
@ -76,7 +76,7 @@ bool Foam::XiGModels::KTS::read(const dictionary& XiGProperties)
|
||||
{
|
||||
XiGModel::read(XiGProperties);
|
||||
|
||||
XiGModelCoeffs_.lookup("GEtaCoef") >> GEtaCoef_;
|
||||
XiGModelCoeffs_.readEntry("GEtaCoef", GEtaCoef_);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -86,8 +86,8 @@ bool Foam::XiGModels::instabilityG::read(const dictionary& XiGProperties)
|
||||
{
|
||||
XiGModel::read(XiGProperties);
|
||||
|
||||
XiGModelCoeffs_.lookup("GIn") >> GIn_;
|
||||
XiGModelCoeffs_.lookup("lambdaIn") >> lambdaIn_;
|
||||
XiGModelCoeffs_.readEntry("GIn", GIn_);
|
||||
XiGModelCoeffs_.readEntry("lambdaIn", lambdaIn_);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -89,7 +89,7 @@ bool Foam::XiModels::algebraic::read(const dictionary& XiProperties)
|
||||
{
|
||||
XiModel::read(XiProperties);
|
||||
|
||||
XiModelCoeffs_.lookup("XiShapeCoef") >> XiShapeCoef;
|
||||
XiModelCoeffs_.readEntry("XiShapeCoef", XiShapeCoef);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -136,7 +136,7 @@ bool Foam::XiModels::transport::read(const dictionary& XiProperties)
|
||||
{
|
||||
XiModel::read(XiProperties);
|
||||
|
||||
XiModelCoeffs_.lookup("XiShapeCoef") >> XiShapeCoef;
|
||||
XiModelCoeffs_.readEntry("XiShapeCoef", XiShapeCoef);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -32,7 +32,7 @@ bool Foam::fv::VoFSolidificationMeltingSource::read(const dictionary& dict)
|
||||
if (cellSetOption::read(dict))
|
||||
{
|
||||
alphaSolidT_ = Function1<scalar>::New("alphaSolidT", coeffs_);
|
||||
coeffs_.lookup("L") >> L_;
|
||||
coeffs_.readEntry("L", L_);
|
||||
coeffs_.readIfPresent("relax", relax_);
|
||||
coeffs_.readIfPresent("Cu", Cu_);
|
||||
coeffs_.readIfPresent("q", q_);
|
||||
|
||||
@ -122,8 +122,8 @@ bool Foam::incompressibleTwoPhaseInteractingMixture::read()
|
||||
&& nucModel_().read(subDict(phase2Name_))
|
||||
)
|
||||
{
|
||||
muModel_->viscosityProperties().lookup("rho") >> rhod_;
|
||||
nucModel_->viscosityProperties().lookup("rho") >> rhoc_;
|
||||
muModel_->viscosityProperties().readEntry("rho", rhod_);
|
||||
nucModel_->viscosityProperties().readEntry("rho", rhoc_);
|
||||
|
||||
dd_ = dimensionedScalar
|
||||
(
|
||||
|
||||
@ -128,9 +128,9 @@ bool Foam::mixtureViscosityModels::BinghamPlastic::read
|
||||
{
|
||||
plastic::read(viscosityProperties);
|
||||
|
||||
plasticCoeffs_.lookup("yieldStressCoeff") >> yieldStressCoeff_;
|
||||
plasticCoeffs_.lookup("yieldStressExponent") >> yieldStressExponent_;
|
||||
plasticCoeffs_.lookup("yieldStressOffset") >> yieldStressOffset_;
|
||||
plasticCoeffs_.readEntry("yieldStressCoeff", yieldStressCoeff_);
|
||||
plasticCoeffs_.readEntry("yieldStressExponent", yieldStressExponent_);
|
||||
plasticCoeffs_.readEntry("yieldStressOffset", yieldStressOffset_);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -119,9 +119,9 @@ bool Foam::mixtureViscosityModels::plastic::read
|
||||
|
||||
plasticCoeffs_ = viscosityProperties.optionalSubDict(typeName + "Coeffs");
|
||||
|
||||
plasticCoeffs_.lookup("k") >> plasticViscosityCoeff_;
|
||||
plasticCoeffs_.lookup("n") >> plasticViscosityExponent_;
|
||||
plasticCoeffs_.lookup("muMax") >> muMax_;
|
||||
plasticCoeffs_.readEntry("k", plasticViscosityCoeff_);
|
||||
plasticCoeffs_.readEntry("n", plasticViscosityExponent_);
|
||||
plasticCoeffs_.readEntry("muMax", muMax_);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -271,7 +271,7 @@ void Foam::multiphaseSystem::solve()
|
||||
const dictionary& alphaControls = mesh.solverDict("alpha");
|
||||
label nAlphaSubCycles(readLabel(alphaControls.lookup("nAlphaSubCycles")));
|
||||
label nAlphaCorr(readLabel(alphaControls.lookup("nAlphaCorr")));
|
||||
mesh.solverDict("alpha").lookup("cAlphas") >> cAlphas_;
|
||||
mesh.solverDict("alpha").readEntry("cAlphas", cAlphas_);
|
||||
|
||||
// Reset ddtAlphaMax
|
||||
ddtAlphaMax_ = dimensionedScalar(dimless, Zero);
|
||||
|
||||
@ -158,8 +158,8 @@ bool Foam::temperaturePhaseChangeTwoPhaseMixtures::constant::read()
|
||||
{
|
||||
if (temperaturePhaseChangeTwoPhaseMixture::read())
|
||||
{
|
||||
subDict(type() + "Coeffs").lookup("coeffC") >> coeffC_;
|
||||
subDict(type() + "Coeffs").lookup("coeffE") >> coeffE_;
|
||||
subDict(type() + "Coeffs").readEntry("coeffC", coeffC_);
|
||||
subDict(type() + "Coeffs").readEntry("coeffE", coeffE_);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -109,17 +109,17 @@ bool Foam::thermoIncompressibleTwoPhaseMixture::read()
|
||||
{
|
||||
if (incompressibleTwoPhaseMixture::read())
|
||||
{
|
||||
subDict(phase1Name_).lookup("kappa") >> kappa1_;
|
||||
subDict(phase2Name_).lookup("kappa") >> kappa2_;
|
||||
subDict(phase1Name_).readEntry("kappa", kappa1_);
|
||||
subDict(phase2Name_).readEntry("kappa", kappa2_);
|
||||
|
||||
subDict(phase1Name_).lookup("Cp") >> Cp1_;
|
||||
subDict(phase2Name_).lookup("Cp") >> Cp2_;
|
||||
subDict(phase1Name_).readEntry("Cp", Cp1_);
|
||||
subDict(phase2Name_).readEntry("Cp", Cp2_);
|
||||
|
||||
subDict(phase1Name_).lookup("Cv") >> Cv1_;
|
||||
subDict(phase2Name_).lookup("Cv") >> Cv2_;
|
||||
subDict(phase1Name_).readEntry("Cv", Cv1_);
|
||||
subDict(phase2Name_).readEntry("Cv", Cv2_);
|
||||
|
||||
subDict(phase1Name_).lookup("hf") >> Hf1_;
|
||||
subDict(phase2Name_).lookup("hf") >> Hf2_;
|
||||
subDict(phase1Name_).readEntry("hf", Hf1_);
|
||||
subDict(phase2Name_).readEntry("hf", Hf2_);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -581,15 +581,13 @@ bool Foam::twoPhaseMixtureEThermo::read()
|
||||
{
|
||||
if (basicThermo::read() && thermoIncompressibleTwoPhaseMixture::read())
|
||||
{
|
||||
basicThermo::lookup("pDivU") >> pDivU_;
|
||||
basicThermo::lookup("TSat") >> TSat_;
|
||||
basicThermo::readEntry("pDivU", pDivU_);
|
||||
basicThermo::readEntry("TSat", TSat_);
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -231,9 +231,9 @@ bool Foam::incompressibleThreePhaseMixture::read()
|
||||
&& nuModel3_().read(*this)
|
||||
)
|
||||
{
|
||||
nuModel1_->viscosityProperties().lookup("rho") >> rho1_;
|
||||
nuModel2_->viscosityProperties().lookup("rho") >> rho2_;
|
||||
nuModel3_->viscosityProperties().lookup("rho") >> rho3_;
|
||||
nuModel1_->viscosityProperties().readEntry("rho", rho1_);
|
||||
nuModel2_->viscosityProperties().readEntry("rho", rho2_);
|
||||
nuModel3_->viscosityProperties().readEntry("rho", rho3_);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -104,10 +104,10 @@ bool Foam::phaseChangeTwoPhaseMixtures::Kunz::read()
|
||||
{
|
||||
phaseChangeTwoPhaseMixtureCoeffs_ = optionalSubDict(type() + "Coeffs");
|
||||
|
||||
phaseChangeTwoPhaseMixtureCoeffs_.lookup("UInf") >> UInf_;
|
||||
phaseChangeTwoPhaseMixtureCoeffs_.lookup("tInf") >> tInf_;
|
||||
phaseChangeTwoPhaseMixtureCoeffs_.lookup("Cc") >> Cc_;
|
||||
phaseChangeTwoPhaseMixtureCoeffs_.lookup("Cv") >> Cv_;
|
||||
phaseChangeTwoPhaseMixtureCoeffs_.readEntry("UInf", UInf_);
|
||||
phaseChangeTwoPhaseMixtureCoeffs_.readEntry("tInf", tInf_);
|
||||
phaseChangeTwoPhaseMixtureCoeffs_.readEntry("Cc", Cc_);
|
||||
phaseChangeTwoPhaseMixtureCoeffs_.readEntry("Cv", Cv_);
|
||||
|
||||
mcCoeff_ = Cc_*rho2()/tInf_;
|
||||
mvCoeff_ = Cv_*rho2()/(0.5*rho1()*sqr(UInf_)*tInf_);
|
||||
|
||||
@ -99,10 +99,10 @@ bool Foam::phaseChangeTwoPhaseMixtures::Merkle::read()
|
||||
{
|
||||
phaseChangeTwoPhaseMixtureCoeffs_ = optionalSubDict(type() + "Coeffs");
|
||||
|
||||
phaseChangeTwoPhaseMixtureCoeffs_.lookup("UInf") >> UInf_;
|
||||
phaseChangeTwoPhaseMixtureCoeffs_.lookup("tInf") >> tInf_;
|
||||
phaseChangeTwoPhaseMixtureCoeffs_.lookup("Cc") >> Cc_;
|
||||
phaseChangeTwoPhaseMixtureCoeffs_.lookup("Cv") >> Cv_;
|
||||
phaseChangeTwoPhaseMixtureCoeffs_.readEntry("UInf", UInf_);
|
||||
phaseChangeTwoPhaseMixtureCoeffs_.readEntry("tInf", tInf_);
|
||||
phaseChangeTwoPhaseMixtureCoeffs_.readEntry("Cc", Cc_);
|
||||
phaseChangeTwoPhaseMixtureCoeffs_.readEntry("Cv", Cv_);
|
||||
|
||||
mcCoeff_ = Cc_/(0.5*sqr(UInf_)*tInf_);
|
||||
mvCoeff_ = Cv_*rho1()/(0.5*sqr(UInf_)*tInf_*rho2());
|
||||
|
||||
@ -153,10 +153,10 @@ bool Foam::phaseChangeTwoPhaseMixtures::SchnerrSauer::read()
|
||||
{
|
||||
phaseChangeTwoPhaseMixtureCoeffs_ = optionalSubDict(type() + "Coeffs");
|
||||
|
||||
phaseChangeTwoPhaseMixtureCoeffs_.lookup("n") >> n_;
|
||||
phaseChangeTwoPhaseMixtureCoeffs_.lookup("dNuc") >> dNuc_;
|
||||
phaseChangeTwoPhaseMixtureCoeffs_.lookup("Cc") >> Cc_;
|
||||
phaseChangeTwoPhaseMixtureCoeffs_.lookup("Cv") >> Cv_;
|
||||
phaseChangeTwoPhaseMixtureCoeffs_.readEntry("n", n_);
|
||||
phaseChangeTwoPhaseMixtureCoeffs_.readEntry("dNuc", dNuc_);
|
||||
phaseChangeTwoPhaseMixtureCoeffs_.readEntry("Cc", Cc_);
|
||||
phaseChangeTwoPhaseMixtureCoeffs_.readEntry("Cv", Cv_);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -78,15 +78,13 @@ bool Foam::phaseChangeTwoPhaseMixture::read()
|
||||
if (incompressibleTwoPhaseMixture::read())
|
||||
{
|
||||
phaseChangeTwoPhaseMixtureCoeffs_ = optionalSubDict(type() + "Coeffs");
|
||||
lookup("pSat") >> pSat_;
|
||||
readEntry("pSat", pSat_);
|
||||
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -944,17 +944,15 @@ bool Foam::multiphaseSystem::read()
|
||||
readOK &= iter().read(phaseData[phasei++].dict());
|
||||
}
|
||||
|
||||
lookup("sigmas") >> sigmas_;
|
||||
lookup("interfaceCompression") >> cAlphas_;
|
||||
lookup("virtualMass") >> Cvms_;
|
||||
readEntry("sigmas", sigmas_);
|
||||
readEntry("interfaceCompression", cAlphas_);
|
||||
readEntry("virtualMass", Cvms_);
|
||||
|
||||
return readOK;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -222,10 +222,10 @@ bool Foam::phaseModel::read(const dictionary& phaseDict)
|
||||
|
||||
//if (nuModel_->read(phaseDict_))
|
||||
{
|
||||
phaseDict_.lookup("nu") >> nu_.value();
|
||||
phaseDict_.lookup("kappa") >> kappa_.value();
|
||||
phaseDict_.lookup("Cp") >> Cp_.value();
|
||||
phaseDict_.lookup("rho") >> rho_.value();
|
||||
phaseDict_.readEntry("nu", nu_.value());
|
||||
phaseDict_.readEntry("kappa", kappa_.value());
|
||||
phaseDict_.readEntry("Cp", Cp_.value());
|
||||
phaseDict_.readEntry("rho", rho_.value());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -701,15 +701,13 @@ bool Foam::multiphaseMixture::read()
|
||||
readOK &= iter().read(phaseData[phasei++].dict());
|
||||
}
|
||||
|
||||
lookup("sigmas") >> sigmas_;
|
||||
readEntry("sigmas", sigmas_);
|
||||
|
||||
return readOK;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -84,7 +84,7 @@ bool Foam::phase::read(const dictionary& phaseDict)
|
||||
|
||||
if (nuModel_->read(phaseDict_))
|
||||
{
|
||||
phaseDict_.lookup("rho") >> rho_;
|
||||
phaseDict_.readEntry("rho", rho_);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -88,7 +88,7 @@ bool Foam::diameterModels::constant::read(const dictionary& phaseProperties)
|
||||
{
|
||||
diameterModel::read(phaseProperties);
|
||||
|
||||
diameterProperties_.lookup("d") >> d_;
|
||||
diameterProperties_.readEntry("d", d_);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -81,8 +81,8 @@ bool Foam::diameterModels::isothermal::read(const dictionary& phaseProperties)
|
||||
{
|
||||
diameterModel::read(phaseProperties);
|
||||
|
||||
diameterProperties_.lookup("d0") >> d0_;
|
||||
diameterProperties_.lookup("p0") >> p0_;
|
||||
diameterProperties_.readEntry("d0", d0_);
|
||||
diameterProperties_.readEntry("p0", p0_);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -212,7 +212,7 @@ bool Foam::RASModels::kineticTheoryModel::read()
|
||||
>::read()
|
||||
)
|
||||
{
|
||||
coeffDict().lookup("equilibrium") >> equilibrium_;
|
||||
coeffDict().readEntry("equilibrium", equilibrium_);
|
||||
e_.readIfPresent(coeffDict());
|
||||
alphaMax_.readIfPresent(coeffDict());
|
||||
alphaMinFriction_.readIfPresent(coeffDict());
|
||||
|
||||
@ -94,9 +94,9 @@ bool Foam::RASModels::phasePressureModel::read()
|
||||
>::read()
|
||||
)
|
||||
{
|
||||
coeffDict().lookup("alphaMax") >> alphaMax_;
|
||||
coeffDict().lookup("preAlphaExp") >> preAlphaExp_;
|
||||
coeffDict().lookup("expMax") >> expMax_;
|
||||
coeffDict().readEntry("alphaMax", alphaMax_);
|
||||
coeffDict().readEntry("preAlphaExp", preAlphaExp_);
|
||||
coeffDict().readEntry("expMax", expMax_);
|
||||
g0_.readIfPresent(coeffDict());
|
||||
|
||||
return true;
|
||||
|
||||
@ -174,8 +174,8 @@ bool Foam::diameterModels::IATE::read(const dictionary& phaseProperties)
|
||||
{
|
||||
diameterModel::read(phaseProperties);
|
||||
|
||||
diameterProperties_.lookup("dMax") >> dMax_;
|
||||
diameterProperties_.lookup("dMin") >> dMin_;
|
||||
diameterProperties_.readEntry("dMax", dMax_);
|
||||
diameterProperties_.readEntry("dMin", dMin_);
|
||||
|
||||
// Re-create all the sources updating number, type and coefficients
|
||||
PtrList<IATEsource>
|
||||
|
||||
@ -212,7 +212,7 @@ bool Foam::RASModels::kineticTheoryModel::read()
|
||||
>::read()
|
||||
)
|
||||
{
|
||||
coeffDict().lookup("equilibrium") >> equilibrium_;
|
||||
coeffDict().readEntry("equilibrium", equilibrium_);
|
||||
e_.readIfPresent(coeffDict());
|
||||
alphaMax_.readIfPresent(coeffDict());
|
||||
alphaMinFriction_.readIfPresent(coeffDict());
|
||||
|
||||
@ -100,9 +100,9 @@ bool Foam::RASModels::phasePressureModel::read()
|
||||
>::read()
|
||||
)
|
||||
{
|
||||
coeffDict().lookup("alphaMax") >> alphaMax_;
|
||||
coeffDict().lookup("preAlphaExp") >> preAlphaExp_;
|
||||
coeffDict().lookup("expMax") >> expMax_;
|
||||
coeffDict().readEntry("alphaMax", alphaMax_);
|
||||
coeffDict().readEntry("preAlphaExp", preAlphaExp_);
|
||||
coeffDict().readEntry("expMax", expMax_);
|
||||
g0_.readIfPresent(coeffDict());
|
||||
|
||||
return true;
|
||||
|
||||
@ -184,8 +184,8 @@ bool Foam::diameterModels::IATE::read(const dictionary& phaseProperties)
|
||||
{
|
||||
diameterModel::read(phaseProperties);
|
||||
|
||||
diameterProperties_.lookup("dMax") >> dMax_;
|
||||
diameterProperties_.lookup("dMin") >> dMin_;
|
||||
diameterProperties_.readEntry("dMax", dMax_);
|
||||
diameterProperties_.readEntry("dMin", dMin_);
|
||||
|
||||
// Re-create all the sources updating number, type and coefficients
|
||||
PtrList<IATEsource>
|
||||
|
||||
@ -91,7 +91,7 @@ bool Foam::diameterModels::constant::read(const dictionary& phaseProperties)
|
||||
{
|
||||
diameterModel::read(phaseProperties);
|
||||
|
||||
diameterProperties_.lookup("d") >> d_;
|
||||
diameterProperties_.readEntry("d", d_);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -81,8 +81,8 @@ bool Foam::diameterModels::isothermal::read(const dictionary& phaseProperties)
|
||||
{
|
||||
diameterModel::read(phaseProperties);
|
||||
|
||||
diameterProperties_.lookup("d0") >> d0_;
|
||||
diameterProperties_.lookup("p0") >> p0_;
|
||||
diameterProperties_.readEntry("d0", d0_);
|
||||
diameterProperties_.readEntry("p0", p0_);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -362,7 +362,7 @@ int main(int argc, char *argv[])
|
||||
/"processor" + Foam::name(Pstream::myProcNo());
|
||||
}
|
||||
wordList sourcePatches;
|
||||
dict.lookup("sourcePatches") >> sourcePatches;
|
||||
dict.readEntry("sourcePatches", sourcePatches);
|
||||
|
||||
if (sourcePatches.size() == 1)
|
||||
{
|
||||
@ -581,7 +581,7 @@ int main(int argc, char *argv[])
|
||||
labelList exposedPatchID;
|
||||
if (mode == PATCH)
|
||||
{
|
||||
dict.lookup("exposedPatchName") >> backPatchName;
|
||||
dict.readEntry("exposedPatchName", backPatchName);
|
||||
exposedPatchID.setSize
|
||||
(
|
||||
extrudePatch.size(),
|
||||
|
||||
@ -1514,7 +1514,7 @@ int main(int argc, char *argv[])
|
||||
const bool hasZones = dict.found("faceZones");
|
||||
if (hasZones)
|
||||
{
|
||||
dict.lookup("faceZones") >> zoneNames;
|
||||
dict.readEntry("faceZones", zoneNames);
|
||||
dict.readIfPresent("faceZonesShadow", zoneShadowNames);
|
||||
|
||||
// Check
|
||||
@ -1528,7 +1528,7 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
else
|
||||
{
|
||||
dict.lookup("faceSets") >> zoneNames;
|
||||
dict.readEntry("faceSets", zoneNames);
|
||||
dict.readIfPresent("faceSetsShadow", zoneShadowNames);
|
||||
}
|
||||
|
||||
|
||||
@ -71,10 +71,9 @@ Foam::surfaceOffsetLinearDistance::surfaceOffsetLinearDistance
|
||||
totalDistance_(),
|
||||
totalDistanceSqr_()
|
||||
{
|
||||
if (coeffsDict().found("totalDistanceCoeff"))
|
||||
if (coeffsDict().readIfPresent("totalDistanceCoeff", totalDistance_))
|
||||
{
|
||||
totalDistance_ =
|
||||
coeffsDict().get<scalar>("totalDistanceCoeff") * defaultCellSize;
|
||||
totalDistance_ *= defaultCellSize;
|
||||
|
||||
if (coeffsDict().found("linearDistanceCoeff"))
|
||||
{
|
||||
@ -84,11 +83,10 @@ Foam::surfaceOffsetLinearDistance::surfaceOffsetLinearDistance
|
||||
<< nl << exit(FatalError) << endl;
|
||||
}
|
||||
}
|
||||
else if (coeffsDict().found("linearDistanceCoeff"))
|
||||
else if (coeffsDict().readIfPresent("linearDistanceCoeff", totalDistance_))
|
||||
{
|
||||
totalDistance_ =
|
||||
coeffsDict().get<scalar>("linearDistanceCoeff") * defaultCellSize
|
||||
+ surfaceOffset_;
|
||||
totalDistance_ *= defaultCellSize;
|
||||
totalDistance_ += surfaceOffset_;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -749,7 +749,7 @@ int main(int argc, char *argv[])
|
||||
<< endl;
|
||||
}
|
||||
|
||||
renumberDict.lookup("writeMaps") >> writeMaps;
|
||||
renumberDict.readEntry("writeMaps", writeMaps);
|
||||
if (writeMaps)
|
||||
{
|
||||
Info<< "Writing renumber maps (new to old) to polyMesh." << nl
|
||||
|
||||
@ -85,7 +85,7 @@ void Foam::helpTypes::helpSolver::execute
|
||||
}
|
||||
else if (args.found("read"))
|
||||
{
|
||||
mesh.time().controlDict().lookup("application") >> solver;
|
||||
mesh.time().controlDict().readEntry("application", solver);
|
||||
displayDoc(solver, ".*solvers/.*Foam/", true, "C");
|
||||
}
|
||||
else
|
||||
|
||||
@ -119,7 +119,7 @@ void Foam::helpType::displayDoc
|
||||
{
|
||||
const dictionary& docDict =
|
||||
debug::controlDict().subDict("Documentation");
|
||||
docDict.lookup("docBrowser") >> docBrowser;
|
||||
docDict.readEntry("docBrowser", docBrowser);
|
||||
}
|
||||
|
||||
doxygenXmlParser parser
|
||||
|
||||
@ -29,7 +29,7 @@
|
||||
io.readOpt() = IOobject::MUST_READ_IF_MODIFIED;
|
||||
IOdictionary timeObject(io);
|
||||
|
||||
timeObject.lookup("index") >> timeIndex;
|
||||
timeObject.readEntry("index", timeIndex);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -157,11 +157,11 @@ int main(int argc, char *argv[])
|
||||
functionObjects::fileFieldSelection fields(mesh);
|
||||
if (args.found("fields"))
|
||||
{
|
||||
args.lookup("fields")() >> fields;
|
||||
fields.insert(args.getList<wordRe>("fields"));
|
||||
}
|
||||
if (args.found("field"))
|
||||
{
|
||||
fields.insert(args.lookup("field")());
|
||||
fields.insert(args.opt<wordRe>("field"));
|
||||
}
|
||||
|
||||
// Externally stored dictionary for functionObjectList
|
||||
|
||||
@ -129,9 +129,9 @@ Foam::caseInfo::caseInfo(const Time& runTime, const word& regionName)
|
||||
forAll(conditionNames_, i)
|
||||
{
|
||||
const dictionary& dict = bcDict_.subDict(conditionNames_[i]);
|
||||
dict.lookup("category") >> patchCategories_[i];
|
||||
dict.lookup("type") >> patchTypes_[i];
|
||||
dict.lookup("patches") >> patchNames_[i];
|
||||
dict.readEntry("category", patchCategories_[i]);
|
||||
dict.readEntry("type", patchTypes_[i]);
|
||||
dict.readEntry("patches", patchNames_[i]);
|
||||
}
|
||||
|
||||
updateGeometricBoundaryField();
|
||||
|
||||
@ -217,7 +217,7 @@ void Foam::solverTemplate::setRegionProperties
|
||||
const word& fieldName = fieldNames_[regionI][i];
|
||||
const dictionary& dict = fieldDict.subDict(fieldName);
|
||||
|
||||
dict.lookup("type") >> fieldTypes_[regionI][i];
|
||||
dict.readEntry("type", fieldTypes_[regionI][i]);
|
||||
fieldDimensions_[regionI].set
|
||||
(
|
||||
i,
|
||||
|
||||
@ -361,8 +361,8 @@ int main(int argc, char *argv[])
|
||||
)
|
||||
);
|
||||
|
||||
mapFieldsDict.lookup("patchMap") >> patchMap;
|
||||
mapFieldsDict.lookup("cuttingPatches") >> cuttingPatches;
|
||||
mapFieldsDict.readEntry("patchMap", patchMap);
|
||||
mapFieldsDict.readEntry("cuttingPatches", cuttingPatches);
|
||||
}
|
||||
|
||||
if (parallelSource && !parallelTarget)
|
||||
|
||||
@ -313,8 +313,8 @@ int main(int argc, char *argv[])
|
||||
)
|
||||
);
|
||||
|
||||
mapFieldsDict.lookup("patchMap") >> patchMap;
|
||||
mapFieldsDict.lookup("cuttingPatches") >> cuttingPatches;
|
||||
mapFieldsDict.readEntry("patchMap", patchMap);
|
||||
mapFieldsDict.readEntry("cuttingPatches", cuttingPatches);
|
||||
}
|
||||
|
||||
#include "setTimeIndex.H"
|
||||
|
||||
@ -56,7 +56,7 @@ Foam::surfaceFeaturesExtraction::extractFromFile::extractFromFile
|
||||
const dictionary& coeffDict =
|
||||
dict.optionalSubDict("extractFromFileCoeffs");
|
||||
|
||||
coeffDict.lookup("featureEdgeFile") >> featureEdgeFile_;
|
||||
coeffDict.readEntry("featureEdgeFile", featureEdgeFile_);
|
||||
coeffDict.readIfPresent("geometricTestOnly", geometricTestOnly_);
|
||||
}
|
||||
|
||||
|
||||
@ -55,7 +55,7 @@ Foam::surfaceFeaturesExtraction::extractFromSurface::extractFromSurface
|
||||
const dictionary& coeffDict =
|
||||
dict.optionalSubDict("extractFromSurfaceCoeffs");
|
||||
|
||||
coeffDict.lookup("includedAngle") >> includedAngle_;
|
||||
coeffDict.readEntry("includedAngle", includedAngle_);
|
||||
coeffDict.readIfPresent("geometricTestOnly", geometricTestOnly_);
|
||||
}
|
||||
|
||||
|
||||
@ -51,8 +51,8 @@ Foam::functionObjects::FUNCTIONOBJECT::FUNCTIONOBJECT
|
||||
:
|
||||
fvMeshFunctionObject(name, runTime, dict),
|
||||
wordData_(dict.lookupOrDefault<word>("wordData", "defaultWord")),
|
||||
scalarData_(readScalar(dict.lookup("scalarData"))),
|
||||
labelData_(readLabel(dict.lookup("labelData")))
|
||||
scalarData_(dict.get<scalar>("scalarData")),
|
||||
labelData_(dict.get<label>("labelData"))
|
||||
{
|
||||
read(dict);
|
||||
}
|
||||
@ -69,8 +69,9 @@ Foam::functionObjects::FUNCTIONOBJECT::~FUNCTIONOBJECT()
|
||||
bool Foam::functionObjects::FUNCTIONOBJECT::read(const dictionary& dict)
|
||||
{
|
||||
dict.readIfPresent("wordData", wordData_);
|
||||
dict.lookup("scalarData") >> scalarData_;
|
||||
dict.lookup("labelData") >> labelData_;
|
||||
|
||||
dict.readEntry("scalarData", scalarData_);
|
||||
dict.readEntry("labelData", labelData_);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -55,15 +55,15 @@ void Foam::GeometricField<Type, PatchField, GeoMesh>::readFields
|
||||
|
||||
boundaryField_.readField(*this, dict.subDict("boundaryField"));
|
||||
|
||||
if (dict.found("referenceLevel"))
|
||||
{
|
||||
Type fieldAverage(pTraits<Type>(dict.lookup("referenceLevel")));
|
||||
Type refLevel;
|
||||
|
||||
Field<Type>::operator+=(fieldAverage);
|
||||
if (dict.readIfPresent("referenceLevel", refLevel))
|
||||
{
|
||||
Field<Type>::operator+=(refLevel);
|
||||
|
||||
forAll(boundaryField_, patchi)
|
||||
{
|
||||
boundaryField_[patchi] == boundaryField_[patchi] + fieldAverage;
|
||||
boundaryField_[patchi] == boundaryField_[patchi] + refLevel;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -85,7 +85,7 @@ bool Foam::UniformDimensionedField<Type>::readData(Istream& is)
|
||||
dictionary dict(is);
|
||||
scalar multiplier;
|
||||
this->dimensions().read(dict.lookup("dimensions"), multiplier);
|
||||
dict.lookup("value") >> this->value();
|
||||
dict.readEntry("value", this->value());
|
||||
this->value() *= multiplier;
|
||||
|
||||
return is.good();
|
||||
|
||||
@ -207,9 +207,9 @@ void Foam::interpolationLookUpTable<Type>::readTable
|
||||
)
|
||||
);
|
||||
|
||||
control.lookup("fields") >> entries_;
|
||||
control.lookup("output") >> output_;
|
||||
control.lookup("values") >> *this;
|
||||
control.readEntry("fields", entries_);
|
||||
control.readEntry("output", output_);
|
||||
control.readEntry("values", *this);
|
||||
|
||||
dimensionTable();
|
||||
|
||||
|
||||
@ -64,9 +64,9 @@ Foam::uniformInterpolationTable<Type>::uniformInterpolationTable
|
||||
{
|
||||
IOdictionary dict(io);
|
||||
|
||||
dict.lookup("data") >> *this;
|
||||
dict.lookup("x0") >> x0_;
|
||||
dict.lookup("dx") >> dx_;
|
||||
dict.readEntry("data", *this);
|
||||
dict.readEntry("x0", x0_);
|
||||
dict.readEntry("dx", dx_);
|
||||
dict.readIfPresent("log10", log10_);
|
||||
dict.readIfPresent("bound", bound_);
|
||||
}
|
||||
@ -107,7 +107,7 @@ Foam::uniformInterpolationTable<Type>::uniformInterpolationTable
|
||||
}
|
||||
else
|
||||
{
|
||||
dict.lookup("data") >> *this;
|
||||
dict.readEntry("data", *this);
|
||||
}
|
||||
|
||||
checkTable();
|
||||
|
||||
@ -34,10 +34,7 @@ inline void Foam::LduMatrix<Type, DType, LUType>::solver::readControl
|
||||
const word& controlName
|
||||
)
|
||||
{
|
||||
if (controlDict.found(controlName))
|
||||
{
|
||||
controlDict.lookup(controlName) >> control;
|
||||
}
|
||||
controlDict.readIfPresent(controlName, control);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -47,7 +47,7 @@ Foam::word Foam::lduMatrix::preconditioner::getName
|
||||
const entry& e = solverControls.lookupEntry("preconditioner", false, false);
|
||||
if (e.isDict())
|
||||
{
|
||||
e.dict().lookup("preconditioner") >> name;
|
||||
e.dict().readEntry("preconditioner", name);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -71,7 +71,7 @@ Foam::lduMatrix::preconditioner::New
|
||||
const entry& e = solverControls.lookupEntry("preconditioner", false, false);
|
||||
if (e.isDict())
|
||||
{
|
||||
e.dict().lookup("preconditioner") >> name;
|
||||
e.dict().readEntry("preconditioner", name);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -47,7 +47,7 @@ Foam::lduMatrix::smoother::getName
|
||||
const entry& e = solverControls.lookupEntry("smoother", false, false);
|
||||
if (e.isDict())
|
||||
{
|
||||
e.dict().lookup("smoother") >> name;
|
||||
e.dict().readEntry("smoother", name);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -74,7 +74,7 @@ Foam::autoPtr<Foam::lduMatrix::smoother> Foam::lduMatrix::smoother::New
|
||||
const entry& e = solverControls.lookupEntry("smoother", false, false);
|
||||
if (e.isDict())
|
||||
{
|
||||
e.dict().lookup("smoother") >> name;
|
||||
e.dict().readEntry("smoother", name);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -33,10 +33,10 @@ Foam::cellModel::cellModel(Istream& is)
|
||||
dictionaryEntry dict(dictionary::null, is);
|
||||
|
||||
name_ = dict.keyword();
|
||||
dict.lookup("index") >> index_;
|
||||
dict.lookup("numberOfPoints") >> nPoints_;
|
||||
dict.lookup("faces") >> faces_;
|
||||
dict.lookup("edges") >> edges_;
|
||||
dict.readEntry("index", index_);
|
||||
dict.readEntry("numberOfPoints", nPoints_);
|
||||
dict.readEntry("faces", faces_);
|
||||
dict.readEntry("edges", edges_);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -681,8 +681,8 @@ Foam::cyclicPolyPatch::cyclicPolyPatch
|
||||
{
|
||||
case ROTATIONAL:
|
||||
{
|
||||
dict.lookup("rotationAxis") >> rotationAxis_;
|
||||
dict.lookup("rotationCentre") >> rotationCentre_;
|
||||
dict.readEntry("rotationAxis", rotationAxis_);
|
||||
dict.readEntry("rotationCentre", rotationCentre_);
|
||||
|
||||
scalar magRot = mag(rotationAxis_);
|
||||
if (magRot < SMALL)
|
||||
@ -698,7 +698,7 @@ Foam::cyclicPolyPatch::cyclicPolyPatch
|
||||
}
|
||||
case TRANSLATIONAL:
|
||||
{
|
||||
dict.lookup("separationVector") >> separationVector_;
|
||||
dict.readEntry("separationVector", separationVector_);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
|
||||
@ -616,13 +616,13 @@ Foam::oldCyclicPolyPatch::oldCyclicPolyPatch
|
||||
{
|
||||
case ROTATIONAL:
|
||||
{
|
||||
dict.lookup("rotationAxis") >> rotationAxis_;
|
||||
dict.lookup("rotationCentre") >> rotationCentre_;
|
||||
dict.readEntry("rotationAxis", rotationAxis_);
|
||||
dict.readEntry("rotationCentre", rotationCentre_);
|
||||
break;
|
||||
}
|
||||
case TRANSLATIONAL:
|
||||
{
|
||||
dict.lookup("separationVector") >> separationVector_;
|
||||
dict.readEntry("separationVector", separationVector_);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
|
||||
@ -32,7 +32,7 @@ inline void Foam::demandDrivenEntry<Type>::initialise() const
|
||||
{
|
||||
if (!stored_)
|
||||
{
|
||||
dict_.lookup(keyword_) >> value_;
|
||||
dict_.readEntry(keyword_, value_);
|
||||
stored_ = true;
|
||||
}
|
||||
}
|
||||
|
||||
@ -37,7 +37,7 @@ Foam::Function1Types::TableFile<Type>::TableFile
|
||||
TableBase<Type>(entryName, dict),
|
||||
fName_("none")
|
||||
{
|
||||
dict.lookup("file") >> fName_;
|
||||
dict.readEntry("file", fName_);
|
||||
|
||||
fileName expandedFile(fName_);
|
||||
//IFstream is(expandedFile.expand());
|
||||
|
||||
@ -100,7 +100,7 @@ externalWallHeatFluxTemperatureFvPatchScalarField
|
||||
{
|
||||
case fixedPower:
|
||||
{
|
||||
dict.lookup("Q") >> Q_;
|
||||
dict.readEntry("Q", Q_);
|
||||
|
||||
break;
|
||||
}
|
||||
@ -115,10 +115,9 @@ externalWallHeatFluxTemperatureFvPatchScalarField
|
||||
h_ = scalarField("h", dict, p.size());
|
||||
Ta_ = Function1<scalar>::New("Ta", dict);
|
||||
|
||||
if (dict.found("thicknessLayers"))
|
||||
if (dict.readIfPresent("thicknessLayers", thicknessLayers_))
|
||||
{
|
||||
dict.lookup("thicknessLayers") >> thicknessLayers_;
|
||||
dict.lookup("kappaLayers") >> kappaLayers_;
|
||||
dict.readEntry("kappaLayers", kappaLayers_);
|
||||
|
||||
if (thicknessLayers_.size() != kappaLayers_.size())
|
||||
{
|
||||
|
||||
@ -101,10 +101,9 @@ turbulentTemperatureCoupledBaffleMixedFvPatchScalarField
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
if (dict.found("thicknessLayers"))
|
||||
if (dict.readIfPresent("thicknessLayers", thicknessLayers_))
|
||||
{
|
||||
dict.lookup("thicknessLayers") >> thicknessLayers_;
|
||||
dict.lookup("kappaLayers") >> kappaLayers_;
|
||||
dict.readEntry("kappaLayers", kappaLayers_);
|
||||
|
||||
if (thicknessLayers_.size() > 0)
|
||||
{
|
||||
|
||||
@ -111,10 +111,9 @@ turbulentTemperatureRadCoupledMixedFvPatchScalarField
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
if (dict.found("thicknessLayers"))
|
||||
if (dict.readIfPresent("thicknessLayers", thicknessLayers_))
|
||||
{
|
||||
dict.lookup("thicknessLayers") >> thicknessLayers_;
|
||||
dict.lookup("kappaLayers") >> kappaLayers_;
|
||||
dict.readEntry("kappaLayers", kappaLayers_);
|
||||
|
||||
if (thicknessLayers_.size() > 0)
|
||||
{
|
||||
|
||||
@ -180,7 +180,7 @@ bool Foam::LESModel<BasicTurbulenceModel>::read()
|
||||
if (BasicTurbulenceModel::read())
|
||||
{
|
||||
LESDict_ <<= this->subDict("LES");
|
||||
LESDict_.lookup("turbulence") >> turbulence_;
|
||||
LESDict_.readEntry("turbulence", turbulence_);
|
||||
|
||||
coeffDict_ <<= LESDict_.optionalSubDict(type() + "Coeffs");
|
||||
|
||||
|
||||
@ -178,7 +178,7 @@ void Foam::LESModels::smoothDelta::read(const dictionary& dict)
|
||||
const dictionary& coeffsDict(dict.optionalSubDict(type() + "Coeffs"));
|
||||
|
||||
geometricDelta_().read(coeffsDict);
|
||||
coeffsDict.lookup("maxDeltaRatio") >> maxDeltaRatio_;
|
||||
coeffsDict.readEntry("maxDeltaRatio", maxDeltaRatio_);
|
||||
calcDelta();
|
||||
}
|
||||
|
||||
|
||||
@ -121,7 +121,7 @@ Foam::anisotropicFilter::anisotropicFilter
|
||||
|
||||
void Foam::anisotropicFilter::read(const dictionary& bd)
|
||||
{
|
||||
bd.optionalSubDict(type() + "Coeffs").lookup("widthCoeff") >> widthCoeff_;
|
||||
bd.optionalSubDict(type() + "Coeffs").readEntry("widthCoeff", widthCoeff_);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -89,7 +89,7 @@ Foam::laplaceFilter::laplaceFilter(const fvMesh& mesh, const dictionary& bd)
|
||||
|
||||
void Foam::laplaceFilter::read(const dictionary& bd)
|
||||
{
|
||||
bd.optionalSubDict(type() + "Coeffs").lookup("widthCoeff") >> widthCoeff_;
|
||||
bd.optionalSubDict(type() + "Coeffs").readEntry("widthCoeff", widthCoeff_);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -170,7 +170,7 @@ bool Foam::RASModel<BasicTurbulenceModel>::read()
|
||||
if (BasicTurbulenceModel::read())
|
||||
{
|
||||
RASDict_ <<= this->subDict("RAS");
|
||||
RASDict_.lookup("turbulence") >> turbulence_;
|
||||
RASDict_.readEntry("turbulence", turbulence_);
|
||||
|
||||
coeffDict_ <<= RASDict_.optionalSubDict(type() + "Coeffs");
|
||||
|
||||
|
||||
@ -347,8 +347,8 @@ bool FSD<ReactionThermo, ThermoType>::read()
|
||||
{
|
||||
if (singleStepCombustion<ReactionThermo, ThermoType>::read())
|
||||
{
|
||||
this->coeffs().lookup("Cv") >> Cv_ ;
|
||||
this->coeffs().lookup("ftVarMin") >> ftVarMin_;
|
||||
this->coeffs().readEntry("Cv", Cv_);
|
||||
this->coeffs().readEntry("ftVarMin", ftVarMin_);
|
||||
reactionRateFlameArea_->read(this->coeffs());
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -127,10 +127,10 @@ Foam::tmp<Foam::volScalarField> Foam::consumptionSpeed::omega0Sigma
|
||||
|
||||
void Foam::consumptionSpeed::read(const dictionary& dict)
|
||||
{
|
||||
dict.lookup("omega0") >> omega0_ ;
|
||||
dict.lookup("eta") >> eta_ ;
|
||||
dict.lookup("sigmaExt") >> sigmaExt_;
|
||||
dict.lookup("omegaMin") >> omegaMin_;
|
||||
dict.readEntry("omega0", omega0_);
|
||||
dict.readEntry("eta", eta_);
|
||||
dict.readEntry("sigmaExt", sigmaExt_);
|
||||
dict.readEntry("omegaMin", omegaMin_);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -73,7 +73,7 @@ Foam::reactionRateFlameArea::~reactionRateFlameArea()
|
||||
|
||||
bool Foam::reactionRateFlameArea::read(const dictionary& dict)
|
||||
{
|
||||
dict.lookup("fuel") >> fuel_;
|
||||
dict.readEntry("fuel", fuel_);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -152,8 +152,8 @@ bool Foam::reactionRateFlameAreaModels::relaxation::read
|
||||
if (reactionRateFlameArea::read(dict))
|
||||
{
|
||||
coeffDict_ = dict.optionalSubDict(typeName + "Coeffs");
|
||||
coeffDict_.lookup("C") >> C_;
|
||||
coeffDict_.lookup("alpha") >> alpha_;
|
||||
coeffDict_.readEntry("C", C_);
|
||||
coeffDict_.readEntry("alpha", alpha_);
|
||||
correlation_.read
|
||||
(
|
||||
coeffDict_.subDict(fuel_)
|
||||
|
||||
@ -128,7 +128,7 @@ bool Foam::combustionModels::PaSR<ReactionThermo>::read()
|
||||
{
|
||||
if (laminar<ReactionThermo>::read())
|
||||
{
|
||||
this->coeffs().lookup("Cmix") >> Cmix_;
|
||||
this->coeffs().readEntry("Cmix", Cmix_);
|
||||
return true;
|
||||
}
|
||||
else
|
||||
|
||||
@ -99,15 +99,13 @@ bool Foam::combustionModel::read()
|
||||
{
|
||||
if (regIOobject::read())
|
||||
{
|
||||
this->lookup("active") >> active_;
|
||||
this->readEntry("active", active_);
|
||||
coeffs_ = optionalSubDict(modelType_ + "Coeffs");
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -46,7 +46,7 @@ Foam::autoPtr<CombustionModel> Foam::combustionModel::New
|
||||
word combModelName("none");
|
||||
if (combIO.typeHeaderOk<IOdictionary>(false))
|
||||
{
|
||||
IOdictionary(combIO).lookup("combustionModel") >> combModelName;
|
||||
IOdictionary(combIO).readEntry("combustionModel", combModelName);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -96,7 +96,7 @@ bool diffusion<ReactionThermo, ThermoType>::read()
|
||||
{
|
||||
if (singleStepCombustion<ReactionThermo, ThermoType>::read())
|
||||
{
|
||||
this->coeffs().lookup("C") >> C_ ;
|
||||
this->coeffs().readEntry("C", C_);
|
||||
this->coeffs().readIfPresent("oxidant", oxidantName_);
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -107,7 +107,7 @@ bool eddyDissipationDiffusionModel<ReactionThermo, ThermoType>::read()
|
||||
{
|
||||
if (eddyDissipationModelBase<ReactionThermo, ThermoType>::read())
|
||||
{
|
||||
this->coeffs().lookup("Cd") >> Cd_;
|
||||
this->coeffs().readEntry("Cd", Cd_);
|
||||
return true;
|
||||
}
|
||||
else
|
||||
|
||||
@ -116,7 +116,7 @@ bool eddyDissipationModelBase<ReactionThermo, ThermoType>::read()
|
||||
{
|
||||
if (singleStepCombustion<ReactionThermo, ThermoType>::read())
|
||||
{
|
||||
this->coeffs().lookup("CEDC") >> CEDC_;
|
||||
this->coeffs().readEntry("CEDC", CEDC_);
|
||||
return true;
|
||||
}
|
||||
else
|
||||
|
||||
@ -94,7 +94,7 @@ bool infinitelyFastChemistry<ReactionThermo, ThermoType>::read()
|
||||
{
|
||||
if (singleStepCombustion<ReactionThermo, ThermoType>::read())
|
||||
{
|
||||
this->coeffs().lookup("C") >> C_ ;
|
||||
this->coeffs().readEntry("C", C_);
|
||||
return true;
|
||||
}
|
||||
else
|
||||
|
||||
@ -90,16 +90,12 @@ void Foam::combustionModels::laminar<ReactionThermo>::correct()
|
||||
const scalarField& rDeltaT =
|
||||
fv::localEulerDdt::localRDeltaT(this->mesh());
|
||||
|
||||
if (this->coeffs().found("maxIntegrationTime"))
|
||||
scalar maxTime;
|
||||
if (this->coeffs().readIfPresent("maxIntegrationTime", maxTime))
|
||||
{
|
||||
scalar maxIntegrationTime
|
||||
(
|
||||
readScalar(this->coeffs().lookup("maxIntegrationTime"))
|
||||
);
|
||||
|
||||
this->chemistryPtr_->solve
|
||||
(
|
||||
min(1.0/rDeltaT, maxIntegrationTime)()
|
||||
min(1.0/rDeltaT, maxTime)()
|
||||
);
|
||||
}
|
||||
else
|
||||
|
||||
@ -117,8 +117,8 @@ extrudePatchMesh::extrudePatchMesh
|
||||
|
||||
forAll(dicts, patchi)
|
||||
{
|
||||
dicts[patchi].lookup("name") >> patchNames[patchi];
|
||||
dicts[patchi].lookup("type") >> patchTypes[patchi];
|
||||
dicts[patchi].readEntry("name", patchNames[patchi]);
|
||||
dicts[patchi].readEntry("type", patchTypes[patchi]);
|
||||
}
|
||||
|
||||
forAll(regionPatches, patchi)
|
||||
@ -273,8 +273,8 @@ void extrudePatchMesh::extrudeMesh(const List<polyPatch*>& regionPatches)
|
||||
|
||||
forAll(dicts, patchi)
|
||||
{
|
||||
dicts[patchi].lookup("name") >> patchNames[patchi];
|
||||
dicts[patchi].lookup("type") >> patchTypes[patchi];
|
||||
dicts[patchi].readEntry("name", patchNames[patchi]);
|
||||
dicts[patchi].readEntry("type", patchTypes[patchi]);
|
||||
}
|
||||
|
||||
forAll(regionPatches, patchi)
|
||||
|
||||
@ -103,17 +103,17 @@ bool Foam::solidBodyMotionFunctions::SDA::read(const dictionary& SBMFCoeffs)
|
||||
{
|
||||
solidBodyMotionFunction::read(SBMFCoeffs);
|
||||
|
||||
SBMFCoeffs_.lookup("CofG") >> CofG_;
|
||||
SBMFCoeffs_.lookup("lamda") >> lamda_;
|
||||
SBMFCoeffs_.lookup("rollAmax") >> rollAmax_;
|
||||
SBMFCoeffs_.lookup("rollAmin") >> rollAmin_;
|
||||
SBMFCoeffs_.lookup("heaveA") >> heaveA_;
|
||||
SBMFCoeffs_.lookup("swayA") >> swayA_;
|
||||
SBMFCoeffs_.lookup("Q") >> Q_;
|
||||
SBMFCoeffs_.lookup("Tp") >> Tp_;
|
||||
SBMFCoeffs_.lookup("Tpn") >> Tpn_;
|
||||
SBMFCoeffs_.lookup("dTi") >> dTi_;
|
||||
SBMFCoeffs_.lookup("dTp") >> dTp_;
|
||||
SBMFCoeffs_.readEntry("CofG", CofG_);
|
||||
SBMFCoeffs_.readEntry("lamda", lamda_);
|
||||
SBMFCoeffs_.readEntry("rollAmax", rollAmax_);
|
||||
SBMFCoeffs_.readEntry("rollAmin", rollAmin_);
|
||||
SBMFCoeffs_.readEntry("heaveA", heaveA_);
|
||||
SBMFCoeffs_.readEntry("swayA", swayA_);
|
||||
SBMFCoeffs_.readEntry("Q", Q_);
|
||||
SBMFCoeffs_.readEntry("Tp", Tp_);
|
||||
SBMFCoeffs_.readEntry("Tpn", Tpn_);
|
||||
SBMFCoeffs_.readEntry("dTi", dTi_);
|
||||
SBMFCoeffs_.readEntry("dTp", dTp_);
|
||||
|
||||
// Rescale parameters according to the given scale parameter
|
||||
if (lamda_ > 1 + SMALL)
|
||||
|
||||
@ -98,8 +98,8 @@ bool Foam::solidBodyMotionFunctions::axisRotationMotion::read
|
||||
{
|
||||
solidBodyMotionFunction::read(SBMFCoeffs);
|
||||
|
||||
SBMFCoeffs_.lookup("origin") >> origin_;
|
||||
SBMFCoeffs_.lookup("radialVelocity") >> radialVelocity_;
|
||||
SBMFCoeffs_.readEntry("origin", origin_);
|
||||
SBMFCoeffs_.readEntry("radialVelocity", radialVelocity_);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -89,7 +89,7 @@ bool Foam::solidBodyMotionFunctions::linearMotion::read
|
||||
{
|
||||
solidBodyMotionFunction::read(SBMFCoeffs);
|
||||
|
||||
SBMFCoeffs_.lookup("velocity") >> velocity_;
|
||||
SBMFCoeffs_.readEntry("velocity", velocity_);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -89,8 +89,8 @@ bool Foam::solidBodyMotionFunctions::oscillatingLinearMotion::read
|
||||
{
|
||||
solidBodyMotionFunction::read(SBMFCoeffs);
|
||||
|
||||
SBMFCoeffs_.lookup("amplitude") >> amplitude_;
|
||||
SBMFCoeffs_.lookup("omega") >> omega_;
|
||||
SBMFCoeffs_.readEntry("amplitude", amplitude_);
|
||||
SBMFCoeffs_.readEntry("omega", omega_);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -97,9 +97,9 @@ bool Foam::solidBodyMotionFunctions::oscillatingRotatingMotion::read
|
||||
{
|
||||
solidBodyMotionFunction::read(SBMFCoeffs);
|
||||
|
||||
SBMFCoeffs_.lookup("origin") >> origin_;
|
||||
SBMFCoeffs_.lookup("amplitude") >> amplitude_;
|
||||
SBMFCoeffs_.lookup("omega") >> omega_;
|
||||
SBMFCoeffs_.readEntry("origin", origin_);
|
||||
SBMFCoeffs_.readEntry("amplitude", amplitude_);
|
||||
SBMFCoeffs_.readEntry("omega", omega_);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -157,7 +157,7 @@ bool Foam::solidBodyMotionFunctions::tabulated6DoFMotion::read
|
||||
}
|
||||
}
|
||||
|
||||
SBMFCoeffs_.lookup("CofG") >> CofG_;
|
||||
SBMFCoeffs_.readEntry("CofG", CofG_);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -87,10 +87,7 @@ Foam::inletOutletFaPatchField<Type>::inletOutletFaPatchField
|
||||
this->refGrad() = pTraits<Type>::zero;
|
||||
this->valueFraction() = 0.0;
|
||||
|
||||
if (dict.found("phi"))
|
||||
{
|
||||
dict.lookup("phi") >> phiName_;
|
||||
}
|
||||
dict.readIfPresent("phi", phiName_);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -257,7 +257,7 @@ Foam::MRFZone::MRFZone
|
||||
{
|
||||
if (cellZoneName_ == word::null)
|
||||
{
|
||||
coeffs_.lookup("cellZone") >> cellZoneName_;
|
||||
coeffs_.readEntry("cellZone", cellZoneName_);
|
||||
}
|
||||
|
||||
if (!active_)
|
||||
@ -593,7 +593,7 @@ bool Foam::MRFZone::read(const dictionary& dict)
|
||||
coeffs_ = dict;
|
||||
|
||||
active_ = coeffs_.lookupOrDefault("active", true);
|
||||
coeffs_.lookup("cellZone") >> cellZoneName_;
|
||||
coeffs_.readEntry("cellZone", cellZoneName_);
|
||||
cellZoneID_ = mesh_.cellZones().findZoneID(cellZoneName_);
|
||||
|
||||
return true;
|
||||
|
||||
@ -150,7 +150,7 @@ bool Foam::externalFileCoupler::readDict(const dictionary& dict)
|
||||
// if things have already been initialized
|
||||
if (!initialized())
|
||||
{
|
||||
dict.lookup("commsDir") >> commsDir_;
|
||||
dict.readEntry("commsDir", commsDir_);
|
||||
commsDir_.expand();
|
||||
commsDir_.clean();
|
||||
slaveFirst_ = dict.lookupOrDefault("initByExternal", false);
|
||||
|
||||
@ -216,7 +216,7 @@ void Foam::porosityModels::fixedCoeff::correct
|
||||
scalar rho = 1.0;
|
||||
if (UEqn.dimensions() == dimForce)
|
||||
{
|
||||
coeffs_.lookup("rhoRef") >> rho;
|
||||
coeffs_.readEntry("rhoRef", rho);
|
||||
}
|
||||
|
||||
apply(Udiag, Usource, V, U, rho);
|
||||
@ -238,7 +238,7 @@ void Foam::porosityModels::fixedCoeff::correct
|
||||
scalar rho = 1.0;
|
||||
if (UEqn.dimensions() == dimForce)
|
||||
{
|
||||
coeffs_.lookup("rhoRef") >> rho;
|
||||
coeffs_.readEntry("rhoRef", rho);
|
||||
}
|
||||
|
||||
apply(Udiag, Usource, V, U, rho);
|
||||
@ -256,7 +256,7 @@ void Foam::porosityModels::fixedCoeff::correct
|
||||
scalar rho = 1.0;
|
||||
if (UEqn.dimensions() == dimForce)
|
||||
{
|
||||
coeffs_.lookup("rhoRef") >> rho;
|
||||
coeffs_.readEntry("rhoRef", rho);
|
||||
}
|
||||
|
||||
apply(AU, U, rho);
|
||||
|
||||
@ -106,7 +106,7 @@ Foam::porosityModel::porosityModel
|
||||
if (zoneName_ == word::null)
|
||||
{
|
||||
dict.readIfPresent("active", active_);
|
||||
dict_.lookup("cellZone") >> zoneName_;
|
||||
dict_.readEntry("cellZone", zoneName_);
|
||||
}
|
||||
|
||||
cellZoneIDs_ = mesh_.cellZones().indices(zoneName_);
|
||||
|
||||
@ -120,10 +120,7 @@ activePressureForceBaffleVelocityFvPatchVectorField
|
||||
).neighbFvPatch().Sf();
|
||||
}
|
||||
|
||||
if (dict.found("p"))
|
||||
{
|
||||
dict.lookup("p") >> pName_;
|
||||
}
|
||||
dict.readIfPresent("p", pName_);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -103,7 +103,7 @@ Foam::advectiveFvPatchField<Type>::advectiveFvPatchField
|
||||
|
||||
if (dict.readIfPresent("lInf", lInf_))
|
||||
{
|
||||
dict.lookup("fieldInf") >> fieldInf_;
|
||||
dict.readEntry("fieldInf", fieldInf_);
|
||||
|
||||
if (lInf_ < 0.0)
|
||||
{
|
||||
|
||||
@ -74,8 +74,8 @@ Foam::fanFvPatchField<Type>::fanFvPatchField
|
||||
{
|
||||
if (nonDimensional_)
|
||||
{
|
||||
dict.lookup("rpm") >> rpm_;
|
||||
dict.lookup("dm") >> dm_;
|
||||
dict.readEntry("rpm", rpm_);
|
||||
dict.readEntry("dm", dm_);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -91,8 +91,8 @@ Foam::fanPressureFvPatchScalarField::fanPressureFvPatchScalarField
|
||||
{
|
||||
if (nonDimensional_)
|
||||
{
|
||||
dict.lookup("rpm") >> rpm_;
|
||||
dict.lookup("dm") >> dm_;
|
||||
dict.readEntry("rpm", rpm_);
|
||||
dict.readEntry("dm", dm_);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -87,11 +87,7 @@ Foam::plenumPressureFvPatchScalarField::plenumPressureFvPatchScalarField
|
||||
phiName_(dict.lookupOrDefault<word>("phi", "phi")),
|
||||
UName_(dict.lookupOrDefault<word>("U", "U"))
|
||||
{
|
||||
if (dict.found("rho"))
|
||||
{
|
||||
rho_ = readScalar(dict.lookup("rho"));
|
||||
hasRho_ = true;
|
||||
}
|
||||
hasRho_ = dict.readIfPresent("rho", rho_);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -50,7 +50,7 @@ Foam::functionObjects::fieldSelection::~fieldSelection()
|
||||
|
||||
bool Foam::functionObjects::fieldSelection::read(const dictionary& dict)
|
||||
{
|
||||
dict.lookup("fields") >> *this;
|
||||
dict.readEntry("fields", *this);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user