diff --git a/applications/solvers/combustion/PDRFoam/PDRModels/XiGModels/basicXiSubG/basicXiSubG.C b/applications/solvers/combustion/PDRFoam/PDRModels/XiGModels/basicXiSubG/basicXiSubG.C index 04d3b6a5a494a5c7f7620a99102d832b5ada33f8..3da7d1af933afe90c7e1736dbaa16482b203030e 100644 --- a/applications/solvers/combustion/PDRFoam/PDRModels/XiGModels/basicXiSubG/basicXiSubG.C +++ b/applications/solvers/combustion/PDRFoam/PDRModels/XiGModels/basicXiSubG/basicXiSubG.C @@ -49,7 +49,7 @@ Foam::XiGModels::basicSubGrid::basicSubGrid ) : XiGModel(XiGProperties, thermo, turbulence, Su), - k1(readScalar(XiGModelCoeffs_.lookup("k1"))), + k1(XiGModelCoeffs_.get<scalar>("k1")), XiGModel_(XiGModel::New(XiGModelCoeffs_, thermo, turbulence, Su)) {} diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/Gulder/Gulder.C b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/Gulder/Gulder.C index acbe023e0c697f6840364bd4b473b0f8273f742e..56ff3ed5effba75ffec51a115c8b9ccba79bcee5 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/Gulder/Gulder.C +++ b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/Gulder/Gulder.C @@ -49,13 +49,10 @@ Foam::XiEqModels::Gulder::Gulder ) : XiEqModel(XiEqProperties, thermo, turbulence, Su), - XiEqCoef_(readScalar(XiEqModelCoeffs_.lookup("XiEqCoef"))), + XiEqCoef_(XiEqModelCoeffs_.get<scalar>("XiEqCoef")), SuMin_(0.01*Su.average()), - uPrimeCoef_(readScalar(XiEqModelCoeffs_.lookup("uPrimeCoef"))), - subGridSchelkin_ - ( - readBool(XiEqModelCoeffs_.lookup("subGridSchelkin")) - ) + uPrimeCoef_(XiEqModelCoeffs_.get<scalar>("uPrimeCoef")), + subGridSchelkin_(XiEqModelCoeffs_.get<bool>("subGridSchelkin")) {} diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/SCOPEXiEq/SCOPEXiEq.C b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/SCOPEXiEq/SCOPEXiEq.C index 59758b889e9e6dc760b9257c9b0cd2dd36f3a3ca..47e03c65ecdbccb207d526d31132b475df795092 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/SCOPEXiEq/SCOPEXiEq.C +++ b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/SCOPEXiEq/SCOPEXiEq.C @@ -49,15 +49,12 @@ Foam::XiEqModels::SCOPEXiEq::SCOPEXiEq ) : XiEqModel(XiEqProperties, thermo, turbulence, Su), - XiEqCoef_(readScalar(XiEqModelCoeffs_.lookup("XiEqCoef"))), - XiEqExp_(readScalar(XiEqModelCoeffs_.lookup("XiEqExp"))), - lCoef_(readScalar(XiEqModelCoeffs_.lookup("lCoef"))), + XiEqCoef_(XiEqModelCoeffs_.get<scalar>("XiEqCoef")), + XiEqExp_(XiEqModelCoeffs_.get<scalar>("XiEqExp")), + lCoef_(XiEqModelCoeffs_.get<scalar>("lCoef")), SuMin_(0.01*Su.average()), - uPrimeCoef_(readScalar(XiEqModelCoeffs_.lookup("uPrimeCoef"))), - subGridSchelkin_ - ( - readBool(XiEqModelCoeffs_.lookup("subGridSchelkin")) - ), + uPrimeCoef_(XiEqModelCoeffs_.get<scalar>("uPrimeCoef")), + subGridSchelkin_(XiEqModelCoeffs_.get<bool>("subGridSchelkin")), MaModel ( Su.mesh().lookupObject<IOdictionary>("combustionProperties"), diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/instabilityXiEq/instabilityXiEq.C b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/instabilityXiEq/instabilityXiEq.C index 39651e983c9b8f6eb34f655abc6ed9682a1124a4..15ee61375cee623454c1bc78fba929b26b3b673a 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/instabilityXiEq/instabilityXiEq.C +++ b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/instabilityXiEq/instabilityXiEq.C @@ -49,7 +49,7 @@ Foam::XiEqModels::instability::instability ) : XiEqModel(XiEqProperties, thermo, turbulence, Su), - XiEqIn(readScalar(XiEqModelCoeffs_.lookup("XiEqIn"))), + XiEqIn(XiEqModelCoeffs_.get<scalar>("XiEqIn")), XiEqModel_(XiEqModel::New(XiEqModelCoeffs_, thermo, turbulence, Su)) {} diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/KTS/KTS.C b/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/KTS/KTS.C index 5750278f32d8aa714576f058622f883f99e25748..58183d1bb4a3ac8c700f09be2aedd715fd2590ea 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/KTS/KTS.C +++ b/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/KTS/KTS.C @@ -49,7 +49,7 @@ Foam::XiGModels::KTS::KTS ) : XiGModel(XiGProperties, thermo, turbulence, Su), - GEtaCoef_(readScalar(XiGModelCoeffs_.lookup("GEtaCoef"))) + GEtaCoef_(XiGModelCoeffs_.get<scalar>("GEtaCoef")) {} diff --git a/applications/solvers/combustion/PDRFoam/XiModels/algebraic/algebraic.C b/applications/solvers/combustion/PDRFoam/XiModels/algebraic/algebraic.C index 7908a578b565f07d894d8a15eef9b95f6c81eee3..f5750ce936cf64219b2b3f7717f19305010b0f98 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/algebraic/algebraic.C +++ b/applications/solvers/combustion/PDRFoam/XiModels/algebraic/algebraic.C @@ -52,7 +52,7 @@ Foam::XiModels::algebraic::algebraic ) : XiModel(XiProperties, thermo, turbulence, Su, rho, b, phi), - XiShapeCoef(readScalar(XiModelCoeffs_.lookup("XiShapeCoef"))), + XiShapeCoef(XiModelCoeffs_.get<scalar>("XiShapeCoef")), XiEqModel_(XiEqModel::New(XiProperties, thermo, turbulence, Su)), XiGModel_(XiGModel::New(XiProperties, thermo, turbulence, Su)) {} diff --git a/applications/solvers/combustion/PDRFoam/XiModels/transport/transport.C b/applications/solvers/combustion/PDRFoam/XiModels/transport/transport.C index b23c057a6a2189b5ea403bf98816803f5e92b736..e243b44d9fcf6d727fb64b5ccabaa710e03c6781 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/transport/transport.C +++ b/applications/solvers/combustion/PDRFoam/XiModels/transport/transport.C @@ -57,7 +57,7 @@ Foam::XiModels::transport::transport ) : XiModel(XiProperties, thermo, turbulence, Su, rho, b, phi), - XiShapeCoef(readScalar(XiModelCoeffs_.lookup("XiShapeCoef"))), + XiShapeCoef(XiModelCoeffs_.get<scalar>("XiShapeCoef")), XiEqModel_(XiEqModel::New(XiProperties, thermo, turbulence, Su)), XiGModel_(XiGModel::New(XiProperties, thermo, turbulence, Su)) {} diff --git a/applications/solvers/combustion/PDRFoam/laminarFlameSpeed/SCOPE/SCOPELaminarFlameSpeed.C b/applications/solvers/combustion/PDRFoam/laminarFlameSpeed/SCOPE/SCOPELaminarFlameSpeed.C index a6987d2ea09bf190513c7d1fdc4b021fb4f99d87..979828413806640335c8e998f84e27f8be39bd77 100644 --- a/applications/solvers/combustion/PDRFoam/laminarFlameSpeed/SCOPE/SCOPELaminarFlameSpeed.C +++ b/applications/solvers/combustion/PDRFoam/laminarFlameSpeed/SCOPE/SCOPELaminarFlameSpeed.C @@ -53,8 +53,8 @@ Foam::laminarFlameSpeedModels::SCOPE::polynomial::polynomial ) : FixedList<scalar, 7>(polyDict.lookup("coefficients")), - ll(readScalar(polyDict.lookup("lowerLimit"))), - ul(readScalar(polyDict.lookup("upperLimit"))), + ll(polyDict.get<scalar>("lowerLimit")), + ul(polyDict.get<scalar>("upperLimit")), llv(polyPhi(ll, *this)), ulv(polyPhi(ul, *this)), lu(0) @@ -75,39 +75,30 @@ Foam::laminarFlameSpeedModels::SCOPE::SCOPE ( IFstream ( - fileName - ( - dict.lookup("fuelFile") - ) + dict.get<fileName>("fuelFile") )() ).optionalSubDict(typeName + "Coeffs") ), LFL_ ( - readScalar + coeffsDict_.getCompat<scalar> ( - coeffsDict_.lookupCompat - ( - "lowerFlammabilityLimit", - {{"lowerFlamabilityLimit", 1712}} - ) + "lowerFlammabilityLimit", + {{"lowerFlamabilityLimit", 1712}} ) ), UFL_ ( - readScalar + coeffsDict_.getCompat<scalar> ( - coeffsDict_.lookupCompat - ( - "upperFlammabilityLimit", - {{"upperFlamabilityLimit", 1712}} - ) + "upperFlammabilityLimit", + {{"upperFlamabilityLimit", 1712}} ) ), SuPolyL_(coeffsDict_.subDict("lowerSuPolynomial")), SuPolyU_(coeffsDict_.subDict("upperSuPolynomial")), - Texp_(readScalar(coeffsDict_.lookup("Texp"))), - pexp_(readScalar(coeffsDict_.lookup("pexp"))), + Texp_(coeffsDict_.get<scalar>("Texp")), + pexp_(coeffsDict_.get<scalar>("pexp")), MaPolyL_(coeffsDict_.subDict("lowerMaPolynomial")), MaPolyU_(coeffsDict_.subDict("upperMaPolynomial")) { diff --git a/applications/solvers/combustion/chemFoam/createFields.H b/applications/solvers/combustion/chemFoam/createFields.H index 34fcf682904f46d4accd0512786c704edacd7408..7cc28d45623a0c8cc5ae1435de96967aae797556 100644 --- a/applications/solvers/combustion/chemFoam/createFields.H +++ b/applications/solvers/combustion/chemFoam/createFields.H @@ -18,8 +18,8 @@ ) ); - scalar p0 = readScalar(initialConditions.lookup("p")); - scalar T0 = readScalar(initialConditions.lookup("T")); + scalar p0 = initialConditions.get<scalar>("p"); + scalar T0 = initialConditions.get<scalar>("T"); #include "createBaseFields.H" diff --git a/applications/solvers/combustion/chemFoam/readInitialConditions.H b/applications/solvers/combustion/chemFoam/readInitialConditions.H index 8e340a7e164f73ac2799edc2fff7a77e69a9154b..c321fcbf3bf56d074a4d6919c24b8a901cf527a7 100644 --- a/applications/solvers/combustion/chemFoam/readInitialConditions.H +++ b/applications/solvers/combustion/chemFoam/readInitialConditions.H @@ -40,7 +40,7 @@ const word& name = Y[i].name(); if (fractions.found(name)) { - X0[i] = readScalar(fractions.lookup(name)); + X0[i] = fractions.get<scalar>(name); } } @@ -64,7 +64,7 @@ const word& name = Y[i].name(); if (fractions.found(name)) { - Y0[i] = readScalar(fractions.lookup(name)); + Y0[i] = fractions.get<scalar>(name); } } diff --git a/applications/solvers/combustion/reactingFoam/setRDeltaT.H b/applications/solvers/combustion/reactingFoam/setRDeltaT.H index 2f028e45d28142941e0a05051b482325409797d0..3b8a3ae96fd50601c61727bfc8bfaacf0c032bfb 100644 --- a/applications/solvers/combustion/reactingFoam/setRDeltaT.H +++ b/applications/solvers/combustion/reactingFoam/setRDeltaT.H @@ -29,7 +29,7 @@ License const dictionary& pimpleDict = pimple.dict(); // Maximum flow Courant number - scalar maxCo(readScalar(pimpleDict.lookup("maxCo"))); + scalar maxCo(pimpleDict.get<scalar>("maxCo")); // Maximum time scale scalar maxDeltaT(pimpleDict.lookupOrDefault<scalar>("maxDeltaT", GREAT)); @@ -118,7 +118,7 @@ License if (Yref.found(Yi.name())) { foundY = true; - scalar Yrefi = readScalar(Yref.lookup(Yi.name())); + const scalar Yrefi = Yref.get<scalar>(Yi.name()); rDeltaTY.field() = max ( diff --git a/applications/solvers/compressible/rhoCentralFoam/BCs/T/smoluchowskiJumpTFvPatchScalarField.C b/applications/solvers/compressible/rhoCentralFoam/BCs/T/smoluchowskiJumpTFvPatchScalarField.C index 0590e8d09801cefdd24746db7bb24b3fc447110d..4e12e668e247eb4965de7b0be68e1d9c34ea1af2 100644 --- a/applications/solvers/compressible/rhoCentralFoam/BCs/T/smoluchowskiJumpTFvPatchScalarField.C +++ b/applications/solvers/compressible/rhoCentralFoam/BCs/T/smoluchowskiJumpTFvPatchScalarField.C @@ -84,7 +84,7 @@ Foam::smoluchowskiJumpTFvPatchScalarField::smoluchowskiJumpTFvPatchScalarField rhoName_(dict.lookupOrDefault<word>("rho", "rho")), psiName_(dict.lookupOrDefault<word>("psi", "thermo:psi")), muName_(dict.lookupOrDefault<word>("mu", "thermo:mu")), - accommodationCoeff_(readScalar(dict.lookup("accommodationCoeff"))), + accommodationCoeff_(dict.get<scalar>("accommodationCoeff")), Twall_("Twall", dict, p.size()), gamma_(dict.lookupOrDefault<scalar>("gamma", 1.4)) { diff --git a/applications/solvers/compressible/rhoCentralFoam/BCs/U/maxwellSlipUFvPatchVectorField.C b/applications/solvers/compressible/rhoCentralFoam/BCs/U/maxwellSlipUFvPatchVectorField.C index defbf3fe22e3bafc299a1657eb37b032fde72d70..aa6e13648b83eeab17532a9f19836e74288f5bb6 100644 --- a/applications/solvers/compressible/rhoCentralFoam/BCs/U/maxwellSlipUFvPatchVectorField.C +++ b/applications/solvers/compressible/rhoCentralFoam/BCs/U/maxwellSlipUFvPatchVectorField.C @@ -85,7 +85,7 @@ Foam::maxwellSlipUFvPatchVectorField::maxwellSlipUFvPatchVectorField psiName_(dict.lookupOrDefault<word>("psi", "thermo:psi")), muName_(dict.lookupOrDefault<word>("mu", "thermo:mu")), tauMCName_(dict.lookupOrDefault<word>("tauMC", "tauMC")), - accommodationCoeff_(readScalar(dict.lookup("accommodationCoeff"))), + accommodationCoeff_(dict.get<scalar>("accommodationCoeff")), Uwall_("Uwall", dict, p.size()), thermalCreep_(dict.lookupOrDefault("thermalCreep", true)), curvature_(dict.lookupOrDefault("curvature", true)) diff --git a/applications/solvers/compressible/rhoPimpleAdiabaticFoam/EEqn.H b/applications/solvers/compressible/rhoPimpleAdiabaticFoam/EEqn.H index a3bd66654d41b6bf5589f978d5260d488b3a13ac..e15261990acf4aaadf9c197ddf9754210dc904eb 100644 --- a/applications/solvers/compressible/rhoPimpleAdiabaticFoam/EEqn.H +++ b/applications/solvers/compressible/rhoPimpleAdiabaticFoam/EEqn.H @@ -25,8 +25,8 @@ if (!local) { - const scalar T0 = readScalar(eosDict.lookup("T0")); - const scalar p0 = readScalar(eosDict.lookup("p0")); + const scalar T0 = eosDict.get<scalar>("T0"); + const scalar p0 = eosDict.get<scalar>("p0"); he = thermo.he(p, pow(p/p0, (gamma - scalar(1))/gamma)*T0); } diff --git a/applications/solvers/discreteMethods/molecularDynamics/mdEquilibrationFoam/readmdEquilibrationDict.H b/applications/solvers/discreteMethods/molecularDynamics/mdEquilibrationFoam/readmdEquilibrationDict.H index 3f43981907d797f26b14afc96465c32e390e8ec6..8c9a222f16cb073c227dee03a50f0550ea81c98b 100644 --- a/applications/solvers/discreteMethods/molecularDynamics/mdEquilibrationFoam/readmdEquilibrationDict.H +++ b/applications/solvers/discreteMethods/molecularDynamics/mdEquilibrationFoam/readmdEquilibrationDict.H @@ -12,7 +12,7 @@ IOdictionary mdEquilibrationDict ) ); -scalar targetTemperature = readScalar +scalar targetTemperature ( - mdEquilibrationDict.lookup("targetTemperature") + mdEquilibrationDict.get<scalar>("targetTemperature") ); diff --git a/applications/solvers/lagrangian/DPMFoam/createFields.H b/applications/solvers/lagrangian/DPMFoam/createFields.H index ea19bf758cfe39961ea1a144c81efd1097e41e36..55c3608ac92de8847c0de0acf05d6185161a5aa2 100644 --- a/applications/solvers/lagrangian/DPMFoam/createFields.H +++ b/applications/solvers/lagrangian/DPMFoam/createFields.H @@ -139,10 +139,9 @@ basicKinematicTypeCloud kinematicCloud scalar alphacMin ( 1.0 - - readScalar - ( + - ( kinematicCloud.particleProperties().subDict("constantProperties") - .lookup("alphaMax") + .get<scalar>("alphaMax") ) ); diff --git a/applications/solvers/lagrangian/coalChemistryFoam/setRDeltaT.H b/applications/solvers/lagrangian/coalChemistryFoam/setRDeltaT.H index 3b2d3a77cf946f2527dbc2d47dfae4f4b2d0703f..00664ea0c637458a4071ff2f1b5bdd8bf588e826 100644 --- a/applications/solvers/lagrangian/coalChemistryFoam/setRDeltaT.H +++ b/applications/solvers/lagrangian/coalChemistryFoam/setRDeltaT.H @@ -29,7 +29,7 @@ License const dictionary& pimpleDict = pimple.dict(); // Maximum flow Courant number - scalar maxCo(readScalar(pimpleDict.lookup("maxCo"))); + scalar maxCo(pimpleDict.get<scalar>("maxCo")); // Maximum time scale scalar maxDeltaT(pimpleDict.lookupOrDefault<scalar>("maxDeltaT", GREAT)); diff --git a/applications/solvers/lagrangian/reactingParcelFoam/setRDeltaT.H b/applications/solvers/lagrangian/reactingParcelFoam/setRDeltaT.H index 1a57519eacad89c3c8277b0d3a54c51aff87228b..c9deaa4e0e5a9ce32b1c56e1245745ed10f3656e 100644 --- a/applications/solvers/lagrangian/reactingParcelFoam/setRDeltaT.H +++ b/applications/solvers/lagrangian/reactingParcelFoam/setRDeltaT.H @@ -29,7 +29,7 @@ License const dictionary& pimpleDict = pimple.dict(); // Maximum flow Courant number - scalar maxCo(readScalar(pimpleDict.lookup("maxCo"))); + scalar maxCo(pimpleDict.get<scalar>("maxCo")); // Maximum time scale scalar maxDeltaT(pimpleDict.lookupOrDefault<scalar>("maxDeltaT", GREAT)); diff --git a/applications/solvers/multiphase/MPPICInterFoam/createFields.H b/applications/solvers/multiphase/MPPICInterFoam/createFields.H index 95746f2f6db2356a4e21bf79f8d621518bedfb91..61f4def12821fc4948536bd81c69922fff5b4439 100644 --- a/applications/solvers/multiphase/MPPICInterFoam/createFields.H +++ b/applications/solvers/multiphase/MPPICInterFoam/createFields.H @@ -160,10 +160,9 @@ basicKinematicMPPICCloud kinematicCloud scalar alphacMin ( 1.0 - - readScalar - ( + - ( kinematicCloud.particleProperties().subDict("constantProperties") - .lookup("alphaMax") + .get<scalar>("alphaMax") ) ); diff --git a/applications/solvers/multiphase/VoF/alphaCourantNo.H b/applications/solvers/multiphase/VoF/alphaCourantNo.H index 24f6e48a22cb58366d5cfec831d0720ded233f86..d67638a3c26b785f6487a0987f94b1fae080a9d5 100644 --- a/applications/solvers/multiphase/VoF/alphaCourantNo.H +++ b/applications/solvers/multiphase/VoF/alphaCourantNo.H @@ -31,7 +31,7 @@ Description scalar maxAlphaCo ( - readScalar(runTime.controlDict().lookup("maxAlphaCo")) + runTime.controlDict().get<scalar>("maxAlphaCo") ); scalar alphaCoNum = 0.0; diff --git a/applications/solvers/multiphase/cavitatingFoam/cavitatingDyMFoam/createControls.H b/applications/solvers/multiphase/cavitatingFoam/cavitatingDyMFoam/createControls.H index d47cf78b5a457a85044b885e776c364f856cdeb3..70acf5b5ee1abece49b0afc74ef9561dcda9e81b 100644 --- a/applications/solvers/multiphase/cavitatingFoam/cavitatingDyMFoam/createControls.H +++ b/applications/solvers/multiphase/cavitatingFoam/cavitatingDyMFoam/createControls.H @@ -2,5 +2,5 @@ scalar maxAcousticCo ( - readScalar(runTime.controlDict().lookup("maxAcousticCo")) + runTime.controlDict().get<scalar>("maxAcousticCo") ); diff --git a/applications/solvers/multiphase/cavitatingFoam/cavitatingDyMFoam/pEqn.H b/applications/solvers/multiphase/cavitatingFoam/cavitatingDyMFoam/pEqn.H index 51a2da33bdd8918dba99277e42b820c194cfa584..f5b1d8ef01e945d3c5c93be98bb169b71e2aeafa 100644 --- a/applications/solvers/multiphase/cavitatingFoam/cavitatingDyMFoam/pEqn.H +++ b/applications/solvers/multiphase/cavitatingFoam/cavitatingDyMFoam/pEqn.H @@ -70,10 +70,10 @@ // Remove the swirl component of velocity for "wedge" cases if (pimple.dict().found("removeSwirl")) { - label swirlCmpt(readLabel(pimple.dict().lookup("removeSwirl"))); + label swirlCmpt(pimple.dict().get<label>("removeSwirl")); Info<< "Removing swirl component-" << swirlCmpt << " of U" << endl; - U.field().replace(swirlCmpt, 0.0); + U.field().replace(swirlCmpt, Zero); } U.correctBoundaryConditions(); diff --git a/applications/solvers/multiphase/cavitatingFoam/createControls.H b/applications/solvers/multiphase/cavitatingFoam/createControls.H index e5c7eea9f7075fec7f28ff1dff50639b81ed3191..8c9a75cf16bfbb4c8fb27744afd11358416083be 100644 --- a/applications/solvers/multiphase/cavitatingFoam/createControls.H +++ b/applications/solvers/multiphase/cavitatingFoam/createControls.H @@ -2,5 +2,5 @@ scalar maxAcousticCo ( - readScalar(runTime.controlDict().lookup("maxAcousticCo")) + runTime.controlDict().get<scalar>("maxAcousticCo") ); diff --git a/applications/solvers/multiphase/cavitatingFoam/pEqn.H b/applications/solvers/multiphase/cavitatingFoam/pEqn.H index 4c337c4269a26bb625500529bf5d000cf210c6f0..2cb7b0fc5adc35f1b10ec4089baac32f47650989 100644 --- a/applications/solvers/multiphase/cavitatingFoam/pEqn.H +++ b/applications/solvers/multiphase/cavitatingFoam/pEqn.H @@ -73,10 +73,10 @@ // Remove the swirl component of velocity for "wedge" cases if (pimple.dict().found("removeSwirl")) { - label swirlCmpt(readLabel(pimple.dict().lookup("removeSwirl"))); + label swirlCmpt(pimple.dict().get<label>("removeSwirl")); Info<< "Removing swirl component-" << swirlCmpt << " of U" << endl; - U.field().replace(swirlCmpt, 0.0); + U.field().replace(swirlCmpt, Zero); } U.correctBoundaryConditions(); diff --git a/applications/solvers/multiphase/compressibleMultiphaseInterFoam/multiphaseMixtureThermo/multiphaseMixtureThermo.C b/applications/solvers/multiphase/compressibleMultiphaseInterFoam/multiphaseMixtureThermo/multiphaseMixtureThermo.C index 114b29c46cbfcce57d1e0c67d123602980345abe..0a0ab0f4e72c29e650601d2d6276edc7a964acdc 100644 --- a/applications/solvers/multiphase/compressibleMultiphaseInterFoam/multiphaseMixtureThermo/multiphaseMixtureThermo.C +++ b/applications/solvers/multiphase/compressibleMultiphaseInterFoam/multiphaseMixtureThermo/multiphaseMixtureThermo.C @@ -763,8 +763,8 @@ void Foam::multiphaseMixtureThermo::solve() const Time& runTime = mesh_.time(); const dictionary& alphaControls = mesh_.solverDict("alpha"); - label nAlphaSubCycles(readLabel(alphaControls.lookup("nAlphaSubCycles"))); - scalar cAlpha(readScalar(alphaControls.lookup("cAlpha"))); + label nAlphaSubCycles(alphaControls.get<label>("nAlphaSubCycles")); + scalar cAlpha(alphaControls.get<scalar>("cAlpha")); volScalarField& alpha = phases_.first(); diff --git a/applications/solvers/multiphase/driftFluxFoam/alphaControls.H b/applications/solvers/multiphase/driftFluxFoam/alphaControls.H index 95154c6a154e5c5545dca0e2c79d9f7e881f870e..b677b4ae99353e02d194c64bd998bcadd594732f 100644 --- a/applications/solvers/multiphase/driftFluxFoam/alphaControls.H +++ b/applications/solvers/multiphase/driftFluxFoam/alphaControls.H @@ -1,8 +1,8 @@ const dictionary& alphaControls = mesh.solverDict(alpha1.name()); -label nAlphaCorr(readLabel(alphaControls.lookup("nAlphaCorr"))); +label nAlphaCorr(alphaControls.get<label>("nAlphaCorr")); -label nAlphaSubCycles(readLabel(alphaControls.lookup("nAlphaSubCycles"))); +label nAlphaSubCycles(alphaControls.get<label>("nAlphaSubCycles")); bool MULESCorr(alphaControls.lookupOrDefault("MULESCorr", false)); diff --git a/applications/solvers/multiphase/icoReactingMultiphaseInterFoam/alphaCourantNo.H b/applications/solvers/multiphase/icoReactingMultiphaseInterFoam/alphaCourantNo.H index c1dfd7ca1ff17552fc2ee52848e530c01d71e1bc..d5521370e8de6e37d66a124935f6422f562e3ec3 100644 --- a/applications/solvers/multiphase/icoReactingMultiphaseInterFoam/alphaCourantNo.H +++ b/applications/solvers/multiphase/icoReactingMultiphaseInterFoam/alphaCourantNo.H @@ -31,7 +31,7 @@ Description scalar maxAlphaCo ( - readScalar(runTime.controlDict().lookup("maxAlphaCo")) + runTime.controlDict().get<scalar>("maxAlphaCo") ); scalar maxAlphaDdt diff --git a/applications/solvers/multiphase/icoReactingMultiphaseInterFoam/laserDTRM/laserDTRM.C b/applications/solvers/multiphase/icoReactingMultiphaseInterFoam/laserDTRM/laserDTRM.C index a60ba21ae89f2cd23fb47e4c09a461b6f32148c7..f941743c47a8c100e8fcbfe491f274cd49e5ee6c 100644 --- a/applications/solvers/multiphase/icoReactingMultiphaseInterFoam/laserDTRM/laserDTRM.C +++ b/applications/solvers/multiphase/icoReactingMultiphaseInterFoam/laserDTRM/laserDTRM.C @@ -198,7 +198,7 @@ void Foam::radiation::laserDTRM::initialise() { case pdGaussian: { - sigma_ = readScalar(lookup("sigma")); + sigma_ = get<scalar>("sigma"); break; } case pdManual: @@ -325,8 +325,8 @@ Foam::radiation::laserDTRM::laserDTRM(const volScalarField& T) mode_(powerDistNames_.lookup("mode", *this)), DTRMCloud_(mesh_, "DTRMCloud", IDLList<DTRMParticle>()), nParticles_(0), - ndTheta_(readLabel(lookup("nTheta"))), - ndr_(readLabel(lookup("nr"))), + ndTheta_(get<label>("nTheta")), + ndr_(get<label>("nr")), maxTrackLength_(mesh_.bounds().mag()), focalLaserPosition_ @@ -339,7 +339,7 @@ Foam::radiation::laserDTRM::laserDTRM(const volScalarField& T) Function1<vector>::New("laserDirection", *this) ), - focalLaserRadius_(readScalar(lookup("focalLaserRadius"))), + focalLaserRadius_(get<scalar>("focalLaserRadius")), qualityBeamLaser_ ( lookupOrDefault<scalar>("qualityBeamLaser", 0.0) @@ -435,8 +435,8 @@ Foam::radiation::laserDTRM::laserDTRM mode_(powerDistNames_.lookup("mode", *this)), DTRMCloud_(mesh_, "DTRMCloud", IDLList<DTRMParticle>()), nParticles_(0), - ndTheta_(readLabel(lookup("nTheta"))), - ndr_(readLabel(lookup("nr"))), + ndTheta_(get<label>("nTheta")), + ndr_(get<label>("nr")), maxTrackLength_(mesh_.bounds().mag()), focalLaserPosition_ @@ -448,7 +448,7 @@ Foam::radiation::laserDTRM::laserDTRM Function1<vector>::New("laserDirection", *this) ), - focalLaserRadius_(readScalar(lookup("focalLaserRadius"))), + focalLaserRadius_(get<scalar>("focalLaserRadius")), qualityBeamLaser_ ( lookupOrDefault<scalar>("qualityBeamLaser", 0.0) diff --git a/applications/solvers/multiphase/icoReactingMultiphaseInterFoam/laserDTRM/reflectionModel/FresnelLaser/FresnelLaser.C b/applications/solvers/multiphase/icoReactingMultiphaseInterFoam/laserDTRM/reflectionModel/FresnelLaser/FresnelLaser.C index a6b7b549b875cbc71bdc55ac59d84615ed1aef63..81d565345daa90c019a8419e319a0093e88bbdff 100644 --- a/applications/solvers/multiphase/icoReactingMultiphaseInterFoam/laserDTRM/reflectionModel/FresnelLaser/FresnelLaser.C +++ b/applications/solvers/multiphase/icoReactingMultiphaseInterFoam/laserDTRM/reflectionModel/FresnelLaser/FresnelLaser.C @@ -53,7 +53,7 @@ Foam::radiation::FresnelLaser::FresnelLaser ) : reflectionModel(dict, mesh), - epsilon_(readScalar(dict.lookup("epsilon"))) + epsilon_(dict.get<scalar>("epsilon")) {} diff --git a/applications/solvers/multiphase/icoReactingMultiphaseInterFoam/phasesSystem/interfaceModels/porousModels/VollerPrakash/VollerPrakash.C b/applications/solvers/multiphase/icoReactingMultiphaseInterFoam/phasesSystem/interfaceModels/porousModels/VollerPrakash/VollerPrakash.C index d6ac5b4b48cb8f5ac66f1697de4af36e83149f8a..95eb16181943d3118f99c46b55e46d8f4cf57894 100644 --- a/applications/solvers/multiphase/icoReactingMultiphaseInterFoam/phasesSystem/interfaceModels/porousModels/VollerPrakash/VollerPrakash.C +++ b/applications/solvers/multiphase/icoReactingMultiphaseInterFoam/phasesSystem/interfaceModels/porousModels/VollerPrakash/VollerPrakash.C @@ -53,8 +53,8 @@ Foam::porousModels::VollerPrakash::VollerPrakash ) : porousModel(dict, mesh), - Cu_(readScalar(dict.lookup("Cu"))), - solidPhase_(dict.lookup("solidPhase")) + Cu_(dict.get<scalar>("Cu")), + solidPhase_(dict.get<word>("solidPhase")) {} diff --git a/applications/solvers/multiphase/icoReactingMultiphaseInterFoam/phasesSystem/phaseModel/MultiComponentPhaseModel/MultiComponentPhaseModel.C b/applications/solvers/multiphase/icoReactingMultiphaseInterFoam/phasesSystem/phaseModel/MultiComponentPhaseModel/MultiComponentPhaseModel.C index 16e8a94be6c5fc1e2247a35af5e921c4387c8c05..6c00cd3a76a138ee7091b568be7bcf3a092b4060 100644 --- a/applications/solvers/multiphase/icoReactingMultiphaseInterFoam/phasesSystem/phaseModel/MultiComponentPhaseModel/MultiComponentPhaseModel.C +++ b/applications/solvers/multiphase/icoReactingMultiphaseInterFoam/phasesSystem/phaseModel/MultiComponentPhaseModel/MultiComponentPhaseModel.C @@ -191,7 +191,7 @@ void Foam::MultiComponentPhaseModel<BasePhaseModel, phaseThermo>::solveYi const dictionary& MULEScontrols = mesh.solverDict(alpha1.name()); - scalar cAlpha(readScalar(MULEScontrols.lookup("cYi"))); + scalar cAlpha(MULEScontrols.get<scalar>("cYi")); PtrList<surfaceScalarField> phiYiCorrs(species_.size()); const surfaceScalarField& phi = this->fluid().phi(); diff --git a/applications/solvers/multiphase/icoReactingMultiphaseInterFoam/phasesSystem/phaseSystem/multiphaseSystem/multiphaseSystem.C b/applications/solvers/multiphase/icoReactingMultiphaseInterFoam/phasesSystem/phaseSystem/multiphaseSystem/multiphaseSystem.C index e7d8c066153a16f80e119738409304875f9dca1a..2440b43e0219e205dab74b6691cc51f37b679fd1 100644 --- a/applications/solvers/multiphase/icoReactingMultiphaseInterFoam/phasesSystem/phaseSystem/multiphaseSystem/multiphaseSystem.C +++ b/applications/solvers/multiphase/icoReactingMultiphaseInterFoam/phasesSystem/phaseSystem/multiphaseSystem/multiphaseSystem.C @@ -269,8 +269,8 @@ void Foam::multiphaseSystem::solve() const fvMesh& mesh = this->mesh(); const dictionary& alphaControls = mesh.solverDict("alpha"); - label nAlphaSubCycles(readLabel(alphaControls.lookup("nAlphaSubCycles"))); - label nAlphaCorr(readLabel(alphaControls.lookup("nAlphaCorr"))); + label nAlphaSubCycles(alphaControls.get<label>("nAlphaSubCycles")); + label nAlphaCorr(alphaControls.get<label>("nAlphaCorr")); mesh.solverDict("alpha").readEntry("cAlphas", cAlphas_); // Reset ddtAlphaMax diff --git a/applications/solvers/multiphase/interCondensatingEvaporatingFoam/temperaturePhaseChangeTwoPhaseMixtures/temperaturePhaseChangeTwoPhaseMixtures/newtemperaturePhaseChangeTwoPhaseMixture.C b/applications/solvers/multiphase/interCondensatingEvaporatingFoam/temperaturePhaseChangeTwoPhaseMixtures/temperaturePhaseChangeTwoPhaseMixtures/newtemperaturePhaseChangeTwoPhaseMixture.C index 137710d217e46193ab8eba72b9d125755f8d1c9f..6169ab62f4939bac095754ccaa84f6e5a841d5e1 100644 --- a/applications/solvers/multiphase/interCondensatingEvaporatingFoam/temperaturePhaseChangeTwoPhaseMixtures/temperaturePhaseChangeTwoPhaseMixtures/newtemperaturePhaseChangeTwoPhaseMixture.C +++ b/applications/solvers/multiphase/interCondensatingEvaporatingFoam/temperaturePhaseChangeTwoPhaseMixtures/temperaturePhaseChangeTwoPhaseMixtures/newtemperaturePhaseChangeTwoPhaseMixture.C @@ -50,10 +50,7 @@ Foam::temperaturePhaseChangeTwoPhaseMixture::New const word modelType ( - phaseChangePropertiesDict.lookup - ( - "phaseChangeTwoPhaseModel" - ) + phaseChangePropertiesDict.get<word>("phaseChangeTwoPhaseModel") ); Info<< "Selecting phaseChange model " << modelType << endl; diff --git a/applications/solvers/multiphase/interFoam/interMixingFoam/alphaControls.H b/applications/solvers/multiphase/interFoam/interMixingFoam/alphaControls.H index a99a0b39e289f60589a61d3c43b1fb94fcff81dc..cb83b15a9e01489d56c5acaecfd308677f5128e8 100644 --- a/applications/solvers/multiphase/interFoam/interMixingFoam/alphaControls.H +++ b/applications/solvers/multiphase/interFoam/interMixingFoam/alphaControls.H @@ -1,5 +1,5 @@ const dictionary& alphaControls = mesh.solverDict(alpha1.name()); -label nAlphaCorr(readLabel(alphaControls.lookup("nAlphaCorr"))); +label nAlphaCorr(alphaControls.get<label>("nAlphaCorr")); -label nAlphaSubCycles(readLabel(alphaControls.lookup("nAlphaSubCycles"))); +label nAlphaSubCycles(alphaControls.get<label>("nAlphaSubCycles")); diff --git a/applications/solvers/multiphase/interFoam/interMixingFoam/threePhaseInterfaceProperties/threePhaseInterfaceProperties.C b/applications/solvers/multiphase/interFoam/interMixingFoam/threePhaseInterfaceProperties/threePhaseInterfaceProperties.C index 70cc298fe9d5b8eb63a378d5e8403b4ce60434e1..03b8bc9aad439be5e8e4ca51b7659e25cd68b573 100644 --- a/applications/solvers/multiphase/interFoam/interMixingFoam/threePhaseInterfaceProperties/threePhaseInterfaceProperties.C +++ b/applications/solvers/multiphase/interFoam/interMixingFoam/threePhaseInterfaceProperties/threePhaseInterfaceProperties.C @@ -155,13 +155,10 @@ Foam::threePhaseInterfaceProperties::threePhaseInterfaceProperties mixture_(mixture), cAlpha_ ( - readScalar + mixture.U().mesh().solverDict ( - mixture.U().mesh().solverDict - ( - mixture_.alpha1().name() - ).lookup("cAlpha") - ) + mixture_.alpha1().name() + ).get<scalar>("cAlpha") ), sigma12_("sigma12", dimensionSet(1, 0, -2, 0, 0), mixture), sigma13_("sigma13", dimensionSet(1, 0, -2, 0, 0), mixture), diff --git a/applications/solvers/multiphase/interFoam/overInterDyMFoam/alphaCourantNo.H b/applications/solvers/multiphase/interFoam/overInterDyMFoam/alphaCourantNo.H index 8666b664ac1e71ffa6ae5863c9ee0a0af5b8b235..d93afbb8173fbb554ee08f0a01ecfbb8cdd928ff 100644 --- a/applications/solvers/multiphase/interFoam/overInterDyMFoam/alphaCourantNo.H +++ b/applications/solvers/multiphase/interFoam/overInterDyMFoam/alphaCourantNo.H @@ -31,7 +31,7 @@ Description scalar maxAlphaCo ( - readScalar(runTime.controlDict().lookup("maxAlphaCo")) + runTime.controlDict().get<scalar>("maxAlphaCo") ); scalar alphaCoNum = 0.0; diff --git a/applications/solvers/multiphase/interIsoFoam/alphaControls.H b/applications/solvers/multiphase/interIsoFoam/alphaControls.H index db77d94af4dee9b8099d9d77b15fcced6e4b72cd..2e94f34d752b7465f8eade4425fb76d9d84ab880 100644 --- a/applications/solvers/multiphase/interIsoFoam/alphaControls.H +++ b/applications/solvers/multiphase/interIsoFoam/alphaControls.H @@ -1,3 +1,3 @@ const dictionary& alphaControls = mesh.solverDict(alpha1.name()); -label nAlphaSubCycles(readLabel(alphaControls.lookup("nAlphaSubCycles"))); +label nAlphaSubCycles(alphaControls.get<label>("nAlphaSubCycles")); diff --git a/applications/solvers/multiphase/interIsoFoam/alphaCourantNo.H b/applications/solvers/multiphase/interIsoFoam/alphaCourantNo.H index 24f6e48a22cb58366d5cfec831d0720ded233f86..d67638a3c26b785f6487a0987f94b1fae080a9d5 100644 --- a/applications/solvers/multiphase/interIsoFoam/alphaCourantNo.H +++ b/applications/solvers/multiphase/interIsoFoam/alphaCourantNo.H @@ -31,7 +31,7 @@ Description scalar maxAlphaCo ( - readScalar(runTime.controlDict().lookup("maxAlphaCo")) + runTime.controlDict().get<scalar>("maxAlphaCo") ); scalar alphaCoNum = 0.0; diff --git a/applications/solvers/multiphase/interPhaseChangeFoam/alphaControls.H b/applications/solvers/multiphase/interPhaseChangeFoam/alphaControls.H index bd26f0b927074e2e8e38e804105a66c00dd5fd45..41d51c91350717e3a4cf209e1cfaf9db5ef33461 100644 --- a/applications/solvers/multiphase/interPhaseChangeFoam/alphaControls.H +++ b/applications/solvers/multiphase/interPhaseChangeFoam/alphaControls.H @@ -1,8 +1,8 @@ const dictionary& alphaControls = mesh.solverDict(alpha1.name()); -label nAlphaCorr(readLabel(alphaControls.lookup("nAlphaCorr"))); +label nAlphaCorr(alphaControls.get<label>("nAlphaCorr")); -label nAlphaSubCycles(readLabel(alphaControls.lookup("nAlphaSubCycles"))); +label nAlphaSubCycles(alphaControls.get<label>("nAlphaSubCycles")); bool MULESCorr(alphaControls.lookupOrDefault("MULESCorr", false)); diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/multiphaseSystem.C b/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/multiphaseSystem.C index e48594f9705b5656b035d08fa5949fb475bdc259..df770b3f0f2f6a934914d7f08290842309825d18 100644 --- a/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/multiphaseSystem.C +++ b/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/multiphaseSystem.C @@ -844,7 +844,7 @@ void Foam::multiphaseSystem::solve() const Time& runTime = mesh_.time(); const dictionary& alphaControls = mesh_.solverDict("alpha"); - label nAlphaSubCycles(readLabel(alphaControls.lookup("nAlphaSubCycles"))); + label nAlphaSubCycles(alphaControls.get<label>("nAlphaSubCycles")); if (nAlphaSubCycles > 1) { diff --git a/applications/solvers/multiphase/multiphaseInterFoam/multiphaseMixture/multiphaseMixture.C b/applications/solvers/multiphase/multiphaseInterFoam/multiphaseMixture/multiphaseMixture.C index c6c366951ddcc66de2f979bf9fd01f571340ac89..93ff2ee04b464409d0d0d420491c3a20b008d98d 100644 --- a/applications/solvers/multiphase/multiphaseInterFoam/multiphaseMixture/multiphaseMixture.C +++ b/applications/solvers/multiphase/multiphaseInterFoam/multiphaseMixture/multiphaseMixture.C @@ -311,8 +311,8 @@ void Foam::multiphaseMixture::solve() volScalarField& alpha = phases_.first(); const dictionary& alphaControls = mesh_.solverDict("alpha"); - label nAlphaSubCycles(readLabel(alphaControls.lookup("nAlphaSubCycles"))); - scalar cAlpha(readScalar(alphaControls.lookup("cAlpha"))); + label nAlphaSubCycles(alphaControls.get<label>("nAlphaSubCycles")); + scalar cAlpha(alphaControls.get<scalar>("cAlpha")); if (nAlphaSubCycles > 1) { diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/wallLubricationModels/Frank/Frank.C b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/wallLubricationModels/Frank/Frank.C index 8c068653f8ced45502da342b22b68e7febfa28d5..fdf37e58854212c1b280a2ce7cad97a790a49020 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/wallLubricationModels/Frank/Frank.C +++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/wallLubricationModels/Frank/Frank.C @@ -55,7 +55,7 @@ Foam::wallLubricationModels::Frank::Frank wallLubricationModel(dict, pair), Cwd_("Cwd", dimless, dict), Cwc_("Cwc", dimless, dict), - p_(readScalar(dict.lookup("p"))) + p_(dict.get<scalar>("p")) {} diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/multiphaseSystem/multiphaseSystem.C b/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/multiphaseSystem/multiphaseSystem.C index e7b7121d450a5f08799744070c315002414c9e65..70c75214c0a37d509ae89602feece8893677afbc 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/multiphaseSystem/multiphaseSystem.C +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/multiphaseSystem/multiphaseSystem.C @@ -606,7 +606,7 @@ void Foam::multiphaseSystem::solve() const Time& runTime = mesh_.time(); const dictionary& alphaControls = mesh_.solverDict("alpha"); - label nAlphaSubCycles(readLabel(alphaControls.lookup("nAlphaSubCycles"))); + label nAlphaSubCycles(alphaControls.get<label>("nAlphaSubCycles")); bool LTS = fv::localEulerDdt::enabled(mesh_); diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/departureDiameterModels/KocamustafaogullariIshii/KocamustafaogullariIshii.C b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/departureDiameterModels/KocamustafaogullariIshii/KocamustafaogullariIshii.C index c18a01cf0b038f31a35282f33c8d3929f6dab6cd..28b3dfe83286939210210d090e7adcc067bc1f27 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/departureDiameterModels/KocamustafaogullariIshii/KocamustafaogullariIshii.C +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/departureDiameterModels/KocamustafaogullariIshii/KocamustafaogullariIshii.C @@ -60,7 +60,7 @@ KocamustafaogullariIshii::KocamustafaogullariIshii ) : departureDiameterModel(), - phi_(readScalar(dict.lookup("phi"))) + phi_(dict.get<scalar>("phi")) {} diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/partitioningModels/Lavieville/Lavieville.C b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/partitioningModels/Lavieville/Lavieville.C index 581a83a6d1b0dbcd9ea3054602c4e3deff2900e0..e1e999dff3eb37ad7fedffab03fc5290948fcb0b 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/partitioningModels/Lavieville/Lavieville.C +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/partitioningModels/Lavieville/Lavieville.C @@ -52,7 +52,7 @@ Foam::wallBoilingModels::partitioningModels:: Lavieville::Lavieville(const dictionary& dict) : partitioningModel(), - alphaCrit_(readScalar(dict.lookup("alphaCrit"))) + alphaCrit_(dict.get<scalar>("alphaCrit")) {} diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/partitioningModels/cosine/cosine.C b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/partitioningModels/cosine/cosine.C index f9528677d4f41ec886e0ce6f88b596dc55195e84..3d7163446f26cfc8035c3839bebd9d51ca2bfac1 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/partitioningModels/cosine/cosine.C +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/partitioningModels/cosine/cosine.C @@ -52,8 +52,8 @@ Foam::wallBoilingModels::partitioningModels:: cosine::cosine(const dictionary& dict) : partitioningModel(), - alphaLiquid1_(readScalar(dict.lookup("alphaLiquid1"))), - alphaLiquid0_(readScalar(dict.lookup("alphaLiquid0"))) + alphaLiquid1_(dict.get<scalar>("alphaLiquid1")), + alphaLiquid0_(dict.get<scalar>("alphaLiquid0")) {} diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/partitioningModels/linear/linear.C b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/partitioningModels/linear/linear.C index cc6d648f8492f4702421aa006ee634172d9a2240..b0bb37aaed9bd41479d793cd3231f503e5033bf5 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/partitioningModels/linear/linear.C +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/partitioningModels/linear/linear.C @@ -52,8 +52,8 @@ Foam::wallBoilingModels::partitioningModels:: linear::linear(const dictionary& dict) : partitioningModel(), - alphaLiquid1_(readScalar(dict.lookup("alphaLiquid1"))), - alphaLiquid0_(readScalar(dict.lookup("alphaLiquid0"))) + alphaLiquid1_(dict.get<scalar>("alphaLiquid1")), + alphaLiquid0_(dict.get<scalar>("alphaLiquid0")) {} diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/phasePressureModel/phasePressureModel.C b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/phasePressureModel/phasePressureModel.C index 90549eda9c1b2a7bba2eb59de5298fd7e2356e6e..05cf94b90b24f928b979a567b99a29b28ff90d42 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/phasePressureModel/phasePressureModel.C +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/phasePressureModel/phasePressureModel.C @@ -57,9 +57,9 @@ Foam::RASModels::phasePressureModel::phasePressureModel phase_(phase), - alphaMax_(readScalar(coeffDict_.lookup("alphaMax"))), - preAlphaExp_(readScalar(coeffDict_.lookup("preAlphaExp"))), - expMax_(readScalar(coeffDict_.lookup("expMax"))), + alphaMax_(coeffDict_.get<scalar>("alphaMax")), + preAlphaExp_(coeffDict_.get<scalar>("preAlphaExp")), + expMax_(coeffDict_.get<scalar>("expMax")), g0_ ( "g0", diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseSystem/twoPhaseSystem.C b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseSystem/twoPhaseSystem.C index bbe3c419252bc7e705e3fa0870b4a7d4cbd7a88f..07c640f89587d489130ef6280d5767ffbf34c748 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseSystem/twoPhaseSystem.C +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseSystem/twoPhaseSystem.C @@ -193,8 +193,8 @@ void Foam::twoPhaseSystem::solve() const dictionary& alphaControls = mesh_.solverDict(alpha1.name()); - label nAlphaSubCycles(readLabel(alphaControls.lookup("nAlphaSubCycles"))); - label nAlphaCorr(readLabel(alphaControls.lookup("nAlphaCorr"))); + label nAlphaSubCycles(alphaControls.get<label>("nAlphaSubCycles")); + label nAlphaCorr(alphaControls.get<label>("nAlphaCorr")); bool LTS = fv::localEulerDdt::enabled(mesh_); diff --git a/applications/solvers/multiphase/twoLiquidMixingFoam/alphaControls.H b/applications/solvers/multiphase/twoLiquidMixingFoam/alphaControls.H index db77d94af4dee9b8099d9d77b15fcced6e4b72cd..2e94f34d752b7465f8eade4425fb76d9d84ab880 100644 --- a/applications/solvers/multiphase/twoLiquidMixingFoam/alphaControls.H +++ b/applications/solvers/multiphase/twoLiquidMixingFoam/alphaControls.H @@ -1,3 +1,3 @@ const dictionary& alphaControls = mesh.solverDict(alpha1.name()); -label nAlphaSubCycles(readLabel(alphaControls.lookup("nAlphaSubCycles"))); +label nAlphaSubCycles(alphaControls.get<label>("nAlphaSubCycles")); diff --git a/applications/solvers/multiphase/twoLiquidMixingFoam/alphaCourantNo.H b/applications/solvers/multiphase/twoLiquidMixingFoam/alphaCourantNo.H index 9c8e27d975653c3f497d05f73997a8f9f84e038d..a8adce7eed05d6ae4aa20947818a17a20bc7464b 100644 --- a/applications/solvers/multiphase/twoLiquidMixingFoam/alphaCourantNo.H +++ b/applications/solvers/multiphase/twoLiquidMixingFoam/alphaCourantNo.H @@ -31,7 +31,7 @@ Description scalar maxAlphaCo ( - readScalar(runTime.controlDict().lookup("maxAlphaCo")) + runTime.controlDict().get<scalar>("maxAlphaCo") ); scalar alphaCoNum = 0.0; diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/wallLubricationModels/Frank/Frank.C b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/wallLubricationModels/Frank/Frank.C index 033aaa82aae4e377b57c95b894d7aa3c994dbdba..15b206041b2352be8ede8c601d3f4466dbead155 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/wallLubricationModels/Frank/Frank.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/wallLubricationModels/Frank/Frank.C @@ -55,7 +55,7 @@ Foam::wallLubricationModels::Frank::Frank wallLubricationModel(dict, pair), Cwd_("Cwd", dimless, dict), Cwc_("Cwc", dimless, dict), - p_(readScalar(dict.lookup("p"))) + p_(dict.get<scalar>("p")) {} diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/phasePressureModel/phasePressureModel.C b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/phasePressureModel/phasePressureModel.C index b00f887c98cb2344dc5172a4be5da10fb027dd70..64fb24755ed0d1189581143ccd6e479265528121 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/phasePressureModel/phasePressureModel.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/phasePressureModel/phasePressureModel.C @@ -60,9 +60,9 @@ Foam::RASModels::phasePressureModel::phasePressureModel phase_(phase), - alphaMax_(readScalar(coeffDict_.lookup("alphaMax"))), - preAlphaExp_(readScalar(coeffDict_.lookup("preAlphaExp"))), - expMax_(readScalar(coeffDict_.lookup("expMax"))), + alphaMax_(coeffDict_.get<scalar>("alphaMax")), + preAlphaExp_(coeffDict_.get<scalar>("preAlphaExp")), + expMax_(coeffDict_.get<scalar>("expMax")), g0_ ( "g0", diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/twoPhaseSystem.C b/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/twoPhaseSystem.C index 339e755c722c486e034d678e266c041e5d289c95..b875ed74efae43e6d109fd476850fa2d736c5bf7 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/twoPhaseSystem.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/twoPhaseSystem.C @@ -360,8 +360,8 @@ void Foam::twoPhaseSystem::solve() alpha1.name() ); - label nAlphaSubCycles(readLabel(alphaControls.lookup("nAlphaSubCycles"))); - label nAlphaCorr(readLabel(alphaControls.lookup("nAlphaCorr"))); + label nAlphaSubCycles(alphaControls.get<label>("nAlphaSubCycles")); + label nAlphaCorr(alphaControls.get<label>("nAlphaCorr")); word alphaScheme("div(phi," + alpha1.name() + ')'); word alpharScheme("div(phir," + alpha1.name() + ')'); diff --git a/applications/solvers/stressAnalysis/solidDisplacementFoam/readMechanicalProperties.H b/applications/solvers/stressAnalysis/solidDisplacementFoam/readMechanicalProperties.H index a592de04e93df2f95f7950f023071fad52204894..80d92971a25e68b8bb2d49eb6a9b6028f93d0b3d 100644 --- a/applications/solvers/stressAnalysis/solidDisplacementFoam/readMechanicalProperties.H +++ b/applications/solvers/stressAnalysis/solidDisplacementFoam/readMechanicalProperties.H @@ -13,7 +13,7 @@ ); const dictionary& rhoDict(mechanicalProperties.subDict("rho")); - word rhoType(rhoDict.lookup("type")); + word rhoType(rhoDict.get<word>("type")); autoPtr<volScalarField> rhoPtr; @@ -28,7 +28,7 @@ if (rhoType == "uniform") { - scalar rhoValue(readScalar(rhoDict.lookup("value"))); + scalar rhoValue(rhoDict.get<scalar>("value")); rhoPtr.reset ( @@ -68,7 +68,7 @@ volScalarField& rho = rhoPtr(); const dictionary& EDict(mechanicalProperties.subDict("E")); - word EType(EDict.lookup("type")); + word EType(EDict.get<word>("type")); autoPtr<volScalarField> EPtr; @@ -83,7 +83,7 @@ if (EType == "uniform") { - scalar rhoEValue(readScalar(EDict.lookup("value"))); + scalar rhoEValue(EDict.get<scalar>("value")); EPtr.reset ( @@ -134,11 +134,11 @@ ); const dictionary& nuDict(mechanicalProperties.subDict("nu")); - word nuType(nuDict.lookup("type")); + word nuType(nuDict.get<word>("type")); if (nuType == "uniform") { - scalar nuValue(readScalar(nuDict.lookup("value"))); + scalar nuValue(nuDict.get<scalar>("value")); nuPtr.reset ( new volScalarField diff --git a/applications/solvers/stressAnalysis/solidDisplacementFoam/readThermalProperties.H b/applications/solvers/stressAnalysis/solidDisplacementFoam/readThermalProperties.H index 3c889fc1c82016a104cef05067b067fdd8e007e5..8d9ccda5e4d9cb08115c1e16e0f2739390fad263 100644 --- a/applications/solvers/stressAnalysis/solidDisplacementFoam/readThermalProperties.H +++ b/applications/solvers/stressAnalysis/solidDisplacementFoam/readThermalProperties.H @@ -58,10 +58,10 @@ if (thermalStress) ); const dictionary& CDict(thermalProperties.subDict("C")); - word CType(CDict.lookup("type")); + word CType(CDict.get<word>("type")); if (CType == "uniform") { - scalar CValue(readScalar(CDict.lookup("value"))); + scalar CValue(CDict.get<scalar>("value")); CPtr.reset ( @@ -113,10 +113,10 @@ if (thermalStress) ); const dictionary& kDict(thermalProperties.subDict("k")); - word kType(kDict.lookup("type")); + word kType(kDict.get<word>("type")); if (kType == "uniform") { - scalar rhoKValue(readScalar(kDict.lookup("value"))); + scalar rhoKValue(kDict.get<scalar>("value")); rhoKPtr.reset ( @@ -169,11 +169,11 @@ if (thermalStress) const dictionary& alphaDict(thermalProperties.subDict("alpha")); - word alphaType(alphaDict.lookup("type")); + word alphaType(alphaDict.get<word>("type")); if (alphaType == "uniform") { - scalar alphaValue(readScalar(alphaDict.lookup("value"))); + scalar alphaValue(alphaDict.get<scalar>("value")); alphaPtr.reset ( new volScalarField diff --git a/applications/solvers/stressAnalysis/solidEquilibriumDisplacementFoam/readSteadyStressFoamControls.H b/applications/solvers/stressAnalysis/solidEquilibriumDisplacementFoam/readSteadyStressFoamControls.H index dd7af1704a58d00621b49b33fa3e0975ee6eab05..eefb3bbffa45fa0299afee21dca0bc658e5d63a5 100644 --- a/applications/solvers/stressAnalysis/solidEquilibriumDisplacementFoam/readSteadyStressFoamControls.H +++ b/applications/solvers/stressAnalysis/solidEquilibriumDisplacementFoam/readSteadyStressFoamControls.H @@ -1 +1 @@ -scalar accFac(readScalar(stressControl.lookup("accelerationFactor"))); +scalar accFac(stressControl.get<scalar>("accelerationFactor")); diff --git a/applications/test/Function1/Test-Function1.C b/applications/test/Function1/Test-Function1.C index d1d3b1f073c4ddff57d2ba432ecf58ce21da1ef5..32da39e44f2a304ab888f308fffa1dba26f9d80f 100644 --- a/applications/test/Function1/Test-Function1.C +++ b/applications/test/Function1/Test-Function1.C @@ -120,8 +120,8 @@ int main(int argc, char *argv[]) ) ); - scalar x0 = readScalar(function1Properties.lookup("x0")); - scalar x1 = readScalar(function1Properties.lookup("x1")); + scalar x0 = function1Properties.get<scalar>("x0"); + scalar x1 = function1Properties.get<scalar>("x1"); Info<< "Data entry type: " << function1().type() << nl << endl; diff --git a/applications/test/rigidBodyDynamics/pendulumAndSpring/pendulumAndSpring.C b/applications/test/rigidBodyDynamics/pendulumAndSpring/pendulumAndSpring.C index 5da5d7f33654bff0c4a0414ae03f5dcfa82b1911..211d1452f03bb8642abe3d3e624e5415f4fc65f4 100644 --- a/applications/test/rigidBodyDynamics/pendulumAndSpring/pendulumAndSpring.C +++ b/applications/test/rigidBodyDynamics/pendulumAndSpring/pendulumAndSpring.C @@ -55,7 +55,7 @@ int main(int argc, char *argv[]) // Create the pendulumAndSpring model from dictionary rigidBodyMotion pendulumAndSpring(runTime, pendulumAndSpringDict); - label nIter(readLabel(pendulumAndSpringDict.lookup("nIter"))); + label nIter(pendulumAndSpringDict.get<label>("nIter")); Info<< pendulumAndSpring << endl; Info<< "// Joint state " << endl; diff --git a/applications/test/rigidBodyDynamics/sphericalJoint/sphericalJoint.C b/applications/test/rigidBodyDynamics/sphericalJoint/sphericalJoint.C index f61dfe03b40a1e57d3a49ae60c655c8dad362afc..a6b19ebb5f7da713d63638b3ff28f5b3308b6e21 100644 --- a/applications/test/rigidBodyDynamics/sphericalJoint/sphericalJoint.C +++ b/applications/test/rigidBodyDynamics/sphericalJoint/sphericalJoint.C @@ -54,7 +54,7 @@ int main(int argc, char *argv[]) // Create the sphericalJoint model from dictionary rigidBodyMotion sphericalJoint(runTime, sphericalJointDict); - label nIter(readLabel(sphericalJointDict.lookup("nIter"))); + label nIter(sphericalJointDict.get<label>("nIter")); Info<< sphericalJoint << endl; diff --git a/applications/test/rigidBodyDynamics/spring/spring.C b/applications/test/rigidBodyDynamics/spring/spring.C index 00bed9032e63014dba86432a0769fbcf45c85806..ad4613fe01b0787b407e6d2f3cfc8d720f381bbb 100644 --- a/applications/test/rigidBodyDynamics/spring/spring.C +++ b/applications/test/rigidBodyDynamics/spring/spring.C @@ -49,7 +49,7 @@ int main(int argc, char *argv[]) // Create the spring model from dictionary rigidBodyMotion spring(springDict); - label nIter(readLabel(springDict.lookup("nIter"))); + label nIter(springDict.get<label>("nIter")); Info<< spring << endl; diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshCalcDualMesh.C b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshCalcDualMesh.C index 00bad93cd888b6c2ae008d252f06b23fe1028e2c..c7e2544634cd08461b8028b74573b13faf8ab9ed 100644 --- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshCalcDualMesh.C +++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshCalcDualMesh.C @@ -751,7 +751,7 @@ Foam::conformalVoronoiMesh::createPolyMeshFromPoints forAll(patches, p) { - label totalPatchSize = patchDicts[p].get<label>("nFaces"); + const label totalPatchSize = patchDicts[p].get<label>("nFaces"); if ( diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshIO.C b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshIO.C index 5268583281e2d934155a07ac76cbf5d0d3d2e58f..bf4944deea08a10e488d2fc9b84145228a2851e8 100644 --- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshIO.C +++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshIO.C @@ -816,7 +816,7 @@ void Foam::conformalVoronoiMesh::writeMesh forAll(patches, p) { - label totalPatchSize = patchDicts[p].get<label>("nFaces"); + const label totalPatchSize = patchDicts[p].get<label>("nFaces"); if ( diff --git a/etc/codeTemplates/BC/BC.C b/etc/codeTemplates/BC/BC.C index b0091f6900e4ea2ba2c2a36770d834a7729f56a9..173e7a5a456aebd919d108820d1701fb578ca15b 100644 --- a/etc/codeTemplates/BC/BC.C +++ b/etc/codeTemplates/BC/BC.C @@ -73,7 +73,7 @@ CONSTRUCT ) : PARENT(p, iF), - scalarData_(readScalar(dict.lookup("scalarData"))), + scalarData_(dict.get<scalar>("scalarData")), data_(pTraits<TYPE>(dict.lookup("data"))), fieldData_("fieldData", dict, p.size()), timeVsData_(Function1<TYPE>::New("timeVsData", dict)), diff --git a/src/OpenFOAM/db/dictionary/dictionary.H b/src/OpenFOAM/db/dictionary/dictionary.H index dafb0b5179c2315106cca2438ff0b62736b80f4c..6364c722cbad7a196add9626043c9adaeed39529 100644 --- a/src/OpenFOAM/db/dictionary/dictionary.H +++ b/src/OpenFOAM/db/dictionary/dictionary.H @@ -85,6 +85,7 @@ SeeAlso #ifndef dictionary_H #define dictionary_H +#include <type_traits> #include "entry.H" #include "IDLList.H" #include "DLList.H" @@ -93,7 +94,10 @@ SeeAlso #include "HashTable.H" #include "wordList.H" #include "className.H" -#include <type_traits> + +// Some common data types +#include "label.H" +#include "scalar.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -450,7 +454,7 @@ public: virtual ~dictionary(); - // Member functions + // Member Functions // Access @@ -1146,6 +1150,30 @@ public: //- Write dictionary to Ostream friend Ostream& operator<<(Ostream& os, const dictionary& dict); + + + // Shortcuts - may be more useable in templated code + + #undef defineDictionaryGetter + #define defineDictionaryGetter(Func,Type) \ + /** Same as get\<Type\> */ \ + Type Func \ + ( \ + const word& keyword, \ + bool recursive = false, \ + bool patternMatch = true \ + ) const \ + { \ + return get<Type>(keyword, recursive, patternMatch); \ + } + + defineDictionaryGetter(getBool, bool); + defineDictionaryGetter(getLabel, label); + defineDictionaryGetter(getScalar, scalar); + defineDictionaryGetter(getWord, word); + defineDictionaryGetter(getFileName, fileName); + + #undef defineDictionaryGetter }; diff --git a/src/OpenFOAM/global/argList/argList.C b/src/OpenFOAM/global/argList/argList.C index b2f0d979cc2d9bc663e76ce0dc13917b5560f660..aa7f6fe8ecaa427aec7b856fdcb5b8aafafb3c7c 100644 --- a/src/OpenFOAM/global/argList/argList.C +++ b/src/OpenFOAM/global/argList/argList.C @@ -1217,7 +1217,7 @@ void Foam::argList::parse dictionary decompDict(decompDictStream); - dictNProcs = decompDict.get<label>("numberOfSubdomains"); + decompDict.readEntry("numberOfSubdomains", dictNProcs); if (decompDict.lookupOrDefault("distributed", false)) { diff --git a/src/OpenFOAM/interpolations/interpolationLookUpTable/interpolationLookUpTable.C b/src/OpenFOAM/interpolations/interpolationLookUpTable/interpolationLookUpTable.C index affa384e78ca254607425f62a053794c4b4266f6..be1b0c8e43aa70fe45cd18012f490dc63bf8beec 100644 --- a/src/OpenFOAM/interpolations/interpolationLookUpTable/interpolationLookUpTable.C +++ b/src/OpenFOAM/interpolations/interpolationLookUpTable/interpolationLookUpTable.C @@ -158,19 +158,19 @@ void Foam::interpolationLookUpTable<Type>::dimensionTable() forAll(entries_,i) { - dim_[i] = readLabel(entries_[i].lookup("N")); - max_[i] = readScalar(entries_[i].lookup("max")); - min_[i] = readScalar(entries_[i].lookup("min")); + dim_[i] = entries_[i].get<label>("N"); + max_[i] = entries_[i].get<scalar>("max"); + min_[i] = entries_[i].get<scalar>("min"); delta_[i] = (max_[i] - min_[i])/dim_[i]; tableDim *= dim_[i] + 1; - fieldIndices_.insert(entries_[i].lookup("name"), index); + fieldIndices_.insert(entries_[i].get<word>("name"), index); entryIndices_[i] = index; index++; } forAll(output_,i) { - fieldIndices_.insert(output_[i].lookup("name"), index); + fieldIndices_.insert(output_[i].get<word>("name"), index); outputIndices_[i] = index; index++; } @@ -284,7 +284,7 @@ Foam::interpolationLookUpTable<Type>::interpolationLookUpTable ) : List<scalarField>(), - fileName_(fileName(dict.lookup("file")).expand()), + fileName_(dict.get<fileName>("file").expand()), dim_(0), min_(0.0), delta_(0.0), diff --git a/src/OpenFOAM/interpolations/interpolationTable/tableReaders/csv/csvTableReader.C b/src/OpenFOAM/interpolations/interpolationTable/tableReaders/csv/csvTableReader.C index bf972fda0a194104560d4263a19671480c76ead8..f5490c2af074e0c6554354ce953cd63276853e08 100644 --- a/src/OpenFOAM/interpolations/interpolationTable/tableReaders/csv/csvTableReader.C +++ b/src/OpenFOAM/interpolations/interpolationTable/tableReaders/csv/csvTableReader.C @@ -33,10 +33,10 @@ template<class Type> Foam::csvTableReader<Type>::csvTableReader(const dictionary& dict) : tableReader<Type>(dict), - headerLine_(readBool(dict.lookup("hasHeaderLine"))), - timeColumn_(readLabel(dict.lookup("timeColumn"))), + headerLine_(dict.get<bool>("hasHeaderLine")), + timeColumn_(dict.get<label>("timeColumn")), componentColumns_(dict.lookup("valueColumns")), - separator_(dict.lookupOrDefault<string>("separator", string(","))[0]) + separator_(dict.lookupOrDefault<string>("separator", ",")[0]) { if (componentColumns_.size() != pTraits<Type>::nComponents) { diff --git a/src/OpenFOAM/interpolations/uniformInterpolationTable/uniformInterpolationTable.C b/src/OpenFOAM/interpolations/uniformInterpolationTable/uniformInterpolationTable.C index 58d3018e3e8e8e6ac980314cdca070eaf6a0454b..8a48fffb7311a397f82276dea9d2dba202042a6a 100644 --- a/src/OpenFOAM/interpolations/uniformInterpolationTable/uniformInterpolationTable.C +++ b/src/OpenFOAM/interpolations/uniformInterpolationTable/uniformInterpolationTable.C @@ -94,14 +94,14 @@ Foam::uniformInterpolationTable<Type>::uniformInterpolationTable false // if used in BCs, could be used by multiple patches ), List<scalar>(2, 0.0), - x0_(readScalar(dict.lookup("x0"))), - dx_(readScalar(dict.lookup("dx"))), + x0_(dict.get<scalar>("x0")), + dx_(dict.get<scalar>("dx")), log10_(dict.lookupOrDefault<Switch>("log10", false)), bound_(dict.lookupOrDefault<Switch>("bound", false)) { if (initialiseOnly) { - const scalar xMax = readScalar(dict.lookup("xMax")); + const scalar xMax = dict.get<scalar>("xMax"); const label nIntervals = static_cast<label>(xMax - x0_)/dx_ + 1; this->setSize(nIntervals); } diff --git a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/dummyAgglomeration/dummyAgglomeration.C b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/dummyAgglomeration/dummyAgglomeration.C index b189aaaf2c4ba9de72f289c54eca2a978ace57af..6d6df0ab11f40d6bbdeed209f6d4de43b490408a 100644 --- a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/dummyAgglomeration/dummyAgglomeration.C +++ b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/dummyAgglomeration/dummyAgglomeration.C @@ -50,7 +50,7 @@ Foam::dummyAgglomeration::dummyAgglomeration ) : GAMGAgglomeration(mesh, controlDict), - nLevels_(readLabel(controlDict.lookup("nLevels"))) + nLevels_(controlDict.get<label>("nLevels")) { const label nCoarseCells = mesh.lduAddr().size(); diff --git a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGProcAgglomerations/procFacesGAMGProcAgglomeration/procFacesGAMGProcAgglomeration.C b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGProcAgglomerations/procFacesGAMGProcAgglomeration/procFacesGAMGProcAgglomeration.C index 360877ba7eeaca0f84205a5b242c1862a3367467..484289bedc6f9ff0caf2bd2ae80663e1a4e022f3 100644 --- a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGProcAgglomerations/procFacesGAMGProcAgglomeration/procFacesGAMGProcAgglomeration.C +++ b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGProcAgglomerations/procFacesGAMGProcAgglomeration/procFacesGAMGProcAgglomeration.C @@ -223,7 +223,7 @@ Foam::procFacesGAMGProcAgglomeration::procFacesGAMGProcAgglomeration ) : GAMGProcAgglomeration(agglom, controlDict), - nAgglomeratingCells_(readLabel(controlDict.lookup("nAgglomeratingCells"))) + nAgglomeratingCells_(controlDict.get<label>("nAgglomeratingCells")) {} diff --git a/src/OpenFOAM/matrices/solution/solution.C b/src/OpenFOAM/matrices/solution/solution.C index 982c3398b65d84a6c6ace821cd038b232661d90c..b08dde5b91e17eb50c7f250e2b90f43d1113df69 100644 --- a/src/OpenFOAM/matrices/solution/solution.C +++ b/src/OpenFOAM/matrices/solution/solution.C @@ -74,7 +74,7 @@ void Foam::solution::read(const dictionary& dict) forAll(entryNames, i) { const word& e = entryNames[i]; - scalar value = readScalar(relaxDict.lookup(e)); + scalar value = relaxDict.get<scalar>(e); if (e.startsWith("p")) { @@ -274,7 +274,7 @@ Foam::scalar Foam::solution::fieldRelaxationFactor(const word& name) const if (fieldRelaxDict_.found(name)) { - return readScalar(fieldRelaxDict_.lookup(name)); + return fieldRelaxDict_.get<scalar>(name); } else if (fieldRelaxDefault_ > SMALL) { @@ -303,7 +303,7 @@ Foam::scalar Foam::solution::equationRelaxationFactor(const word& name) const if (eqnRelaxDict_.found(name)) { - return readScalar(eqnRelaxDict_.lookup(name)); + return eqnRelaxDict_.get<scalar>(name); } else if (eqnRelaxDefault_ > SMALL) { @@ -327,12 +327,10 @@ const Foam::dictionary& Foam::solution::solutionDict() const { if (found("select")) { - return subDict(word(lookup("select"))); - } - else - { - return *this; + return subDict(get<word>("select")); } + + return *this; } @@ -366,10 +364,8 @@ bool Foam::solution::read() return true; } - else - { - return false; - } + + return false; } diff --git a/src/OpenFOAM/matrices/tolerances/tolerances.C b/src/OpenFOAM/matrices/tolerances/tolerances.C index 8d4303cfac988989398372769ca0acff45c3dc0d..76e4440a13ea88b6d0b296a54361f21f3b3f3291 100644 --- a/src/OpenFOAM/matrices/tolerances/tolerances.C +++ b/src/OpenFOAM/matrices/tolerances/tolerances.C @@ -93,13 +93,13 @@ bool Foam::tolerances::relax(const word& name) const Foam::scalar Foam::tolerances::relaxationFactor(const word& name) const { - return readScalar(relaxationFactors_.lookup(name)); + return relaxationFactors_.get<scalar>(name); } Foam::scalar Foam::tolerances::solverTolerance(const word& name) const { - return readScalar(solverTolerances_.lookup(name)); + return solverTolerances_.get<scalar>(name); } @@ -111,7 +111,7 @@ bool Foam::tolerances::solverRelativeTolerances() const Foam::scalar Foam::tolerances::solverRelativeTolerance(const word& name) const { - return readScalar(solverRelativeTolerances_.lookup(name)); + return solverRelativeTolerances_.get<scalar>(name); } diff --git a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/processor/processorPolyPatch.C b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/processor/processorPolyPatch.C index 42b89d400d1a7ef6e1d16e45289a82dc6592d6de..9288f7809bd0a148d4b592a33a1e82fc64c220ea 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/processor/processorPolyPatch.C +++ b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/processor/processorPolyPatch.C @@ -109,8 +109,8 @@ Foam::processorPolyPatch::processorPolyPatch ) : coupledPolyPatch(name, dict, index, bm, patchType), - myProcNo_(readLabel(dict.lookup("myProcNo"))), - neighbProcNo_(readLabel(dict.lookup("neighbProcNo"))), + myProcNo_(dict.get<label>("myProcNo")), + neighbProcNo_(dict.get<label>("neighbProcNo")), neighbFaceCentres_(), neighbFaceAreas_(), neighbFaceCellCentres_() diff --git a/src/OpenFOAM/meshes/polyMesh/polyPatches/polyPatch/polyPatch.C b/src/OpenFOAM/meshes/polyMesh/polyPatches/polyPatch/polyPatch.C index f1cb956a57e5183dd414b80b14a108c78c0e53fd..2c9a8aaedf2cd25f67c346f305692ba022da88c0 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyPatches/polyPatch/polyPatch.C +++ b/src/OpenFOAM/meshes/polyMesh/polyPatches/polyPatch/polyPatch.C @@ -146,12 +146,12 @@ Foam::polyPatch::polyPatch faceSubList ( bm.mesh().faces(), - readLabel(dict.lookup("nFaces")), - readLabel(dict.lookup("startFace")) + dict.get<label>("nFaces"), + dict.get<label>("startFace") ), bm.mesh().points() ), - start_(readLabel(dict.lookup("startFace"))), + start_(dict.get<label>("startFace")), boundaryMesh_(bm), faceCellsPtr_(nullptr), mePtr_(nullptr) diff --git a/src/OpenFOAM/primitives/functions/Function1/CSV/CSV.C b/src/OpenFOAM/primitives/functions/Function1/CSV/CSV.C index 4ddc9123dcbd5acbfa3aeaa11f8bcc66b3196d8c..93836d807b9ba2f2c220d20f2feb805fe7576ef7 100644 --- a/src/OpenFOAM/primitives/functions/Function1/CSV/CSV.C +++ b/src/OpenFOAM/primitives/functions/Function1/CSV/CSV.C @@ -209,12 +209,12 @@ Foam::Function1Types::CSV<Type>::CSV ) : TableBase<Type>(entryName, dict), - nHeaderLine_(readLabel(dict.lookup("nHeaderLine"))), - refColumn_(readLabel(dict.lookup("refColumn"))), + nHeaderLine_(dict.get<label>("nHeaderLine")), + refColumn_(dict.get<label>("refColumn")), componentColumns_(dict.lookup("componentColumns")), - separator_(dict.lookupOrDefault<string>("separator", string(","))[0]), - mergeSeparators_(readBool(dict.lookup("mergeSeparators"))), - fName_(fName != fileName::null ? fName : dict.lookup("file")) + separator_(dict.lookupOrDefault<string>("separator", ",")[0]), + mergeSeparators_(dict.get<bool>("mergeSeparators")), + fName_(fName.empty() ? dict.get<fileName>("file") : fName) { if (componentColumns_.size() != pTraits<Type>::nComponents) { diff --git a/src/OpenFOAM/primitives/functions/Function1/ramp/ramp.C b/src/OpenFOAM/primitives/functions/Function1/ramp/ramp.C index 1f39dafa3edf6e266d37e4a044f75c27be95d8dc..61b5435b6a1e5b19d2c3a7f8fe7899e73324aa58 100644 --- a/src/OpenFOAM/primitives/functions/Function1/ramp/ramp.C +++ b/src/OpenFOAM/primitives/functions/Function1/ramp/ramp.C @@ -30,7 +30,7 @@ License void Foam::Function1Types::ramp::read(const dictionary& coeffs) { start_ = coeffs.lookupOrDefault<scalar>("start", 0); - duration_ = coeffs.get<scalar>("duration"); + coeffs.readEntry("duration", duration_); } diff --git a/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/convectiveHeatTransfer/convectiveHeatTransferFvPatchScalarField.C b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/convectiveHeatTransfer/convectiveHeatTransferFvPatchScalarField.C index 6ba0630240d52dfb34c65dd7c57b1921b7468e25..ea72a774f956df53b0db3cc5dd7a0136632e251e 100644 --- a/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/convectiveHeatTransfer/convectiveHeatTransferFvPatchScalarField.C +++ b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/convectiveHeatTransfer/convectiveHeatTransferFvPatchScalarField.C @@ -72,7 +72,7 @@ convectiveHeatTransferFvPatchScalarField ) : fixedValueFvPatchScalarField(p, iF, dict), - L_(readScalar(dict.lookup("L"))) + L_(dict.get<scalar>("L")) {} diff --git a/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/lumpedMassWallTemperature/lumpedMassWallTemperatureFvPatchScalarField.C b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/lumpedMassWallTemperature/lumpedMassWallTemperatureFvPatchScalarField.C index fefc7a9409c70b6a3be7239fd24e9b35075a9fab..9a9da7fa01a1a30432aa74a307a3c78a87737094 100644 --- a/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/lumpedMassWallTemperature/lumpedMassWallTemperatureFvPatchScalarField.C +++ b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/lumpedMassWallTemperature/lumpedMassWallTemperatureFvPatchScalarField.C @@ -77,8 +77,8 @@ lumpedMassWallTemperatureFvPatchScalarField : mixedFvPatchScalarField(p, iF), temperatureCoupledBase(patch(), dict), - Cp_(readScalar(dict.lookup("Cp"))), - mass_(readScalar(dict.lookup("mass"))), + Cp_(dict.get<scalar>("Cp")), + mass_(dict.get<scalar>("mass")), curTimeIndex_(-1) { refGrad() = 0.0; diff --git a/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/outletMachNumberPressure/outletMachNumberPressureFvPatchScalarField.C b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/outletMachNumberPressure/outletMachNumberPressureFvPatchScalarField.C index 16335a2ba2354f2361ee84db3d9771455c272b8d..0e4f3e24a33e014a5063d003c4a91a0139ed4652 100644 --- a/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/outletMachNumberPressure/outletMachNumberPressureFvPatchScalarField.C +++ b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/outletMachNumberPressure/outletMachNumberPressureFvPatchScalarField.C @@ -63,7 +63,7 @@ outletMachNumberPressureFvPatchScalarField : fixedValueFvPatchScalarField(p, iF, dict), M_(dict.lookupOrDefault<scalar>("M", 0.0)), - pBack_(readScalar(dict.lookup("pBack"))), + pBack_(dict.get<scalar>("pBack")), c1_(dict.lookupOrDefault<scalar>("c1", 0.0)), A1_(dict.lookupOrDefault<scalar>("A1", 0.0)), phiName_(dict.lookupOrDefault<word>("phi", "phi")), diff --git a/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/outletMappedUniformInletHeatAddition/outletMappedUniformInletHeatAdditionFvPatchField.C b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/outletMappedUniformInletHeatAddition/outletMappedUniformInletHeatAdditionFvPatchField.C index 3cf2ce56d610b7d1e03064af60440b52fe621275..28b3f220f1ace7deebb228db6f211a6c9e76d459 100644 --- a/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/outletMappedUniformInletHeatAddition/outletMappedUniformInletHeatAdditionFvPatchField.C +++ b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/outletMappedUniformInletHeatAddition/outletMappedUniformInletHeatAdditionFvPatchField.C @@ -76,7 +76,7 @@ outletMappedUniformInletHeatAdditionFvPatchField fixedValueFvPatchScalarField(p, iF, dict), outletPatchName_(dict.lookup("outletPatch")), phiName_(dict.lookupOrDefault<word>("phi", "phi")), - Q_(readScalar(dict.lookup("Q"))), + Q_(dict.get<scalar>("Q")), TMin_(dict.lookupOrDefault<scalar>("TMin", 0)), TMax_(dict.lookupOrDefault<scalar>("TMax", 5000)) {} diff --git a/src/TurbulenceModels/incompressible/turbulentTransportModels/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatJayatillekeWallFunction/alphatJayatillekeWallFunctionFvPatchScalarField.C b/src/TurbulenceModels/incompressible/turbulentTransportModels/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatJayatillekeWallFunction/alphatJayatillekeWallFunctionFvPatchScalarField.C index f4988cd4aa94242c7dd54f0a6fc48afe19c1bedd..cb337c1d0bd0492e4ea5dc4178a12de3b86466b7 100644 --- a/src/TurbulenceModels/incompressible/turbulentTransportModels/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatJayatillekeWallFunction/alphatJayatillekeWallFunctionFvPatchScalarField.C +++ b/src/TurbulenceModels/incompressible/turbulentTransportModels/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatJayatillekeWallFunction/alphatJayatillekeWallFunctionFvPatchScalarField.C @@ -175,7 +175,7 @@ alphatJayatillekeWallFunctionFvPatchScalarField ) : fixedValueFvPatchScalarField(p, iF, dict), - Prt_(readScalar(dict.lookup("Prt"))), // force read to avoid ambiguity + Prt_(dict.get<scalar>("Prt")), // force read to avoid ambiguity kappa_(dict.lookupOrDefault<scalar>("kappa", 0.41)), E_(dict.lookupOrDefault<scalar>("E", 9.8)) { diff --git a/src/TurbulenceModels/turbulenceModels/LES/LESdeltas/smoothDelta/smoothDelta.C b/src/TurbulenceModels/turbulenceModels/LES/LESdeltas/smoothDelta/smoothDelta.C index d12932df9a7945bea22a4658a020c19fec613fe8..2d01bf89bc86a86c5a6e1be9cd5301c7afacf970 100644 --- a/src/TurbulenceModels/turbulenceModels/LES/LESdeltas/smoothDelta/smoothDelta.C +++ b/src/TurbulenceModels/turbulenceModels/LES/LESdeltas/smoothDelta/smoothDelta.C @@ -161,10 +161,7 @@ Foam::LESModels::smoothDelta::smoothDelta ), maxDeltaRatio_ ( - readScalar - ( - dict.optionalSubDict(type() + "Coeffs").lookup("maxDeltaRatio") - ) + dict.optionalSubDict(type() + "Coeffs").get<scalar>("maxDeltaRatio") ) { calcDelta(); diff --git a/src/TurbulenceModels/turbulenceModels/LES/LESfilters/anisotropicFilter/anisotropicFilter.C b/src/TurbulenceModels/turbulenceModels/LES/LESfilters/anisotropicFilter/anisotropicFilter.C index b4ef0a2bb839b9a4f8ef01ffafd3bed0b801b069..56982e732ae40f0db04bc9f77e172fa16de948ea 100644 --- a/src/TurbulenceModels/turbulenceModels/LES/LESfilters/anisotropicFilter/anisotropicFilter.C +++ b/src/TurbulenceModels/turbulenceModels/LES/LESfilters/anisotropicFilter/anisotropicFilter.C @@ -86,7 +86,7 @@ Foam::anisotropicFilter::anisotropicFilter LESfilter(mesh), widthCoeff_ ( - readScalar(bd.optionalSubDict(type() + "Coeffs").lookup("widthCoeff")) + bd.optionalSubDict(type() + "Coeffs").get<scalar>("widthCoeff") ), coeff_ ( diff --git a/src/TurbulenceModels/turbulenceModels/LES/LESfilters/laplaceFilter/laplaceFilter.C b/src/TurbulenceModels/turbulenceModels/LES/LESfilters/laplaceFilter/laplaceFilter.C index 8f2e985c983182ba2d651367089c382a57aee98a..8d48acabf4376af9c356175bcff484220952940c 100644 --- a/src/TurbulenceModels/turbulenceModels/LES/LESfilters/laplaceFilter/laplaceFilter.C +++ b/src/TurbulenceModels/turbulenceModels/LES/LESfilters/laplaceFilter/laplaceFilter.C @@ -66,7 +66,7 @@ Foam::laplaceFilter::laplaceFilter(const fvMesh& mesh, const dictionary& bd) LESfilter(mesh), widthCoeff_ ( - readScalar(bd.optionalSubDict(type() + "Coeffs").lookup("widthCoeff")) + bd.optionalSubDict(type() + "Coeffs").get<scalar>("widthCoeff") ), coeff_ ( diff --git a/src/TurbulenceModels/turbulenceModels/RAS/derivedFvPatchFields/turbulentMixingLengthDissipationRateInlet/turbulentMixingLengthDissipationRateInletFvPatchScalarField.C b/src/TurbulenceModels/turbulenceModels/RAS/derivedFvPatchFields/turbulentMixingLengthDissipationRateInlet/turbulentMixingLengthDissipationRateInletFvPatchScalarField.C index 5da68948f99cacfbb6fc34adc991051006492f70..cbf192fe9a367daf5d0e66a62382493bf9e299d8 100644 --- a/src/TurbulenceModels/turbulenceModels/RAS/derivedFvPatchFields/turbulentMixingLengthDissipationRateInlet/turbulentMixingLengthDissipationRateInletFvPatchScalarField.C +++ b/src/TurbulenceModels/turbulenceModels/RAS/derivedFvPatchFields/turbulentMixingLengthDissipationRateInlet/turbulentMixingLengthDissipationRateInletFvPatchScalarField.C @@ -78,7 +78,7 @@ turbulentMixingLengthDissipationRateInletFvPatchScalarField ) : inletOutletFvPatchScalarField(p, iF), - mixingLength_(readScalar(dict.lookup("mixingLength"))), + mixingLength_(dict.get<scalar>("mixingLength")), kName_(dict.lookupOrDefault<word>("k", "k")) { this->phiName_ = dict.lookupOrDefault<word>("phi", "phi"); diff --git a/src/TurbulenceModels/turbulenceModels/RAS/derivedFvPatchFields/turbulentMixingLengthFrequencyInlet/turbulentMixingLengthFrequencyInletFvPatchScalarField.C b/src/TurbulenceModels/turbulenceModels/RAS/derivedFvPatchFields/turbulentMixingLengthFrequencyInlet/turbulentMixingLengthFrequencyInletFvPatchScalarField.C index 7107217c85856155994b9062273bab62a8741b1f..84ae93b19d2fba6cbbdbd33b5477f074a7878652 100644 --- a/src/TurbulenceModels/turbulenceModels/RAS/derivedFvPatchFields/turbulentMixingLengthFrequencyInlet/turbulentMixingLengthFrequencyInletFvPatchScalarField.C +++ b/src/TurbulenceModels/turbulenceModels/RAS/derivedFvPatchFields/turbulentMixingLengthFrequencyInlet/turbulentMixingLengthFrequencyInletFvPatchScalarField.C @@ -76,7 +76,7 @@ turbulentMixingLengthFrequencyInletFvPatchScalarField ) : inletOutletFvPatchScalarField(p, iF), - mixingLength_(readScalar(dict.lookup("mixingLength"))), + mixingLength_(dict.get<scalar>("mixingLength")), kName_(dict.lookupOrDefault<word>("k", "k")) { this->phiName_ = dict.lookupOrDefault<word>("phi", "phi"); diff --git a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/porousBafflePressure/porousBafflePressureFvPatchField.C b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/porousBafflePressure/porousBafflePressureFvPatchField.C index be957dcaac1bb38a8d6de90b815c1a0fb70609e3..2dced993d6f796dbe3a72b7546e28f18ca7cc1f1 100644 --- a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/porousBafflePressure/porousBafflePressureFvPatchField.C +++ b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/porousBafflePressure/porousBafflePressureFvPatchField.C @@ -58,7 +58,7 @@ Foam::porousBafflePressureFvPatchField::porousBafflePressureFvPatchField rhoName_(dict.lookupOrDefault<word>("rho", "rho")), D_(Function1<scalar>::New("D", dict)), I_(Function1<scalar>::New("I", dict)), - length_(readScalar(dict.lookup("length"))), + length_(dict.get<scalar>("length")), uniformJump_(dict.lookupOrDefault("uniformJump", false)) { fvPatchField<scalar>::operator= diff --git a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutURoughWallFunction/nutURoughWallFunctionFvPatchScalarField.C b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutURoughWallFunction/nutURoughWallFunctionFvPatchScalarField.C index cef7574691dc16adb30954e6e86569336970649b..5e256b515b798bdc54ad26bdc60d0efe70f11e24 100644 --- a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutURoughWallFunction/nutURoughWallFunctionFvPatchScalarField.C +++ b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutURoughWallFunction/nutURoughWallFunctionFvPatchScalarField.C @@ -238,9 +238,9 @@ nutURoughWallFunctionFvPatchScalarField::nutURoughWallFunctionFvPatchScalarField ) : nutWallFunctionFvPatchScalarField(p, iF, dict), - roughnessHeight_(readScalar(dict.lookup("roughnessHeight"))), - roughnessConstant_(readScalar(dict.lookup("roughnessConstant"))), - roughnessFactor_(readScalar(dict.lookup("roughnessFactor"))) + roughnessHeight_(dict.get<scalar>("roughnessHeight")), + roughnessConstant_(dict.get<scalar>("roughnessConstant")), + roughnessFactor_(dict.get<scalar>("roughnessFactor")) {} diff --git a/src/atmosphericModels/derivedFvPatchFields/atmBoundaryLayer/atmBoundaryLayer.C b/src/atmosphericModels/derivedFvPatchFields/atmBoundaryLayer/atmBoundaryLayer.C index aabf2bab690b74bb3bc361e4813e4786ae960c85..9c4faaf498bfc628692b100f88a8268c542e4c6c 100644 --- a/src/atmosphericModels/derivedFvPatchFields/atmBoundaryLayer/atmBoundaryLayer.C +++ b/src/atmosphericModels/derivedFvPatchFields/atmBoundaryLayer/atmBoundaryLayer.C @@ -52,8 +52,8 @@ atmBoundaryLayer::atmBoundaryLayer(const vectorField& p, const dictionary& dict) zDir_(dict.lookup("zDir")), kappa_(dict.lookupOrDefault<scalar>("kappa", 0.41)), Cmu_(dict.lookupOrDefault<scalar>("Cmu", 0.09)), - Uref_(readScalar(dict.lookup("Uref"))), - Zref_(readScalar(dict.lookup("Zref"))), + Uref_(dict.get<scalar>("Uref")), + Zref_(dict.get<scalar>("Zref")), z0_("z0", dict, p.size()), zGround_("zGround", dict, p.size()), Ustar_(p.size()) diff --git a/src/atmosphericModels/kEpsilonLopesdaCosta/kEpsilonLopesdaCosta.C b/src/atmosphericModels/kEpsilonLopesdaCosta/kEpsilonLopesdaCosta.C index 6686114c1dea0d775063c7950310da45753b6600..cd5407a8b9c96149ef4e598c83e9c1d53d0e12ea 100644 --- a/src/atmosphericModels/kEpsilonLopesdaCosta/kEpsilonLopesdaCosta.C +++ b/src/atmosphericModels/kEpsilonLopesdaCosta/kEpsilonLopesdaCosta.C @@ -48,7 +48,7 @@ void kEpsilonLopesdaCosta<BasicTurbulenceModel>::setPorosityCoefficient { const labelList& cellZoneIDs = pm.cellZoneIDs(); - const scalar Cpm = readScalar(pm.dict().lookup(C.name())); + const scalar Cpm = pm.dict().get<scalar>(C.name()); for (const label zonei : cellZoneIDs) { @@ -75,7 +75,7 @@ void kEpsilonLopesdaCosta<BasicTurbulenceModel>::setCdSigma const labelList& cellZoneIDs = pm.cellZoneIDs(); const scalarField& Sigma = pm.Sigma(); - const scalar Cpm = readScalar(pm.dict().lookup(C.name())); + const scalar Cpm = pm.dict().get<scalar>(C.name()); for (const label zonei : cellZoneIDs) { diff --git a/src/atmosphericModels/porosityModels/powerLawLopesdaCosta/powerLawLopesdaCosta.C b/src/atmosphericModels/porosityModels/powerLawLopesdaCosta/powerLawLopesdaCosta.C index e5d13f50e9946f92f3d4a5818e729ea73c184953..c138ee93368f65150c0c792067b9302d5288cc1f 100644 --- a/src/atmosphericModels/porosityModels/powerLawLopesdaCosta/powerLawLopesdaCosta.C +++ b/src/atmosphericModels/porosityModels/powerLawLopesdaCosta/powerLawLopesdaCosta.C @@ -60,7 +60,7 @@ Foam::porosityModels::powerLawLopesdaCostaZone::powerLawLopesdaCostaZone vector zDir(coeffs.lookup("zDir")); // Span of the search for the cells in the porous region - scalar searchSpan(readScalar(coeffs.lookup("searchSpan"))); + scalar searchSpan(coeffs.get<scalar>("searchSpan")); // Top surface file name defining the extent of the porous region word topSurfaceFileName(coeffs.lookup("topSurface")); @@ -305,8 +305,8 @@ Foam::porosityModels::powerLawLopesdaCosta::powerLawLopesdaCosta dict, powerLawLopesdaCostaZone::zoneName_ ), - Cd_(readScalar(coeffs_.lookup("Cd"))), - C1_(readScalar(coeffs_.lookup("C1"))), + Cd_(coeffs_.get<scalar>("Cd")), + C1_(coeffs_.get<scalar>("C1")), rhoName_(coeffs_.lookupOrDefault<word>("rho", "rho")) {} diff --git a/src/combustionModels/FSD/FSD.C b/src/combustionModels/FSD/FSD.C index aef2d8a24ab1912abba57020a07427adca6450c0..8e0b549839ed05ee38501de4fa225a3a7ce29089 100644 --- a/src/combustionModels/FSD/FSD.C +++ b/src/combustionModels/FSD/FSD.C @@ -76,12 +76,12 @@ FSD<ReactionThermo, ThermoType>::FSD ), YFuelFuelStream_(dimensionedScalar("YFuelStream", dimless, 1.0)), YO2OxiStream_(dimensionedScalar("YOxiStream", dimless, 0.23)), - Cv_(readScalar(this->coeffs().lookup("Cv"))), + Cv_(this->coeffs().getScalar("Cv")), C_(5.0), ftMin_(0.0), ftMax_(1.0), ftDim_(300), - ftVarMin_(readScalar(this->coeffs().lookup("ftVarMin"))) + ftVarMin_(this->coeffs().getScalar("ftVarMin")) {} diff --git a/src/combustionModels/FSD/reactionRateFlameAreaModels/consumptionSpeed/consumptionSpeed.C b/src/combustionModels/FSD/reactionRateFlameAreaModels/consumptionSpeed/consumptionSpeed.C index 4e87601c0f48164b6b0d191601a7927b0dbbfe48..afdc516f38d00675cceb76dc581498a7d6460e91 100644 --- a/src/combustionModels/FSD/reactionRateFlameAreaModels/consumptionSpeed/consumptionSpeed.C +++ b/src/combustionModels/FSD/reactionRateFlameAreaModels/consumptionSpeed/consumptionSpeed.C @@ -39,10 +39,10 @@ Foam::consumptionSpeed::consumptionSpeed ( const dictionary& dict ) -: omega0_(readScalar(dict.lookup("omega0"))), - eta_(readScalar(dict.lookup("eta"))), - sigmaExt_(readScalar(dict.lookup("sigmaExt"))), - omegaMin_(readScalar(dict.lookup("omegaMin"))) +: omega0_(dict.get<scalar>("omega0")), + eta_(dict.get<scalar>("eta")), + sigmaExt_(dict.get<scalar>("sigmaExt")), + omegaMin_(dict.get<scalar>("omegaMin")) {} diff --git a/src/combustionModels/FSD/reactionRateFlameAreaModels/relaxation/relaxation.C b/src/combustionModels/FSD/reactionRateFlameAreaModels/relaxation/relaxation.C index 5d17baa771ed3767e30e86cfefc48f111275dd39..f3d23c6a787c1859838a226d3a81eb97b6f3febe 100644 --- a/src/combustionModels/FSD/reactionRateFlameAreaModels/relaxation/relaxation.C +++ b/src/combustionModels/FSD/reactionRateFlameAreaModels/relaxation/relaxation.C @@ -57,11 +57,8 @@ Foam::reactionRateFlameAreaModels::relaxation::relaxation : reactionRateFlameArea(modelType, dict, mesh, combModel), correlation_(dict.optionalSubDict(typeName + "Coeffs").subDict(fuel_)), - C_(readScalar(dict.optionalSubDict(typeName + "Coeffs").lookup("C"))), - alpha_ - ( - readScalar(dict.optionalSubDict(typeName + "Coeffs").lookup("alpha")) - ) + C_(dict.optionalSubDict(typeName + "Coeffs").get<scalar>("C")), + alpha_(dict.optionalSubDict(typeName + "Coeffs").get<scalar>("alpha")) {} diff --git a/src/combustionModels/PaSR/PaSR.C b/src/combustionModels/PaSR/PaSR.C index 2dd35b878e43e457d7a8d0d1acca015b9be1a3c1..113e643f57bd1574bd03d009bb60320645fb4bf4 100644 --- a/src/combustionModels/PaSR/PaSR.C +++ b/src/combustionModels/PaSR/PaSR.C @@ -37,7 +37,7 @@ Foam::combustionModels::PaSR<ReactionThermo>::PaSR ) : laminar<ReactionThermo>(modelType, thermo, turb, combustionProperties), - Cmix_(readScalar(this->coeffs().lookup("Cmix"))), + Cmix_(this->coeffs().getScalar("Cmix")), kappa_ ( IOobject diff --git a/src/combustionModels/diffusion/diffusion.C b/src/combustionModels/diffusion/diffusion.C index b4a919e0c4d357f610e478fea3483085a27bd164..0bc874883d4292d9c56d85a98b9564ab9320d24c 100644 --- a/src/combustionModels/diffusion/diffusion.C +++ b/src/combustionModels/diffusion/diffusion.C @@ -49,7 +49,7 @@ diffusion<ReactionThermo, ThermoType>::diffusion turb, combustionProperties ), - C_(readScalar(this->coeffs().lookup("C"))), + C_(this->coeffs().getScalar("C")), oxidantName_(this->coeffs().template lookupOrDefault<word>("oxidant", "O2")) {} diff --git a/src/combustionModels/eddyDissipationDiffusionModel/eddyDissipationDiffusionModel.C b/src/combustionModels/eddyDissipationDiffusionModel/eddyDissipationDiffusionModel.C index 4f95db380f9f53bd95649fb02978383edfd16f87..ed63f0f2464dcf0c7ea5875bbc02709472e76f8b 100644 --- a/src/combustionModels/eddyDissipationDiffusionModel/eddyDissipationDiffusionModel.C +++ b/src/combustionModels/eddyDissipationDiffusionModel/eddyDissipationDiffusionModel.C @@ -48,7 +48,7 @@ eddyDissipationDiffusionModel turb, combustionProperties ), - Cd_(readScalar(this->coeffs().lookup("Cd"))) + Cd_(this->coeffs().getScalar("Cd")) {} diff --git a/src/combustionModels/eddyDissipationModelBase/eddyDissipationModelBase.C b/src/combustionModels/eddyDissipationModelBase/eddyDissipationModelBase.C index a2f280f5b825a2f2c744152d1e6d6f9a28ae9bdb..cd7f45e7db05219f76331756e46bb94ff02ea4d4 100644 --- a/src/combustionModels/eddyDissipationModelBase/eddyDissipationModelBase.C +++ b/src/combustionModels/eddyDissipationModelBase/eddyDissipationModelBase.C @@ -48,7 +48,7 @@ eddyDissipationModelBase<ReactionThermo, ThermoType>::eddyDissipationModelBase turb, combustionProperties ), - CEDC_(readScalar(this->coeffs().lookup("CEDC"))) + CEDC_(this->coeffs().getScalar("CEDC")) {} diff --git a/src/combustionModels/infinitelyFastChemistry/infinitelyFastChemistry.C b/src/combustionModels/infinitelyFastChemistry/infinitelyFastChemistry.C index eb80809febd600360ffa97358ccf7c7714385b8d..68661ee08117c89a36a38c5ddca83a76dbe241dc 100644 --- a/src/combustionModels/infinitelyFastChemistry/infinitelyFastChemistry.C +++ b/src/combustionModels/infinitelyFastChemistry/infinitelyFastChemistry.C @@ -48,7 +48,7 @@ infinitelyFastChemistry<ReactionThermo, ThermoType>::infinitelyFastChemistry turb, combustionProperties ), - C_(readScalar(this->coeffs().lookup("C"))) + C_(this->coeffs().getScalar("C")) {} diff --git a/src/combustionModels/singleStepCombustion/singleStepCombustion.C b/src/combustionModels/singleStepCombustion/singleStepCombustion.C index 718aedd69a5deee80089be58a47573d5b2d80975..f5800e556d7c7bcc9ceb54457917f66af142e184 100644 --- a/src/combustionModels/singleStepCombustion/singleStepCombustion.C +++ b/src/combustionModels/singleStepCombustion/singleStepCombustion.C @@ -57,7 +57,7 @@ singleStepCombustion<ReactionThermo, ThermoType>::singleStepCombustion this->mesh(), dimensionedScalar(dimMass/dimVolume/dimTime, Zero) ), - semiImplicit_(readBool(this->coeffs_.lookup("semiImplicit"))) + semiImplicit_(this->coeffs_.getBool("semiImplicit")) { if (isA<singleStepReactingMixture<ThermoType>>(this->thermo())) { diff --git a/src/conversion/ccm/writer/ccmWriterSolution.C b/src/conversion/ccm/writer/ccmWriterSolution.C index 5a48e864e6f0f50a2a27652a8263d2f174c4cc82..32f7e01ee8a13db592c2473c759b05d00b4b0574 100644 --- a/src/conversion/ccm/writer/ccmWriterSolution.C +++ b/src/conversion/ccm/writer/ccmWriterSolution.C @@ -371,7 +371,7 @@ void Foam::ccm::writer::writeSolution if (io.typeHeaderOk<IOdictionary>(true)) { - timeIndex = IOdictionary(io).get<label>("index"); + IOdictionary(io).readEntry("index", timeIndex); } } diff --git a/src/dynamicFvMesh/dynamicInkJetFvMesh/dynamicInkJetFvMesh.C b/src/dynamicFvMesh/dynamicInkJetFvMesh/dynamicInkJetFvMesh.C index 03e4290f3e1dbdf6258720e250009b03d047ab48..a25277ed9ccba7204ddbe70a175aadecd4daccb4 100644 --- a/src/dynamicFvMesh/dynamicInkJetFvMesh/dynamicInkJetFvMesh.C +++ b/src/dynamicFvMesh/dynamicInkJetFvMesh/dynamicInkJetFvMesh.C @@ -57,9 +57,9 @@ Foam::dynamicInkJetFvMesh::dynamicInkJetFvMesh(const IOobject& io) ) ).optionalSubDict(typeName + "Coeffs") ), - amplitude_(readScalar(dynamicMeshCoeffs_.lookup("amplitude"))), - frequency_(readScalar(dynamicMeshCoeffs_.lookup("frequency"))), - refPlaneX_(readScalar(dynamicMeshCoeffs_.lookup("refPlaneX"))), + amplitude_(dynamicMeshCoeffs_.get<scalar>("amplitude")), + frequency_(dynamicMeshCoeffs_.get<scalar>("frequency")), + refPlaneX_(dynamicMeshCoeffs_.get<scalar>("refPlaneX")), stationaryPoints_ ( IOobject diff --git a/src/dynamicFvMesh/dynamicRefineFvMesh/dynamicRefineFvMesh.C b/src/dynamicFvMesh/dynamicRefineFvMesh/dynamicRefineFvMesh.C index 266d2c3dbff11037ab24aa8ddfb059c63c3aee24..466b7d4e5ef2a904e4ce8b5ea35623f0f002e495 100644 --- a/src/dynamicFvMesh/dynamicRefineFvMesh/dynamicRefineFvMesh.C +++ b/src/dynamicFvMesh/dynamicRefineFvMesh/dynamicRefineFvMesh.C @@ -192,10 +192,8 @@ void Foam::dynamicRefineFvMesh::readDict() ).optionalSubDict(typeName + "Coeffs") ); - List<Pair<word>> fluxVelocities = List<Pair<word>> - ( - refineDict.lookup("correctFluxes") - ); + auto fluxVelocities = refineDict.get<List<Pair<word>>>("correctFluxes"); + // Rework into hashtable. correctFluxes_.resize(fluxVelocities.size()); forAll(fluxVelocities, i) @@ -203,7 +201,7 @@ void Foam::dynamicRefineFvMesh::readDict() correctFluxes_.insert(fluxVelocities[i][0], fluxVelocities[i][1]); } - dumpLevel_ = refineDict.get<bool>("dumpLevel"); + refineDict.readEntry("dumpLevel", dumpLevel_); } @@ -1209,7 +1207,7 @@ bool Foam::dynamicRefineFvMesh::update() ).optionalSubDict(typeName + "Coeffs") ); - label refineInterval = readLabel(refineDict.lookup("refineInterval")); + label refineInterval = refineDict.get<label>("refineInterval"); bool hasChanged = false; @@ -1236,7 +1234,7 @@ bool Foam::dynamicRefineFvMesh::update() if (time().timeIndex() > 0 && time().timeIndex() % refineInterval == 0) { - label maxCells = readLabel(refineDict.lookup("maxCells")); + label maxCells = refineDict.get<label>("maxCells"); if (maxCells <= 0) { @@ -1247,7 +1245,7 @@ bool Foam::dynamicRefineFvMesh::update() << exit(FatalError); } - label maxRefinement = readLabel(refineDict.lookup("maxRefinement")); + label maxRefinement = refineDict.get<label>("maxRefinement"); if (maxRefinement <= 0) { @@ -1258,21 +1256,23 @@ bool Foam::dynamicRefineFvMesh::update() << exit(FatalError); } - const word fieldName(refineDict.lookup("field")); + const word fieldName(refineDict.get<word>("field")); const volScalarField& vFld = lookupObject<volScalarField>(fieldName); const scalar lowerRefineLevel = - readScalar(refineDict.lookup("lowerRefineLevel")); + refineDict.get<scalar>("lowerRefineLevel"); const scalar upperRefineLevel = - readScalar(refineDict.lookup("upperRefineLevel")); + refineDict.get<scalar>("upperRefineLevel"); + const scalar unrefineLevel = refineDict.lookupOrDefault<scalar> ( "unrefineLevel", GREAT ); + const label nBufferLayers = - readLabel(refineDict.lookup("nBufferLayers")); + refineDict.get<label>("nBufferLayers"); // Cells marked for refinement or otherwise protected from unrefinement. bitSet refineCell(nCells()); diff --git a/src/dynamicMesh/boundaryPatch/boundaryPatch.C b/src/dynamicMesh/boundaryPatch/boundaryPatch.C index 9655b995bb93b8a6ba56f5a840370b5451ca6fe1..11ac05990226a7fd48b4c441f64e18ce44733f93 100644 --- a/src/dynamicMesh/boundaryPatch/boundaryPatch.C +++ b/src/dynamicMesh/boundaryPatch/boundaryPatch.C @@ -52,8 +52,8 @@ Foam::boundaryPatch::boundaryPatch ) : patchIdentifier(name, dict, index), - size_(readLabel(dict.lookup("nFaces"))), - start_(readLabel(dict.lookup("startFace"))) + size_(dict.get<label>("nFaces")), + start_(dict.get<label>("startFace")) {} diff --git a/src/dynamicMesh/extrudePatchMesh/extrudePatchMesh.C b/src/dynamicMesh/extrudePatchMesh/extrudePatchMesh.C index da956b34035f7ae030a215fa908b747b43701e06..26425070983bdd14590333a42252846f6bac0c47 100644 --- a/src/dynamicMesh/extrudePatchMesh/extrudePatchMesh.C +++ b/src/dynamicMesh/extrudePatchMesh/extrudePatchMesh.C @@ -145,7 +145,7 @@ void extrudePatchMesh::extrudeMesh(const List<polyPatch*>& regionPatches) { if (this->boundaryMesh().size() == 0) { - bool columnCells = readBool(dict_.lookup("columnCells")); + const bool columnCells = dict_.get<bool>("columnCells"); bitSet nonManifoldEdge(extrudedPatch_.nEdges()); for (label edgeI = 0; edgeI < extrudedPatch_.nInternalEdges(); edgeI++) diff --git a/src/dynamicMesh/layerAdditionRemoval/layerAdditionRemoval.C b/src/dynamicMesh/layerAdditionRemoval/layerAdditionRemoval.C index 631f247c5cf99c9f2f0ec589e8cce8aac6fcbdef..e5854a771ab896f598fc28de8b8026e77758cd6a 100644 --- a/src/dynamicMesh/layerAdditionRemoval/layerAdditionRemoval.C +++ b/src/dynamicMesh/layerAdditionRemoval/layerAdditionRemoval.C @@ -168,8 +168,8 @@ Foam::layerAdditionRemoval::layerAdditionRemoval : polyMeshModifier(name, index, ptc, dict.get<bool>("active")), faceZoneID_(dict.lookup("faceZoneName"), ptc.mesh().faceZones()), - minLayerThickness_(readScalar(dict.lookup("minLayerThickness"))), - maxLayerThickness_(readScalar(dict.lookup("maxLayerThickness"))), + minLayerThickness_(dict.get<scalar>("minLayerThickness")), + maxLayerThickness_(dict.get<scalar>("maxLayerThickness")), thicknessFromVolume_(dict.lookupOrDefault("thicknessFromVolume", true)), oldLayerThickness_(readOldThickness(dict)), pointsPairingPtr_(nullptr), diff --git a/src/dynamicMesh/motionSmoother/motionSmootherAlgo.C b/src/dynamicMesh/motionSmoother/motionSmootherAlgo.C index a5be6f412bad80fcdc46f49a34222128a52562b7..e565582e86cf7be5c3f0b43788fb4dfc328dc156 100644 --- a/src/dynamicMesh/motionSmoother/motionSmootherAlgo.C +++ b/src/dynamicMesh/motionSmoother/motionSmootherAlgo.C @@ -728,12 +728,12 @@ Foam::scalar Foam::motionSmootherAlgo::setErrorReduction const scalar errorReduction ) { - scalar oldErrorReduction = readScalar(paramDict_.lookup("errorReduction")); + scalar old = paramDict_.get<scalar>("errorReduction"); paramDict_.remove("errorReduction"); paramDict_.add("errorReduction", errorReduction); - return oldErrorReduction; + return old; } @@ -890,10 +890,8 @@ bool Foam::motionSmootherAlgo::scaleMesh } } - const scalar errorReduction = - readScalar(paramDict.lookup("errorReduction")); - const label nSmoothScale = - readLabel(paramDict.lookup("nSmoothScale")); + const scalar errorReduction = paramDict.get<scalar>("errorReduction"); + const label nSmoothScale = paramDict.get<label>("nSmoothScale"); // Note: displacement_ should already be synced already from setDisplacement diff --git a/src/dynamicMesh/motionSmoother/motionSmootherAlgoCheck.C b/src/dynamicMesh/motionSmoother/motionSmootherAlgoCheck.C index 2521d3932f908f144fe17a6efed6f3fa0009aa7a..8a5aadee53fdc43202d0f664ecb5bd5e05c40504 100644 --- a/src/dynamicMesh/motionSmoother/motionSmootherAlgoCheck.C +++ b/src/dynamicMesh/motionSmoother/motionSmootherAlgoCheck.C @@ -62,53 +62,53 @@ bool Foam::motionSmootherAlgo::checkMesh { const scalar maxNonOrtho ( - readScalar(dict.lookup("maxNonOrtho", true)) + dict.get<scalar>("maxNonOrtho", true) ); const scalar minVol ( - readScalar(dict.lookup("minVol", true)) + dict.get<scalar>("minVol", true) ); const scalar minTetQuality ( - readScalar(dict.lookup("minTetQuality", true)) + dict.get<scalar>("minTetQuality", true) ); const scalar maxConcave ( - readScalar(dict.lookup("maxConcave", true)) + dict.get<scalar>("maxConcave", true) ); const scalar minArea ( - readScalar(dict.lookup("minArea", true)) + dict.get<scalar>("minArea", true) ); const scalar maxIntSkew ( - readScalar(dict.lookup("maxInternalSkewness", true)) + dict.get<scalar>("maxInternalSkewness", true) ); const scalar maxBounSkew ( - readScalar(dict.lookup("maxBoundarySkewness", true)) + dict.get<scalar>("maxBoundarySkewness", true) ); const scalar minWeight ( - readScalar(dict.lookup("minFaceWeight", true)) + dict.get<scalar>("minFaceWeight", true) ); const scalar minVolRatio ( - readScalar(dict.lookup("minVolRatio", true)) + dict.get<scalar>("minVolRatio", true) ); const scalar minTwist ( - readScalar(dict.lookup("minTwist", true)) + dict.get<scalar>("minTwist", true) ); const scalar minTriangleTwist ( - readScalar(dict.lookup("minTriangleTwist", true)) + dict.get<scalar>("minTriangleTwist", true) ); scalar minFaceFlatness = -1.0; dict.readIfPresent("minFaceFlatness", minFaceFlatness, true); const scalar minDet ( - readScalar(dict.lookup("minDeterminant", true)) + dict.get<scalar>("minDeterminant", true) ); label nWrongFaces = 0; @@ -467,53 +467,53 @@ bool Foam::motionSmootherAlgo::checkMesh { const scalar maxNonOrtho ( - readScalar(dict.lookup("maxNonOrtho", true)) + dict.get<scalar>("maxNonOrtho", true) ); const scalar minVol ( - readScalar(dict.lookup("minVol", true)) + dict.get<scalar>("minVol", true) ); const scalar minTetQuality ( - readScalar(dict.lookup("minTetQuality", true)) + dict.get<scalar>("minTetQuality", true) ); const scalar maxConcave ( - readScalar(dict.lookup("maxConcave", true)) + dict.get<scalar>("maxConcave", true) ); const scalar minArea ( - readScalar(dict.lookup("minArea", true)) + dict.get<scalar>("minArea", true) ); const scalar maxIntSkew ( - readScalar(dict.lookup("maxInternalSkewness", true)) + dict.get<scalar>("maxInternalSkewness", true) ); const scalar maxBounSkew ( - readScalar(dict.lookup("maxBoundarySkewness", true)) + dict.get<scalar>("maxBoundarySkewness", true) ); const scalar minWeight ( - readScalar(dict.lookup("minFaceWeight", true)) + dict.get<scalar>("minFaceWeight", true) ); const scalar minVolRatio ( - readScalar(dict.lookup("minVolRatio", true)) + dict.get<scalar>("minVolRatio", true) ); const scalar minTwist ( - readScalar(dict.lookup("minTwist", true)) + dict.get<scalar>("minTwist", true) ); const scalar minTriangleTwist ( - readScalar(dict.lookup("minTriangleTwist", true)) + dict.get<scalar>("minTriangleTwist", true) ); scalar minFaceFlatness = -1.0; dict.readIfPresent("minFaceFlatness", minFaceFlatness, true); const scalar minDet ( - readScalar(dict.lookup("minDeterminant", true)) + dict.get<scalar>("minDeterminant", true) ); label nWrongFaces = 0; diff --git a/src/dynamicMesh/perfectInterface/perfectInterface.C b/src/dynamicMesh/perfectInterface/perfectInterface.C index 977ac41e0b5e44b484e933da58e1716677c1309c..8751b82df0ce28a63bfe09a79b7b4032fa56e825 100644 --- a/src/dynamicMesh/perfectInterface/perfectInterface.C +++ b/src/dynamicMesh/perfectInterface/perfectInterface.C @@ -104,7 +104,7 @@ Foam::perfectInterface::perfectInterface const polyTopoChanger& mme ) : - polyMeshModifier(name, index, mme, readBool(dict.lookup("active"))), + polyMeshModifier(name, index, mme, dict.get<bool>("active")), faceZoneID_ ( dict.lookup("faceZoneName"), diff --git a/src/dynamicMesh/polyMeshFilter/polyMeshFilterSettings.C b/src/dynamicMesh/polyMeshFilter/polyMeshFilterSettings.C index 74082b280f2c1cff06b6b6173b57601699a46c38..d6632f339fbdff336f7441783785d690c5d1235d 100644 --- a/src/dynamicMesh/polyMeshFilter/polyMeshFilterSettings.C +++ b/src/dynamicMesh/polyMeshFilter/polyMeshFilterSettings.C @@ -38,14 +38,14 @@ Foam::polyMeshFilterSettings::polyMeshFilterSettings(const dictionary& dict) collapseEdgesCoeffDict_(dict_.subDict("collapseEdgesCoeffs")), collapseFacesCoeffDict_(dict_.subOrEmptyDict("collapseFacesCoeffs")), meshQualityCoeffDict_(dict_.subOrEmptyDict("controlMeshQualityCoeffs")), - minLen_(readScalar(collapseEdgesCoeffDict_.lookup("minimumEdgeLength"))), + minLen_(collapseEdgesCoeffDict_.get<scalar>("minimumEdgeLength")), maxCos_ ( ::cos ( degToRad ( - readScalar(collapseEdgesCoeffDict_.lookup("maximumMergeAngle")) + collapseEdgesCoeffDict_.get<scalar>("maximumMergeAngle") ) ) ), diff --git a/src/engine/ignition/ignitionSiteIO.C b/src/engine/ignition/ignitionSiteIO.C index 9c068394c4ba254d5f68c491bb294e24f73152f5..e5d2d460d898a3a504829e43201054815d7d755e 100644 --- a/src/engine/ignition/ignitionSiteIO.C +++ b/src/engine/ignition/ignitionSiteIO.C @@ -39,22 +39,22 @@ Foam::ignitionSite::ignitionSite mesh_(mesh), ignitionSiteDict_(is), location_(ignitionSiteDict_.lookup("location")), - diameter_(readScalar(ignitionSiteDict_.lookup("diameter"))), + diameter_(ignitionSiteDict_.get<scalar>("diameter")), time_ ( db_.userTimeToTime ( - readScalar(ignitionSiteDict_.lookup("start")) + ignitionSiteDict_.get<scalar>("start") ) ), duration_ ( db_.userTimeToTime ( - readScalar(ignitionSiteDict_.lookup("duration")) + ignitionSiteDict_.get<scalar>("duration") ) ), - strength_(readScalar(ignitionSiteDict_.lookup("strength"))), + strength_(ignitionSiteDict_.get<scalar>("strength")), timeIndex_(db_.timeIndex()) { // Check state of Istream @@ -75,22 +75,28 @@ Foam::ignitionSite::ignitionSite mesh_(mesh), ignitionSiteDict_(is), location_(ignitionSiteDict_.lookup("location")), - diameter_(readScalar(ignitionSiteDict_.lookup("diameter"))), + diameter_(ignitionSiteDict_.get<scalar>("diameter")), time_ ( db_.userTimeToTime ( - edb.userTimeToTime(readScalar(ignitionSiteDict_.lookup("start"))) + edb.userTimeToTime + ( + ignitionSiteDict_.get<scalar>("start") + ) ) ), duration_ ( db_.userTimeToTime ( - edb.userTimeToTime(readScalar(ignitionSiteDict_.lookup("duration"))) + edb.userTimeToTime + ( + ignitionSiteDict_.get<scalar>("duration") + ) ) ), - strength_(readScalar(ignitionSiteDict_.lookup("strength"))), + strength_(ignitionSiteDict_.get<scalar>("strength")), timeIndex_(db_.timeIndex()) { // Check state of Istream diff --git a/src/engine/include/StCorr.H b/src/engine/include/StCorr.H index c3bdc5771f76dad77aa156605d6cdec82a4397fb..b49fee326270a87c20c57224bbef08fa8dde683c 100644 --- a/src/engine/include/StCorr.H +++ b/src/engine/include/StCorr.H @@ -18,12 +18,9 @@ // Assume it is part-spherical scalar sphereFraction ( - readScalar + combustionProperties.get<scalar> ( - combustionProperties.lookup - ( - "ignitionSphereFraction" - ) + "ignitionSphereFraction" ) ); @@ -47,12 +44,9 @@ scalar circleFraction ( - readScalar + combustionProperties.get<scalar> ( - combustionProperties.lookup - ( - "ignitionCircleFraction" - ) + "ignitionCircleFraction" ) ); diff --git a/src/finiteArea/faMesh/faPatches/constraint/processor/processorFaPatch.H b/src/finiteArea/faMesh/faPatches/constraint/processor/processorFaPatch.H index d3f05c47ac6f38e8e4a007c0b4a2eff32ebee4d3..5f791329471c4bab3556312cfe778005d3220a5b 100644 --- a/src/finiteArea/faMesh/faPatches/constraint/processor/processorFaPatch.H +++ b/src/finiteArea/faMesh/faPatches/constraint/processor/processorFaPatch.H @@ -160,8 +160,8 @@ public: ) : coupledFaPatch(name, dict, index, bm), - myProcNo_(readLabel(dict.lookup("myProcNo"))), - neighbProcNo_(readLabel(dict.lookup("neighbProcNo"))), + myProcNo_(dict.get<label>("myProcNo")), + neighbProcNo_(dict.get<label>("neighbProcNo")), neighbEdgeCentres_(), neighbEdgeLengths_(), neighbEdgeFaceCentres_(), diff --git a/src/finiteVolume/cfdTools/general/SRF/SRFModel/rpm/rpm.C b/src/finiteVolume/cfdTools/general/SRF/SRFModel/rpm/rpm.C index 4f9f090641a3fffcc8fbe8d3e1287f2d49e87d5c..eab33b3ad7e9c1c147b4ee6b7b737aebbf573fb5 100644 --- a/src/finiteVolume/cfdTools/general/SRF/SRFModel/rpm/rpm.C +++ b/src/finiteVolume/cfdTools/general/SRF/SRFModel/rpm/rpm.C @@ -62,7 +62,7 @@ bool Foam::SRF::rpm::read() { if (SRFModel::read()) { - rpm_ = SRFModelCoeffs_.get<scalar>("rpm"); + SRFModelCoeffs_.readEntry("rpm", rpm_); omega_.value() = axis_*rpmToRads(rpm_); diff --git a/src/finiteVolume/cfdTools/general/findRefCell/findRefCell.C b/src/finiteVolume/cfdTools/general/findRefCell/findRefCell.C index 51c222005e785817b2e9016aad1617e89f466087..f5cc8f48c6ab5eb4e97b46cc52ac2e71dafd9d98 100644 --- a/src/finiteVolume/cfdTools/general/findRefCell/findRefCell.C +++ b/src/finiteVolume/cfdTools/general/findRefCell/findRefCell.C @@ -47,7 +47,7 @@ bool Foam::setRefCell { if (Pstream::master()) { - refCelli = readLabel(dict.lookup(refCellName)); + dict.readEntry(refCellName, refCelli); if (refCelli < 0 || refCelli >= field.mesh().nCells()) { @@ -66,7 +66,7 @@ bool Foam::setRefCell } else if (dict.found(refPointName)) { - point refPointi(dict.lookup(refPointName)); + point refPointi(dict.get<point>(refPointName)); // Try fast approximate search avoiding octree construction refCelli = field.mesh().findCell(refPointi, polyMesh::FACE_PLANES); @@ -107,14 +107,12 @@ bool Foam::setRefCell << " or " << refPointName << nl << exit(FatalIOError); } - refValue = readScalar(dict.lookup(refValueName)); + dict.readEntry(refValueName, refValue); return true; } - else - { - return false; - } + + return false; } diff --git a/src/finiteVolume/cfdTools/general/include/alphaControls.H b/src/finiteVolume/cfdTools/general/include/alphaControls.H index 796a59a3f1fcf6e49cd34ceec4ae41b1745c0372..cb751b43ae6f3b63c6bd2800d88f6df88dba78c6 100644 --- a/src/finiteVolume/cfdTools/general/include/alphaControls.H +++ b/src/finiteVolume/cfdTools/general/include/alphaControls.H @@ -1,8 +1,8 @@ const dictionary& alphaControls = mesh.solverDict(alpha1.name()); -label nAlphaCorr(readLabel(alphaControls.lookup("nAlphaCorr"))); +label nAlphaCorr(alphaControls.get<label>("nAlphaCorr")); -label nAlphaSubCycles(readLabel(alphaControls.lookup("nAlphaSubCycles"))); +label nAlphaSubCycles(alphaControls.get<label>("nAlphaSubCycles")); bool MULESCorr(alphaControls.lookupOrDefault("MULESCorr", false)); diff --git a/src/finiteVolume/cfdTools/general/pressureControl/pressureControl.C b/src/finiteVolume/cfdTools/general/pressureControl/pressureControl.C index bcd8ebd5f09ca99b719c2c1033715b937f51f9b3..64714450ce2a0d0864040e43881ec0ba490a9da1 100644 --- a/src/finiteVolume/cfdTools/general/pressureControl/pressureControl.C +++ b/src/finiteVolume/cfdTools/general/pressureControl/pressureControl.C @@ -39,7 +39,7 @@ Foam::pressureControl::pressureControl refCell_(-1), refValue_(0), pMax_("pMax", dimPressure, GREAT), - pMin_("pMin", dimPressure, 0), + pMin_("pMin", dimPressure, Zero), limitMaxP_(false), limitMinP_(false) { @@ -58,10 +58,8 @@ Foam::pressureControl::pressureControl if (dict.found("pMax") && dict.found("pMin")) { - pMax_.value() = readScalar(dict.lookup("pMax")); - limitMaxP_ = true; - pMin_.value() = readScalar(dict.lookup("pMin")); - limitMinP_ = true; + dict.readEntry("pMax", pMax_.value()); limitMaxP_ = true; + dict.readEntry("pMin", pMin_.value()); limitMinP_ = true; } else { @@ -97,9 +95,8 @@ Foam::pressureControl::pressureControl reduce(rhoRefMin, minOp<scalar>()); } - if (dict.found("pMax")) + if (dict.readIfPresent("pMax", pMax_.value())) { - pMax_.value() = readScalar(dict.lookup("pMax")); limitMaxP_ = true; } else if (dict.found("pMaxFactor")) @@ -114,8 +111,7 @@ Foam::pressureControl::pressureControl << exit(FatalIOError); } - const scalar pMaxFactor(readScalar(dict.lookup("pMaxFactor"))); - pMax_.value() = pMaxFactor*pMax; + pMax_.value() = pMax * dict.get<scalar>("pMaxFactor"); limitMaxP_ = true; } else if (dict.found("rhoMax")) @@ -154,9 +150,8 @@ Foam::pressureControl::pressureControl limitMaxP_ = true; } - if (dict.found("pMin")) + if (dict.readIfPresent("pMin", pMin_.value())) { - pMin_.value() = readScalar(dict.lookup("pMin")); limitMinP_ = true; } else if (dict.found("pMinFactor")) @@ -171,8 +166,7 @@ Foam::pressureControl::pressureControl << exit(FatalIOError); } - const scalar pMinFactor(readScalar(dict.lookup("pMinFactor"))); - pMin_.value() = pMinFactor*pMin; + pMin_.value() = pMin * dict.get<scalar>("pMinFactor"); limitMinP_ = true; } else if (dict.found("rhoMin")) @@ -260,10 +254,8 @@ bool Foam::pressureControl::limit(volScalarField& p) const return true; } - else - { - return false; - } + + return false; } diff --git a/src/finiteVolume/cfdTools/general/solutionControl/solutionControl/solutionControl.C b/src/finiteVolume/cfdTools/general/solutionControl/solutionControl/solutionControl.C index 93e809efe5803273c1b34fc2686eef247b894d22..d304f9cd4f30889259e38ec1a4e98c2dbdba99fc 100644 --- a/src/finiteVolume/cfdTools/general/solutionControl/solutionControl/solutionControl.C +++ b/src/finiteVolume/cfdTools/general/solutionControl/solutionControl/solutionControl.C @@ -67,7 +67,7 @@ void Foam::solutionControl::read(const bool absTolOnly) if (absTolOnly) { - fd.absTol = readScalar(residualDict.lookup(fName)); + fd.absTol = residualDict.get<scalar>(fName); fd.relTol = -1; fd.initialResidual = -1; } @@ -76,8 +76,8 @@ void Foam::solutionControl::read(const bool absTolOnly) if (iter().isDict()) { const dictionary& fieldDict(iter().dict()); - fd.absTol = readScalar(fieldDict.lookup("tolerance")); - fd.relTol = readScalar(fieldDict.lookup("relTol")); + fd.absTol = fieldDict.get<scalar>("tolerance"); + fd.relTol = fieldDict.get<scalar>("relTol"); fd.initialResidual = 0.0; } else @@ -96,15 +96,15 @@ void Foam::solutionControl::read(const bool absTolOnly) fieldData& fd = data[fieldi]; if (absTolOnly) { - fd.absTol = readScalar(residualDict.lookup(fName)); + fd.absTol = residualDict.get<scalar>(fName); } else { if (iter().isDict()) { const dictionary& fieldDict(iter().dict()); - fd.absTol = readScalar(fieldDict.lookup("tolerance")); - fd.relTol = readScalar(fieldDict.lookup("relTol")); + fd.absTol = fieldDict.get<scalar>("tolerance"); + fd.relTol = fieldDict.get<scalar>("relTol"); } else { diff --git a/src/finiteVolume/fields/fvPatchFields/derived/activeBaffleVelocity/activeBaffleVelocityFvPatchVectorField.C b/src/finiteVolume/fields/fvPatchFields/derived/activeBaffleVelocity/activeBaffleVelocityFvPatchVectorField.C index 7b5a59106388ed8b84202b02b7119681664c7d99..2e8fd4ef432a3c25e918b4cf40ed96a783f765fb 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/activeBaffleVelocity/activeBaffleVelocityFvPatchVectorField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/activeBaffleVelocity/activeBaffleVelocityFvPatchVectorField.C @@ -89,7 +89,7 @@ activeBaffleVelocityFvPatchVectorField pName_(dict.lookupOrDefault<word>("p", "p")), cyclicPatchName_(dict.lookup("cyclicPatch")), cyclicPatchLabel_(p.patch().boundaryMesh().findPatchID(cyclicPatchName_)), - orientation_(readLabel(dict.lookup("orientation"))), + orientation_(dict.get<label>("orientation")), initWallSf_(p.Sf()), initCyclicSf_(p.boundaryMesh()[cyclicPatchLabel_].Sf()), nbrCyclicSf_ @@ -100,9 +100,9 @@ activeBaffleVelocityFvPatchVectorField dict ).neighbFvPatch().Sf() ), - openFraction_(readScalar(dict.lookup("openFraction"))), - openingTime_(readScalar(dict.lookup("openingTime"))), - maxOpenFractionDelta_(readScalar(dict.lookup("maxOpenFractionDelta"))), + openFraction_(dict.get<scalar>("openFraction")), + openingTime_(dict.get<scalar>("openingTime")), + maxOpenFractionDelta_(dict.get<scalar>("maxOpenFractionDelta")), curTimeIndex_(-1) { fvPatchVectorField::operator=(Zero); diff --git a/src/finiteVolume/fields/fvPatchFields/derived/activePressureForceBaffleVelocity/activePressureForceBaffleVelocityFvPatchVectorField.C b/src/finiteVolume/fields/fvPatchFields/derived/activePressureForceBaffleVelocity/activePressureForceBaffleVelocityFvPatchVectorField.C index 9981cc14513799c5a9b5c2af21336c9e9f38d750..af7e199f852a6cc0671ba46a099bbda8e25c6040 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/activePressureForceBaffleVelocity/activePressureForceBaffleVelocityFvPatchVectorField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/activePressureForceBaffleVelocity/activePressureForceBaffleVelocityFvPatchVectorField.C @@ -98,14 +98,14 @@ activePressureForceBaffleVelocityFvPatchVectorField initWallSf_(0), initCyclicSf_(0), nbrCyclicSf_(0), - openFraction_(readScalar(dict.lookup("openFraction"))), - openingTime_(readScalar(dict.lookup("openingTime"))), - maxOpenFractionDelta_(readScalar(dict.lookup("maxOpenFractionDelta"))), + openFraction_(dict.get<scalar>("openFraction")), + openingTime_(dict.get<scalar>("openingTime")), + maxOpenFractionDelta_(dict.get<scalar>("maxOpenFractionDelta")), curTimeIndex_(-1), - minThresholdValue_(readScalar(dict.lookup("minThresholdValue"))), - fBased_(readBool(dict.lookup("forceBased"))), + minThresholdValue_(dict.get<scalar>("minThresholdValue")), + fBased_(dict.get<bool>("forceBased")), baffleActivated_(0), - opening_(readBool(dict.lookup("opening"))) + opening_(dict.get<bool>("opening")) { fvPatchVectorField::operator=(Zero); diff --git a/src/finiteVolume/fields/fvPatchFields/derived/fixedProfile/fixedProfileFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/fixedProfile/fixedProfileFvPatchField.C index 0d97a44926bff6563cd0120d07232dfe71a3a845..36f3ce9bde3b43b9215ce3689ae07da108f1f561 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/fixedProfile/fixedProfileFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/fixedProfile/fixedProfileFvPatchField.C @@ -67,7 +67,7 @@ Foam::fixedProfileFvPatchField<Type>::fixedProfileFvPatchField fixedValueFvPatchField<Type>(p, iF, dict, false), profile_(Function1<Type>::New("profile", dict)), dir_(dict.lookup("direction")), - origin_(readScalar(dict.lookup("origin"))) + origin_(dict.get<scalar>("origin")) { if (mag(dir_) < SMALL) { diff --git a/src/finiteVolume/fields/fvPatchFields/derived/inletOutletTotalTemperature/inletOutletTotalTemperatureFvPatchScalarField.C b/src/finiteVolume/fields/fvPatchFields/derived/inletOutletTotalTemperature/inletOutletTotalTemperatureFvPatchScalarField.C index 679cb1205525898ba1752a224f0419fb0b34dda1..463dbda48a8d5076c028aa7801f89c9803ed4236 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/inletOutletTotalTemperature/inletOutletTotalTemperatureFvPatchScalarField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/inletOutletTotalTemperature/inletOutletTotalTemperatureFvPatchScalarField.C @@ -78,7 +78,7 @@ inletOutletTotalTemperatureFvPatchScalarField inletOutletFvPatchScalarField(p, iF), UName_(dict.lookupOrDefault<word>("U", "U")), psiName_(dict.lookupOrDefault<word>("psi", "thermo:psi")), - gamma_(readScalar(dict.lookup("gamma"))), + gamma_(dict.get<scalar>("gamma")), T0_("T0", dict, p.size()) { this->patchType() = dict.lookupOrDefault<word>("patchType", word::null); diff --git a/src/finiteVolume/fields/fvPatchFields/derived/outletPhaseMeanVelocity/outletPhaseMeanVelocityFvPatchVectorField.C b/src/finiteVolume/fields/fvPatchFields/derived/outletPhaseMeanVelocity/outletPhaseMeanVelocityFvPatchVectorField.C index b1fef5b04bee093d7b21d4fb165e14c07479e532..5431a50408b094f0f2a3b3c3b1b30ca2c3bb7ba1 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/outletPhaseMeanVelocity/outletPhaseMeanVelocityFvPatchVectorField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/outletPhaseMeanVelocity/outletPhaseMeanVelocityFvPatchVectorField.C @@ -72,7 +72,7 @@ Foam::outletPhaseMeanVelocityFvPatchVectorField ) : mixedFvPatchField<vector>(p, iF), - Umean_(readScalar(dict.lookup("Umean"))), + Umean_(dict.get<scalar>("Umean")), alphaName_(dict.lookup("alpha")) { patchType() = dict.lookupOrDefault<word>("patchType", word::null); diff --git a/src/finiteVolume/fields/fvPatchFields/derived/phaseHydrostaticPressure/phaseHydrostaticPressureFvPatchScalarField.C b/src/finiteVolume/fields/fvPatchFields/derived/phaseHydrostaticPressure/phaseHydrostaticPressureFvPatchScalarField.C index 31d6c14f2cc56418c032e6ef3cd1a832d3a3402d..99cd84fd4e94f2e402ba842149145fa07281238f 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/phaseHydrostaticPressure/phaseHydrostaticPressureFvPatchScalarField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/phaseHydrostaticPressure/phaseHydrostaticPressureFvPatchScalarField.C @@ -61,8 +61,8 @@ phaseHydrostaticPressureFvPatchScalarField : mixedFvPatchScalarField(p, iF), phaseFraction_(dict.lookupOrDefault<word>("phaseFraction", "alpha")), - rho_(readScalar(dict.lookup("rho"))), - pRefValue_(readScalar(dict.lookup("pRefValue"))), + rho_(dict.get<scalar>("rho")), + pRefValue_(dict.get<scalar>("pRefValue")), pRefPoint_(dict.lookup("pRefPoint")) { this->patchType() = dict.lookupOrDefault<word>("patchType", word::null); diff --git a/src/finiteVolume/fields/fvPatchFields/derived/plenumPressure/plenumPressureFvPatchScalarField.C b/src/finiteVolume/fields/fvPatchFields/derived/plenumPressure/plenumPressureFvPatchScalarField.C index 2b10b1441ae8896ee2668b1f8cbdd305edc7d3e5..76521a761090c907f55e879c5f1e5b43454ba25e 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/plenumPressure/plenumPressureFvPatchScalarField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/plenumPressure/plenumPressureFvPatchScalarField.C @@ -66,23 +66,17 @@ Foam::plenumPressureFvPatchScalarField::plenumPressureFvPatchScalarField ) : fixedValueFvPatchScalarField(p, iF, dict), - gamma_(readScalar(dict.lookup("gamma"))), - R_(readScalar(dict.lookup("R"))), - supplyMassFlowRate_(readScalar(dict.lookup("supplyMassFlowRate"))), - supplyTotalTemperature_ - ( - readScalar(dict.lookup("supplyTotalTemperature")) - ), - plenumVolume_(readScalar(dict.lookup("plenumVolume"))), - plenumDensity_(readScalar(dict.lookup("plenumDensity"))), - plenumTemperature_(readScalar(dict.lookup("plenumTemperature"))), + gamma_(dict.get<scalar>("gamma")), + R_(dict.get<scalar>("R")), + supplyMassFlowRate_(dict.get<scalar>("supplyMassFlowRate")), + supplyTotalTemperature_(dict.get<scalar>("supplyTotalTemperature")), + plenumVolume_(dict.get<scalar>("plenumVolume")), + plenumDensity_(dict.get<scalar>("plenumDensity")), + plenumTemperature_(dict.get<scalar>("plenumTemperature")), rho_(1.0), hasRho_(false), - inletAreaRatio_(readScalar(dict.lookup("inletAreaRatio"))), - inletDischargeCoefficient_ - ( - readScalar(dict.lookup("inletDischargeCoefficient")) - ), + inletAreaRatio_(dict.get<scalar>("inletAreaRatio")), + inletDischargeCoefficient_(dict.get<scalar>("inletDischargeCoefficient")), timeScale_(dict.lookupOrDefault<scalar>("timeScale", 0.0)), phiName_(dict.lookupOrDefault<word>("phi", "phi")), UName_(dict.lookupOrDefault<word>("U", "U")) diff --git a/src/finiteVolume/fields/fvPatchFields/derived/pressurePIDControlInletVelocity/pressurePIDControlInletVelocityFvPatchVectorField.C b/src/finiteVolume/fields/fvPatchFields/derived/pressurePIDControlInletVelocity/pressurePIDControlInletVelocityFvPatchVectorField.C index 2101867dc5eff8ced75901678faee328449349c8..0db2d9b5205651403210ecfc3b0b47ef916d457a 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/pressurePIDControlInletVelocity/pressurePIDControlInletVelocityFvPatchVectorField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/pressurePIDControlInletVelocity/pressurePIDControlInletVelocityFvPatchVectorField.C @@ -139,14 +139,14 @@ pressurePIDControlInletVelocityFvPatchVectorField fixedValueFvPatchField<vector>(p, iF, dict), upstreamName_(dict.lookup("upstream")), downstreamName_(dict.lookup("downstream")), - deltaP_(readScalar(dict.lookup("deltaP"))), + deltaP_(dict.get<scalar>("deltaP")), shapeFactor_(dict.lookupOrDefault<scalar>("shapeFactor", 0)), pName_(dict.lookupOrDefault<word>("p", "p")), phiName_(dict.lookupOrDefault<word>("phi", "phi")), rhoName_(dict.lookupOrDefault<word>("rho", "none")), - P_(readScalar(dict.lookup("P"))), - I_(readScalar(dict.lookup("I"))), - D_(readScalar(dict.lookup("D"))), + P_(dict.get<scalar>("P")), + I_(dict.get<scalar>("I")), + D_(dict.get<scalar>("D")), Q_(- gSum(*this & patch().Sf())), error_(dict.lookupOrDefault<scalar>("error", 0)), errorIntegral_(dict.lookupOrDefault<scalar>("errorIntegral", 0)), diff --git a/src/finiteVolume/fields/fvPatchFields/derived/supersonicFreestream/supersonicFreestreamFvPatchVectorField.C b/src/finiteVolume/fields/fvPatchFields/derived/supersonicFreestream/supersonicFreestreamFvPatchVectorField.C index 39c06df42c944290f1fa16836bb6e77038ccf47e..283fc587ddcf415a347b6bc1d379a3069397845e 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/supersonicFreestream/supersonicFreestreamFvPatchVectorField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/supersonicFreestream/supersonicFreestreamFvPatchVectorField.C @@ -65,9 +65,9 @@ supersonicFreestreamFvPatchVectorField pName_(dict.lookupOrDefault<word>("p", "p")), psiName_(dict.lookupOrDefault<word>("psi", "thermo:psi")), UInf_(dict.lookup("UInf")), - pInf_(readScalar(dict.lookup("pInf"))), - TInf_(readScalar(dict.lookup("TInf"))), - gamma_(readScalar(dict.lookup("gamma"))) + pInf_(dict.get<scalar>("pInf")), + TInf_(dict.get<scalar>("TInf")), + gamma_(dict.get<scalar>("gamma")) { patchType() = dict.lookupOrDefault<word>("patchType", word::null); diff --git a/src/finiteVolume/fields/fvPatchFields/derived/syringePressure/syringePressureFvPatchScalarField.C b/src/finiteVolume/fields/fvPatchFields/derived/syringePressure/syringePressureFvPatchScalarField.C index a086f891608c453b8daaa7bb178894219ae95a9e..c2ce94841bf4fa85e34710db133e6d906200dd58 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/syringePressure/syringePressureFvPatchScalarField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/syringePressure/syringePressureFvPatchScalarField.C @@ -51,16 +51,16 @@ Foam::syringePressureFvPatchScalarField::syringePressureFvPatchScalarField ) : fixedValueFvPatchScalarField(p, iF, dict, false), - Ap_(readScalar(dict.lookup("Ap"))), - Sp_(readScalar(dict.lookup("Sp"))), - VsI_(readScalar(dict.lookup("VsI"))), - tas_(readScalar(dict.lookup("tas"))), - tae_(readScalar(dict.lookup("tae"))), - tds_(readScalar(dict.lookup("tds"))), - tde_(readScalar(dict.lookup("tde"))), - psI_(readScalar(dict.lookup("psI"))), - psi_(readScalar(dict.lookup("psi"))), - ams_(readScalar(dict.lookup("ams"))), + Ap_(dict.get<scalar>("Ap")), + Sp_(dict.get<scalar>("Sp")), + VsI_(dict.get<scalar>("VsI")), + tas_(dict.get<scalar>("tas")), + tae_(dict.get<scalar>("tae")), + tds_(dict.get<scalar>("tds")), + tde_(dict.get<scalar>("tde")), + psI_(dict.get<scalar>("psI")), + psi_(dict.get<scalar>("psi")), + ams_(dict.get<scalar>("ams")), ams0_(ams_), phiName_(dict.lookupOrDefault<word>("phi", "phi")), curTimeIndex_(-1) diff --git a/src/finiteVolume/fields/fvPatchFields/derived/totalPressure/totalPressureFvPatchScalarField.C b/src/finiteVolume/fields/fvPatchFields/derived/totalPressure/totalPressureFvPatchScalarField.C index 65461cc9c49d88f450bfd3efcc65bd632a4dc6df..38bd2597677efce2d307bd3df7c32d65205c1914 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/totalPressure/totalPressureFvPatchScalarField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/totalPressure/totalPressureFvPatchScalarField.C @@ -60,7 +60,7 @@ Foam::totalPressureFvPatchScalarField::totalPressureFvPatchScalarField phiName_(dict.lookupOrDefault<word>("phi", "phi")), rhoName_(dict.lookupOrDefault<word>("rho", "rho")), psiName_(dict.lookupOrDefault<word>("psi", "none")), - gamma_(psiName_ != "none" ? readScalar(dict.lookup("gamma")) : 1), + gamma_(psiName_ != "none" ? dict.get<scalar>("gamma") : 1), p0_("p0", dict, p.size()) { if (dict.found("value")) diff --git a/src/finiteVolume/fields/fvPatchFields/derived/totalTemperature/totalTemperatureFvPatchScalarField.C b/src/finiteVolume/fields/fvPatchFields/derived/totalTemperature/totalTemperatureFvPatchScalarField.C index 771ebb53d84ae49d3ed65ccdfcad86fa77de40e0..6f8f3bfb3c6ba822f7396e6fbd722c4d3763ea83 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/totalTemperature/totalTemperatureFvPatchScalarField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/totalTemperature/totalTemperatureFvPatchScalarField.C @@ -74,7 +74,7 @@ Foam::totalTemperatureFvPatchScalarField::totalTemperatureFvPatchScalarField UName_(dict.lookupOrDefault<word>("U", "U")), phiName_(dict.lookupOrDefault<word>("phi", "phi")), psiName_(dict.lookupOrDefault<word>("psi", "thermo:psi")), - gamma_(readScalar(dict.lookup("gamma"))), + gamma_(dict.get<scalar>("gamma")), T0_("T0", dict, p.size()) { if (dict.found("value")) diff --git a/src/finiteVolume/fields/fvPatchFields/derived/turbulentDFSEMInlet/turbulentDFSEMInletFvPatchVectorField.C b/src/finiteVolume/fields/fvPatchFields/derived/turbulentDFSEMInlet/turbulentDFSEMInletFvPatchVectorField.C index 911305d020e23e6ef8ebb251d54bced833936298..e22a8958330cf91d30336224d0d90f6fc80a525f 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/turbulentDFSEMInlet/turbulentDFSEMInletFvPatchVectorField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/turbulentDFSEMInlet/turbulentDFSEMInletFvPatchVectorField.C @@ -818,7 +818,7 @@ turbulentDFSEMInletFvPatchVectorField ) : fixedValueFvPatchField<vector>(p, iF, dict), - delta_(readScalar(dict.lookup("delta"))), + delta_(dict.get<scalar>("delta")), d_(dict.lookupOrDefault<scalar>("d", 1)), kappa_(dict.lookupOrDefault<scalar>("kappa", 0.41)), diff --git a/src/finiteVolume/fields/fvPatchFields/derived/turbulentIntensityKineticEnergyInlet/turbulentIntensityKineticEnergyInletFvPatchScalarField.C b/src/finiteVolume/fields/fvPatchFields/derived/turbulentIntensityKineticEnergyInlet/turbulentIntensityKineticEnergyInletFvPatchScalarField.C index 14ec2d187ffbcafa15010df3ab0c21017d6e6d30..cca880908cd371359189e8e142a17a199fa6ebf8 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/turbulentIntensityKineticEnergyInlet/turbulentIntensityKineticEnergyInletFvPatchScalarField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/turbulentIntensityKineticEnergyInlet/turbulentIntensityKineticEnergyInletFvPatchScalarField.C @@ -70,7 +70,7 @@ turbulentIntensityKineticEnergyInletFvPatchScalarField ) : inletOutletFvPatchScalarField(p, iF), - intensity_(readScalar(dict.lookup("intensity"))), + intensity_(dict.get<scalar>("intensity")), UName_(dict.lookupOrDefault<word>("U", "U")) { this->patchType() = dict.lookupOrDefault<word>("patchType", word::null); diff --git a/src/finiteVolume/fields/fvPatchFields/derived/uniformDensityHydrostaticPressure/uniformDensityHydrostaticPressureFvPatchScalarField.C b/src/finiteVolume/fields/fvPatchFields/derived/uniformDensityHydrostaticPressure/uniformDensityHydrostaticPressureFvPatchScalarField.C index fb6367a51a6271bb4f5aca3d1566dc4b9f704bdd..f8c6a08e085fc8be49666a363d99cece5e401d05 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/uniformDensityHydrostaticPressure/uniformDensityHydrostaticPressureFvPatchScalarField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/uniformDensityHydrostaticPressure/uniformDensityHydrostaticPressureFvPatchScalarField.C @@ -55,8 +55,8 @@ uniformDensityHydrostaticPressureFvPatchScalarField ) : fixedValueFvPatchScalarField(p, iF, dict, false), - rho_(readScalar(dict.lookup("rho"))), - pRefValue_(readScalar(dict.lookup("pRefValue"))), + rho_(dict.get<scalar>("rho")), + pRefValue_(dict.get<scalar>("pRefValue")), pRefPoint_(dict.lookup("pRefPoint")) { if (dict.found("value")) diff --git a/src/finiteVolume/fields/fvPatchFields/derived/uniformTotalPressure/uniformTotalPressureFvPatchScalarField.C b/src/finiteVolume/fields/fvPatchFields/derived/uniformTotalPressure/uniformTotalPressureFvPatchScalarField.C index eee8af784c13d2e5ad4321f93b6c842fcad456cb..eb25d6cc9f18a45ed9a97a2e2fab449a66aef8c1 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/uniformTotalPressure/uniformTotalPressureFvPatchScalarField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/uniformTotalPressure/uniformTotalPressureFvPatchScalarField.C @@ -61,7 +61,7 @@ uniformTotalPressureFvPatchScalarField phiName_(dict.lookupOrDefault<word>("phi", "phi")), rhoName_(dict.lookupOrDefault<word>("rho", "rho")), psiName_(dict.lookupOrDefault<word>("psi", "none")), - gamma_(psiName_ != "none" ? readScalar(dict.lookup("gamma")) : 1), + gamma_(psiName_ != "none" ? dict.get<scalar>("gamma") : 1), p0_(Function1<scalar>::New("p0", dict)) { if (dict.found("value")) diff --git a/src/finiteVolume/fields/fvPatchFields/derived/variableHeightFlowRate/variableHeightFlowRateFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/variableHeightFlowRate/variableHeightFlowRateFvPatchField.C index 9f9f89865ace32006432c115171e0f25bc63c875..3293e1f3d8e0a4214ccc5ba0794260d7daee18c3 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/variableHeightFlowRate/variableHeightFlowRateFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/variableHeightFlowRate/variableHeightFlowRateFvPatchField.C @@ -75,8 +75,8 @@ Foam::variableHeightFlowRateFvPatchScalarField : mixedFvPatchScalarField(p, iF), phiName_(dict.lookupOrDefault<word>("phi", "phi")), - lowerBound_(readScalar(dict.lookup("lowerBound"))), - upperBound_(readScalar(dict.lookup("upperBound"))) + lowerBound_(dict.get<scalar>("lowerBound")), + upperBound_(dict.get<scalar>("upperBound")) { patchType() = dict.lookupOrDefault<word>("patchType", word::null); this->refValue() = 0.0; diff --git a/src/finiteVolume/fields/fvPatchFields/derived/waveTransmissive/waveTransmissiveFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/waveTransmissive/waveTransmissiveFvPatchField.C index 863ede5a13577fdd58617c12d52faa7ae6b71c97..26a6420ede480e9698e93869526809dec8080fba 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/waveTransmissive/waveTransmissiveFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/waveTransmissive/waveTransmissiveFvPatchField.C @@ -71,7 +71,7 @@ Foam::waveTransmissiveFvPatchField<Type>::waveTransmissiveFvPatchField : advectiveFvPatchField<Type>(p, iF, dict), psiName_(dict.lookupOrDefault<word>("psi", "thermo:psi")), - gamma_(readScalar(dict.lookup("gamma"))) + gamma_(dict.get<scalar>("gamma")) {} diff --git a/src/finiteVolume/fvMatrices/solvers/MULES/CMULESTemplates.C b/src/finiteVolume/fvMatrices/solvers/MULES/CMULESTemplates.C index e1b990dc428918707757d19e513b52cd4ca52b34..8642df377b6fbfa8394d5ad2c569d16853751db0 100644 --- a/src/finiteVolume/fvMatrices/solvers/MULES/CMULESTemplates.C +++ b/src/finiteVolume/fvMatrices/solvers/MULES/CMULESTemplates.C @@ -153,7 +153,7 @@ void Foam::MULES::limiterCorr const label nLimiterIter ( - readLabel(MULEScontrols.lookup("nLimiterIter")) + MULEScontrols.get<label>("nLimiterIter") ); const scalar smoothLimiter diff --git a/src/finiteVolume/fvMesh/simplifiedFvMesh/columnFvMesh/columnFvMesh.C b/src/finiteVolume/fvMesh/simplifiedFvMesh/columnFvMesh/columnFvMesh.C index dfa72c168a2e3cefcb2fab0effbec8e6c0e435a9..67cc8c22f13c8106d3c6c1c8f0cf411cc5d68c34 100644 --- a/src/finiteVolume/fvMesh/simplifiedFvMesh/columnFvMesh/columnFvMesh.C +++ b/src/finiteVolume/fvMesh/simplifiedFvMesh/columnFvMesh/columnFvMesh.C @@ -80,11 +80,11 @@ bool Foam::simplifiedMeshes::columnFvMeshInfo::setPatchEntries for (const entry& e : allPatchEntries) { - const word type(e.dict().lookup("type")); + const word type(e.dict().get<word>("type")); if (!constraintPatches.found(type)) { - if (readLabel(e.dict().lookup("nFaces"))) + if (e.dict().get<label>("nFaces")) { ++nPatchWithFace_; } @@ -131,7 +131,7 @@ bool Foam::simplifiedMeshes::columnFvMeshInfo::setPatchEntries for (const entry& e : boundaryFieldDict) { - const word type(e.dict().lookup("type")); + const word type(e.dict().get<word>("type")); if (simplifiedFvMesh::fvPatchFieldExists(type)) { @@ -333,7 +333,7 @@ void Foam::simplifiedMeshes::columnFvMeshInfo::addLocalPatches DebugPout << "Setting " << patchName << endl; - label nFaces0 = readLabel(patchDict.lookup("nFaces")); + label nFaces0 = patchDict.get<label>("nFaces"); if (nFaces0) { diff --git a/src/functionObjects/field/nearWallFields/nearWallFields.C b/src/functionObjects/field/nearWallFields/nearWallFields.C index b40a6355b30c57b8be4b2491a9850f422c7358b9..214bea81de6e241a060ad998acbf441aedeae22a 100644 --- a/src/functionObjects/field/nearWallFields/nearWallFields.C +++ b/src/functionObjects/field/nearWallFields/nearWallFields.C @@ -261,8 +261,8 @@ bool Foam::functionObjects::nearWallFields::read(const dictionary& dict) fvMeshFunctionObject::read(dict); dict.readEntry("fields", fieldSet_); + dict.readEntry("distance", distance_); patchSet_ = mesh_.boundaryMesh().patchSet(dict.get<wordRes>("patches")); - distance_ = dict.get<scalar>("distance"); // Clear out any previously loaded fields diff --git a/src/functionObjects/field/valueAverage/valueAverage.C b/src/functionObjects/field/valueAverage/valueAverage.C index 3b34734e97f454261e619a32be6a440355508bbc..d76581a06f901eb0f947c1220525bc3867b84491 100644 --- a/src/functionObjects/field/valueAverage/valueAverage.C +++ b/src/functionObjects/field/valueAverage/valueAverage.C @@ -87,7 +87,7 @@ Foam::functionObjects::valueAverage::valueAverage if (dict.found(fieldName)) { const dictionary& valueDict = dict.subDict(fieldName); - totalTime_[fieldi] = valueDict.get<scalar>("totalTime"); + valueDict.readEntry("totalTime", totalTime_[fieldi]); } } } diff --git a/src/fvAgglomerationMethods/MGridGenGamgAgglomeration/MGridGenGAMGAgglomeration.C b/src/fvAgglomerationMethods/MGridGenGamgAgglomeration/MGridGenGAMGAgglomeration.C index 9b1834de5d21be44d393cbb67f6777f48aa65dbd..643bd0df19cd1613a4d362d1b6c51fddb0572778 100644 --- a/src/fvAgglomerationMethods/MGridGenGamgAgglomeration/MGridGenGAMGAgglomeration.C +++ b/src/fvAgglomerationMethods/MGridGenGamgAgglomeration/MGridGenGAMGAgglomeration.C @@ -170,14 +170,14 @@ Foam::MGridGenGAMGAgglomeration::MGridGenGAMGAgglomeration fvMesh_(refCast<const fvMesh>(mesh)) { // Min, max size of agglomerated cells - label minSize(readLabel(controlDict.lookup("minSize"))); - label maxSize(readLabel(controlDict.lookup("maxSize"))); + label minSize(controlDict.get<label>("minSize")); + label maxSize(controlDict.get<label>("maxSize")); // Number of iterations applied to improve agglomeration consistency across // processor boundaries label nProcConsistencyIter ( - readLabel(controlDict.lookup("nProcConsistencyIter")) + controlDict.get<label>("nProcConsistencyIter") ); // Start geometric agglomeration from the cell volumes and areas of the mesh diff --git a/src/fvAgglomerationMethods/pairPatchAgglomeration/pairPatchAgglomeration.C b/src/fvAgglomerationMethods/pairPatchAgglomeration/pairPatchAgglomeration.C index 914a43c9ef95599f8bd1a9c954d6fc789b17be15..98d04727cbd9a78979c0509cd1fc602b08ae8f19 100644 --- a/src/fvAgglomerationMethods/pairPatchAgglomeration/pairPatchAgglomeration.C +++ b/src/fvAgglomerationMethods/pairPatchAgglomeration/pairPatchAgglomeration.C @@ -208,11 +208,11 @@ Foam::pairPatchAgglomeration::pairPatchAgglomeration maxLevels_(50), nFacesInCoarsestLevel_ ( - readLabel(controlDict.lookup("nFacesInCoarsestLevel")) + controlDict.get<label>("nFacesInCoarsestLevel") ), nGlobalFacesInCoarsestLevel_(labelMax), //( - // readLabel(controlDict.lookup("nGlobalFacesInCoarsestLevel")) + // controlDict.get<label>("nGlobalFacesInCoarsestLevel") //), featureAngle_ ( diff --git a/src/fvMotionSolver/fvMotionSolvers/displacement/surfaceAlignedSBRStress/surfaceAlignedSBRStressFvMotionSolver.C b/src/fvMotionSolver/fvMotionSolvers/displacement/surfaceAlignedSBRStress/surfaceAlignedSBRStressFvMotionSolver.C index 5fd2a85ed08ee3a18fa904d50a1789dc2a45f544..f099a5728fa344f659625e91a58bee31f86daa4b 100644 --- a/src/fvMotionSolver/fvMotionSolvers/displacement/surfaceAlignedSBRStress/surfaceAlignedSBRStressFvMotionSolver.C +++ b/src/fvMotionSolver/fvMotionSolvers/displacement/surfaceAlignedSBRStress/surfaceAlignedSBRStressFvMotionSolver.C @@ -81,7 +81,7 @@ surfaceAlignedSBRStressFvMotionSolver minAng_(coeffDict().lookupOrDefault<scalar>("minAng", 20.0)), accFactor_(coeffDict().lookupOrDefault<scalar>("accFactor", 1.0)), smoothFactor_(coeffDict().lookupOrDefault<scalar>("smoothFactor", 0.9)), - nNonOrthogonalCorr_(readLabel(coeffDict().lookup("nNonOrthogonalCorr"))), + nNonOrthogonalCorr_(coeffDict().get<label>("nNonOrthogonalCorr")), pointDisplacement_(pointDisplacement()), sigmaD_ ( diff --git a/src/fvMotionSolver/pointPatchFields/derived/angularOscillatingDisplacement/angularOscillatingDisplacementPointPatchVectorField.C b/src/fvMotionSolver/pointPatchFields/derived/angularOscillatingDisplacement/angularOscillatingDisplacementPointPatchVectorField.C index 843b115d07e749cef26b6394c4c7800b83ec950e..534ddd48815daae1802674488e9e7c3084bac013 100644 --- a/src/fvMotionSolver/pointPatchFields/derived/angularOscillatingDisplacement/angularOscillatingDisplacementPointPatchVectorField.C +++ b/src/fvMotionSolver/pointPatchFields/derived/angularOscillatingDisplacement/angularOscillatingDisplacementPointPatchVectorField.C @@ -64,9 +64,9 @@ angularOscillatingDisplacementPointPatchVectorField fixedValuePointPatchField<vector>(p, iF, dict), axis_(dict.lookup("axis")), origin_(dict.lookup("origin")), - angle0_(readScalar(dict.lookup("angle0"))), - amplitude_(readScalar(dict.lookup("amplitude"))), - omega_(readScalar(dict.lookup("omega"))) + angle0_(dict.get<scalar>("angle0")), + amplitude_(dict.get<scalar>("amplitude")), + omega_(dict.get<scalar>("omega")) { if (!dict.found("value")) { diff --git a/src/fvMotionSolver/pointPatchFields/derived/angularOscillatingVelocity/angularOscillatingVelocityPointPatchVectorField.C b/src/fvMotionSolver/pointPatchFields/derived/angularOscillatingVelocity/angularOscillatingVelocityPointPatchVectorField.C index 3f64821dd71b9311b08696d0898a78f6e035dfed..7331832f9e94b7f4fce87cc7d8f8b0692aac95da 100644 --- a/src/fvMotionSolver/pointPatchFields/derived/angularOscillatingVelocity/angularOscillatingVelocityPointPatchVectorField.C +++ b/src/fvMotionSolver/pointPatchFields/derived/angularOscillatingVelocity/angularOscillatingVelocityPointPatchVectorField.C @@ -64,9 +64,9 @@ angularOscillatingVelocityPointPatchVectorField fixedValuePointPatchField<vector>(p, iF, dict), axis_(dict.lookup("axis")), origin_(dict.lookup("origin")), - angle0_(readScalar(dict.lookup("angle0"))), - amplitude_(readScalar(dict.lookup("amplitude"))), - omega_(readScalar(dict.lookup("omega"))) + angle0_(dict.get<scalar>("angle0")), + amplitude_(dict.get<scalar>("amplitude")), + omega_(dict.get<scalar>("omega")) { if (!dict.found("value")) { diff --git a/src/fvMotionSolver/pointPatchFields/derived/oscillatingDisplacement/oscillatingDisplacementPointPatchVectorField.C b/src/fvMotionSolver/pointPatchFields/derived/oscillatingDisplacement/oscillatingDisplacementPointPatchVectorField.C index 98e83d7b88b04f2c38bbd822e89f98972f00225d..2e5122917fea4ba30e80c60f054a19232474c9bb 100644 --- a/src/fvMotionSolver/pointPatchFields/derived/oscillatingDisplacement/oscillatingDisplacementPointPatchVectorField.C +++ b/src/fvMotionSolver/pointPatchFields/derived/oscillatingDisplacement/oscillatingDisplacementPointPatchVectorField.C @@ -59,7 +59,7 @@ oscillatingDisplacementPointPatchVectorField : fixedValuePointPatchField<vector>(p, iF, dict), amplitude_(dict.lookup("amplitude")), - omega_(readScalar(dict.lookup("omega"))) + omega_(dict.get<scalar>("omega")) { if (!dict.found("value")) { diff --git a/src/fvMotionSolver/pointPatchFields/derived/oscillatingVelocity/oscillatingVelocityPointPatchVectorField.C b/src/fvMotionSolver/pointPatchFields/derived/oscillatingVelocity/oscillatingVelocityPointPatchVectorField.C index f99d53852846e240401b20414fcba24edd99e554..8aa059cd7af0602b0f2e136c5a3bb61b4b2e87da 100644 --- a/src/fvMotionSolver/pointPatchFields/derived/oscillatingVelocity/oscillatingVelocityPointPatchVectorField.C +++ b/src/fvMotionSolver/pointPatchFields/derived/oscillatingVelocity/oscillatingVelocityPointPatchVectorField.C @@ -60,7 +60,7 @@ oscillatingVelocityPointPatchVectorField : fixedValuePointPatchField<vector>(p, iF, dict), amplitude_(dict.lookup("amplitude")), - omega_(readScalar(dict.lookup("omega"))) + omega_(dict.get<scalar>("omega")) { if (!dict.found("value")) { diff --git a/src/fvMotionSolver/pointPatchFields/derived/waveDisplacement/waveDisplacementPointPatchVectorField.C b/src/fvMotionSolver/pointPatchFields/derived/waveDisplacement/waveDisplacementPointPatchVectorField.C index e5196ceab990694056568416926ea82195199f3c..c7cb9b7ffff4537760fb741df0c111b0e82be2f2 100644 --- a/src/fvMotionSolver/pointPatchFields/derived/waveDisplacement/waveDisplacementPointPatchVectorField.C +++ b/src/fvMotionSolver/pointPatchFields/derived/waveDisplacement/waveDisplacementPointPatchVectorField.C @@ -55,7 +55,7 @@ waveDisplacementPointPatchVectorField : fixedValuePointPatchField<vector>(p, iF, dict), amplitude_(dict.lookup("amplitude")), - omega_(readScalar(dict.lookup("omega"))), + omega_(dict.get<scalar>("omega")), waveNumber_(dict.lookupOrDefault<vector>("waveNumber", Zero)) { if (!dict.found("value")) diff --git a/src/fvOptions/constraints/derived/velocityDampingConstraint/velocityDampingConstraint.C b/src/fvOptions/constraints/derived/velocityDampingConstraint/velocityDampingConstraint.C index 4b9835fee0554fa78eb3ba31e407b4de0ffa5222..c4a4b25376be21f97646c8334b95bfddb4c3fc61 100644 --- a/src/fvOptions/constraints/derived/velocityDampingConstraint/velocityDampingConstraint.C +++ b/src/fvOptions/constraints/derived/velocityDampingConstraint/velocityDampingConstraint.C @@ -122,7 +122,7 @@ bool Foam::fv::velocityDampingConstraint::read(const dictionary& dict) { if (cellSetOption::read(dict)) { - UMax_ = coeffs_.get<scalar>("UMax"); + coeffs_.readEntry("UMax", UMax_); if (!coeffs_.readIfPresent("UNames", fieldNames_)) { diff --git a/src/fvOptions/sources/derived/rotorDiskSource/trimModel/targetCoeff/targetCoeffTrim.C b/src/fvOptions/sources/derived/rotorDiskSource/trimModel/targetCoeff/targetCoeffTrim.C index fd2d7a82ed37e2da1b81835c08281ffde4403239..fa0c19e3984e08b80c03f0b28c73e2e5bea99185 100644 --- a/src/fvOptions/sources/derived/rotorDiskSource/trimModel/targetCoeff/targetCoeffTrim.C +++ b/src/fvOptions/sources/derived/rotorDiskSource/trimModel/targetCoeff/targetCoeffTrim.C @@ -225,9 +225,9 @@ void Foam::targetCoeffTrim::read(const dictionary& dict) ext = "Coeff"; } - target_[0] = targetDict.get<scalar>("thrust" + ext); - target_[1] = targetDict.get<scalar>("pitch" + ext); - target_[2] = targetDict.get<scalar>("roll" + ext); + targetDict.readEntry("thrust" + ext, target_[0]); + targetDict.readEntry("pitch" + ext, target_[1]); + targetDict.readEntry("roll" + ext, target_[2]); const dictionary& pitchAngleDict(coeffs_.subDict("pitchAngles")); theta_[0] = degToRad(pitchAngleDict.get<scalar>("theta0Ini")); @@ -245,7 +245,7 @@ void Foam::targetCoeffTrim::read(const dictionary& dict) dTheta_ = degToRad(dTheta_); } - alpha_ = coeffs_.get<scalar>("alpha"); + coeffs_.readEntry("alpha", alpha_); } diff --git a/src/fvOptions/sources/derived/solidificationMeltingSource/solidificationMeltingSource.C b/src/fvOptions/sources/derived/solidificationMeltingSource/solidificationMeltingSource.C index 60cbf5b943e10cb6f81a6f9aa62af83c99bdba60..5fc0c9695ef1fb8eb27ed1b440b61d8366b88e38 100644 --- a/src/fvOptions/sources/derived/solidificationMeltingSource/solidificationMeltingSource.C +++ b/src/fvOptions/sources/derived/solidificationMeltingSource/solidificationMeltingSource.C @@ -79,7 +79,7 @@ Foam::fv::solidificationMeltingSource::Cp() const { if (CpName_ == "CpRef") { - scalar CpRef = coeffs_.get<scalar>("CpRef"); + const scalar CpRef = coeffs_.get<scalar>("CpRef"); return tmp<volScalarField>::New ( diff --git a/src/fvOptions/sources/interRegion/interRegionHeatTransfer/variableHeatTransfer/variableHeatTransfer.C b/src/fvOptions/sources/interRegion/interRegionHeatTransfer/variableHeatTransfer/variableHeatTransfer.C index c74a87ecc8f77288ef0ae0a1344b9496c87aa923..f58ebd0adff2bc03e1995f84baa7423b776768f7 100644 --- a/src/fvOptions/sources/interRegion/interRegionHeatTransfer/variableHeatTransfer/variableHeatTransfer.C +++ b/src/fvOptions/sources/interRegion/interRegionHeatTransfer/variableHeatTransfer/variableHeatTransfer.C @@ -65,11 +65,12 @@ Foam::fv::variableHeatTransfer::variableHeatTransfer { if (master_) { - a_ = coeffs_.get<scalar>("a"); - b_ = coeffs_.get<scalar>("b"); - c_ = coeffs_.get<scalar>("c"); - ds_ = coeffs_.get<scalar>("ds"); - Pr_ = coeffs_.get<scalar>("Pr"); + coeffs_.readEntry("a", a_); + coeffs_.readEntry("b", b_); + coeffs_.readEntry("c", c_); + coeffs_.readEntry("ds", ds_); + coeffs_.readEntry("Pr", Pr_); + AoV_.reset ( new volScalarField diff --git a/src/lagrangian/DSMC/clouds/Templates/DSMCCloud/DSMCCloud.C b/src/lagrangian/DSMC/clouds/Templates/DSMCCloud/DSMCCloud.C index 80ba38e4035ce5ea6432c5e743aee2e1368031df..1a3d43b0b376ec8e8dc2e76b0d1c796514d9945b 100644 --- a/src/lagrangian/DSMC/clouds/Templates/DSMCCloud/DSMCCloud.C +++ b/src/lagrangian/DSMC/clouds/Templates/DSMCCloud/DSMCCloud.C @@ -84,10 +84,10 @@ void Foam::DSMCCloud<ParcelType>::initialise const scalar temperature ( - readScalar(dsmcInitialiseDict.lookup("temperature")) + dsmcInitialiseDict.get<scalar>("temperature") ); - const vector velocity(dsmcInitialiseDict.lookup("velocity")); + const vector velocity(dsmcInitialiseDict.get<vector>("velocity")); const dictionary& numberDensitiesDict ( @@ -100,10 +100,7 @@ void Foam::DSMCCloud<ParcelType>::initialise forAll(molecules, i) { - numberDensities[i] = readScalar - ( - numberDensitiesDict.lookup(molecules[i]) - ); + numberDensities[i] = numberDensitiesDict.get<scalar>(molecules[i]); } numberDensities /= nParticle_; @@ -491,7 +488,7 @@ Foam::DSMCCloud<ParcelType>::DSMCCloud ) ), typeIdList_(particleProperties_.lookup("typeIdList")), - nParticle_(readScalar(particleProperties_.lookup("nEquivalentParticles"))), + nParticle_(particleProperties_.get<scalar>("nEquivalentParticles")), cellOccupancy_(mesh_.nCells()), sigmaTcRMax_ ( @@ -722,7 +719,7 @@ Foam::DSMCCloud<ParcelType>::DSMCCloud ) ), typeIdList_(particleProperties_.lookup("typeIdList")), - nParticle_(readScalar(particleProperties_.lookup("nEquivalentParticles"))), + nParticle_(particleProperties_.get<scalar>("nEquivalentParticles")), cellOccupancy_(), sigmaTcRMax_ ( diff --git a/src/lagrangian/DSMC/parcels/Templates/DSMCParcel/DSMCParcelI.H b/src/lagrangian/DSMC/parcels/Templates/DSMCParcel/DSMCParcelI.H index 2bff944e14878ef58eb0f524df6024e7ab6196ec..1f8bc481de063d5483303f2a075f539c732c765f 100644 --- a/src/lagrangian/DSMC/parcels/Templates/DSMCParcel/DSMCParcelI.H +++ b/src/lagrangian/DSMC/parcels/Templates/DSMCParcel/DSMCParcelI.H @@ -41,13 +41,10 @@ inline Foam::DSMCParcel<ParcelType>::constantProperties::constantProperties const dictionary& dict ) : - mass_(readScalar(dict.lookup("mass"))), - d_(readScalar(dict.lookup("diameter"))), - internalDegreesOfFreedom_ - ( - readInt(dict.lookup("internalDegreesOfFreedom")) - ), - omega_(readScalar(dict.lookup("omega"))) + mass_(dict.get<scalar>("mass")), + d_(dict.get<scalar>("diameter")), + internalDegreesOfFreedom_(dict.get<int>("internalDegreesOfFreedom")), + omega_(dict.get<scalar>("omega")) {} diff --git a/src/lagrangian/DSMC/submodels/BinaryCollisionModel/LarsenBorgnakkeVariableHardSphere/LarsenBorgnakkeVariableHardSphere.C b/src/lagrangian/DSMC/submodels/BinaryCollisionModel/LarsenBorgnakkeVariableHardSphere/LarsenBorgnakkeVariableHardSphere.C index 248c75c9aa8ac8419178f04b95fbb1e272b37a57..bc14fd8c9191bdf9bee27f18a1bb62654f8cf425 100644 --- a/src/lagrangian/DSMC/submodels/BinaryCollisionModel/LarsenBorgnakkeVariableHardSphere/LarsenBorgnakkeVariableHardSphere.C +++ b/src/lagrangian/DSMC/submodels/BinaryCollisionModel/LarsenBorgnakkeVariableHardSphere/LarsenBorgnakkeVariableHardSphere.C @@ -98,10 +98,10 @@ LarsenBorgnakkeVariableHardSphere ) : BinaryCollisionModel<CloudType>(dict, cloud, typeName), - Tref_(readScalar(this->coeffDict().lookup("Tref"))), + Tref_(this->coeffDict().getScalar("Tref")), relaxationCollisionNumber_ ( - readScalar(this->coeffDict().lookup("relaxationCollisionNumber")) + this->coeffDict().getScalar("relaxationCollisionNumber") ) {} diff --git a/src/lagrangian/DSMC/submodels/BinaryCollisionModel/VariableHardSphere/VariableHardSphere.C b/src/lagrangian/DSMC/submodels/BinaryCollisionModel/VariableHardSphere/VariableHardSphere.C index 3f20bd3bf9243c836062529d2105d4bbd088d5bc..369f9447b14f92c2a5d8a290244a91a7756f7b74 100644 --- a/src/lagrangian/DSMC/submodels/BinaryCollisionModel/VariableHardSphere/VariableHardSphere.C +++ b/src/lagrangian/DSMC/submodels/BinaryCollisionModel/VariableHardSphere/VariableHardSphere.C @@ -38,7 +38,7 @@ Foam::VariableHardSphere<CloudType>::VariableHardSphere ) : BinaryCollisionModel<CloudType>(dict, cloud, typeName), - Tref_(readScalar(this->coeffDict().lookup("Tref"))) + Tref_(this->coeffDict().getScalar("Tref")) {} diff --git a/src/lagrangian/DSMC/submodels/InflowBoundaryModel/FreeStream/FreeStream.C b/src/lagrangian/DSMC/submodels/InflowBoundaryModel/FreeStream/FreeStream.C index 4d6b0a184c9b2e14cdc13d6f6b79fba3155bd1db..12594a53abad4e89edce75f8236e67c6f20e38f6 100644 --- a/src/lagrangian/DSMC/submodels/InflowBoundaryModel/FreeStream/FreeStream.C +++ b/src/lagrangian/DSMC/submodels/InflowBoundaryModel/FreeStream/FreeStream.C @@ -78,7 +78,7 @@ Foam::FreeStream<CloudType>::FreeStream particleFluxAccumulators_[p] = List<Field<scalar>> ( molecules.size(), - Field<scalar>(patch.size(), 0.0) + Field<scalar>(patch.size(), Zero) ); } @@ -88,10 +88,7 @@ Foam::FreeStream<CloudType>::FreeStream forAll(molecules, i) { - numberDensities_[i] = readScalar - ( - numberDensitiesDict.lookup(molecules[i]) - ); + numberDensities_[i] = numberDensitiesDict.get<scalar>(molecules[i]); moleculeTypeIds_[i] = cloud.typeIdList().find(molecules[i]); diff --git a/src/lagrangian/DSMC/submodels/WallInteractionModel/MixedDiffuseSpecular/MixedDiffuseSpecular.C b/src/lagrangian/DSMC/submodels/WallInteractionModel/MixedDiffuseSpecular/MixedDiffuseSpecular.C index 4fe4f0649d798a393d9de5c0d84e9b9ff2da5786..19f95b245bbde0414f21a527b35c02eb9e151bdd 100644 --- a/src/lagrangian/DSMC/submodels/WallInteractionModel/MixedDiffuseSpecular/MixedDiffuseSpecular.C +++ b/src/lagrangian/DSMC/submodels/WallInteractionModel/MixedDiffuseSpecular/MixedDiffuseSpecular.C @@ -35,7 +35,7 @@ Foam::MixedDiffuseSpecular<CloudType>::MixedDiffuseSpecular ) : WallInteractionModel<CloudType>(dict, cloud, typeName), - diffuseFraction_(readScalar(this->coeffDict().lookup("diffuseFraction"))) + diffuseFraction_(this->coeffDict().getScalar("diffuseFraction")) {} diff --git a/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationDiffusionLimitedRate/COxidationDiffusionLimitedRate.C b/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationDiffusionLimitedRate/COxidationDiffusionLimitedRate.C index e51e59f1d754d9d48539b62ae8c446edb2a6cff7..5785c6fd6d1534edaa5d0743c03f9d0147da6910 100644 --- a/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationDiffusionLimitedRate/COxidationDiffusionLimitedRate.C +++ b/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationDiffusionLimitedRate/COxidationDiffusionLimitedRate.C @@ -38,8 +38,8 @@ Foam::COxidationDiffusionLimitedRate<CloudType>::COxidationDiffusionLimitedRate ) : SurfaceReactionModel<CloudType>(dict, owner, typeName), - Sb_(readScalar(this->coeffDict().lookup("Sb"))), - D_(readScalar(this->coeffDict().lookup("D"))), + Sb_(this->coeffDict().getScalar("Sb")), + D_(this->coeffDict().getScalar("D")), CsLocalId_(-1), O2GlobalId_(owner.composition().carrierId("O2")), CO2GlobalId_(owner.composition().carrierId("CO2")), diff --git a/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationHurtMitchell/COxidationHurtMitchell.C b/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationHurtMitchell/COxidationHurtMitchell.C index d198deaf912621d5c45492946bdbde9d0e70855b..bd70e8cc0ff6c11afa6ed9b0a86d9e25dd8285ad 100644 --- a/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationHurtMitchell/COxidationHurtMitchell.C +++ b/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationHurtMitchell/COxidationHurtMitchell.C @@ -36,7 +36,7 @@ Foam::COxidationHurtMitchell<CloudType>::COxidationHurtMitchell ) : SurfaceReactionModel<CloudType>(dict, owner, typeName), - Sb_(readScalar(this->coeffDict().lookup("Sb"))), + Sb_(this->coeffDict().getScalar("Sb")), CsLocalId_(-1), ashLocalId_(-1), O2GlobalId_(owner.composition().carrierId("O2")), diff --git a/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationIntrinsicRate/COxidationIntrinsicRate.C b/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationIntrinsicRate/COxidationIntrinsicRate.C index 77435d66b48130a125332b23ad70a976a094c8e5..e19fa95a657c9705bbb8911c56ad7d56fdb74675 100644 --- a/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationIntrinsicRate/COxidationIntrinsicRate.C +++ b/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationIntrinsicRate/COxidationIntrinsicRate.C @@ -38,13 +38,13 @@ Foam::COxidationIntrinsicRate<CloudType>::COxidationIntrinsicRate ) : SurfaceReactionModel<CloudType>(dict, owner, typeName), - Sb_(readScalar(this->coeffDict().lookup("Sb"))), - C1_(readScalar(this->coeffDict().lookup("C1"))), - rMean_(readScalar(this->coeffDict().lookup("rMean"))), - theta_(readScalar(this->coeffDict().lookup("theta"))), - Ai_(readScalar(this->coeffDict().lookup("Ai"))), - Ei_(readScalar(this->coeffDict().lookup("Ei"))), - Ag_(readScalar(this->coeffDict().lookup("Ag"))), + Sb_(this->coeffDict().getScalar("Sb")), + C1_(this->coeffDict().getScalar("C1")), + rMean_(this->coeffDict().getScalar("rMean")), + theta_(this->coeffDict().getScalar("theta")), + Ai_(this->coeffDict().getScalar("Ai")), + Ei_(this->coeffDict().getScalar("Ei")), + Ag_(this->coeffDict().getScalar("Ag")), tau_(this->coeffDict().lookupOrDefault("tau", sqrt(2.0))), CsLocalId_(-1), O2GlobalId_(owner.composition().carrierId("O2")), diff --git a/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationKineticDiffusionLimitedRate/COxidationKineticDiffusionLimitedRate.C b/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationKineticDiffusionLimitedRate/COxidationKineticDiffusionLimitedRate.C index f59317f407f52d2777e9049b9300fd0f1540e7d5..a32af174b3cde5556ac4cba7e72c1ff440e131a3 100644 --- a/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationKineticDiffusionLimitedRate/COxidationKineticDiffusionLimitedRate.C +++ b/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationKineticDiffusionLimitedRate/COxidationKineticDiffusionLimitedRate.C @@ -37,10 +37,10 @@ COxidationKineticDiffusionLimitedRate ) : SurfaceReactionModel<CloudType>(dict, owner, typeName), - Sb_(readScalar(this->coeffDict().lookup("Sb"))), - C1_(readScalar(this->coeffDict().lookup("C1"))), - C2_(readScalar(this->coeffDict().lookup("C2"))), - E_(readScalar(this->coeffDict().lookup("E"))), + Sb_(this->coeffDict().getScalar("Sb")), + C1_(this->coeffDict().getScalar("C1")), + C2_(this->coeffDict().getScalar("C2")), + E_(this->coeffDict().getScalar("E")), CsLocalId_(-1), O2GlobalId_(owner.composition().carrierId("O2")), CO2GlobalId_(owner.composition().carrierId("CO2")), diff --git a/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationMurphyShaddix/COxidationMurphyShaddix.C b/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationMurphyShaddix/COxidationMurphyShaddix.C index af061f4a3ecd48183a658403d8388b37feae7ab5..286ae5b664563339beee5e21ded9849a958f2ee4 100644 --- a/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationMurphyShaddix/COxidationMurphyShaddix.C +++ b/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationMurphyShaddix/COxidationMurphyShaddix.C @@ -45,14 +45,14 @@ Foam::COxidationMurphyShaddix<CloudType>::COxidationMurphyShaddix ) : SurfaceReactionModel<CloudType>(dict, owner, typeName), - D0_(readScalar(this->coeffDict().lookup("D0"))), - rho0_(readScalar(this->coeffDict().lookup("rho0"))), - T0_(readScalar(this->coeffDict().lookup("T0"))), - Dn_(readScalar(this->coeffDict().lookup("Dn"))), - A_(readScalar(this->coeffDict().lookup("A"))), - E_(readScalar(this->coeffDict().lookup("E"))), - n_(readScalar(this->coeffDict().lookup("n"))), - WVol_(readScalar(this->coeffDict().lookup("WVol"))), + D0_(this->coeffDict().getScalar("D0")), + rho0_(this->coeffDict().getScalar("rho0")), + T0_(this->coeffDict().getScalar("T0")), + Dn_(this->coeffDict().getScalar("Dn")), + A_(this->coeffDict().getScalar("A")), + E_(this->coeffDict().getScalar("E")), + n_(this->coeffDict().getScalar("n")), + WVol_(this->coeffDict().getScalar("WVol")), CsLocalId_(-1), O2GlobalId_(owner.composition().carrierId("O2")), CO2GlobalId_(owner.composition().carrierId("CO2")), diff --git a/src/lagrangian/distributionModels/RosinRammler/RosinRammler.C b/src/lagrangian/distributionModels/RosinRammler/RosinRammler.C index 0ed45f62a2c27e738f066c74e62fac6271fbca18..f48e33c363dad443d71bc8816b329a36169b62d2 100644 --- a/src/lagrangian/distributionModels/RosinRammler/RosinRammler.C +++ b/src/lagrangian/distributionModels/RosinRammler/RosinRammler.C @@ -46,10 +46,10 @@ Foam::distributionModels::RosinRammler::RosinRammler ) : distributionModel(typeName, dict, rndGen), - minValue_(readScalar(distributionModelDict_.lookup("minValue"))), - maxValue_(readScalar(distributionModelDict_.lookup("maxValue"))), - d_(readScalar(distributionModelDict_.lookup("d"))), - n_(readScalar(distributionModelDict_.lookup("n"))) + minValue_(distributionModelDict_.get<scalar>("minValue")), + maxValue_(distributionModelDict_.get<scalar>("maxValue")), + d_(distributionModelDict_.get<scalar>("d")), + n_(distributionModelDict_.get<scalar>("n")) { check(); } diff --git a/src/lagrangian/distributionModels/exponential/exponential.C b/src/lagrangian/distributionModels/exponential/exponential.C index 3253151351183e2ca743ac14ea68932e1118a628..92b2c2335f0cbb923e6c63d378478b404e5af951 100644 --- a/src/lagrangian/distributionModels/exponential/exponential.C +++ b/src/lagrangian/distributionModels/exponential/exponential.C @@ -46,9 +46,9 @@ Foam::distributionModels::exponential::exponential ) : distributionModel(typeName, dict, rndGen), - minValue_(readScalar(distributionModelDict_.lookup("minValue"))), - maxValue_(readScalar(distributionModelDict_.lookup("maxValue"))), - lambda_(readScalar(distributionModelDict_.lookup("lambda"))) + minValue_(distributionModelDict_.get<scalar>("minValue")), + maxValue_(distributionModelDict_.get<scalar>("maxValue")), + lambda_(distributionModelDict_.get<scalar>("lambda")) { check(); } diff --git a/src/lagrangian/distributionModels/fixedValue/fixedValue.C b/src/lagrangian/distributionModels/fixedValue/fixedValue.C index 0275a404ad7b31da7342e710e4f90fba0eca8ab9..2213fe9017ce10ca0857211564eb73fedd8f60d6 100644 --- a/src/lagrangian/distributionModels/fixedValue/fixedValue.C +++ b/src/lagrangian/distributionModels/fixedValue/fixedValue.C @@ -46,7 +46,7 @@ Foam::distributionModels::fixedValue::fixedValue ) : distributionModel(typeName, dict, rndGen), - value_(readScalar(distributionModelDict_.lookup("value"))) + value_(distributionModelDict_.get<scalar>("value")) {} diff --git a/src/lagrangian/distributionModels/massRosinRammler/massRosinRammler.C b/src/lagrangian/distributionModels/massRosinRammler/massRosinRammler.C index 23339eca0f037faef82bada89d9f73848cf2d69d..b3d899b850f3810e664d0e4d0b86b0b6ede02c2b 100644 --- a/src/lagrangian/distributionModels/massRosinRammler/massRosinRammler.C +++ b/src/lagrangian/distributionModels/massRosinRammler/massRosinRammler.C @@ -46,10 +46,10 @@ Foam::distributionModels::massRosinRammler::massRosinRammler ) : distributionModel(typeName, dict, rndGen), - minValue_(readScalar(distributionModelDict_.lookup("minValue"))), - maxValue_(readScalar(distributionModelDict_.lookup("maxValue"))), - d_(readScalar(distributionModelDict_.lookup("d"))), - n_(readScalar(distributionModelDict_.lookup("n"))) + minValue_(distributionModelDict_.get<scalar>("minValue")), + maxValue_(distributionModelDict_.get<scalar>("maxValue")), + d_(distributionModelDict_.get<scalar>("d")), + n_(distributionModelDict_.get<scalar>("n")) { check(); } diff --git a/src/lagrangian/distributionModels/multiNormal/multiNormal.C b/src/lagrangian/distributionModels/multiNormal/multiNormal.C index 8779281fc06bd9aab30ca26e8f0880e1983f127d..b272500ac1d15113d7b2b91e5d386e71fd59fb9e 100644 --- a/src/lagrangian/distributionModels/multiNormal/multiNormal.C +++ b/src/lagrangian/distributionModels/multiNormal/multiNormal.C @@ -46,8 +46,8 @@ Foam::distributionModels::multiNormal::multiNormal ) : distributionModel(typeName, dict, rndGen), - minValue_(readScalar(distributionModelDict_.lookup("minValue"))), - maxValue_(readScalar(distributionModelDict_.lookup("maxValue"))), + minValue_(distributionModelDict_.get<scalar>("minValue")), + maxValue_(distributionModelDict_.get<scalar>("maxValue")), range_(maxValue_ - minValue_), expectation_(distributionModelDict_.lookup("expectation")), variance_(distributionModelDict_.lookup("variance")), diff --git a/src/lagrangian/distributionModels/normal/normal.C b/src/lagrangian/distributionModels/normal/normal.C index a6ebd9d594eababb602b3e0522212c815bb593a4..d8e7d7c2461cbff65e5b546f0b2ef9aaf9bf4558 100644 --- a/src/lagrangian/distributionModels/normal/normal.C +++ b/src/lagrangian/distributionModels/normal/normal.C @@ -47,10 +47,10 @@ Foam::distributionModels::normal::normal ) : distributionModel(typeName, dict, rndGen), - minValue_(readScalar(distributionModelDict_.lookup("minValue"))), - maxValue_(readScalar(distributionModelDict_.lookup("maxValue"))), - expectation_(readScalar(distributionModelDict_.lookup("expectation"))), - variance_(readScalar(distributionModelDict_.lookup("variance"))), + minValue_(distributionModelDict_.get<scalar>("minValue")), + maxValue_(distributionModelDict_.get<scalar>("maxValue")), + expectation_(distributionModelDict_.get<scalar>("expectation")), + variance_(distributionModelDict_.get<scalar>("variance")), a_(0.147) { if (minValue_ < 0) diff --git a/src/lagrangian/distributionModels/uniform/uniform.C b/src/lagrangian/distributionModels/uniform/uniform.C index ccf60544b5854146ed68e0039411ada43c57dc2b..91ab4c0ea882474c26b9b586cb9edbf4c24f11ae 100644 --- a/src/lagrangian/distributionModels/uniform/uniform.C +++ b/src/lagrangian/distributionModels/uniform/uniform.C @@ -46,8 +46,8 @@ Foam::distributionModels::uniform::uniform ) : distributionModel(typeName, dict, rndGen), - minValue_(readScalar(distributionModelDict_.lookup("minValue"))), - maxValue_(readScalar(distributionModelDict_.lookup("maxValue"))) + minValue_(distributionModelDict_.get<scalar>("minValue")), + maxValue_(distributionModelDict_.get<scalar>("maxValue")) { check(); } diff --git a/src/lagrangian/intermediate/submodels/CloudFunctionObjects/ParticleCollector/ParticleCollector.C b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/ParticleCollector/ParticleCollector.C index 593da8386652672e9ad28aed16b36781b86f4351..166150a988495e66c0c2e42808d6a20cd5ec8984 100644 --- a/src/lagrangian/intermediate/submodels/CloudFunctionObjects/ParticleCollector/ParticleCollector.C +++ b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/ParticleCollector/ParticleCollector.C @@ -158,14 +158,15 @@ void Foam::ParticleCollector<CloudType>::initConcentricCircles() vector origin(this->coeffDict().lookup("origin")); this->coeffDict().readEntry("radius", radius_); - nSector_ = readLabel(this->coeffDict().lookup("nSector")); + this->coeffDict().readEntry("nSector", nSector_); label nS = nSector_; vector refDir; if (nSector_ > 1) { - refDir = this->coeffDict().lookup("refDir"); + this->coeffDict().readEntry("refDir", refDir); + refDir -= normal_[0]*(normal_[0] & refDir); refDir.normalise(); } @@ -543,7 +544,7 @@ Foam::ParticleCollector<CloudType>::ParticleCollector normal_(), negateParcelsOppositeNormal_ ( - readBool(this->coeffDict().lookup("negateParcelsOppositeNormal")) + this->coeffDict().getBool("negateParcelsOppositeNormal") ), surfaceFormat_(this->coeffDict().lookup("surfaceFormat")), resetOnWrite_(this->coeffDict().lookup("resetOnWrite")), diff --git a/src/lagrangian/intermediate/submodels/CloudFunctionObjects/ParticleErosion/ParticleErosion.C b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/ParticleErosion/ParticleErosion.C index 3da906bcdc7d2d39a835984a5f024c470a0bbf0d..29a8b0a6a5c24a657d038dadadc295f15b6f4520 100644 --- a/src/lagrangian/intermediate/submodels/CloudFunctionObjects/ParticleErosion/ParticleErosion.C +++ b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/ParticleErosion/ParticleErosion.C @@ -73,7 +73,7 @@ Foam::ParticleErosion<CloudType>::ParticleErosion CloudFunctionObject<CloudType>(dict, owner, modelName, typeName), QPtr_(nullptr), patchIDs_(), - p_(readScalar(this->coeffDict().lookup("p"))), + p_(this->coeffDict().getScalar("p")), psi_(this->coeffDict().template lookupOrDefault<scalar>("psi", 2.0)), K_(this->coeffDict().template lookupOrDefault<scalar>("K", 2.0)) { diff --git a/src/lagrangian/intermediate/submodels/CloudFunctionObjects/ParticleTracks/ParticleTracks.C b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/ParticleTracks/ParticleTracks.C index 850eb320f285597a9f2062199dbf7cd178d99b11..5b9732c0695c149e3f6991174be8eb1416f0338f 100644 --- a/src/lagrangian/intermediate/submodels/CloudFunctionObjects/ParticleTracks/ParticleTracks.C +++ b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/ParticleTracks/ParticleTracks.C @@ -63,8 +63,8 @@ Foam::ParticleTracks<CloudType>::ParticleTracks ) : CloudFunctionObject<CloudType>(dict, owner, modelName, typeName), - trackInterval_(readLabel(this->coeffDict().lookup("trackInterval"))), - maxSamples_(readLabel(this->coeffDict().lookup("maxSamples"))), + trackInterval_(this->coeffDict().getLabel("trackInterval")), + maxSamples_(this->coeffDict().getLabel("maxSamples")), resetOnWrite_(this->coeffDict().lookup("resetOnWrite")), faceHitCounter_(), cloudPtr_(nullptr) diff --git a/src/lagrangian/intermediate/submodels/CloudFunctionObjects/ParticleTrap/ParticleTrap.C b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/ParticleTrap/ParticleTrap.C index febe31eb450fa2bb02015b539f2978b67036b9d1..30cb2f71f9856739b65dc30e312781661cb7f1d4 100644 --- a/src/lagrangian/intermediate/submodels/CloudFunctionObjects/ParticleTrap/ParticleTrap.C +++ b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/ParticleTrap/ParticleTrap.C @@ -43,7 +43,7 @@ Foam::ParticleTrap<CloudType>::ParticleTrap ), alphaPtr_(nullptr), gradAlphaPtr_(nullptr), - threshold_(readScalar(this->coeffDict().lookup("threshold"))) + threshold_(this->coeffDict().getScalar("threshold")) {} diff --git a/src/lagrangian/intermediate/submodels/CloudFunctionObjects/PatchPostProcessing/PatchPostProcessing.C b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/PatchPostProcessing/PatchPostProcessing.C index 21752df47fdc08c6bc5b5408011787c2733793d5..a4bcb3b36a07dc75adf95dfadabf407f431fd640 100644 --- a/src/lagrangian/intermediate/submodels/CloudFunctionObjects/PatchPostProcessing/PatchPostProcessing.C +++ b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/PatchPostProcessing/PatchPostProcessing.C @@ -129,7 +129,7 @@ Foam::PatchPostProcessing<CloudType>::PatchPostProcessing ) : CloudFunctionObject<CloudType>(dict, owner, modelName, typeName), - maxStoredParcels_(readScalar(this->coeffDict().lookup("maxStoredParcels"))), + maxStoredParcels_(this->coeffDict().getScalar("maxStoredParcels")), patchIDs_(), times_(), patchData_() diff --git a/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/PairCollision/PairCollision.C b/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/PairCollision/PairCollision.C index 96407263374762f04cb4ed0c794aebc40055adf6..42728aab1f579770004c64b221b150188cde042d 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/PairCollision/PairCollision.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/PairCollision/PairCollision.C @@ -549,7 +549,7 @@ Foam::PairCollision<CloudType>::PairCollision il_ ( owner.mesh(), - readScalar(this->coeffDict().lookup("maxInteractionDistance")), + this->coeffDict().getScalar("maxInteractionDistance"), this->coeffDict().lookupOrDefault ( "writeReferredParticleCloud", diff --git a/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/PairCollision/PairModel/PairSpringSliderDashpot/PairSpringSliderDashpot.C b/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/PairCollision/PairModel/PairSpringSliderDashpot/PairSpringSliderDashpot.C index 0e4c727a8347c2e521a6bbbf75114058521f3543..621e77222fb83ef42fc2c6be2965384531835046 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/PairCollision/PairModel/PairSpringSliderDashpot/PairSpringSliderDashpot.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/PairCollision/PairModel/PairSpringSliderDashpot/PairSpringSliderDashpot.C @@ -89,24 +89,24 @@ Foam::PairSpringSliderDashpot<CloudType>::PairSpringSliderDashpot PairModel<CloudType>(dict, cloud, typeName), Estar_(), Gstar_(), - alpha_(readScalar(this->coeffDict().lookup("alpha"))), - b_(readScalar(this->coeffDict().lookup("b"))), - mu_(readScalar(this->coeffDict().lookup("mu"))), + alpha_(this->coeffDict().getScalar("alpha")), + b_(this->coeffDict().getScalar("b")), + mu_(this->coeffDict().getScalar("mu")), cohesionEnergyDensity_ ( - readScalar(this->coeffDict().lookup("cohesionEnergyDensity")) + this->coeffDict().getScalar("cohesionEnergyDensity") ), cohesion_(false), collisionResolutionSteps_ ( - readScalar(this->coeffDict().lookup("collisionResolutionSteps")) + this->coeffDict().getScalar("collisionResolutionSteps") ), volumeFactor_(1.0), useEquivalentSize_(Switch(this->coeffDict().lookup("useEquivalentSize"))) { if (useEquivalentSize_) { - volumeFactor_ = readScalar(this->coeffDict().lookup("volumeFactor")); + this->coeffDict().readEntry("volumeFactor", volumeFactor_); } scalar nu = this->owner().constProps().poissonsRatio(); diff --git a/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/PairCollision/WallModel/WallLocalSpringSliderDashpot/WallLocalSpringSliderDashpot.C b/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/PairCollision/WallModel/WallLocalSpringSliderDashpot/WallLocalSpringSliderDashpot.C index d28d6b136f6c782e2ac081128e656766a3a8bea3..6db09c10a3d2e3c41ef5c692a79bbcee4ebfcd73 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/PairCollision/WallModel/WallLocalSpringSliderDashpot/WallLocalSpringSliderDashpot.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/PairCollision/WallModel/WallLocalSpringSliderDashpot/WallLocalSpringSliderDashpot.C @@ -189,17 +189,14 @@ Foam::WallLocalSpringSliderDashpot<CloudType>::WallLocalSpringSliderDashpot maxEstarIndex_(-1), collisionResolutionSteps_ ( - readScalar - ( - this->coeffDict().lookup("collisionResolutionSteps") - ) + this->coeffDict().getScalar("collisionResolutionSteps") ), volumeFactor_(1.0), useEquivalentSize_(Switch(this->coeffDict().lookup("useEquivalentSize"))) { if (useEquivalentSize_) { - volumeFactor_ = readScalar(this->coeffDict().lookup("volumeFactor")); + this->coeffDict().readEntry("volumeFactor", volumeFactor_); } scalar pNu = this->owner().constProps().poissonsRatio(); @@ -243,24 +240,22 @@ Foam::WallLocalSpringSliderDashpot<CloudType>::WallLocalSpringSliderDashpot patchMap_[wallPatchIndices[wPI]] = wPI; - scalar nu = readScalar(patchCoeffDict.lookup("poissonsRatio")); + scalar nu = patchCoeffDict.get<scalar>("poissonsRatio"); - scalar E = readScalar(patchCoeffDict.lookup("youngsModulus")); + scalar E = patchCoeffDict.get<scalar>("youngsModulus"); Estar_[wPI] = 1/((1 - sqr(pNu))/pE + (1 - sqr(nu))/E); Gstar_[wPI] = 1/(2*((2 + pNu - sqr(pNu))/pE + (2 + nu - sqr(nu))/E)); - alpha_[wPI] = readScalar(patchCoeffDict.lookup("alpha")); + alpha_[wPI] = patchCoeffDict.get<scalar>("alpha"); - b_[wPI] = readScalar(patchCoeffDict.lookup("b")); + b_[wPI] = patchCoeffDict.get<scalar>("b"); - mu_[wPI] = readScalar(patchCoeffDict.lookup("mu")); + mu_[wPI] = patchCoeffDict.get<scalar>("mu"); - cohesionEnergyDensity_[wPI] = readScalar - ( - patchCoeffDict.lookup("cohesionEnergyDensity") - ); + cohesionEnergyDensity_[wPI] = + patchCoeffDict.get<scalar>("cohesionEnergyDensity"); cohesion_[wPI] = (mag(cohesionEnergyDensity_[wPI]) > VSMALL); diff --git a/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/PairCollision/WallModel/WallSpringSliderDashpot/WallSpringSliderDashpot.C b/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/PairCollision/WallModel/WallSpringSliderDashpot/WallSpringSliderDashpot.C index a42aeb14b8a784299c8026d2f9d41b8e755edb21..5a98974d54e70add55c4a701166d3b27aaca1b67 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/PairCollision/WallModel/WallSpringSliderDashpot/WallSpringSliderDashpot.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/PairCollision/WallModel/WallSpringSliderDashpot/WallSpringSliderDashpot.C @@ -164,32 +164,29 @@ Foam::WallSpringSliderDashpot<CloudType>::WallSpringSliderDashpot WallModel<CloudType>(dict, cloud, typeName), Estar_(), Gstar_(), - alpha_(readScalar(this->coeffDict().lookup("alpha"))), - b_(readScalar(this->coeffDict().lookup("b"))), - mu_(readScalar(this->coeffDict().lookup("mu"))), + alpha_(this->coeffDict().getScalar("alpha")), + b_(this->coeffDict().getScalar("b")), + mu_(this->coeffDict().getScalar("mu")), cohesionEnergyDensity_ ( - readScalar(this->coeffDict().lookup("cohesionEnergyDensity")) + this->coeffDict().getScalar("cohesionEnergyDensity") ), cohesion_(false), collisionResolutionSteps_ ( - readScalar - ( - this->coeffDict().lookup("collisionResolutionSteps") - ) + this->coeffDict().getScalar("collisionResolutionSteps") ), volumeFactor_(1.0), useEquivalentSize_(Switch(this->coeffDict().lookup("useEquivalentSize"))) { if (useEquivalentSize_) { - volumeFactor_ = readScalar(this->coeffDict().lookup("volumeFactor")); + this->coeffDict().readEntry("volumeFactor", volumeFactor_); } - scalar nu = readScalar(this->coeffDict().lookup("poissonsRatio")); + scalar nu = this->coeffDict().getScalar("poissonsRatio"); - scalar E = readScalar(this->coeffDict().lookup("youngsModulus")); + scalar E = this->coeffDict().getScalar("youngsModulus"); scalar pNu = this->owner().constProps().poissonsRatio(); diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/CellZoneInjection/CellZoneInjection.C b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/CellZoneInjection/CellZoneInjection.C index 4c38895e323d85b00a9c7f400b77d24291573c9f..c2e998c6f5b84ffdef03819be5972ac7dbb2befd 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/CellZoneInjection/CellZoneInjection.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/CellZoneInjection/CellZoneInjection.C @@ -170,7 +170,7 @@ Foam::CellZoneInjection<CloudType>::CellZoneInjection : InjectionModel<CloudType>(dict, owner, modelName, typeName), cellZoneName_(this->coeffDict().lookup("cellZone")), - numberDensity_(readScalar(this->coeffDict().lookup("numberDensity"))), + numberDensity_(this->coeffDict().getScalar("numberDensity")), positions_(), injectorCells_(), injectorTetFaces_(), diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ConeInjection/ConeInjection.C b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ConeInjection/ConeInjection.C index 1e203baca64f63ee2e0a37d4e1fe7d89de83d426..5636cb069b3b083214e98dd24cc75e2b134152d2 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ConeInjection/ConeInjection.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ConeInjection/ConeInjection.C @@ -45,10 +45,10 @@ Foam::ConeInjection<CloudType>::ConeInjection injectorCells_(positionAxis_.size()), injectorTetFaces_(positionAxis_.size()), injectorTetPts_(positionAxis_.size()), - duration_(readScalar(this->coeffDict().lookup("duration"))), + duration_(this->coeffDict().getScalar("duration")), parcelsPerInjector_ ( - readScalar(this->coeffDict().lookup("parcelsPerInjector")) + this->coeffDict().getScalar("parcelsPerInjector") ), flowRateProfile_ ( diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ConeNozzleInjection/ConeNozzleInjection.C b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ConeNozzleInjection/ConeNozzleInjection.C index 0f9be704859e9890d6545611f9335ba17381dc00..e8613476c336d8cb6dd3e9d8b55cc89614c442a8 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ConeNozzleInjection/ConeNozzleInjection.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ConeNozzleInjection/ConeNozzleInjection.C @@ -132,19 +132,16 @@ Foam::ConeNozzleInjection<CloudType>::ConeNozzleInjection injectionMethodNames.lookup("injectionMethod", this->coeffDict()) ), flowType_(flowTypeNames.lookup("flowType", this->coeffDict())), - outerDiameter_(readScalar(this->coeffDict().lookup("outerDiameter"))), - innerDiameter_(readScalar(this->coeffDict().lookup("innerDiameter"))), - duration_(readScalar(this->coeffDict().lookup("duration"))), + outerDiameter_(this->coeffDict().getScalar("outerDiameter")), + innerDiameter_(this->coeffDict().getScalar("innerDiameter")), + duration_(this->coeffDict().getScalar("duration")), positionVsTime_(owner.db().time(), "position"), position_(vector::zero), injectorCell_(-1), tetFacei_(-1), tetPti_(-1), direction_(this->coeffDict().lookup("direction")), - parcelsPerSecond_ - ( - readScalar(this->coeffDict().lookup("parcelsPerSecond")) - ), + parcelsPerSecond_(this->coeffDict().getScalar("parcelsPerSecond")), flowRateProfile_ ( TimeFunction1<scalar> diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/FieldActivatedInjection/FieldActivatedInjection.C b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/FieldActivatedInjection/FieldActivatedInjection.C index 0c457d1ad8ae19392a4abf5a9992f40857f76893..6b0c5f099a88a45c7ad78e12fc7fad2adaf6d285 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/FieldActivatedInjection/FieldActivatedInjection.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/FieldActivatedInjection/FieldActivatedInjection.C @@ -40,7 +40,7 @@ Foam::FieldActivatedInjection<CloudType>::FieldActivatedInjection ) : InjectionModel<CloudType>(dict, owner, modelName, typeName), - factor_(readScalar(this->coeffDict().lookup("factor"))), + factor_(this->coeffDict().getScalar("factor")), referenceField_ ( owner.db().objectRegistry::template lookupObject<volScalarField> @@ -72,7 +72,7 @@ Foam::FieldActivatedInjection<CloudType>::FieldActivatedInjection injectorTetPts_(positions_.size()), nParcelsPerInjector_ ( - readLabel(this->coeffDict().lookup("parcelsPerInjector")) + this->coeffDict().getLabel("parcelsPerInjector") ), nParcelsInjected_(positions_.size(), 0), U0_(this->coeffDict().lookup("U0")), diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InflationInjection/InflationInjection.C b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InflationInjection/InflationInjection.C index 1c4ecefade3cf9b94649ef8f651bdd4d014189a2..fe89abf14270349ac21d642af6369530e9da08bd 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InflationInjection/InflationInjection.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InflationInjection/InflationInjection.C @@ -46,7 +46,7 @@ Foam::InflationInjection<CloudType>::InflationInjection inflationSetName_(this->coeffDict().lookup("inflationCellSet")), generationCells_(), inflationCells_(), - duration_(readScalar(this->coeffDict().lookup("duration"))), + duration_(this->coeffDict().getScalar("duration")), flowRateProfile_ ( TimeFunction1<scalar> @@ -83,7 +83,7 @@ Foam::InflationInjection<CloudType>::InflationInjection if (selfSeed_) { - dSeed_ = readScalar(this->coeffDict().lookup("dSeed")); + this->coeffDict().readEntry("dSeed", dSeed_); } cellSet generationCells(this->owner().mesh(), generationSetName_); diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectedParticleDistributionInjection/InjectedParticleDistributionInjection.C b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectedParticleDistributionInjection/InjectedParticleDistributionInjection.C index 3947b86519a04b60674c1d355ecfd745d184f503..024abb64b6888a8dd767e7b08f27bcc1f4e34309 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectedParticleDistributionInjection/InjectedParticleDistributionInjection.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectedParticleDistributionInjection/InjectedParticleDistributionInjection.C @@ -250,19 +250,19 @@ InjectedParticleDistributionInjection this->template getModelProperty<scalarList>("volumeFlowRate") ), U_(this->template getModelProperty<List<vectorList>>("U")), - binWidth_(readScalar(this->coeffDict().lookup("binWidth"))), + binWidth_(this->coeffDict().getScalar("binWidth")), sizeDistribution_(), parcelsPerInjector_ ( - ceil(readScalar(this->coeffDict().lookup("parcelsPerInjector"))) + ceil(this->coeffDict().getScalar("parcelsPerInjector")) ), resampleSize_ ( - this->coeffDict().template lookupOrDefault<label>("resampleSize", 100) + this->coeffDict().lookupOrDefault("resampleSize", label(100)) ), applyDistributionMassTotal_ ( - readBool(dict.lookup("applyDistributionMassTotal")) + this->coeffDict().getBool("applyDistributionMassTotal") ), ignoreOutOfBounds_ ( diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModel.C b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModel.C index 2d0d2ec92f0d25135a1caba9760a710d2aaa174d..00ebd9280e82ebd287a0c46b899a3e8a5b202db6 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModel.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModel.C @@ -307,8 +307,7 @@ Foam::InjectionModel<CloudType>::InjectionModel timeStep0_(this->template getModelProperty<scalar>("timeStep0")), minParticlesPerParcel_ ( - this->coeffDict().template - lookupOrDefault<scalar>("minParticlesPerParcel", 1) + this->coeffDict().lookupOrDefault("minParticlesPerParcel", scalar(1)) ), delayedVolume_(0.0), injectorID_(this->coeffDict().lookupOrDefault("injectorID", -1)) @@ -354,12 +353,11 @@ Foam::InjectionModel<CloudType>::InjectionModel else if (parcelBasisType == "fixed") { parcelBasis_ = pbFixed; + this->coeffDict().readEntry("nParticle", nParticleFixed_); Info<< " Choosing nParticle to be a fixed value, massTotal " << "variable now does not determine anything." << endl; - - nParticleFixed_ = readScalar(this->coeffDict().lookup("nParticle")); } else { diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/KinematicLookupTableInjection/KinematicLookupTableInjection.C b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/KinematicLookupTableInjection/KinematicLookupTableInjection.C index 739599c153ad9e52c2b862360499028bbfd1628d..53a0969d6d2a06945c7f5f16b16bf6de0004c2e7 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/KinematicLookupTableInjection/KinematicLookupTableInjection.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/KinematicLookupTableInjection/KinematicLookupTableInjection.C @@ -38,12 +38,9 @@ Foam::KinematicLookupTableInjection<CloudType>::KinematicLookupTableInjection : InjectionModel<CloudType>(dict, owner, modelName, typeName), inputFileName_(this->coeffDict().lookup("inputFile")), - duration_(readScalar(this->coeffDict().lookup("duration"))), - parcelsPerSecond_ - ( - readScalar(this->coeffDict().lookup("parcelsPerSecond")) - ), - randomise_(readBool(this->coeffDict().lookup("randomise"))), + duration_(this->coeffDict().getScalar("duration")), + parcelsPerSecond_(this->coeffDict().getScalar("parcelsPerSecond")), + randomise_(this->coeffDict().getBool("randomise")), injectors_ ( IOobject diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/KinematicLookupTableInjection/kinematicParcelInjectionData.C b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/KinematicLookupTableInjection/kinematicParcelInjectionData.C index a831d77283e244b51ebb70a8bf9698276d27a4e9..b44c679bae813bc7e071d41a28d27ebb0b85a682 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/KinematicLookupTableInjection/kinematicParcelInjectionData.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/KinematicLookupTableInjection/kinematicParcelInjectionData.C @@ -51,9 +51,9 @@ Foam::kinematicParcelInjectionData::kinematicParcelInjectionData : x_(dict.lookup("x")), U_(dict.lookup("U")), - d_(readScalar(dict.lookup("d"))), - rho_(readScalar(dict.lookup("rho"))), - mDot_(readScalar(dict.lookup("mDot"))) + d_(dict.get<scalar>("d")), + rho_(dict.get<scalar>("rho")), + mDot_(dict.get<scalar>("mDot")) {} // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/PatchFlowRateInjection/PatchFlowRateInjection.C b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/PatchFlowRateInjection/PatchFlowRateInjection.C index a9527d01901a7cdfa00029c72d045f391745cc23..e6d35f9894567f0d947791b1906a18c935de5cdd 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/PatchFlowRateInjection/PatchFlowRateInjection.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/PatchFlowRateInjection/PatchFlowRateInjection.C @@ -43,7 +43,7 @@ Foam::PatchFlowRateInjection<CloudType>::PatchFlowRateInjection patchInjectionBase(owner.mesh(), this->coeffDict().lookup("patch")), phiName_(this->coeffDict().template lookupOrDefault<word>("phi", "phi")), rhoName_(this->coeffDict().template lookupOrDefault<word>("rho", "rho")), - duration_(readScalar(this->coeffDict().lookup("duration"))), + duration_(this->coeffDict().getScalar("duration")), concentration_ ( TimeFunction1<scalar> @@ -55,7 +55,7 @@ Foam::PatchFlowRateInjection<CloudType>::PatchFlowRateInjection ), parcelConcentration_ ( - readScalar(this->coeffDict().lookup("parcelConcentration")) + this->coeffDict().getScalar("parcelConcentration") ), sizeDistribution_ ( diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/PatchInjection/PatchInjection.C b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/PatchInjection/PatchInjection.C index 1c9524078e5b237cb492b2636f6a7ab4cf75f1d6..3c5563532c1723e47546ab799d70d3cdeb623809 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/PatchInjection/PatchInjection.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/PatchInjection/PatchInjection.C @@ -39,10 +39,10 @@ Foam::PatchInjection<CloudType>::PatchInjection : InjectionModel<CloudType>(dict, owner, modelName, typeName), patchInjectionBase(owner.mesh(), this->coeffDict().lookup("patch")), - duration_(readScalar(this->coeffDict().lookup("duration"))), + duration_(this->coeffDict().getScalar("duration")), parcelsPerSecond_ ( - readScalar(this->coeffDict().lookup("parcelsPerSecond")) + this->coeffDict().getScalar("parcelsPerSecond") ), U0_(this->coeffDict().lookup("U0")), flowRateProfile_ diff --git a/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/Drag/NonSphereDrag/NonSphereDragForce.C b/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/Drag/NonSphereDrag/NonSphereDragForce.C index 9bfa59b04850701e675b815996ff0e3a3b9af401..bc6ee8c4029946bf27a363b96731dd611535c931 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/Drag/NonSphereDrag/NonSphereDragForce.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/Drag/NonSphereDrag/NonSphereDragForce.C @@ -45,7 +45,7 @@ Foam::NonSphereDragForce<CloudType>::NonSphereDragForce ) : ParticleForce<CloudType>(owner, mesh, dict, typeName, true), - phi_(readScalar(this->coeffs().lookup("phi"))), + phi_(this->coeffs().getScalar("phi")), a_(exp(2.3288 - 6.4581*phi_ + 2.4486*sqr(phi_))), b_(0.0964 + 0.5565*phi_), c_(exp(4.9050 - 13.8944*phi_ + 18.4222*sqr(phi_) - 10.2599*pow3(phi_))), diff --git a/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/Interface/InterfaceForce.C b/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/Interface/InterfaceForce.C index fb165f67bd6ad652d22f0b078f6a9ee18841ede0..cbba2eb6983f4afe1a8ea67d47bcadededce72ff 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/Interface/InterfaceForce.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/Interface/InterfaceForce.C @@ -38,7 +38,7 @@ Foam::InterfaceForce<CloudType>::InterfaceForce : ParticleForce<CloudType>(owner, mesh, dict, typeName, true), alphaName_(this->coeffs().lookup("alpha")), - C_(readScalar(this->coeffs().lookup("C"))), + C_(this->coeffs().getScalar("C")), gradInterForceInterpPtr_(nullptr) {} diff --git a/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/Lift/TomiyamaLift/TomiyamaLiftForce.C b/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/Lift/TomiyamaLift/TomiyamaLiftForce.C index 5bb1d84065f29667248d1721c265684aed43c35a..a73c3bb27bcd953d03ee76d40b08086b16b33fff 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/Lift/TomiyamaLift/TomiyamaLiftForce.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/Lift/TomiyamaLift/TomiyamaLiftForce.C @@ -71,7 +71,7 @@ Foam::TomiyamaLiftForce<CloudType>::TomiyamaLiftForce ) : LiftForce<CloudType>(owner, mesh, dict, forceType), - sigma_(readScalar(this->coeffs().lookup("sigma"))) + sigma_(this->coeffs().getScalar("sigma")) {} diff --git a/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/Paramagnetic/ParamagneticForce.C b/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/Paramagnetic/ParamagneticForce.C index b0fc66c7dc7ca44866f6fb5bc34800dc404c4d4f..584d798f61f5feb3ba7dff1102aa7c46726c8fdf 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/Paramagnetic/ParamagneticForce.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/Paramagnetic/ParamagneticForce.C @@ -45,7 +45,7 @@ Foam::ParamagneticForce<CloudType>::ParamagneticForce HdotGradHInterpPtr_(nullptr), magneticSusceptibility_ ( - readScalar(this->coeffs().lookup("magneticSusceptibility")) + this->coeffs().getScalar("magneticSusceptibility") ) {} diff --git a/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/VirtualMass/VirtualMassForce.C b/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/VirtualMass/VirtualMassForce.C index 54408f9b247f65c798c81dc0bf15e1baa2f05288..8de467791fdd6627b3771e17d59d5e8795b3ead2 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/VirtualMass/VirtualMassForce.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/VirtualMass/VirtualMassForce.C @@ -37,7 +37,7 @@ Foam::VirtualMassForce<CloudType>::VirtualMassForce ) : PressureGradientForce<CloudType>(owner, mesh, dict, forceType), - Cvm_(readScalar(this->coeffs().lookup("Cvm"))) + Cvm_(this->coeffs().getScalar("Cvm")) {} diff --git a/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/MultiInteraction/MultiInteraction.C b/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/MultiInteraction/MultiInteraction.C index 735b3b5ba8a7dce43710de45e6d70022fdba4583..56c75babdbb4f08d334867ee9abad2112076b034 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/MultiInteraction/MultiInteraction.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/MultiInteraction/MultiInteraction.C @@ -64,8 +64,7 @@ bool Foam::MultiInteraction<CloudType>::read(const dictionary& dict) } } - oneInteractionOnly_ = dict.get<bool>("oneInteractionOnly"); - + dict.readEntry("oneInteractionOnly", oneInteractionOnly_); if (oneInteractionOnly_) { Info<< "Stopping upon first model that interacts with particle." diff --git a/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/Rebound/Rebound.C b/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/Rebound/Rebound.C index 0b68d08f07c101d9699ee7487c0b6786fa91e4ac..440d7435058f93694786ac70c249ceedd01b7ae1 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/Rebound/Rebound.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/Rebound/Rebound.C @@ -35,7 +35,7 @@ Foam::Rebound<CloudType>::Rebound ) : PatchInteractionModel<CloudType>(dict, cloud, typeName), - UFactor_(readScalar(this->coeffDict().lookup("UFactor"))) + UFactor_(this->coeffDict().getScalar("UFactor")) {} diff --git a/src/lagrangian/intermediate/submodels/MPPIC/CorrectionLimitingMethods/absolute/absolute.C b/src/lagrangian/intermediate/submodels/MPPIC/CorrectionLimitingMethods/absolute/absolute.C index 890e74f720cdd24c47f1817cb46e423e0506cc65..3c6d9fcd8cd564eb8fd60c53729936b7dbe66723 100644 --- a/src/lagrangian/intermediate/submodels/MPPIC/CorrectionLimitingMethods/absolute/absolute.C +++ b/src/lagrangian/intermediate/submodels/MPPIC/CorrectionLimitingMethods/absolute/absolute.C @@ -46,7 +46,7 @@ namespace CorrectionLimitingMethods Foam::CorrectionLimitingMethods::absolute::absolute(const dictionary& dict) : CorrectionLimitingMethod(dict), - e_(readScalar(dict.lookup("e"))) + e_(dict.get<scalar>("e")) {} diff --git a/src/lagrangian/intermediate/submodels/MPPIC/CorrectionLimitingMethods/relative/relative.C b/src/lagrangian/intermediate/submodels/MPPIC/CorrectionLimitingMethods/relative/relative.C index a863ae5655f32765fe4410c3cbfee8f8ec7c5df4..ae664ccf630b470b0d259c8df6e958a244e6561a 100644 --- a/src/lagrangian/intermediate/submodels/MPPIC/CorrectionLimitingMethods/relative/relative.C +++ b/src/lagrangian/intermediate/submodels/MPPIC/CorrectionLimitingMethods/relative/relative.C @@ -46,7 +46,7 @@ namespace CorrectionLimitingMethods Foam::CorrectionLimitingMethods::relative::relative(const dictionary& dict) : CorrectionLimitingMethod(dict), - e_(readScalar(dict.lookup("e"))) + e_(dict.get<scalar>("e")) {} diff --git a/src/lagrangian/intermediate/submodels/MPPIC/PackingModels/Implicit/Implicit.C b/src/lagrangian/intermediate/submodels/MPPIC/PackingModels/Implicit/Implicit.C index 7adb7b5806bd20a6e5caa026a6c6f13b24f71aa0..ea1d72d15bff0cee843b11cc3640765a7f4466f6 100644 --- a/src/lagrangian/intermediate/submodels/MPPIC/PackingModels/Implicit/Implicit.C +++ b/src/lagrangian/intermediate/submodels/MPPIC/PackingModels/Implicit/Implicit.C @@ -60,8 +60,8 @@ Foam::PackingModels::Implicit<CloudType>::Implicit uCorrect_(nullptr), applyLimiting_(this->coeffDict().lookup("applyLimiting")), applyGravity_(this->coeffDict().lookup("applyGravity")), - alphaMin_(readScalar(this->coeffDict().lookup("alphaMin"))), - rhoMin_(readScalar(this->coeffDict().lookup("rhoMin"))) + alphaMin_(this->coeffDict().getScalar("alphaMin")), + rhoMin_(this->coeffDict().getScalar("rhoMin")) { alpha_ = this->owner().theta(); alpha_.oldTime(); diff --git a/src/lagrangian/intermediate/submodels/MPPIC/ParticleStressModels/HarrisCrighton/HarrisCrighton.C b/src/lagrangian/intermediate/submodels/MPPIC/ParticleStressModels/HarrisCrighton/HarrisCrighton.C index 55f32cd610647dea4b70054b70283eff9d741ab3..2303026b0548aaa06e65e97c2f44471df40dfcfe 100644 --- a/src/lagrangian/intermediate/submodels/MPPIC/ParticleStressModels/HarrisCrighton/HarrisCrighton.C +++ b/src/lagrangian/intermediate/submodels/MPPIC/ParticleStressModels/HarrisCrighton/HarrisCrighton.C @@ -52,9 +52,9 @@ Foam::ParticleStressModels::HarrisCrighton::HarrisCrighton ) : ParticleStressModel(dict), - pSolid_(readScalar(dict.lookup("pSolid"))), - beta_(readScalar(dict.lookup("beta"))), - eps_(readScalar(dict.lookup("eps"))) + pSolid_(dict.get<scalar>("pSolid")), + beta_(dict.get<scalar>("beta")), + eps_(dict.get<scalar>("eps")) {} diff --git a/src/lagrangian/intermediate/submodels/MPPIC/ParticleStressModels/Lun/Lun.C b/src/lagrangian/intermediate/submodels/MPPIC/ParticleStressModels/Lun/Lun.C index e4aba79ab96ece40710b3e5caec27726eb3adfba..841dedef308d128c0820f0e3b5cd539eb8907fea 100644 --- a/src/lagrangian/intermediate/submodels/MPPIC/ParticleStressModels/Lun/Lun.C +++ b/src/lagrangian/intermediate/submodels/MPPIC/ParticleStressModels/Lun/Lun.C @@ -52,8 +52,8 @@ Foam::ParticleStressModels::Lun::Lun ) : ParticleStressModel(dict), - e_(readScalar(dict.lookup("e"))), - eps_(readScalar(dict.lookup("eps"))) + e_(dict.get<scalar>("e")), + eps_(dict.get<scalar>("eps")) {} diff --git a/src/lagrangian/intermediate/submodels/MPPIC/ParticleStressModels/ParticleStressModel/ParticleStressModel.C b/src/lagrangian/intermediate/submodels/MPPIC/ParticleStressModels/ParticleStressModel/ParticleStressModel.C index 8fca6accbcba1ddd8642ce7edb6ee61556bb21f4..8a3077760f5bb41b6783dee8b65d35e7d99cb531 100644 --- a/src/lagrangian/intermediate/submodels/MPPIC/ParticleStressModels/ParticleStressModel/ParticleStressModel.C +++ b/src/lagrangian/intermediate/submodels/MPPIC/ParticleStressModels/ParticleStressModel/ParticleStressModel.C @@ -41,9 +41,8 @@ Foam::ParticleStressModel::ParticleStressModel const dictionary& dict ) : - alphaPacked_(readScalar(dict.lookup("alphaPacked"))) -{ -} + alphaPacked_(dict.get<scalar>("alphaPacked")) +{} Foam::ParticleStressModel::ParticleStressModel @@ -52,8 +51,7 @@ Foam::ParticleStressModel::ParticleStressModel ) : alphaPacked_(cm.alphaPacked_) -{ -} +{} // * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // diff --git a/src/lagrangian/intermediate/submodels/MPPIC/ParticleStressModels/exponential/exponential.C b/src/lagrangian/intermediate/submodels/MPPIC/ParticleStressModels/exponential/exponential.C index a589fc16ba8208a33d4b2aea72d48a74f6a3e85e..5858f79f330a9715338c4f1bd6eab075dbf6adad 100644 --- a/src/lagrangian/intermediate/submodels/MPPIC/ParticleStressModels/exponential/exponential.C +++ b/src/lagrangian/intermediate/submodels/MPPIC/ParticleStressModels/exponential/exponential.C @@ -52,9 +52,9 @@ Foam::ParticleStressModels::exponential::exponential ) : ParticleStressModel(dict), - preExp_(readScalar(dict.lookup("preExp"))), - expMax_(readScalar(dict.lookup("expMax"))), - g0_(readScalar(dict.lookup("g0"))) + preExp_(dict.get<scalar>("preExp")), + expMax_(dict.get<scalar>("expMax")), + g0_(dict.get<scalar>("g0")) {} diff --git a/src/lagrangian/intermediate/submodels/MPPIC/TimeScaleModels/TimeScaleModel/TimeScaleModel.C b/src/lagrangian/intermediate/submodels/MPPIC/TimeScaleModels/TimeScaleModel/TimeScaleModel.C index 849955027866a629687db41d85c5645f1343b75f..79c1746f2941b4c2d200e4e364504a41db8568e8 100644 --- a/src/lagrangian/intermediate/submodels/MPPIC/TimeScaleModels/TimeScaleModel/TimeScaleModel.C +++ b/src/lagrangian/intermediate/submodels/MPPIC/TimeScaleModels/TimeScaleModel/TimeScaleModel.C @@ -41,8 +41,8 @@ Foam::TimeScaleModel::TimeScaleModel const dictionary& dict ) : - alphaPacked_(readScalar(dict.lookup("alphaPacked"))), - e_(readScalar(dict.lookup("e"))) + alphaPacked_(dict.get<scalar>("alphaPacked")), + e_(dict.get<scalar>("e")) { } diff --git a/src/lagrangian/intermediate/submodels/Reacting/InjectionModel/ReactingLookupTableInjection/ReactingLookupTableInjection.C b/src/lagrangian/intermediate/submodels/Reacting/InjectionModel/ReactingLookupTableInjection/ReactingLookupTableInjection.C index 7b0982e6a6caa024aae7b44a653002d301848c51..e5e5e0765ca120e43804fd194c932595cbe825b0 100644 --- a/src/lagrangian/intermediate/submodels/Reacting/InjectionModel/ReactingLookupTableInjection/ReactingLookupTableInjection.C +++ b/src/lagrangian/intermediate/submodels/Reacting/InjectionModel/ReactingLookupTableInjection/ReactingLookupTableInjection.C @@ -37,12 +37,9 @@ Foam::ReactingLookupTableInjection<CloudType>::ReactingLookupTableInjection : InjectionModel<CloudType>(dict, owner, modelName, typeName), inputFileName_(this->coeffDict().lookup("inputFile")), - duration_(readScalar(this->coeffDict().lookup("duration"))), - parcelsPerSecond_ - ( - readScalar(this->coeffDict().lookup("parcelsPerSecond")) - ), - randomise_(readBool(this->coeffDict().lookup("randomise"))), + duration_(this->coeffDict().getScalar("duration")), + parcelsPerSecond_(this->coeffDict().getScalar("parcelsPerSecond")), + randomise_(this->coeffDict().getBool("randomise")), injectors_ ( IOobject diff --git a/src/lagrangian/intermediate/submodels/ReactingMultiphase/DevolatilisationModel/ConstantRateDevolatilisation/ConstantRateDevolatilisation.C b/src/lagrangian/intermediate/submodels/ReactingMultiphase/DevolatilisationModel/ConstantRateDevolatilisation/ConstantRateDevolatilisation.C index 9aeee431d02e90dc03f29220eac035d5c5f847d5..838a5cdbcf5f96e00f3656f0af951656b7430184 100644 --- a/src/lagrangian/intermediate/submodels/ReactingMultiphase/DevolatilisationModel/ConstantRateDevolatilisation/ConstantRateDevolatilisation.C +++ b/src/lagrangian/intermediate/submodels/ReactingMultiphase/DevolatilisationModel/ConstantRateDevolatilisation/ConstantRateDevolatilisation.C @@ -38,7 +38,7 @@ Foam::ConstantRateDevolatilisation<CloudType>::ConstantRateDevolatilisation volatileData_(this->coeffDict().lookup("volatileData")), YVolatile0_(volatileData_.size()), volatileToGasMap_(volatileData_.size()), - residualCoeff_(readScalar(this->coeffDict().lookup("residualCoeff"))) + residualCoeff_(this->coeffDict().getScalar("residualCoeff")) { if (volatileData_.empty()) { diff --git a/src/lagrangian/intermediate/submodels/ReactingMultiphase/DevolatilisationModel/SingleKineticRateDevolatilisation/SingleKineticRateDevolatilisation.C b/src/lagrangian/intermediate/submodels/ReactingMultiphase/DevolatilisationModel/SingleKineticRateDevolatilisation/SingleKineticRateDevolatilisation.C index a4a5b1c18491f134b51375095caf6baadc527ebc..84b1325c0d5e2974b5064e5e8677186d4116d8ed 100644 --- a/src/lagrangian/intermediate/submodels/ReactingMultiphase/DevolatilisationModel/SingleKineticRateDevolatilisation/SingleKineticRateDevolatilisation.C +++ b/src/lagrangian/intermediate/submodels/ReactingMultiphase/DevolatilisationModel/SingleKineticRateDevolatilisation/SingleKineticRateDevolatilisation.C @@ -39,7 +39,7 @@ SingleKineticRateDevolatilisation volatileData_(this->coeffDict().lookup("volatileData")), YVolatile0_(volatileData_.size()), volatileToGasMap_(volatileData_.size()), - residualCoeff_(readScalar(this->coeffDict().lookup("residualCoeff"))) + residualCoeff_(this->coeffDict().getScalar("residualCoeff")) { if (volatileData_.empty()) { diff --git a/src/lagrangian/intermediate/submodels/ReactingMultiphase/InjectionModel/ReactingMultiphaseLookupTableInjection/ReactingMultiphaseLookupTableInjection.C b/src/lagrangian/intermediate/submodels/ReactingMultiphase/InjectionModel/ReactingMultiphaseLookupTableInjection/ReactingMultiphaseLookupTableInjection.C index 79423e612e8b6620e7a15a7818e0450c3619ca5e..dc5c33c88e3600c6e0f1cc1ec8dee6388494126d 100644 --- a/src/lagrangian/intermediate/submodels/ReactingMultiphase/InjectionModel/ReactingMultiphaseLookupTableInjection/ReactingMultiphaseLookupTableInjection.C +++ b/src/lagrangian/intermediate/submodels/ReactingMultiphase/InjectionModel/ReactingMultiphaseLookupTableInjection/ReactingMultiphaseLookupTableInjection.C @@ -38,12 +38,9 @@ ReactingMultiphaseLookupTableInjection : InjectionModel<CloudType>(dict, owner, modelName, typeName), inputFileName_(this->coeffDict().lookup("inputFile")), - duration_(readScalar(this->coeffDict().lookup("duration"))), - parcelsPerSecond_ - ( - readScalar(this->coeffDict().lookup("parcelsPerSecond")) - ), - randomise_(readBool(this->coeffDict().lookup("randomise"))), + duration_(this->coeffDict().getScalar("duration")), + parcelsPerSecond_(this->coeffDict().getScalar("parcelsPerSecond")), + randomise_(this->coeffDict().getBool("randomise")), injectors_ ( IOobject diff --git a/src/lagrangian/intermediate/submodels/Thermodynamic/InjectionModel/ThermoLookupTableInjection/ThermoLookupTableInjection.C b/src/lagrangian/intermediate/submodels/Thermodynamic/InjectionModel/ThermoLookupTableInjection/ThermoLookupTableInjection.C index b746e3fd3f21b54e0894c4c345d99444e007525e..adc397264bbe04a585ed71a65060887d20f5fb46 100644 --- a/src/lagrangian/intermediate/submodels/Thermodynamic/InjectionModel/ThermoLookupTableInjection/ThermoLookupTableInjection.C +++ b/src/lagrangian/intermediate/submodels/Thermodynamic/InjectionModel/ThermoLookupTableInjection/ThermoLookupTableInjection.C @@ -38,12 +38,9 @@ Foam::ThermoLookupTableInjection<CloudType>::ThermoLookupTableInjection : InjectionModel<CloudType>(dict, owner, modelName, typeName), inputFileName_(this->coeffDict().lookup("inputFile")), - duration_(readScalar(this->coeffDict().lookup("duration"))), - parcelsPerSecond_ - ( - readScalar(this->coeffDict().lookup("parcelsPerSecond")) - ), - randomise_(readBool(this->coeffDict().lookup("randomise"))), + duration_(this->coeffDict().getScalar("duration")), + parcelsPerSecond_(this->coeffDict().getScalar("parcelsPerSecond")), + randomise_(this->coeffDict().getBool("randomise")), injectors_ ( IOobject diff --git a/src/lagrangian/intermediate/submodels/Thermodynamic/InjectionModel/ThermoLookupTableInjection/thermoParcelInjectionData.C b/src/lagrangian/intermediate/submodels/Thermodynamic/InjectionModel/ThermoLookupTableInjection/thermoParcelInjectionData.C index 34d1a9568d9cd0cd7e74c8874c23b2f01d8a0337..baff1bcc076357d22f008adfba78cc91febfff57 100644 --- a/src/lagrangian/intermediate/submodels/Thermodynamic/InjectionModel/ThermoLookupTableInjection/thermoParcelInjectionData.C +++ b/src/lagrangian/intermediate/submodels/Thermodynamic/InjectionModel/ThermoLookupTableInjection/thermoParcelInjectionData.C @@ -48,8 +48,8 @@ Foam::thermoParcelInjectionData::thermoParcelInjectionData ) : kinematicParcelInjectionData(dict), - T_(readScalar(dict.lookup("T"))), - Cp_(readScalar(dict.lookup("Cp"))) + T_(dict.get<scalar>("T")), + Cp_(dict.get<scalar>("Cp")) {} // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // diff --git a/src/lagrangian/molecularDynamics/molecularMeasurements/correlationFunction/correlationFunction.C b/src/lagrangian/molecularDynamics/molecularMeasurements/correlationFunction/correlationFunction.C index a89c35333d0af07eda032bd3a21775768ab543ce..e616619dddbe51ef58a57aacfbc3b5640423a70b 100644 --- a/src/lagrangian/molecularDynamics/molecularMeasurements/correlationFunction/correlationFunction.C +++ b/src/lagrangian/molecularDynamics/molecularMeasurements/correlationFunction/correlationFunction.C @@ -80,19 +80,16 @@ template<class Type> Foam::correlationFunction<Type>::correlationFunction ( const polyMesh& mesh, - const dictionary& cfDict, + const dictionary& dict, const label tZeroBufferSize ) : bufferedAccumulator<scalar>(), - mesh_(mesh) + mesh_(mesh), + duration_(dict.get<scalar>("duration")), + sampleInterval_(dict.get<scalar>("sampleInterval")), + averagingInterval_(dict.get<scalar>("averagingInterval")) { - duration_ = readScalar(cfDict.lookup("duration")); - - sampleInterval_ = readScalar(cfDict.lookup("sampleInterval")); - - averagingInterval_ = readScalar(cfDict.lookup("averagingInterval")); - setTimesAndSizes(tZeroBufferSize); } diff --git a/src/lagrangian/molecularDynamics/molecule/moleculeCloud/moleculeCloud.C b/src/lagrangian/molecularDynamics/molecule/moleculeCloud/moleculeCloud.C index 0b41ed96f8fe4dc26c3a62c25db3fbaf4b5dc04f..58b668fef699683e558d1e0cffc9db4948a835d5 100644 --- a/src/lagrangian/molecularDynamics/molecule/moleculeCloud/moleculeCloud.C +++ b/src/lagrangian/molecularDynamics/molecule/moleculeCloud/moleculeCloud.C @@ -505,10 +505,13 @@ void Foam::moleculeCloud::initialiseMolecules const scalar temperature ( - readScalar(zoneDict.lookup("temperature")) + zoneDict.get<scalar>("temperature") ); - const vector bulkVelocity(zoneDict.lookup("bulkVelocity")); + const vector bulkVelocity + ( + zoneDict.get<vector>("bulkVelocity") + ); List<word> latticeIds ( @@ -537,9 +540,9 @@ void Foam::moleculeCloud::initialiseMolecules if (zoneDict.found("numberDensity")) { - scalar numberDensity = readScalar + const scalar numberDensity ( - zoneDict.lookup("numberDensity") + zoneDict.get<scalar>("numberDensity") ); if (numberDensity < VSMALL) @@ -570,9 +573,9 @@ void Foam::moleculeCloud::initialiseMolecules unitCellMass += cP.mass(); } - scalar massDensity = readScalar + const scalar massDensity ( - zoneDict.lookup("massDensity") + zoneDict.get<scalar>("massDensity") ); if (massDensity < VSMALL) @@ -600,7 +603,7 @@ void Foam::moleculeCloud::initialiseMolecules latticeCellShape *= latticeCellScale; - vector anchor(zoneDict.lookup("anchor")); + vector anchor(zoneDict.get<vector>("anchor")); bool tethered = false; @@ -614,7 +617,7 @@ void Foam::moleculeCloud::initialiseMolecules const vector orientationAngles ( - zoneDict.lookup("orientationAngles") + zoneDict.get<vector>("orientationAngles") ); scalar phi(orientationAngles.x()*pi/180.0); diff --git a/src/lagrangian/molecularDynamics/molecule/reducedUnits/reducedUnits.C b/src/lagrangian/molecularDynamics/molecule/reducedUnits/reducedUnits.C index 2f424424bb6c19bedb2212f79df99facbb85d201..e296b0bcf3c2dbf8ed4618930194edff7137ebac 100644 --- a/src/lagrangian/molecularDynamics/molecule/reducedUnits/reducedUnits.C +++ b/src/lagrangian/molecularDynamics/molecule/reducedUnits/reducedUnits.C @@ -127,9 +127,9 @@ void Foam::reducedUnits::setRefValues const IOdictionary& reducedUnitsDict ) { - refLength_ = readScalar(reducedUnitsDict.lookup("refLength")); - refTime_ = readScalar(reducedUnitsDict.lookup("refTime")); - refMass_ = readScalar(reducedUnitsDict.lookup("refMass")); + reducedUnitsDict.readEntry("refLength", refLength_); + reducedUnitsDict.readEntry("refTime", refTime_); + reducedUnitsDict.readEntry("refMass", refMass_); calcRefValues(); } diff --git a/src/lagrangian/molecularDynamics/potential/energyScalingFunction/derived/doubleSigmoid/doubleSigmoid.C b/src/lagrangian/molecularDynamics/potential/energyScalingFunction/derived/doubleSigmoid/doubleSigmoid.C index bfefd67c51d68bf785877620614f19ce7713b78d..d1a3e1b0cc6a8ee354d09ebd94347e420e057dc5 100644 --- a/src/lagrangian/molecularDynamics/potential/energyScalingFunction/derived/doubleSigmoid/doubleSigmoid.C +++ b/src/lagrangian/molecularDynamics/potential/energyScalingFunction/derived/doubleSigmoid/doubleSigmoid.C @@ -71,10 +71,10 @@ doubleSigmoid::doubleSigmoid ( energyScalingFunctionProperties.subDict(typeName + "Coeffs") ), - shift1_(readScalar(doubleSigmoidCoeffs_.lookup("shift1"))), - scale1_(readScalar(doubleSigmoidCoeffs_.lookup("scale1"))), - shift2_(readScalar(doubleSigmoidCoeffs_.lookup("shift2"))), - scale2_(readScalar(doubleSigmoidCoeffs_.lookup("scale2"))) + shift1_(doubleSigmoidCoeffs_.get<scalar>("shift1")), + scale1_(doubleSigmoidCoeffs_.get<scalar>("scale1")), + shift2_(doubleSigmoidCoeffs_.get<scalar>("shift2")), + scale2_(doubleSigmoidCoeffs_.get<scalar>("scale2")) {} diff --git a/src/lagrangian/molecularDynamics/potential/energyScalingFunction/derived/sigmoid/sigmoid.C b/src/lagrangian/molecularDynamics/potential/energyScalingFunction/derived/sigmoid/sigmoid.C index 5784f3f10b548493c9a88afbac89110533fa98c5..8a49dffd4760e9491c1927683dc4f4c75f087a46 100644 --- a/src/lagrangian/molecularDynamics/potential/energyScalingFunction/derived/sigmoid/sigmoid.C +++ b/src/lagrangian/molecularDynamics/potential/energyScalingFunction/derived/sigmoid/sigmoid.C @@ -72,8 +72,8 @@ sigmoid::sigmoid ( energyScalingFunctionProperties.subDict(typeName + "Coeffs") ), - shift_(readScalar(sigmoidCoeffs_.lookup("shift"))), - scale_(readScalar(sigmoidCoeffs_.lookup("scale"))) + shift_(sigmoidCoeffs_.get<scalar>("shift")), + scale_(sigmoidCoeffs_.get<scalar>("scale")) {} diff --git a/src/lagrangian/molecularDynamics/potential/pairPotential/basic/pairPotential.C b/src/lagrangian/molecularDynamics/potential/pairPotential/basic/pairPotential.C index 988ef418fc9a17a45559f61c37250047b3c18a26..044497e4400878b904419d18cfbe26c5d48d8929 100644 --- a/src/lagrangian/molecularDynamics/potential/pairPotential/basic/pairPotential.C +++ b/src/lagrangian/molecularDynamics/potential/pairPotential/basic/pairPotential.C @@ -61,10 +61,10 @@ Foam::pairPotential::pairPotential : name_(name), pairPotentialProperties_(pairPotentialProperties), - rCut_(readScalar(pairPotentialProperties_.lookup("rCut"))), + rCut_(pairPotentialProperties_.get<scalar>("rCut")), rCutSqr_(rCut_*rCut_), - rMin_(readScalar(pairPotentialProperties_.lookup("rMin"))), - dr_(readScalar(pairPotentialProperties_.lookup("dr"))), + rMin_(pairPotentialProperties_.get<scalar>("rMin")), + dr_(pairPotentialProperties_.get<scalar>("dr")), forceLookup_(0), energyLookup_(0), esfPtr_(nullptr), diff --git a/src/lagrangian/molecularDynamics/potential/pairPotential/derived/azizChen/azizChen.C b/src/lagrangian/molecularDynamics/potential/pairPotential/derived/azizChen/azizChen.C index 7f318d4e87439c5dd8346acf0bc5e22336342443..7f8799d9ae41efb8e36809a36f1bf7c81f073d8b 100644 --- a/src/lagrangian/molecularDynamics/potential/pairPotential/derived/azizChen/azizChen.C +++ b/src/lagrangian/molecularDynamics/potential/pairPotential/derived/azizChen/azizChen.C @@ -55,15 +55,15 @@ azizChen::azizChen : pairPotential(name, azizChen), azizChenCoeffs_(azizChen.subDict(typeName + "Coeffs")), - epsilon_(readScalar(azizChenCoeffs_.lookup("epsilon"))), - rm_(readScalar(azizChenCoeffs_.lookup("rm"))), - A_(readScalar(azizChenCoeffs_.lookup("A"))), - alpha_(readScalar(azizChenCoeffs_.lookup("alpha"))), - C6_(readScalar(azizChenCoeffs_.lookup("C6"))), - C8_(readScalar(azizChenCoeffs_.lookup("C8"))), - C10_(readScalar(azizChenCoeffs_.lookup("C10"))), - D_(readScalar(azizChenCoeffs_.lookup("D"))), - gamma_(readScalar(azizChenCoeffs_.lookup("gamma"))) + epsilon_(azizChenCoeffs_.get<scalar>("epsilon")), + rm_(azizChenCoeffs_.get<scalar>("rm")), + A_(azizChenCoeffs_.get<scalar>("A")), + alpha_(azizChenCoeffs_.get<scalar>("alpha")), + C6_(azizChenCoeffs_.get<scalar>("C6")), + C8_(azizChenCoeffs_.get<scalar>("C8")), + C10_(azizChenCoeffs_.get<scalar>("C10")), + D_(azizChenCoeffs_.get<scalar>("D")), + gamma_(azizChenCoeffs_.get<scalar>("gamma")) { setLookupTables(); } diff --git a/src/lagrangian/molecularDynamics/potential/pairPotential/derived/dampedCoulomb/dampedCoulomb.C b/src/lagrangian/molecularDynamics/potential/pairPotential/derived/dampedCoulomb/dampedCoulomb.C index d492c7669f241663c2affc85b8718adfcf8741f2..34f30f2ec811ff2d263fd28dc197b1c88fd630ad 100644 --- a/src/lagrangian/molecularDynamics/potential/pairPotential/derived/dampedCoulomb/dampedCoulomb.C +++ b/src/lagrangian/molecularDynamics/potential/pairPotential/derived/dampedCoulomb/dampedCoulomb.C @@ -62,7 +62,7 @@ dampedCoulomb::dampedCoulomb ( pairPotentialProperties.subDict(typeName + "Coeffs") ), - alpha_(readScalar(dampedCoulombCoeffs_.lookup("alpha"))) + alpha_(dampedCoulombCoeffs_.get<scalar>("alpha")) { setLookupTables(); } diff --git a/src/lagrangian/molecularDynamics/potential/pairPotential/derived/exponentialRepulsion/exponentialRepulsion.C b/src/lagrangian/molecularDynamics/potential/pairPotential/derived/exponentialRepulsion/exponentialRepulsion.C index 4b5473d859b35f4de0cebb334e1913cb7c99eeda..bf14908cfa2b3a178242900e5fafb47b1d194459 100644 --- a/src/lagrangian/molecularDynamics/potential/pairPotential/derived/exponentialRepulsion/exponentialRepulsion.C +++ b/src/lagrangian/molecularDynamics/potential/pairPotential/derived/exponentialRepulsion/exponentialRepulsion.C @@ -58,8 +58,8 @@ exponentialRepulsion::exponentialRepulsion ( exponentialRepulsion.subDict(typeName + "Coeffs") ), - rm_(readScalar(exponentialRepulsionCoeffs_.lookup("rm"))), - epsilon_(readScalar(exponentialRepulsionCoeffs_.lookup("epsilon"))) + rm_(exponentialRepulsionCoeffs_.get<scalar>("rm")), + epsilon_(exponentialRepulsionCoeffs_.get<scalar>("epsilon")) { setLookupTables(); } diff --git a/src/lagrangian/molecularDynamics/potential/pairPotential/derived/lennardJones/lennardJones.C b/src/lagrangian/molecularDynamics/potential/pairPotential/derived/lennardJones/lennardJones.C index 1a33f97e5801acc96cbdb01202b47fccf8d7064f..e4544ad52648e2a7686480fb35961f0de797e108 100644 --- a/src/lagrangian/molecularDynamics/potential/pairPotential/derived/lennardJones/lennardJones.C +++ b/src/lagrangian/molecularDynamics/potential/pairPotential/derived/lennardJones/lennardJones.C @@ -55,8 +55,8 @@ lennardJones::lennardJones : pairPotential(name, pairPotentialProperties), lennardJonesCoeffs_(pairPotentialProperties.subDict(typeName + "Coeffs")), - sigma_(readScalar(lennardJonesCoeffs_.lookup("sigma"))), - epsilon_(readScalar(lennardJonesCoeffs_.lookup("epsilon"))) + sigma_(lennardJonesCoeffs_.get<scalar>("sigma")), + epsilon_(lennardJonesCoeffs_.get<scalar>("epsilon")) { setLookupTables(); } diff --git a/src/lagrangian/molecularDynamics/potential/pairPotential/derived/maitlandSmith/maitlandSmith.C b/src/lagrangian/molecularDynamics/potential/pairPotential/derived/maitlandSmith/maitlandSmith.C index 07e5cd7042408b9b8d2f4d13220c9fd18eca25ba..dc1cbebef8c5e7d782e5c2acb367f32f8505365f 100644 --- a/src/lagrangian/molecularDynamics/potential/pairPotential/derived/maitlandSmith/maitlandSmith.C +++ b/src/lagrangian/molecularDynamics/potential/pairPotential/derived/maitlandSmith/maitlandSmith.C @@ -55,10 +55,10 @@ maitlandSmith::maitlandSmith : pairPotential(name, maitlandSmith), maitlandSmithCoeffs_(maitlandSmith.subDict(typeName + "Coeffs")), - m_(readScalar(maitlandSmithCoeffs_.lookup("m"))), - gamma_(readScalar(maitlandSmithCoeffs_.lookup("gamma"))), - rm_(readScalar(maitlandSmithCoeffs_.lookup("rm"))), - epsilon_(readScalar(maitlandSmithCoeffs_.lookup("epsilon"))) + m_(maitlandSmithCoeffs_.get<scalar>("m")), + gamma_(maitlandSmithCoeffs_.get<scalar>("gamma")), + rm_(maitlandSmithCoeffs_.get<scalar>("rm")), + epsilon_(maitlandSmithCoeffs_.get<scalar>("epsilon")) { setLookupTables(); } diff --git a/src/lagrangian/molecularDynamics/potential/potential/potential.C b/src/lagrangian/molecularDynamics/potential/potential/potential.C index e01f75dfcfc8156190f4d306c6a56ac828053573..64265c4c91b7e7859edce360fceec5077c50b2f0 100644 --- a/src/lagrangian/molecularDynamics/potential/potential/potential.C +++ b/src/lagrangian/molecularDynamics/potential/potential/potential.C @@ -152,10 +152,7 @@ void Foam::potential::potential::readPotentialDict() ) ); - potentialEnergyLimit_ = readScalar - ( - potentialDict.lookup("potentialEnergyLimit") - ); + potentialDict.readEntry("potentialEnergyLimit", potentialEnergyLimit_); if (potentialDict.found("removalOrder")) { diff --git a/src/lagrangian/molecularDynamics/potential/tetherPotential/derived/harmonicSpring/harmonicSpring.C b/src/lagrangian/molecularDynamics/potential/tetherPotential/derived/harmonicSpring/harmonicSpring.C index 61c74200ea1d34a19b9226a798b4c11e5f0aa14e..85fb65478e07b0701879f5921391ecfbe898394d 100644 --- a/src/lagrangian/molecularDynamics/potential/tetherPotential/derived/harmonicSpring/harmonicSpring.C +++ b/src/lagrangian/molecularDynamics/potential/tetherPotential/derived/harmonicSpring/harmonicSpring.C @@ -58,7 +58,7 @@ harmonicSpring::harmonicSpring ( tetherPotentialProperties.subDict(typeName + "Coeffs") ), - springConstant_(readScalar(harmonicSpringCoeffs_.lookup("springConstant"))) + springConstant_(harmonicSpringCoeffs_.get<scalar>("springConstant")) {} diff --git a/src/lagrangian/molecularDynamics/potential/tetherPotential/derived/pitchForkRing/pitchForkRing.C b/src/lagrangian/molecularDynamics/potential/tetherPotential/derived/pitchForkRing/pitchForkRing.C index 6aac89c4a895dddc9a646fdd94d788094312dba9..b9d63bc97893a04f5f11a33250540e96bfd9f5a4 100644 --- a/src/lagrangian/molecularDynamics/potential/tetherPotential/derived/pitchForkRing/pitchForkRing.C +++ b/src/lagrangian/molecularDynamics/potential/tetherPotential/derived/pitchForkRing/pitchForkRing.C @@ -58,9 +58,9 @@ pitchForkRing::pitchForkRing ( tetherPotentialProperties.subDict(typeName + "Coeffs") ), - mu_(readScalar(pitchForkRingCoeffs_.lookup("mu"))), - alpha_(readScalar(pitchForkRingCoeffs_.lookup("alpha"))), - rOrbit_(readScalar(pitchForkRingCoeffs_.lookup("rOrbit"))) + mu_(pitchForkRingCoeffs_.get<scalar>("mu")), + alpha_(pitchForkRingCoeffs_.get<scalar>("alpha")), + rOrbit_(pitchForkRingCoeffs_.get<scalar>("rOrbit")) {} diff --git a/src/lagrangian/molecularDynamics/potential/tetherPotential/derived/restrainedHarmonicSpring/restrainedHarmonicSpring.C b/src/lagrangian/molecularDynamics/potential/tetherPotential/derived/restrainedHarmonicSpring/restrainedHarmonicSpring.C index b2f31b16d437252348ac9268ca603212cce6805c..b4598f0961583ed8a0658d25a57a06a2d64d2bfe 100644 --- a/src/lagrangian/molecularDynamics/potential/tetherPotential/derived/restrainedHarmonicSpring/restrainedHarmonicSpring.C +++ b/src/lagrangian/molecularDynamics/potential/tetherPotential/derived/restrainedHarmonicSpring/restrainedHarmonicSpring.C @@ -60,11 +60,11 @@ restrainedHarmonicSpring::restrainedHarmonicSpring ), springConstant_ ( - readScalar(restrainedHarmonicSpringCoeffs_.lookup("springConstant")) + restrainedHarmonicSpringCoeffs_.get<scalar>("springConstant") ), rR_ ( - readScalar(restrainedHarmonicSpringCoeffs_.lookup("rR")) + restrainedHarmonicSpringCoeffs_.get<scalar>("rR") ) {} diff --git a/src/lagrangian/spray/submodels/AtomizationModel/BlobsSheetAtomization/BlobsSheetAtomization.C b/src/lagrangian/spray/submodels/AtomizationModel/BlobsSheetAtomization/BlobsSheetAtomization.C index 63670b08455b21f88c16cb408a62b1b6f957fef9..e8da55dce7ccc767a146d3904a93d70cdda10da4 100644 --- a/src/lagrangian/spray/submodels/AtomizationModel/BlobsSheetAtomization/BlobsSheetAtomization.C +++ b/src/lagrangian/spray/submodels/AtomizationModel/BlobsSheetAtomization/BlobsSheetAtomization.C @@ -35,8 +35,8 @@ Foam::BlobsSheetAtomization<CloudType>::BlobsSheetAtomization ) : AtomizationModel<CloudType>(dict, owner, typeName), - B_(readScalar(this->coeffDict().lookup("B"))), - angle_(readScalar(this->coeffDict().lookup("angle"))) + B_(this->coeffDict().getScalar("B")), + angle_(this->coeffDict().getScalar("angle")) {} diff --git a/src/lagrangian/spray/submodels/AtomizationModel/LISAAtomization/LISAAtomization.C b/src/lagrangian/spray/submodels/AtomizationModel/LISAAtomization/LISAAtomization.C index 3a0be877113a67459c55268794b919e9b3a74195..b2cd63a0325f615a90e24dd776f3e797b8a4305e 100644 --- a/src/lagrangian/spray/submodels/AtomizationModel/LISAAtomization/LISAAtomization.C +++ b/src/lagrangian/spray/submodels/AtomizationModel/LISAAtomization/LISAAtomization.C @@ -35,12 +35,15 @@ Foam::LISAAtomization<CloudType>::LISAAtomization ) : AtomizationModel<CloudType>(dict, owner, typeName), - Cl_(readScalar(this->coeffDict().lookup("Cl"))), - cTau_(readScalar(this->coeffDict().lookup("cTau"))), - Q_(readScalar(this->coeffDict().lookup("Q"))), - lisaExp_(readScalar(this->coeffDict().lookup("lisaExp"))), - injectorDirection_(this->coeffDict().lookup("injectorDirection")), - SMDCalcMethod_(this->coeffDict().lookup("SMDCalculationMethod")) + Cl_(this->coeffDict().getScalar("Cl")), + cTau_(this->coeffDict().getScalar("cTau")), + Q_(this->coeffDict().getScalar("Q")), + lisaExp_(this->coeffDict().getScalar("lisaExp")), + injectorDirection_ + ( + this->coeffDict().template get<vector>("injectorDirection") + ), + SMDCalcMethod_(this->coeffDict().getWord("SMDCalculationMethod")) { // Note: Would be good if this could be picked up from the injector injectorDirection_.normalise(); diff --git a/src/lagrangian/spray/submodels/BreakupModel/BreakupModel/BreakupModel.C b/src/lagrangian/spray/submodels/BreakupModel/BreakupModel/BreakupModel.C index e8c8627443870161e4b8a5feba63ed2be2c063e0..35a34085c6f27c078fe43974c32e91d6d1f6f935 100644 --- a/src/lagrangian/spray/submodels/BreakupModel/BreakupModel/BreakupModel.C +++ b/src/lagrangian/spray/submodels/BreakupModel/BreakupModel/BreakupModel.C @@ -81,7 +81,8 @@ Foam::BreakupModel<CloudType>::BreakupModel const dictionary coeffs(dict.subDict("TABCoeffs")); coeffs.readEntry("Comega", TABComega_); coeffs.readEntry("Cmu", TABCmu_); - scalar WeCrit(readScalar(coeffs.lookup("WeCrit"))); + + const scalar WeCrit(coeffs.get<scalar>("WeCrit")); TABtwoWeCrit_ = 2*WeCrit; } } diff --git a/src/lagrangian/spray/submodels/BreakupModel/SHF/SHF.C b/src/lagrangian/spray/submodels/BreakupModel/SHF/SHF.C index 642df18a86198771a0fc38941ef0e323a471f144..0821ec7368d1927ba7ac1277b830f8c858c0e24c 100644 --- a/src/lagrangian/spray/submodels/BreakupModel/SHF/SHF.C +++ b/src/lagrangian/spray/submodels/BreakupModel/SHF/SHF.C @@ -35,35 +35,35 @@ Foam::SHF<CloudType>::SHF ) : BreakupModel<CloudType>(dict, owner, typeName), - weCorrCoeff_(readScalar(this->coeffDict().lookup("weCorrCoeff"))), - weBuCrit_(readScalar(this->coeffDict().lookup("weBuCrit"))), - weBuBag_(readScalar(this->coeffDict().lookup("weBuBag"))), - weBuMM_(readScalar(this->coeffDict().lookup("weBuMM"))), - ohnCoeffCrit_(readScalar(this->coeffDict().lookup("ohnCoeffCrit"))), - ohnCoeffBag_(readScalar(this->coeffDict().lookup("ohnCoeffBag"))), - ohnCoeffMM_(readScalar(this->coeffDict().lookup("ohnCoeffMM"))), - ohnExpCrit_(readScalar(this->coeffDict().lookup("ohnExpCrit"))), - ohnExpBag_(readScalar(this->coeffDict().lookup("ohnExpBag"))), - ohnExpMM_(readScalar(this->coeffDict().lookup("ohnExpMM"))), - cInit_(readScalar(this->coeffDict().lookup("Cinit"))), - c1_(readScalar(this->coeffDict().lookup("C1"))), - c2_(readScalar(this->coeffDict().lookup("C2"))), - c3_(readScalar(this->coeffDict().lookup("C3"))), - cExp1_(readScalar(this->coeffDict().lookup("Cexp1"))), - cExp2_(readScalar(this->coeffDict().lookup("Cexp2"))), - cExp3_(readScalar(this->coeffDict().lookup("Cexp3"))), - weConst_(readScalar(this->coeffDict().lookup("Weconst"))), - weCrit1_(readScalar(this->coeffDict().lookup("Wecrit1"))), - weCrit2_(readScalar(this->coeffDict().lookup("Wecrit2"))), - coeffD_(readScalar(this->coeffDict().lookup("CoeffD"))), - onExpD_(readScalar(this->coeffDict().lookup("OnExpD"))), - weExpD_(readScalar(this->coeffDict().lookup("WeExpD"))), - mu_(readScalar(this->coeffDict().lookup("mu"))), - sigma_(readScalar(this->coeffDict().lookup("sigma"))), - d32Coeff_(readScalar(this->coeffDict().lookup("d32Coeff"))), - cDmaxBM_(readScalar(this->coeffDict().lookup("cDmaxBM"))), - cDmaxS_(readScalar(this->coeffDict().lookup("cDmaxS"))), - corePerc_(readScalar(this->coeffDict().lookup("corePerc"))) + weCorrCoeff_(this->coeffDict().getScalar("weCorrCoeff")), + weBuCrit_(this->coeffDict().getScalar("weBuCrit")), + weBuBag_(this->coeffDict().getScalar("weBuBag")), + weBuMM_(this->coeffDict().getScalar("weBuMM")), + ohnCoeffCrit_(this->coeffDict().getScalar("ohnCoeffCrit")), + ohnCoeffBag_(this->coeffDict().getScalar("ohnCoeffBag")), + ohnCoeffMM_(this->coeffDict().getScalar("ohnCoeffMM")), + ohnExpCrit_(this->coeffDict().getScalar("ohnExpCrit")), + ohnExpBag_(this->coeffDict().getScalar("ohnExpBag")), + ohnExpMM_(this->coeffDict().getScalar("ohnExpMM")), + cInit_(this->coeffDict().getScalar("Cinit")), + c1_(this->coeffDict().getScalar("C1")), + c2_(this->coeffDict().getScalar("C2")), + c3_(this->coeffDict().getScalar("C3")), + cExp1_(this->coeffDict().getScalar("Cexp1")), + cExp2_(this->coeffDict().getScalar("Cexp2")), + cExp3_(this->coeffDict().getScalar("Cexp3")), + weConst_(this->coeffDict().getScalar("Weconst")), + weCrit1_(this->coeffDict().getScalar("Wecrit1")), + weCrit2_(this->coeffDict().getScalar("Wecrit2")), + coeffD_(this->coeffDict().getScalar("CoeffD")), + onExpD_(this->coeffDict().getScalar("OnExpD")), + weExpD_(this->coeffDict().getScalar("WeExpD")), + mu_(this->coeffDict().getScalar("mu")), + sigma_(this->coeffDict().getScalar("sigma")), + d32Coeff_(this->coeffDict().getScalar("d32Coeff")), + cDmaxBM_(this->coeffDict().getScalar("cDmaxBM")), + cDmaxS_(this->coeffDict().getScalar("cDmaxS")), + corePerc_(this->coeffDict().getScalar("corePerc")) {} diff --git a/src/lagrangian/spray/submodels/StochasticCollision/TrajectoryCollision/TrajectoryCollision.C b/src/lagrangian/spray/submodels/StochasticCollision/TrajectoryCollision/TrajectoryCollision.C index dc5d7b6d13e121fefba96c8787e8b65e8a82f41b..311ecf75d0a287cfa2ade5fbd4f7a4014418e08b 100644 --- a/src/lagrangian/spray/submodels/StochasticCollision/TrajectoryCollision/TrajectoryCollision.C +++ b/src/lagrangian/spray/submodels/StochasticCollision/TrajectoryCollision/TrajectoryCollision.C @@ -139,8 +139,8 @@ Foam::TrajectoryCollision<CloudType>::TrajectoryCollision ) : ORourkeCollision<CloudType>(dict, owner, typeName), - cSpace_(readScalar(this->coeffDict().lookup("cSpace"))), - cTime_(readScalar(this->coeffDict().lookup("cTime"))) + cSpace_(this->coeffDict().getScalar("cSpace")), + cTime_(this->coeffDict().getScalar("cTime")) {} diff --git a/src/lagrangian/turbulence/submodels/Thermodynamic/ParticleForces/BrownianMotion/BrownianMotionForce.C b/src/lagrangian/turbulence/submodels/Thermodynamic/ParticleForces/BrownianMotion/BrownianMotionForce.C index ac4eb95f7f5a4ff9672735fc5762359c5c78ca98..c2f42a8c1052a147d865b8d9a34ae34a1f51b095 100644 --- a/src/lagrangian/turbulence/submodels/Thermodynamic/ParticleForces/BrownianMotion/BrownianMotionForce.C +++ b/src/lagrangian/turbulence/submodels/Thermodynamic/ParticleForces/BrownianMotion/BrownianMotionForce.C @@ -92,8 +92,8 @@ Foam::BrownianMotionForce<CloudType>::BrownianMotionForce : ParticleForce<CloudType>(owner, mesh, dict, typeName, true), rndGen_(owner.rndGen()), - lambda_(readScalar(this->coeffs().lookup("lambda"))), - turbulence_(readBool(this->coeffs().lookup("turbulence"))), + lambda_(this->coeffs().getScalar("lambda")), + turbulence_(this->coeffs().getBool("turbulence")), kPtr_(nullptr), ownK_(false) {} diff --git a/src/mesh/extrudeModel/linearNormal/linearNormal.C b/src/mesh/extrudeModel/linearNormal/linearNormal.C index d3a25216aeec2d8b3fa359d4026808293be59a8d..d8084a47155a5db329990b01d1a051fd378233e5 100644 --- a/src/mesh/extrudeModel/linearNormal/linearNormal.C +++ b/src/mesh/extrudeModel/linearNormal/linearNormal.C @@ -45,7 +45,7 @@ addToRunTimeSelectionTable(extrudeModel, linearNormal, dictionary); linearNormal::linearNormal(const dictionary& dict) : extrudeModel(typeName, dict), - thickness_(readScalar(coeffDict_.lookup("thickness"))), + thickness_(coeffDict_.get<scalar>("thickness")), firstCellThickness_(0), layerPoints_(nLayers_) { diff --git a/src/mesh/extrudeModel/linearRadial/linearRadial.C b/src/mesh/extrudeModel/linearRadial/linearRadial.C index 6477ed4a6d538dcea5449b88376d3eb459c5af03..f468cecd60e9233c0c97c9edb2e40cbdf8fc4551 100644 --- a/src/mesh/extrudeModel/linearRadial/linearRadial.C +++ b/src/mesh/extrudeModel/linearRadial/linearRadial.C @@ -43,7 +43,7 @@ addToRunTimeSelectionTable(extrudeModel, linearRadial, dictionary); linearRadial::linearRadial(const dictionary& dict) : extrudeModel(typeName, dict), - R_(readScalar(coeffDict_.lookup("R"))), + R_(coeffDict_.get<scalar>("R")), Rsurface_(coeffDict_.lookupOrDefault<scalar>("Rsurface", -1)) {} diff --git a/src/mesh/extrudeModel/sector/sector.C b/src/mesh/extrudeModel/sector/sector.C index 58808e5bd80ca2a8ef9e93845e085f1e9c7d96e2..d03c31b5ac7ac069b12af24ea73e649c686015b3 100644 --- a/src/mesh/extrudeModel/sector/sector.C +++ b/src/mesh/extrudeModel/sector/sector.C @@ -50,7 +50,7 @@ sector::sector(const dictionary& dict) axis_(coeffDict_.lookup("axis")), angle_ ( - degToRad(readScalar(coeffDict_.lookup("angle"))) + degToRad(coeffDict_.get<scalar>("angle")) ) {} diff --git a/src/mesh/extrudeModel/sigmaRadial/sigmaRadial.C b/src/mesh/extrudeModel/sigmaRadial/sigmaRadial.C index c97caf8250480575ff1dda4bc2b9c2df0dc66b57..c0cde228346e4452da996795ce38964bab51d329 100644 --- a/src/mesh/extrudeModel/sigmaRadial/sigmaRadial.C +++ b/src/mesh/extrudeModel/sigmaRadial/sigmaRadial.C @@ -45,9 +45,9 @@ addToRunTimeSelectionTable(extrudeModel, sigmaRadial, dictionary); sigmaRadial::sigmaRadial(const dictionary& dict) : extrudeModel(typeName, dict), - RTbyg_(readScalar(coeffDict_.lookup("RTbyg"))), - pRef_(readScalar(coeffDict_.lookup("pRef"))), - pStrat_(readScalar(coeffDict_.lookup("pStrat"))) + RTbyg_(coeffDict_.get<scalar>("RTbyg")), + pRef_(coeffDict_.get<scalar>("pRef")), + pStrat_(coeffDict_.get<scalar>("pStrat")) { if (mag(expansionRatio() - 1.0) > SMALL) { diff --git a/src/mesh/snappyHexMesh/externalDisplacementMeshMover/displacementMotionSolverMeshMover.C b/src/mesh/snappyHexMesh/externalDisplacementMeshMover/displacementMotionSolverMeshMover.C index 6f3b0bc83a351f0c3b59d6170f66612c501d7279..4b2e868af6bc3323424dea2a8a2254e8630172ae 100644 --- a/src/mesh/snappyHexMesh/externalDisplacementMeshMover/displacementMotionSolverMeshMover.C +++ b/src/mesh/snappyHexMesh/externalDisplacementMeshMover/displacementMotionSolverMeshMover.C @@ -51,7 +51,7 @@ bool Foam::displacementMotionSolverMeshMover::moveMesh labelList& checkFaces ) { - const label nRelaxIter = readLabel(moveDict.lookup("nRelaxIter")); + const label nRelaxIter = moveDict.get<label>("nRelaxIter"); meshMover_.setDisplacementPatchFields(); @@ -205,18 +205,18 @@ bool Foam::displacementMotionSolverMeshMover::move // Note that this has to update the pointDisplacement boundary conditions // as well, not just the internal field. { - const label nSmoothPatchThickness = readLabel + const label nSmoothPatchThickness ( - moveDict.lookup("nSmoothThickness") + moveDict.get<label>("nSmoothThickness") ); - const word minThicknessName = word(moveDict.lookup("minThicknessName")); + const word minThicknessName(moveDict.get<word>("minThicknessName")); scalarField zeroMinThickness; if (minThicknessName == "none") { - zeroMinThickness = scalarField(adaptPatchPtr_().nPoints(), 0.0); + zeroMinThickness = scalarField(adaptPatchPtr_().nPoints(), Zero); } const scalarField& minThickness = diff --git a/src/mesh/snappyHexMesh/externalDisplacementMeshMover/medialAxisMeshMover.C b/src/mesh/snappyHexMesh/externalDisplacementMeshMover/medialAxisMeshMover.C index 6bb99d604db052694bf7ee2c7c31808597db1586..598ba950c58cd52e46ab8a2e4154e404c8fa4e75 100644 --- a/src/mesh/snappyHexMesh/externalDisplacementMeshMover/medialAxisMeshMover.C +++ b/src/mesh/snappyHexMesh/externalDisplacementMeshMover/medialAxisMeshMover.C @@ -136,9 +136,9 @@ void Foam::medialAxisMeshMover::update(const dictionary& coeffDict) // ~~~~~~~~~~~~~~~~~~~~~ //- Smooth surface normals - const label nSmoothSurfaceNormals = readLabel + const label nSmoothSurfaceNormals ( - coeffDict.lookup("nSmoothSurfaceNormals") + coeffDict.get<label>("nSmoothSurfaceNormals") ); // Note: parameter name changed @@ -156,20 +156,20 @@ void Foam::medialAxisMeshMover::update(const dictionary& coeffDict) ); //- Feature angle when to stop adding layers - const scalar featureAngle = readScalar(coeffDict.lookup("featureAngle")); + const scalar featureAngle = coeffDict.get<scalar>("featureAngle"); //- When to slip along wall const scalar slipFeatureAngle = - ( - coeffDict.found("slipFeatureAngle") - ? readScalar(coeffDict.lookup("slipFeatureAngle")) - : 0.5*featureAngle - ); + coeffDict.lookupOrDefault<scalar> + ( + "slipFeatureAngle", + 0.5*featureAngle + ); //- Smooth internal normals - const label nSmoothNormals = readLabel + const label nSmoothNormals ( - coeffDict.lookup("nSmoothNormals") + coeffDict.get<label>("nSmoothNormals") ); //- Number of edges walking out @@ -1348,13 +1348,16 @@ void Foam::medialAxisMeshMover::calculateDisplacement ); //- Layer thickness too big - const scalar maxThicknessToMedialRatio = readScalar + const scalar maxThicknessToMedialRatio ( - coeffDict.lookup("maxThicknessToMedialRatio") + coeffDict.get<scalar>("maxThicknessToMedialRatio") ); //- Feature angle when to stop adding layers - const scalar featureAngle = readScalar(coeffDict.lookup("featureAngle")); + const scalar featureAngle + ( + coeffDict.get<scalar>("featureAngle") + ); //- Stop layer growth where mesh wraps around sharp edge scalar layerTerminationAngle = coeffDict.lookupOrDefault<scalar> @@ -1365,9 +1368,9 @@ void Foam::medialAxisMeshMover::calculateDisplacement scalar minCosLayerTermination = Foam::cos(degToRad(layerTerminationAngle)); //- Smoothing wanted patch thickness - const label nSmoothPatchThickness = readLabel + const label nSmoothPatchThickness ( - coeffDict.lookup("nSmoothThickness") + coeffDict.get<label>("nSmoothThickness") ); //- Number of edges walking out @@ -1688,7 +1691,7 @@ bool Foam::medialAxisMeshMover::shrinkMesh ) { //- Number of attempts shrinking the mesh - const label nSnap = readLabel(meshQualityDict.lookup("nRelaxIter")); + const label nSnap = meshQualityDict.get<label>("nRelaxIter"); // Make sure displacement boundary conditions is uptodate with diff --git a/src/mesh/snappyHexMesh/meshRefinement/meshRefinementProblemCells.C b/src/mesh/snappyHexMesh/meshRefinement/meshRefinementProblemCells.C index 1bd63cc13c252082d09c5121c79eb3a961735b49..d7a02c0f42807c7261d2cce3370535c06eecb625 100644 --- a/src/mesh/snappyHexMesh/meshRefinement/meshRefinementProblemCells.C +++ b/src/mesh/snappyHexMesh/meshRefinement/meshRefinementProblemCells.C @@ -633,8 +633,8 @@ Foam::labelList Foam::meshRefinement::markFacesOnProblemCells if (checkCollapse) { - minArea = readScalar(motionDict.lookup("minArea")); - maxNonOrtho = readScalar(motionDict.lookup("maxNonOrtho")); + motionDict.readEntry("minArea", minArea); + motionDict.readEntry("maxNonOrtho", maxNonOrtho); Info<< "markFacesOnProblemCells :" << " Deleting all-anchor surface cells only if" @@ -1205,7 +1205,7 @@ Foam::labelList Foam::meshRefinement::markFacesOnProblemCellsGeometric const labelList allFaces(identity(mesh_.nFaces())); label nWrongFaces = 0; - //const scalar minV(readScalar(motionDict.lookup("minVol", true))); + //const scalar minV(motionDict.get<scalar>("minVol", true)); //if (minV > -GREAT) //{ // polyMeshGeometry::checkFacePyramids @@ -1234,7 +1234,7 @@ Foam::labelList Foam::meshRefinement::markFacesOnProblemCellsGeometric // nWrongFaces = nNewWrongFaces; //} - scalar minArea(readScalar(motionDict.lookup("minArea"))); + scalar minArea(motionDict.get<scalar>("minArea")); if (minArea > -SMALL) { polyMeshGeometry::checkFaceArea @@ -1261,7 +1261,7 @@ Foam::labelList Foam::meshRefinement::markFacesOnProblemCellsGeometric nWrongFaces = nNewWrongFaces; } - scalar minDet(readScalar(motionDict.lookup("minDeterminant"))); + scalar minDet(motionDict.get<scalar>("minDeterminant")); if (minDet > -1) { polyMeshGeometry::checkCellDeterminant diff --git a/src/mesh/snappyHexMesh/refinementFeatures/refinementFeatures.C b/src/mesh/snappyHexMesh/refinementFeatures/refinementFeatures.C index 6a3c996c9adae5a16436595a4217ffd4eaab2f36..f0c1ea312f61f31c666f61b9bc68d27cd7bd650f 100644 --- a/src/mesh/snappyHexMesh/refinementFeatures/refinementFeatures.C +++ b/src/mesh/snappyHexMesh/refinementFeatures/refinementFeatures.C @@ -235,8 +235,8 @@ void Foam::refinementFeatures::read else { // Look up 'level' for single level - levels_[featI] = labelList(1, readLabel(dict.lookup("level"))); - distances_[featI] = scalarField(1, 0.0); + levels_[featI] = labelList(1, dict.get<label>("level")); + distances_[featI] = scalarField(1, Zero); } Info<< "Refinement level according to distance to " diff --git a/src/mesh/snappyHexMesh/refinementSurfaces/refinementSurfaces.C b/src/mesh/snappyHexMesh/refinementSurfaces/refinementSurfaces.C index 0726bd0a3a23b96b3144e6401a569f3c4715e4f6..71a63b20f5ba83853ed08ba18d32667ec1c6d250 100644 --- a/src/mesh/snappyHexMesh/refinementSurfaces/refinementSurfaces.C +++ b/src/mesh/snappyHexMesh/refinementSurfaces/refinementSurfaces.C @@ -351,10 +351,7 @@ Foam::refinementSurfaces::refinementSurfaces regionAngle[surfI].insert ( regionI, - readScalar - ( - regionDict.lookup("perpendicularAngle") - ) + regionDict.get<scalar>("perpendicularAngle") ); } diff --git a/src/mesh/snappyHexMesh/snappyHexMeshDriver/layerParameters/layerParameters.C b/src/mesh/snappyHexMesh/snappyHexMeshDriver/layerParameters/layerParameters.C index 64500d2b853b67bf843cc526e1720328df55acc1..f86bd8fa8e99778960291ea9ce6a3f1d7ad374b1 100644 --- a/src/mesh/snappyHexMesh/snappyHexMeshDriver/layerParameters/layerParameters.C +++ b/src/mesh/snappyHexMesh/snappyHexMeshDriver/layerParameters/layerParameters.C @@ -110,9 +110,9 @@ Foam::layerParameters::layerParameters minThickness_ ( boundaryMesh.size(), - readScalar(dict.lookup("minThickness")) + dict.get<scalar>("minThickness") ), - featureAngle_(readScalar(dict.lookup("featureAngle"))), + featureAngle_(dict.get<scalar>("featureAngle")), mergePatchFacesAngle_ ( dict.lookupOrDefault<scalar> @@ -125,16 +125,16 @@ Foam::layerParameters::layerParameters ( dict.lookupOrDefault("concaveAngle", defaultConcaveAngle) ), - nGrow_(readLabel(dict.lookup("nGrow"))), + nGrow_(dict.get<label>("nGrow")), maxFaceThicknessRatio_ ( - readScalar(dict.lookup("maxFaceThicknessRatio")) + dict.get<scalar>("maxFaceThicknessRatio") ), nBufferCellsNoExtrude_ ( - readLabel(dict.lookup("nBufferCellsNoExtrude")) + dict.get<label>("nBufferCellsNoExtrude") ), - nLayerIter_(readLabel(dict.lookup("nLayerIter"))), + nLayerIter_(dict.get<label>("nLayerIter")), nRelaxedIter_(labelMax), additionalReporting_(dict.lookupOrDefault("additionalReporting", false)), meshShrinker_ @@ -156,7 +156,7 @@ Foam::layerParameters::layerParameters firstLayerThickness_ = scalarField ( boundaryMesh.size(), - readScalar(dict.lookup("firstLayerThickness")) + dict.get<scalar>("firstLayerThickness") ); nSpec++; } @@ -166,7 +166,7 @@ Foam::layerParameters::layerParameters finalLayerThickness_ = scalarField ( boundaryMesh.size(), - readScalar(dict.lookup("finalLayerThickness")) + dict.get<scalar>("finalLayerThickness") ); nSpec++; } @@ -176,7 +176,7 @@ Foam::layerParameters::layerParameters thickness_ = scalarField ( boundaryMesh.size(), - readScalar(dict.lookup("thickness")) + dict.get<scalar>("thickness") ); nSpec++; } @@ -186,7 +186,7 @@ Foam::layerParameters::layerParameters expansionRatio_ = scalarField ( boundaryMesh.size(), - readScalar(dict.lookup("expansionRatio")) + dict.get<scalar>("expansionRatio") ); nSpec++; } @@ -283,7 +283,7 @@ Foam::layerParameters::layerParameters for (const label patchi : patchIDs) { numLayers_[patchi] = - readLabel(layerDict.lookup("nSurfaceLayers")); + layerDict.get<label>("nSurfaceLayers"); switch (layerSpec_) { diff --git a/src/mesh/snappyHexMesh/snappyHexMeshDriver/refinementParameters/refinementParameters.C b/src/mesh/snappyHexMesh/snappyHexMeshDriver/refinementParameters/refinementParameters.C index df86ee5276bf0c8a1326347e94d010b14f603928..c63345f9939a2dd0152e290cf15374e0c2a713dd 100644 --- a/src/mesh/snappyHexMesh/snappyHexMeshDriver/refinementParameters/refinementParameters.C +++ b/src/mesh/snappyHexMesh/snappyHexMeshDriver/refinementParameters/refinementParameters.C @@ -34,18 +34,18 @@ License Foam::refinementParameters::refinementParameters(const dictionary& dict) : - maxGlobalCells_(readLabel(dict.lookup("maxGlobalCells"))), - maxLocalCells_(readLabel(dict.lookup("maxLocalCells"))), - minRefineCells_(readLabel(dict.lookup("minRefinementCells"))), + maxGlobalCells_(dict.get<label>("maxGlobalCells")), + maxLocalCells_(dict.get<label>("maxLocalCells")), + minRefineCells_(dict.get<label>("minRefinementCells")), planarAngle_ ( dict.lookupOrDefault ( "planarAngle", - readScalar(dict.lookup("resolveFeatureAngle")) + dict.get<scalar>("resolveFeatureAngle") ) ), - nBufferLayers_(readLabel(dict.lookup("nCellsBetweenLevels"))), + nBufferLayers_(dict.get<label>("nCellsBetweenLevels")), locationsOutsideMesh_ ( dict.lookupOrDefault @@ -104,7 +104,7 @@ Foam::refinementParameters::refinementParameters(const dictionary& dict) } - scalar featAngle(readScalar(dict.lookup("resolveFeatureAngle"))); + const scalar featAngle(dict.get<scalar>("resolveFeatureAngle")); if (featAngle < 0 || featAngle > 180) { diff --git a/src/mesh/snappyHexMesh/snappyHexMeshDriver/snapParameters/snapParameters.C b/src/mesh/snappyHexMesh/snappyHexMeshDriver/snapParameters/snapParameters.C index 501f5dc7a131f298f885a9ccab3c73ca8371b0de..3f19065202193849ae9dae92b91eabf8f0248203 100644 --- a/src/mesh/snappyHexMesh/snappyHexMeshDriver/snapParameters/snapParameters.C +++ b/src/mesh/snappyHexMesh/snappyHexMeshDriver/snapParameters/snapParameters.C @@ -30,11 +30,11 @@ License // Construct from dictionary Foam::snapParameters::snapParameters(const dictionary& dict) : - nSmoothPatch_(readLabel(dict.lookup("nSmoothPatch"))), + nSmoothPatch_(dict.get<label>("nSmoothPatch")), nSmoothInternal_(dict.lookupOrDefault("nSmoothInternal", 0)), - snapTol_(readScalar(dict.lookup("tolerance"))), - nSmoothDispl_(readLabel(dict.lookup("nSolveIter"))), - nSnap_(readLabel(dict.lookup("nRelaxIter"))), + snapTol_(dict.get<scalar>("tolerance")), + nSmoothDispl_(dict.get<label>("nSolveIter")), + nSnap_(dict.get<label>("nRelaxIter")), nFeatureSnap_(dict.lookupOrDefault("nFeatureSnapIter", -1)), explicitFeatureSnap_(dict.lookupOrDefault("explicitFeatureSnap", true)), implicitFeatureSnap_(dict.lookupOrDefault("implicitFeatureSnap", false)), diff --git a/src/meshTools/triSurface/surfaceFeatures/surfaceFeatures.C b/src/meshTools/triSurface/surfaceFeatures/surfaceFeatures.C index 2b1cc2ee7124b8044abae4f01841cbf78ee68f1f..89c26ca88fa0f6a79d29dd973d5ff87bf94b3683 100644 --- a/src/meshTools/triSurface/surfaceFeatures/surfaceFeatures.C +++ b/src/meshTools/triSurface/surfaceFeatures/surfaceFeatures.C @@ -707,8 +707,8 @@ Foam::surfaceFeatures::surfaceFeatures surf_(surf), featurePoints_(featInfoDict.lookup("featurePoints")), featureEdges_(featInfoDict.lookup("featureEdges")), - externalStart_(readLabel(featInfoDict.lookup("externalStart"))), - internalStart_(readLabel(featInfoDict.lookup("internalStart"))) + externalStart_(featInfoDict.get<label>("externalStart")), + internalStart_(featInfoDict.get<label>("internalStart")) {} @@ -730,8 +730,8 @@ Foam::surfaceFeatures::surfaceFeatures featureEdges_ = labelList(featInfoDict.lookup("featureEdges")); featurePoints_ = labelList(featInfoDict.lookup("featurePoints")); - externalStart_ = readLabel(featInfoDict.lookup("externalStart")); - internalStart_ = readLabel(featInfoDict.lookup("internalStart")); + externalStart_ = featInfoDict.get<label>("externalStart"); + internalStart_ = featInfoDict.get<label>("internalStart"); } diff --git a/src/parallel/decompose/decompositionMethods/decompositionMethod/decompositionMethod.C b/src/parallel/decompose/decompositionMethods/decompositionMethod/decompositionMethod.C index 73bb15f9a180f7a18ddc604d2bd7230b30f38520..d2cec72e0b3f3d5a8cb90b71540f9b8f11206136 100644 --- a/src/parallel/decompose/decompositionMethods/decompositionMethod/decompositionMethod.C +++ b/src/parallel/decompose/decompositionMethods/decompositionMethod/decompositionMethod.C @@ -57,7 +57,7 @@ namespace Foam Foam::label Foam::decompositionMethod::nDomains(const dictionary& decompDict) { - return readLabel(decompDict.lookup("numberOfSubdomains")); + return decompDict.get<label>("numberOfSubdomains"); } diff --git a/src/parallel/distributed/distributedTriSurfaceMesh/distributedTriSurfaceMesh.C b/src/parallel/distributed/distributedTriSurfaceMesh/distributedTriSurfaceMesh.C index 64766a1df7f018cb315b40c304be0f02ca7b46e7..25686ebb724d0df9978cb7e8ca467d70b6234ec0 100644 --- a/src/parallel/distributed/distributedTriSurfaceMesh/distributedTriSurfaceMesh.C +++ b/src/parallel/distributed/distributedTriSurfaceMesh/distributedTriSurfaceMesh.C @@ -82,7 +82,7 @@ bool Foam::distributedTriSurfaceMesh::read() distType_ = distributionTypeNames_.lookup("distributionType", dict_); // Merge distance - mergeDist_ = readScalar(dict_.lookup("mergeDistance")); + dict_.readEntry("mergeDistance", mergeDist_); return true; } diff --git a/src/regionModels/regionCoupling/derivedFvPatchFields/filmPyrolysisRadiativeCoupledMixed/filmPyrolysisRadiativeCoupledMixedFvPatchScalarField.C b/src/regionModels/regionCoupling/derivedFvPatchFields/filmPyrolysisRadiativeCoupledMixed/filmPyrolysisRadiativeCoupledMixedFvPatchScalarField.C index ebd0bedcdd524c1d83b4fb81f814909d24bc70da..54fe25c512c849a8b558960970cdb7de996ff0db 100644 --- a/src/regionModels/regionCoupling/derivedFvPatchFields/filmPyrolysisRadiativeCoupledMixed/filmPyrolysisRadiativeCoupledMixedFvPatchScalarField.C +++ b/src/regionModels/regionCoupling/derivedFvPatchFields/filmPyrolysisRadiativeCoupledMixed/filmPyrolysisRadiativeCoupledMixedFvPatchScalarField.C @@ -163,8 +163,8 @@ filmPyrolysisRadiativeCoupledMixedFvPatchScalarField TnbrName_(dict.lookup("Tnbr")), qrName_(dict.lookup("qr")), convectiveScaling_(dict.lookupOrDefault<scalar>("convectiveScaling", 1.0)), - filmDeltaDry_(readScalar(dict.lookup("filmDeltaDry"))), - filmDeltaWet_(readScalar(dict.lookup("filmDeltaWet"))) + filmDeltaDry_(dict.get<scalar>("filmDeltaDry")), + filmDeltaWet_(dict.get<scalar>("filmDeltaWet")) { if (!isA<mappedPatchBase>(this->patch().patch())) { diff --git a/src/regionModels/surfaceFilmModels/kinematicSingleLayer/kinematicSingleLayer.C b/src/regionModels/surfaceFilmModels/kinematicSingleLayer/kinematicSingleLayer.C index 1ccbd5ca8cb95a4d064c6ad1c8c10d588956b53e..03635edb6efcb5921f252cc4b76f84635aa71b39 100644 --- a/src/regionModels/surfaceFilmModels/kinematicSingleLayer/kinematicSingleLayer.C +++ b/src/regionModels/surfaceFilmModels/kinematicSingleLayer/kinematicSingleLayer.C @@ -462,10 +462,10 @@ kinematicSingleLayer::kinematicSingleLayer momentumPredictor_(solution().subDict("PISO").lookup("momentumPredictor")), nOuterCorr_(solution().subDict("PISO").lookupOrDefault("nOuterCorr", 1)), - nCorr_(readLabel(solution().subDict("PISO").lookup("nCorr"))), + nCorr_(solution().subDict("PISO").get<label>("nCorr")), nNonOrthCorr_ ( - readLabel(solution().subDict("PISO").lookup("nNonOrthCorr")) + solution().subDict("PISO").get<label>("nNonOrthCorr") ), cumulativeContErr_(0.0), diff --git a/src/regionModels/surfaceFilmModels/submodels/kinematic/filmThermoModel/liquidFilmThermo/liquidFilmThermo.C b/src/regionModels/surfaceFilmModels/submodels/kinematic/filmThermoModel/liquidFilmThermo/liquidFilmThermo.C index 8160f7a2ba4ce9f164be27d50c19667eb486d4a4..b857ed3fae745baa3947dab403130998c0eee41e 100644 --- a/src/regionModels/surfaceFilmModels/submodels/kinematic/filmThermoModel/liquidFilmThermo/liquidFilmThermo.C +++ b/src/regionModels/surfaceFilmModels/submodels/kinematic/filmThermoModel/liquidFilmThermo/liquidFilmThermo.C @@ -111,7 +111,7 @@ liquidFilmThermo::liquidFilmThermo name_("unknown_liquid"), liquidPtr_(nullptr), ownLiquid_(false), - useReferenceValues_(readBool(coeffDict_.lookup("useReferenceValues"))), + useReferenceValues_(coeffDict_.get<bool>("useReferenceValues")), pRef_(0.0), TRef_(0.0) { diff --git a/src/regionModels/surfaceFilmModels/submodels/kinematic/filmTurbulenceModel/laminar/laminar.C b/src/regionModels/surfaceFilmModels/submodels/kinematic/filmTurbulenceModel/laminar/laminar.C index d70b50c7102ad2f47f40e335b8fe72f6e02b8ab5..d9c30608dea555e9bbed508366eb6128c043074c 100644 --- a/src/regionModels/surfaceFilmModels/submodels/kinematic/filmTurbulenceModel/laminar/laminar.C +++ b/src/regionModels/surfaceFilmModels/submodels/kinematic/filmTurbulenceModel/laminar/laminar.C @@ -56,7 +56,7 @@ laminar::laminar ) : filmTurbulenceModel(type(), film, dict), - Cf_(readScalar(coeffDict_.lookup("Cf"))) + Cf_(coeffDict_.get<scalar>("Cf")) {} diff --git a/src/regionModels/surfaceFilmModels/submodels/kinematic/force/contactAngleForces/contactAngleForce/contactAngleForce.C b/src/regionModels/surfaceFilmModels/submodels/kinematic/force/contactAngleForces/contactAngleForce/contactAngleForce.C index 53419d5b3401171ec7f8e063c80c5ac6eaf4573e..fa6f2293269031d544b4c487a3e7a96e9a0251af 100644 --- a/src/regionModels/surfaceFilmModels/submodels/kinematic/force/contactAngleForces/contactAngleForce/contactAngleForce.C +++ b/src/regionModels/surfaceFilmModels/submodels/kinematic/force/contactAngleForces/contactAngleForce/contactAngleForce.C @@ -54,7 +54,7 @@ void contactAngleForce::initialise() if (zeroForcePatches.size()) { const polyBoundaryMesh& pbm = filmModel_.regionMesh().boundaryMesh(); - scalar dLim = readScalar(coeffDict_.lookup("zeroForceDistance")); + const scalar dLim = coeffDict_.get<scalar>("zeroForceDistance"); Info<< " Assigning zero contact force within " << dLim << " of patches:" << endl; @@ -99,7 +99,7 @@ contactAngleForce::contactAngleForce ) : force(typeName, film, dict), - Ccf_(readScalar(coeffDict_.lookup("Ccf"))), + Ccf_(coeffDict_.get<scalar>("Ccf")), mask_ ( IOobject diff --git a/src/regionModels/surfaceFilmModels/submodels/kinematic/injectionModel/drippingInjection/drippingInjection.C b/src/regionModels/surfaceFilmModels/submodels/kinematic/injectionModel/drippingInjection/drippingInjection.C index 1c2e5ebb1542676b399b8d7a5cffab2edef23f18..30b4ce185c1718eb0dcd618688315861f5cdaec1 100644 --- a/src/regionModels/surfaceFilmModels/submodels/kinematic/injectionModel/drippingInjection/drippingInjection.C +++ b/src/regionModels/surfaceFilmModels/submodels/kinematic/injectionModel/drippingInjection/drippingInjection.C @@ -55,8 +55,8 @@ drippingInjection::drippingInjection ) : injectionModel(type(), film, dict), - deltaStable_(readScalar(coeffDict_.lookup("deltaStable"))), - particlesPerParcel_(readScalar(coeffDict_.lookup("particlesPerParcel"))), + deltaStable_(coeffDict_.get<scalar>("deltaStable")), + particlesPerParcel_(coeffDict_.get<scalar>("particlesPerParcel")), rndGen_(), parcelDistribution_ ( diff --git a/src/regionModels/surfaceFilmModels/submodels/thermo/filmRadiationModel/constantRadiation/constantRadiation.C b/src/regionModels/surfaceFilmModels/submodels/thermo/filmRadiationModel/constantRadiation/constantRadiation.C index 1dee50801d23aef9a3ce0d61d5bdc3a086703f84..6e1d755badaa7fb09e673b8c5104b79e66b4960f 100644 --- a/src/regionModels/surfaceFilmModels/submodels/thermo/filmRadiationModel/constantRadiation/constantRadiation.C +++ b/src/regionModels/surfaceFilmModels/submodels/thermo/filmRadiationModel/constantRadiation/constantRadiation.C @@ -81,9 +81,9 @@ constantRadiation::constantRadiation film.regionMesh(), dimensionedScalar("one", dimless, 1.0) ), - absorptivity_(readScalar(coeffDict_.lookup("absorptivity"))), - timeStart_(readScalar(coeffDict_.lookup("timeStart"))), - duration_(readScalar(coeffDict_.lookup("duration"))) + absorptivity_(coeffDict_.get<scalar>("absorptivity")), + timeStart_(coeffDict_.get<scalar>("timeStart")), + duration_(coeffDict_.get<scalar>("duration")) { mask_ = pos0(mask_); } diff --git a/src/regionModels/surfaceFilmModels/submodels/thermo/filmRadiationModel/standardRadiation/standardRadiation.C b/src/regionModels/surfaceFilmModels/submodels/thermo/filmRadiationModel/standardRadiation/standardRadiation.C index eff356e63aa20a5caefb1008854fcd2d065009cf..bd4af69630575b97030d388e0598a8cad3fb0860 100644 --- a/src/regionModels/surfaceFilmModels/submodels/thermo/filmRadiationModel/standardRadiation/standardRadiation.C +++ b/src/regionModels/surfaceFilmModels/submodels/thermo/filmRadiationModel/standardRadiation/standardRadiation.C @@ -85,8 +85,8 @@ standardRadiation::standardRadiation dimensionedScalar(dimMass/pow3(dimTime), Zero), zeroGradientFvPatchScalarField::typeName ), - beta_(readScalar(coeffDict_.lookup("beta"))), - kappaBar_(readScalar(coeffDict_.lookup("kappaBar"))) + beta_(coeffDict_.get<scalar>("beta")), + kappaBar_(coeffDict_.get<scalar>("kappaBar")) {} diff --git a/src/regionModels/surfaceFilmModels/submodels/thermo/heatTransferModel/constantHeatTransfer/constantHeatTransfer.C b/src/regionModels/surfaceFilmModels/submodels/thermo/heatTransferModel/constantHeatTransfer/constantHeatTransfer.C index d7e06c9f7a4c7cbea13dcd1bcfe108d4405b9d1d..cc23942fe084cf3ae22a194600dd028810dfd77f 100644 --- a/src/regionModels/surfaceFilmModels/submodels/thermo/heatTransferModel/constantHeatTransfer/constantHeatTransfer.C +++ b/src/regionModels/surfaceFilmModels/submodels/thermo/heatTransferModel/constantHeatTransfer/constantHeatTransfer.C @@ -56,7 +56,7 @@ constantHeatTransfer::constantHeatTransfer ) : heatTransferModel(typeName, film, dict), - c0_(readScalar(coeffDict_.lookup("c0"))) + c0_(coeffDict_.get<scalar>("c0")) {} diff --git a/src/regionModels/surfaceFilmModels/submodels/thermo/phaseChangeModel/solidification/solidification.C b/src/regionModels/surfaceFilmModels/submodels/thermo/phaseChangeModel/solidification/solidification.C index 46e9f4b77daf871c7f545747bdd091c26a63d3ed..60b18c7ca6dab70dc23ab7d727040355d51c552a 100644 --- a/src/regionModels/surfaceFilmModels/submodels/thermo/phaseChangeModel/solidification/solidification.C +++ b/src/regionModels/surfaceFilmModels/submodels/thermo/phaseChangeModel/solidification/solidification.C @@ -56,7 +56,7 @@ solidification::solidification ) : phaseChangeModel(typeName, film, dict), - T0_(readScalar(coeffDict_.lookup("T0"))), + T0_(coeffDict_.get<scalar>("T0")), maxSolidificationFrac_ ( coeffDict_.lookupOrDefault("maxSolidificationFrac", 0.2) diff --git a/src/regionModels/surfaceFilmModels/submodels/thermo/phaseChangeModel/standardPhaseChange/standardPhaseChange.C b/src/regionModels/surfaceFilmModels/submodels/thermo/phaseChangeModel/standardPhaseChange/standardPhaseChange.C index 28dccfae5689990502f7253f287bf01a08466f92..149c5821aacbd0b4508d1c14c7440d76d7051860 100644 --- a/src/regionModels/surfaceFilmModels/submodels/thermo/phaseChangeModel/standardPhaseChange/standardPhaseChange.C +++ b/src/regionModels/surfaceFilmModels/submodels/thermo/phaseChangeModel/standardPhaseChange/standardPhaseChange.C @@ -76,8 +76,8 @@ standardPhaseChange::standardPhaseChange ) : phaseChangeModel(typeName, film, dict), - deltaMin_(readScalar(coeffDict_.lookup("deltaMin"))), - L_(readScalar(coeffDict_.lookup("L"))), + deltaMin_(coeffDict_.get<scalar>("deltaMin")), + L_(coeffDict_.get<scalar>("L")), TbFactor_(coeffDict_.lookupOrDefault<scalar>("TbFactor", 1.1)), YInfZero_(coeffDict_.lookupOrDefault<Switch>("YInfZero", false)) {} diff --git a/src/regionModels/surfaceFilmModels/submodels/thermo/phaseChangeModel/waxSolventEvaporation/waxSolventEvaporation.C b/src/regionModels/surfaceFilmModels/submodels/thermo/phaseChangeModel/waxSolventEvaporation/waxSolventEvaporation.C index a810a952a9526673f9dbdde42236cd12f5e8489d..2a55a6134dae7460bfc0377e8d9bdb65de10b1ac 100644 --- a/src/regionModels/surfaceFilmModels/submodels/thermo/phaseChangeModel/waxSolventEvaporation/waxSolventEvaporation.C +++ b/src/regionModels/surfaceFilmModels/submodels/thermo/phaseChangeModel/waxSolventEvaporation/waxSolventEvaporation.C @@ -89,7 +89,7 @@ waxSolventEvaporation::waxSolventEvaporation film.regionMesh().time().constant(), film.regionMesh() ), - readScalar(coeffDict_.lookup("Wwax")) + coeffDict_.get<scalar>("Wwax") ), Wsolvent_ ( @@ -99,7 +99,7 @@ waxSolventEvaporation::waxSolventEvaporation film.regionMesh().time().constant(), film.regionMesh() ), - readScalar(coeffDict_.lookup("Wsolvent")) + coeffDict_.get<scalar>("Wsolvent") ), Ysolvent0_ ( @@ -124,8 +124,8 @@ waxSolventEvaporation::waxSolventEvaporation ), film.regionMesh() ), - deltaMin_(readScalar(coeffDict_.lookup("deltaMin"))), - L_(readScalar(coeffDict_.lookup("L"))), + deltaMin_(coeffDict_.get<scalar>("deltaMin")), + L_(coeffDict_.get<scalar>("L")), TbFactor_(coeffDict_.lookupOrDefault<scalar>("TbFactor", 1.1)), YInfZero_(coeffDict_.lookupOrDefault("YInfZero", false)), activityCoeff_ diff --git a/src/regionModels/surfaceFilmModels/thermoSingleLayer/thermoSingleLayer.C b/src/regionModels/surfaceFilmModels/thermoSingleLayer/thermoSingleLayer.C index 4876ae4bc415142cda3dc501e27fedb3f2b55c2b..d878a648ef78d432feda3f1abb965d296037e1eb 100644 --- a/src/regionModels/surfaceFilmModels/thermoSingleLayer/thermoSingleLayer.C +++ b/src/regionModels/surfaceFilmModels/thermoSingleLayer/thermoSingleLayer.C @@ -429,8 +429,8 @@ thermoSingleLayer::thermoSingleLayer zeroGradientFvPatchScalarField::typeName ), - deltaWet_(readScalar(coeffs_.lookup("deltaWet"))), - hydrophilic_(readBool(coeffs_.lookup("hydrophilic"))), + deltaWet_(coeffs_.get<scalar>("deltaWet")), + hydrophilic_(coeffs_.get<bool>("hydrophilic")), hydrophilicDryScale_(0.0), hydrophilicWetScale_(0.0), diff --git a/src/regionModels/thermalBaffleModels/derivedFvPatchFields/thermalBaffle/thermalBaffleFvPatchScalarField.C b/src/regionModels/thermalBaffleModels/derivedFvPatchFields/thermalBaffle/thermalBaffleFvPatchScalarField.C index 23620a89421c165f858f44fe475e26b497a63dc8..7d96eb8e8dbfcaf9146e4d84cad31b6f0aece5b9 100644 --- a/src/regionModels/thermalBaffleModels/derivedFvPatchFields/thermalBaffle/thermalBaffleFvPatchScalarField.C +++ b/src/regionModels/thermalBaffleModels/derivedFvPatchFields/thermalBaffle/thermalBaffleFvPatchScalarField.C @@ -170,7 +170,7 @@ void thermalBaffleFvPatchScalarField::createPatchMesh() patchTypes[bottomPatchID] = mappedWallPolyPatch::typeName; patchTypes[topPatchID] = mappedWallPolyPatch::typeName; - if (readBool(dict_.lookup("columnCells"))) + if (dict_.get<bool>("columnCells")) { patchTypes[sidePatchID] = emptyPolyPatch::typeName; } @@ -264,31 +264,22 @@ void thermalBaffleFvPatchScalarField::write(Ostream& os) const if (owner_ && (thisMesh.name() == polyMesh::defaultRegion)) { - os.writeKeyword("extrudeModel"); - os << word(dict_.lookup("extrudeModel")) - << token::END_STATEMENT << nl; + os.writeEntry("extrudeModel", dict_.get<word>("extrudeModel")); - os.writeKeyword("nLayers"); - os << readLabel(dict_.lookup("nLayers")) - << token::END_STATEMENT << nl; + os.writeEntry("nLayers", dict_.get<label>("nLayers")); - os.writeKeyword("expansionRatio"); - os << readScalar(dict_.lookup("expansionRatio")) - << token::END_STATEMENT << nl; + os.writeEntry("expansionRatio", dict_.get<scalar>("expansionRatio")); - os.writeKeyword("columnCells"); - os << readBool(dict_.lookup("columnCells")) - << token::END_STATEMENT << nl; + os.writeEntry("columnCells", dict_.get<Switch>("columnCells")); + + const word extrudeModel(dict_.get<word>("extrudeModel") + "Coeffs"); - word extrudeModel(word(dict_.lookup("extrudeModel")) + "Coeffs"); os.writeKeyword(extrudeModel); os << dict_.subDict(extrudeModel) << nl; - word regionName = dict_.lookup("region"); - os.writeEntry("region", regionName); + os.writeEntry("region", dict_.get<word>("region")); - bool active = readBool(dict_.lookup("active")); - os.writeEntry("active", active); + os.writeEntry("active", dict_.get<Switch>("active")); os.writeKeyword("thermoType"); os << dict_.subDict("thermoType") << nl; diff --git a/src/regionModels/thermalBaffleModels/thermalBaffle/thermalBaffle.C b/src/regionModels/thermalBaffleModels/thermalBaffle/thermalBaffle.C index 75ec4d10863c4393dc2c18aabef7738ef81dc1e5..d2b30e2305564740e498bdf0b8206caf398519fd 100644 --- a/src/regionModels/thermalBaffleModels/thermalBaffle/thermalBaffle.C +++ b/src/regionModels/thermalBaffleModels/thermalBaffle/thermalBaffle.C @@ -164,7 +164,7 @@ thermalBaffle::thermalBaffle ) : thermalBaffleModel(modelType, mesh, dict), - nNonOrthCorr_(readLabel(solution().lookup("nNonOrthCorr"))), + nNonOrthCorr_(solution().get<label>("nNonOrthCorr")), thermo_(solidThermo::New(regionMesh(), dict)), h_(thermo_->he()), qs_ @@ -214,7 +214,7 @@ thermalBaffle::thermalBaffle ) : thermalBaffleModel(modelType, mesh), - nNonOrthCorr_(readLabel(solution().lookup("nNonOrthCorr"))), + nNonOrthCorr_(solution().get<label>("nNonOrthCorr")), thermo_(solidThermo::New(regionMesh())), h_(thermo_->he()), qs_ diff --git a/src/renumber/renumberMethods/springRenumber/springRenumber.C b/src/renumber/renumberMethods/springRenumber/springRenumber.C index eb31b53b0a5b00f6f442b39ca2c91ad232338ecb..1a64c64809b99f3c6402f6eeea1ebe31ebd12cf5 100644 --- a/src/renumber/renumberMethods/springRenumber/springRenumber.C +++ b/src/renumber/renumberMethods/springRenumber/springRenumber.C @@ -48,9 +48,9 @@ Foam::springRenumber::springRenumber(const dictionary& renumberDict) : renumberMethod(renumberDict), dict_(renumberDict.optionalSubDict(typeName+"Coeffs")), - maxCo_(readScalar(dict_.lookup("maxCo"))), - maxIter_(readLabel(dict_.lookup("maxIter"))), - freezeFraction_(readScalar(dict_.lookup("freezeFraction"))) + maxCo_(dict_.get<scalar>("maxCo")), + maxIter_(dict_.get<label>("maxIter")), + freezeFraction_(dict_.get<scalar>("freezeFraction")) {} diff --git a/src/rigidBodyDynamics/bodies/cuboid/cuboidI.H b/src/rigidBodyDynamics/bodies/cuboid/cuboidI.H index e18a835bc0ee9195745be9d02452b789e31817be..825a9e5bf135e3e2f7f59da77ae8e98576e58ba7 100644 --- a/src/rigidBodyDynamics/bodies/cuboid/cuboidI.H +++ b/src/rigidBodyDynamics/bodies/cuboid/cuboidI.H @@ -67,10 +67,10 @@ inline Foam::RBD::cuboid::cuboid ) : rigidBody(name, rigidBodyInertia()), - L_(dict.lookup("L")) + L_(dict.get<vector>("L")) { - const scalar m(readScalar(dict.lookup("mass"))); - const vector c(dict.lookup("centreOfMass")); + const scalar m(dict.get<scalar>("mass")); + const vector c(dict.get<vector>("centreOfMass")); rigidBodyInertia::operator=(rigidBodyInertia(m, c, I(m, L_))); } diff --git a/src/rigidBodyDynamics/bodies/sphere/sphereI.H b/src/rigidBodyDynamics/bodies/sphere/sphereI.H index 49d9fc0e0b132c9d363b2d73138e140c370cc357..ad1035560737220c7dd9e0e20a2b264a24d449d7 100644 --- a/src/rigidBodyDynamics/bodies/sphere/sphereI.H +++ b/src/rigidBodyDynamics/bodies/sphere/sphereI.H @@ -57,10 +57,10 @@ inline Foam::RBD::sphere::sphere ) : rigidBody(name, rigidBodyInertia()), - r_(readScalar(dict.lookup("radius"))) + r_(dict.get<scalar>("radius")) { - const scalar m(readScalar(dict.lookup("mass"))); - const vector c(dict.lookup("centreOfMass")); + const scalar m(dict.get<scalar>("mass")); + const vector c(dict.get<vector>("centreOfMass")); rigidBodyInertia::operator=(rigidBodyInertia(m, c, I(m, r_))); } diff --git a/src/rigidBodyDynamics/rigidBodyInertia/rigidBodyInertiaI.H b/src/rigidBodyDynamics/rigidBodyInertia/rigidBodyInertiaI.H index 78d74db2155bee7f3ac5af158f7e41df5be76457..69a422c7941b14bfe84be906c738652bacbc3680 100644 --- a/src/rigidBodyDynamics/rigidBodyInertia/rigidBodyInertiaI.H +++ b/src/rigidBodyDynamics/rigidBodyInertia/rigidBodyInertiaI.H @@ -64,7 +64,7 @@ inline Foam::RBD::rigidBodyInertia::rigidBodyInertia inline Foam::RBD::rigidBodyInertia::rigidBodyInertia(const dictionary& dict) : - m_(readScalar(dict.lookup("mass"))), + m_(dict.get<scalar>("mass")), c_(dict.lookup("centreOfMass")), Ic_(dict.lookup("inertia")) {} diff --git a/src/rigidBodyMeshMotion/rigidBodyMeshMotion/rigidBodyMeshMotion.C b/src/rigidBodyMeshMotion/rigidBodyMeshMotion/rigidBodyMeshMotion.C index e46c901565afef6f99a56d7a0ca436ecd59463a9..1b180de70da34b3d1ddf706f21c6d290f833fc6c 100644 --- a/src/rigidBodyMeshMotion/rigidBodyMeshMotion/rigidBodyMeshMotion.C +++ b/src/rigidBodyMeshMotion/rigidBodyMeshMotion/rigidBodyMeshMotion.C @@ -62,8 +62,8 @@ Foam::rigidBodyMeshMotion::bodyMesh::bodyMesh bodyID_(bodyID), patches_(dict.lookup("patches")), patchSet_(mesh.boundaryMesh().patchSet(patches_)), - di_(readScalar(dict.lookup("innerDistance"))), - do_(readScalar(dict.lookup("outerDistance"))), + di_(dict.get<scalar>("innerDistance")), + do_(dict.get<scalar>("outerDistance")), weight_ ( IOobject @@ -248,7 +248,7 @@ void Foam::rigidBodyMeshMotion::solve() if (test_) { - label nIter(readLabel(coeffDict().lookup("nIter"))); + const label nIter(coeffDict().get<label>("nIter")); for (label i=0; i<nIter; i++) { @@ -263,7 +263,7 @@ void Foam::rigidBodyMeshMotion::solve() } else { - label nIter(coeffDict().lookupOrDefault("nIter", 1)); + const label nIter(coeffDict().lookupOrDefault("nIter", 1)); for (label i=0; i<nIter; i++) { diff --git a/src/rigidBodyMeshMotion/rigidBodyMeshMotionSolver/rigidBodyMeshMotionSolver.C b/src/rigidBodyMeshMotion/rigidBodyMeshMotionSolver/rigidBodyMeshMotionSolver.C index abf0312812483322d1747660686b8fc43d80e93c..fffe4747a50374664a09aa79e839f9baf4c2c6de 100644 --- a/src/rigidBodyMeshMotion/rigidBodyMeshMotionSolver/rigidBodyMeshMotionSolver.C +++ b/src/rigidBodyMeshMotion/rigidBodyMeshMotionSolver/rigidBodyMeshMotionSolver.C @@ -122,7 +122,7 @@ Foam::rigidBodyMeshMotionSolver::rigidBodyMeshMotionSolver { if (rhoName_ == "rhoInf") { - rhoInf_ = readScalar(coeffDict().lookup("rhoInf")); + coeffDict().readEntry("rhoInf", rhoInf_); } const dictionary& bodiesDict = coeffDict().subDict("bodies"); @@ -196,7 +196,7 @@ void Foam::rigidBodyMeshMotionSolver::solve() if (test_) { - label nIter(readLabel(coeffDict().lookup("nIter"))); + const label nIter(coeffDict().get<label>("nIter")); for (label i=0; i<nIter; i++) { diff --git a/src/sixDoFRigidBodyMotion/pointPatchFields/derived/sixDoFRigidBodyDisplacement/sixDoFRigidBodyDisplacementPointPatchVectorField.C b/src/sixDoFRigidBodyMotion/pointPatchFields/derived/sixDoFRigidBodyDisplacement/sixDoFRigidBodyDisplacementPointPatchVectorField.C index e1508439b6e0c4b080f0e52a843f4931e39d2c41..22a934c62ed4670df338f4c36cb3e05798b91d17 100644 --- a/src/sixDoFRigidBodyMotion/pointPatchFields/derived/sixDoFRigidBodyDisplacement/sixDoFRigidBodyDisplacementPointPatchVectorField.C +++ b/src/sixDoFRigidBodyMotion/pointPatchFields/derived/sixDoFRigidBodyDisplacement/sixDoFRigidBodyDisplacementPointPatchVectorField.C @@ -75,7 +75,7 @@ sixDoFRigidBodyDisplacementPointPatchVectorField { if (rhoName_ == "rhoInf") { - rhoInf_ = readScalar(dict.lookup("rhoInf")); + dict.readEntry("rhoInf", rhoInf_); } if (dict.readIfPresent("g", g_)) diff --git a/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion.C b/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion.C index 8e51d68c7de206d585be2cf12cb23373b3ff2b78..181fff875f17fbfc9c9300db39455e8b3c38b6fe 100644 --- a/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion.C +++ b/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion.C @@ -119,7 +119,7 @@ Foam::sixDoFRigidBodyMotion::sixDoFRigidBodyMotion dict.lookupOrDefault("orientation", tensor::I) ) ), - mass_(readScalar(dict.lookup("mass"))), + mass_(dict.get<scalar>("mass")), momentOfInertia_(dict.lookup("momentOfInertia")), aRelax_(dict.lookupOrDefault<scalar>("accelerationRelaxation", 1.0)), aDamp_(dict.lookupOrDefault<scalar>("accelerationDamping", 1.0)), diff --git a/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionSolver/sixDoFRigidBodyMotionSolver.C b/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionSolver/sixDoFRigidBodyMotionSolver.C index ef88a6c2225fefafe4ff36389eedb93dfa836485..cf5c3f38a545fdc9d6da8ea3ba3c6638d3823aff 100644 --- a/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionSolver/sixDoFRigidBodyMotionSolver.C +++ b/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionSolver/sixDoFRigidBodyMotionSolver.C @@ -83,8 +83,8 @@ Foam::sixDoFRigidBodyMotionSolver::sixDoFRigidBodyMotionSolver ), patches_(wordRes(coeffDict().lookup("patches"))), patchSet_(mesh.boundaryMesh().patchSet(patches_)), - di_(readScalar(coeffDict().lookup("innerDistance"))), - do_(readScalar(coeffDict().lookup("outerDistance"))), + di_(coeffDict().get<scalar>("innerDistance")), + do_(coeffDict().get<scalar>("outerDistance")), test_(coeffDict().lookupOrDefault("test", false)), rhoInf_(1.0), rhoName_(coeffDict().lookupOrDefault<word>("rho", "rho")), @@ -106,7 +106,7 @@ Foam::sixDoFRigidBodyMotionSolver::sixDoFRigidBodyMotionSolver { if (rhoName_ == "rhoInf") { - rhoInf_ = readScalar(coeffDict().lookup("rhoInf")); + coeffDict().readEntry("rhoInf", rhoInf_); } // Calculate scaling factor everywhere diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/reduction/DAC/DAC.C b/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/reduction/DAC/DAC.C index fd5cec5245fb66006493a02d6163a1e701d9272b..fa70b7ac031ace16067d4a121d3f84d389214e98 100644 --- a/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/reduction/DAC/DAC.C +++ b/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/reduction/DAC/DAC.C @@ -203,7 +203,7 @@ Foam::chemistryReductionMethods::DAC<CompType, ThermoType>::DAC forAll(fuelSpecies_, i) { - fuelSpeciesProp_[i] = readScalar(fuelDict.lookup(fuelSpecies_[i])); + fuelSpeciesProp_[i] = fuelDict.get<scalar>(fuelSpecies_[i]); for (label j=0; j<this->nSpecie_; j++) { if (this->chemistry_.Y()[j].member() == fuelSpecies_[i]) diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/tabulation/ISAT/ISAT.C b/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/tabulation/ISAT/ISAT.C index f6c590b8d74899a5f49653c73896bc7e7bed0b77..e5130042c42bafbf6c963315a73f46623bc17bf4 100644 --- a/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/tabulation/ISAT/ISAT.C +++ b/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/tabulation/ISAT/ISAT.C @@ -80,8 +80,8 @@ Foam::chemistryTabulationMethods::ISAT<CompType, ThermoType>::ISAT if (this->active_) { dictionary scaleDict(this->coeffsDict_.subDict("scaleFactor")); - label Ysize = this->chemistry_.Y().size(); - scalar otherScaleFactor = readScalar(scaleDict.lookup("otherSpecies")); + const label Ysize = this->chemistry_.Y().size(); + const scalar otherScaleFactor = scaleDict.get<scalar>("otherSpecies"); for (label i=0; i<Ysize; ++i) { if (!scaleDict.found(this->chemistry_.Y()[i].member())) @@ -91,17 +91,16 @@ Foam::chemistryTabulationMethods::ISAT<CompType, ThermoType>::ISAT else { scaleFactor_[i] = - readScalar - ( - scaleDict.lookup(this->chemistry_.Y()[i].member()) - ); + scaleDict.get<scalar>(this->chemistry_.Y()[i].member()); } } - scaleFactor_[Ysize] = readScalar(scaleDict.lookup("Temperature")); - scaleFactor_[Ysize + 1] = readScalar(scaleDict.lookup("Pressure")); + + scaleDict.readEntry("Temperature", scaleFactor_[Ysize]); + scaleDict.readEntry("Pressure", scaleFactor_[Ysize + 1]); + if (this->variableTimeStep()) { - scaleFactor_[Ysize + 2] = readScalar(scaleDict.lookup("deltaT")); + scaleDict.readEntry("deltaT", scaleFactor_[Ysize + 2]); } } diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/tabulation/ISAT/binaryTree/binaryTree.C b/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/tabulation/ISAT/binaryTree/binaryTree.C index f0dd9382455c7ed6c1ecebe5680d747db7686bf1..284302ef2661365dd3d3ef3b8d0e867e1790da47 100644 --- a/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/tabulation/ISAT/binaryTree/binaryTree.C +++ b/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/tabulation/ISAT/binaryTree/binaryTree.C @@ -358,7 +358,7 @@ Foam::binaryTree<CompType, ThermoType>::binaryTree : chemistry_(chemistry), root_(nullptr), - maxNLeafs_(readLabel(coeffsDict.lookup("maxNLeafs"))), + maxNLeafs_(coeffsDict.get<label>("maxNLeafs")), size_(0), n2ndSearch_(0), max2ndSearch_(coeffsDict.lookupOrDefault("max2ndSearch",0)), diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/basicChemistryModel/basicChemistryModel.C b/src/thermophysicalModels/chemistryModel/chemistryModel/basicChemistryModel/basicChemistryModel.C index 4f870cc4373e072afe9f37e01b27ed276e12cd97..53f5239f7f0fd5c3a12d7ca1aa31c8dd771fdcb9 100644 --- a/src/thermophysicalModels/chemistryModel/chemistryModel/basicChemistryModel/basicChemistryModel.C +++ b/src/thermophysicalModels/chemistryModel/chemistryModel/basicChemistryModel/basicChemistryModel.C @@ -57,7 +57,7 @@ Foam::basicChemistryModel::basicChemistryModel(basicThermo& thermo) ), mesh_(thermo.p().mesh()), chemistry_(lookup("chemistry")), - deltaTChemIni_(readScalar(lookup("initialChemicalTimeStep"))), + deltaTChemIni_(get<scalar>("initialChemicalTimeStep")), deltaTChemMax_(lookupOrDefault("maxChemicalTimeStep", GREAT)), deltaTChem_ ( diff --git a/src/thermophysicalModels/chemistryModel/chemistrySolver/EulerImplicit/EulerImplicit.C b/src/thermophysicalModels/chemistryModel/chemistrySolver/EulerImplicit/EulerImplicit.C index da15b7b087849093fdf82bbdade29188173448c2..d51d31436d944b310e3f8b32c18536e38edfa37e 100644 --- a/src/thermophysicalModels/chemistryModel/chemistrySolver/EulerImplicit/EulerImplicit.C +++ b/src/thermophysicalModels/chemistryModel/chemistrySolver/EulerImplicit/EulerImplicit.C @@ -38,7 +38,7 @@ Foam::EulerImplicit<ChemistryModel>::EulerImplicit : chemistrySolver<ChemistryModel>(thermo), coeffsDict_(this->subDict("EulerImplicitCoeffs")), - cTauChem_(readScalar(coeffsDict_.lookup("cTauChem"))), + cTauChem_(coeffsDict_.get<scalar>("cTauChem")), eqRateLimiter_(coeffsDict_.lookup("equilibriumRateLimiter")), cTp_(this->nEqns()) {} diff --git a/src/thermophysicalModels/laminarFlameSpeed/Gulders/Gulders.C b/src/thermophysicalModels/laminarFlameSpeed/Gulders/Gulders.C index 4decd9cf27337c65917b603a5862a9fcc9715a78..c1dbfacc4d232462808a64791221c91defbe3be2 100644 --- a/src/thermophysicalModels/laminarFlameSpeed/Gulders/Gulders.C +++ b/src/thermophysicalModels/laminarFlameSpeed/Gulders/Gulders.C @@ -55,12 +55,12 @@ Foam::laminarFlameSpeedModels::Gulders::Gulders laminarFlameSpeed(dict, ct), coeffsDict_(dict.optionalSubDict(typeName + "Coeffs").subDict(fuel_)), - W_(readScalar(coeffsDict_.lookup("W"))), - eta_(readScalar(coeffsDict_.lookup("eta"))), - xi_(readScalar(coeffsDict_.lookup("xi"))), - f_(readScalar(coeffsDict_.lookup("f"))), - alpha_(readScalar(coeffsDict_.lookup("alpha"))), - beta_(readScalar(coeffsDict_.lookup("beta"))) + W_(coeffsDict_.get<scalar>("W")), + eta_(coeffsDict_.get<scalar>("eta")), + xi_(coeffsDict_.get<scalar>("xi")), + f_(coeffsDict_.get<scalar>("f")), + alpha_(coeffsDict_.get<scalar>("alpha")), + beta_(coeffsDict_.get<scalar>("beta")) {} diff --git a/src/thermophysicalModels/laminarFlameSpeed/GuldersEGR/GuldersEGR.C b/src/thermophysicalModels/laminarFlameSpeed/GuldersEGR/GuldersEGR.C index 48f9ff392d0c1b9e84e7293d8940a530913cfd45..97c10ebb2771a237ec35c25adaed1ae1b3b6e715 100644 --- a/src/thermophysicalModels/laminarFlameSpeed/GuldersEGR/GuldersEGR.C +++ b/src/thermophysicalModels/laminarFlameSpeed/GuldersEGR/GuldersEGR.C @@ -54,12 +54,12 @@ Foam::laminarFlameSpeedModels::GuldersEGR::GuldersEGR laminarFlameSpeed(dict, ct), coeffsDict_(dict.optionalSubDict(typeName + "Coeffs").subDict(fuel_)), - W_(readScalar(coeffsDict_.lookup("W"))), - eta_(readScalar(coeffsDict_.lookup("eta"))), - xi_(readScalar(coeffsDict_.lookup("xi"))), - f_(readScalar(coeffsDict_.lookup("f"))), - alpha_(readScalar(coeffsDict_.lookup("alpha"))), - beta_(readScalar(coeffsDict_.lookup("beta"))) + W_(coeffsDict_.get<scalar>("W")), + eta_(coeffsDict_.get<scalar>("eta")), + xi_(coeffsDict_.get<scalar>("xi")), + f_(coeffsDict_.get<scalar>("f")), + alpha_(coeffsDict_.get<scalar>("alpha")), + beta_(coeffsDict_.get<scalar>("beta")) {} diff --git a/src/thermophysicalModels/laminarFlameSpeed/RaviPetersen/RaviPetersen.C b/src/thermophysicalModels/laminarFlameSpeed/RaviPetersen/RaviPetersen.C index ecd107189cbe8fc923cf33268dfb59f50aabe92b..ed707d79ee2f64dbe8b2efac1665ffd22caf0eb0 100644 --- a/src/thermophysicalModels/laminarFlameSpeed/RaviPetersen/RaviPetersen.C +++ b/src/thermophysicalModels/laminarFlameSpeed/RaviPetersen/RaviPetersen.C @@ -58,7 +58,7 @@ Foam::laminarFlameSpeedModels::RaviPetersen::RaviPetersen EqRPoints_(coeffsDict_.lookup("EqRPoints")), alpha_(coeffsDict_.lookup("alpha")), beta_(coeffsDict_.lookup("beta")), - TRef_(readScalar(coeffsDict_.lookup("TRef"))) + TRef_(coeffsDict_.get<scalar>("TRef")) { checkPointsMonotonicity("equivalenceRatio", EqRPoints_); checkPointsMonotonicity("pressure", pPoints_); diff --git a/src/thermophysicalModels/radiation/radiationModels/fvDOM/fvDOM/fvDOM.C b/src/thermophysicalModels/radiation/radiationModels/fvDOM/fvDOM/fvDOM.C index e587e3f94fdce6b10a4c72ccacf4b272bc2c4f41..cffafb7baf5115c28d8c2cdebfc1e40444887685 100644 --- a/src/thermophysicalModels/radiation/radiationModels/fvDOM/fvDOM/fvDOM.C +++ b/src/thermophysicalModels/radiation/radiationModels/fvDOM/fvDOM/fvDOM.C @@ -279,8 +279,8 @@ Foam::radiation::fvDOM::fvDOM(const volScalarField& T) mesh_, dimensionedScalar(dimless/dimLength, Zero) ), - nTheta_(readLabel(coeffs_.lookup("nTheta"))), - nPhi_(readLabel(coeffs_.lookup("nPhi"))), + nTheta_(coeffs_.get<label>("nTheta")), + nPhi_(coeffs_.get<label>("nPhi")), nRay_(0), nLambda_(absorptionEmission_->nBands()), aLambda_(nLambda_), @@ -375,8 +375,8 @@ Foam::radiation::fvDOM::fvDOM mesh_, dimensionedScalar(dimless/dimLength, Zero) ), - nTheta_(readLabel(coeffs_.lookup("nTheta"))), - nPhi_(readLabel(coeffs_.lookup("nPhi"))), + nTheta_(coeffs_.get<label>("nTheta")), + nPhi_(coeffs_.get<label>("nPhi")), nRay_(0), nLambda_(absorptionEmission_->nBands()), aLambda_(nLambda_), diff --git a/src/thermophysicalModels/radiation/radiationModels/viewFactor/viewFactor.C b/src/thermophysicalModels/radiation/radiationModels/viewFactor/viewFactor.C index d9da6157ffac194f469bcc100962e8606e2489fe..d4f7607958bd4cc4b770fd5b2ecb8b00712276ef 100644 --- a/src/thermophysicalModels/radiation/radiationModels/viewFactor/viewFactor.C +++ b/src/thermophysicalModels/radiation/radiationModels/viewFactor/viewFactor.C @@ -155,8 +155,7 @@ void Foam::radiation::viewFactor::initialise() } - bool smoothing = readBool(coeffs_.lookup("smoothing")); - if (smoothing) + if (coeffs_.get<bool>("smoothing")) { if (debug) { @@ -180,7 +179,7 @@ void Foam::radiation::viewFactor::initialise() } } - constEmissivity_ = readBool(coeffs_.lookup("constantEmissivity")); + coeffs_.readEntry("constantEmissivity", constEmissivity_); if (constEmissivity_) { CLU_.reset diff --git a/src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/greyMeanAbsorptionEmission/greyMeanAbsorptionEmission.C b/src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/greyMeanAbsorptionEmission/greyMeanAbsorptionEmission.C index 221fbfa4f2ff7fd5ae29d9ae8d983bcbe0d06f96..c5a782b23c54e873b2aacf1f4f4c1c8c3e42ed9a 100644 --- a/src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/greyMeanAbsorptionEmission/greyMeanAbsorptionEmission.C +++ b/src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/greyMeanAbsorptionEmission/greyMeanAbsorptionEmission.C @@ -61,7 +61,7 @@ Foam::radiation::greyMeanAbsorptionEmission::greyMeanAbsorptionEmission specieIndex_(label(0)), lookUpTablePtr_(), thermo_(mesh.lookupObject<fluidThermo>(basicThermo::dictName)), - EhrrCoeff_(readScalar(coeffsDict_.lookup("EhrrCoeff"))), + EhrrCoeff_(coeffsDict_.get<scalar>("EhrrCoeff")), Yj_(nSpecies_) { if (!isA<basicSpecieMixture>(thermo_)) diff --git a/src/thermophysicalModels/radiation/submodels/boundaryRadiationProperties/boundaryRadiationPropertiesPatch.C b/src/thermophysicalModels/radiation/submodels/boundaryRadiationProperties/boundaryRadiationPropertiesPatch.C index 6d9ef2a18d12ceb39e08d38e3c4881516ce4b19c..5d68a5c9c9d9c4dd043bc638a5becf93d2b2126a 100644 --- a/src/thermophysicalModels/radiation/submodels/boundaryRadiationProperties/boundaryRadiationPropertiesPatch.C +++ b/src/thermophysicalModels/radiation/submodels/boundaryRadiationProperties/boundaryRadiationPropertiesPatch.C @@ -173,41 +173,30 @@ Foam::radiation::boundaryRadiationPropertiesPatch::emissivity mpp.distribute(emissivity); - const tmp<scalarField> te(new scalarField(emissivity)); - - return te; - + return tmp<scalarField>::New(std::move(emissivity)); } break; case LOOKUP: { - tmp<scalarField> e + return tmp<scalarField>::New ( - new scalarField - ( - patch_.size(), - readScalar(dict_.lookup("emissivity")) - ) + patch_.size(), + dict_.get<scalar>("emissivity") ); - - return e; } + break; case MODEL: { const label index = patch_.index(); - tmp<scalarField> e + return tmp<scalarField>::New ( - new scalarField - ( - absorptionEmission_->e(bandI)().boundaryField()[index] - ) + absorptionEmission_->e(bandI)().boundaryField()[index] ); - - return e; } + break; default: { @@ -254,9 +243,7 @@ Foam::radiation::boundaryRadiationPropertiesPatch::absorptivity mpp.distribute(absorp); - const tmp<scalarField> ta(new scalarField(absorp)); - - return ta; + return tmp<scalarField>::New(std::move(absorp)); } break; @@ -264,29 +251,23 @@ Foam::radiation::boundaryRadiationPropertiesPatch::absorptivity case MODEL: { const label index = patch_.index(); - tmp<scalarField> a + + return tmp<scalarField>::New ( - new scalarField - ( - absorptionEmission_->a(bandI)().boundaryField()[index] - ) + absorptionEmission_->a(bandI)().boundaryField()[index] ); - return a; } + break; case LOOKUP: { - tmp<scalarField> a + return tmp<scalarField>::New ( - new scalarField - ( - patch_.size(), - readScalar(dict_.lookup("absorptivity")) - ) + patch_.size(), + dict_.get<scalar>("absorptivity") ); - - return a; } + break; default: { @@ -334,9 +315,7 @@ Foam::radiation::boundaryRadiationPropertiesPatch::transmissivity mpp.distribute(trans); - const tmp<scalarField> tt(new scalarField(trans)); - - return tt; + return tmp<scalarField>::New(std::move(trans)); } break; @@ -344,28 +323,20 @@ Foam::radiation::boundaryRadiationPropertiesPatch::transmissivity case MODEL: { const label index = patch_.index(); - tmp<scalarField> tau + + return tmp<scalarField>::New ( - new scalarField - ( - transmissivity_->tauEff(bandI)().boundaryField()[index] - ) + transmissivity_->tauEff(bandI)().boundaryField()[index] ); - return tau; } case LOOKUP: { - tmp<scalarField> tau + return tmp<scalarField>::New ( - new scalarField - ( - patch_.size(), - readScalar(dict_.lookup("transmissivity")) - ) + patch_.size(), + dict_.get<scalar>("transmissivity") ); - - return tau; } default: @@ -407,7 +378,7 @@ void Foam::radiation::boundaryRadiationPropertiesPatch::write { case MODEL: { - word modelType(dict_.lookup("absorptionEmissionModel")); + word modelType(dict_.get<word>("absorptionEmissionModel")); os.writeEntry("absorptionEmissionModel", modelType); @@ -416,7 +387,7 @@ void Foam::radiation::boundaryRadiationPropertiesPatch::write dict_.subDict(modelCoeffs).write(os); - modelType = word(dict_.lookup("transmissivityModel")); + modelType = dict_.get<word>("transmissivityModel"); os.writeEntry("transmissivityModel", modelType); diff --git a/src/thermophysicalModels/radiation/submodels/solarCalculator/solarCalculator.C b/src/thermophysicalModels/radiation/submodels/solarCalculator/solarCalculator.C index 5a3063394882fa877bb074ed06c0b90374c66577..70a8df2ad8de1864a455be91857c8f8e11369b74 100644 --- a/src/thermophysicalModels/radiation/submodels/solarCalculator/solarCalculator.C +++ b/src/thermophysicalModels/radiation/submodels/solarCalculator/solarCalculator.C @@ -82,16 +82,17 @@ void Foam::solarCalculator::calculateBetaTetha() } } - scalar LSM = 15.0*(readScalar(dict_.lookup("localStandardMeridian"))); + scalar LSM = 15.0*(dict_.get<scalar>("localStandardMeridian")); - scalar D = readScalar(dict_.lookup("startDay")) + runTime/86400.0; + scalar D = dict_.get<scalar>("startDay") + runTime/86400.0; scalar M = 6.24004 + 0.0172*D; scalar EOT = -7.659*sin(M) + 9.863*sin(2*M + 3.5932); - startTime_ = readScalar(dict_.lookup("startTime")); + dict_.readEntry("startTime", startTime_); + scalar LST = startTime_ + runTime/3600.0; - scalar LON = readScalar(dict_.lookup("longitude")); + scalar LON = dict_.get<scalar>("longitude"); scalar AST = LST + EOT/60.0 + (LON - LSM)/15; @@ -99,7 +100,7 @@ void Foam::solarCalculator::calculateBetaTetha() scalar H = degToRad(15*(AST - 12)); - scalar L = degToRad(readScalar(dict_.lookup("latitude"))); + scalar L = degToRad(dict_.get<scalar>("latitude")); scalar deltaRad = degToRad(delta); beta_ = max(asin(cos(L)*cos(deltaRad)*cos(H) + sin(L)*sin(deltaRad)), 1e-3); @@ -208,10 +209,10 @@ void Foam::solarCalculator::init() skyCloudCoverFraction_ ); - A_ = dict_.get<scalar>("A"); - B_ = dict_.get<scalar>("B"); + dict_.readEntry("A", A_); + dict_.readEntry("B", B_); - if (!dict_.readIfPresent("beta",beta_)) + if (!dict_.readIfPresent("beta", beta_)) { calculateBetaTetha(); } @@ -257,7 +258,7 @@ Foam::solarCalculator::solarCalculator skyCloudCoverFraction_(0.0), Setrn_(0.0), SunPrime_(0.0), - C_(readScalar(dict.lookup("C"))), + C_(dict.get<scalar>("C")), sunDirectionModel_ ( sunDirectionModelTypeNames_.lookup("sunDirectionModel", dict) diff --git a/src/thermophysicalModels/radiation/submodels/sootModel/mixtureFractionSoot/mixtureFractionSoot.C b/src/thermophysicalModels/radiation/submodels/sootModel/mixtureFractionSoot/mixtureFractionSoot.C index aa12edffeef9d64a8a0ad164c45cd488c2dc4481..306d40716759e5b2154e040d7a1e6cea44a8423b 100644 --- a/src/thermophysicalModels/radiation/submodels/sootModel/mixtureFractionSoot/mixtureFractionSoot.C +++ b/src/thermophysicalModels/radiation/submodels/sootModel/mixtureFractionSoot/mixtureFractionSoot.C @@ -83,8 +83,8 @@ Foam::radiation::mixtureFractionSoot<ThermoType>::mixtureFractionSoot mesh_ ), coeffsDict_(dict.subOrEmptyDict(modelType + "Coeffs")), - nuSoot_(readScalar(coeffsDict_.lookup("nuSoot"))), - Wsoot_(readScalar(coeffsDict_.lookup("Wsoot"))), + nuSoot_(coeffsDict_.get<scalar>("nuSoot")), + Wsoot_(coeffsDict_.get<scalar>("Wsoot")), sootMax_(-1), mappingFieldName_ ( diff --git a/src/thermophysicalModels/radiation/submodels/transmissivityModel/constantTransmissivity/constantTransmissivity.C b/src/thermophysicalModels/radiation/submodels/transmissivityModel/constantTransmissivity/constantTransmissivity.C index 7f056a115477e2f7de3b267b343574d78ddfd545..af505ec7dd4fea596ffe65bde81aca167a910d77 100644 --- a/src/thermophysicalModels/radiation/submodels/transmissivityModel/constantTransmissivity/constantTransmissivity.C +++ b/src/thermophysicalModels/radiation/submodels/transmissivityModel/constantTransmissivity/constantTransmissivity.C @@ -54,7 +54,7 @@ Foam::radiation::constantTransmissivity::constantTransmissivity : transmissivityModel(dict, mesh), coeffsDict_(dict.subDict(typeName + "Coeffs")), - tau_(readScalar(coeffsDict_.lookup("transmissivity"))) + tau_(coeffsDict_.get<scalar>("transmissivity")) {} diff --git a/src/thermophysicalModels/solidSpecie/reaction/reactionRate/solidArrheniusReactionRate/solidArrheniusReactionRateI.H b/src/thermophysicalModels/solidSpecie/reaction/reactionRate/solidArrheniusReactionRate/solidArrheniusReactionRateI.H index b9e8689047311aa2cfd223cc2c227abde45bca17..afa131e0df1fb1828737d75902b83d4ad9f345cb 100644 --- a/src/thermophysicalModels/solidSpecie/reaction/reactionRate/solidArrheniusReactionRate/solidArrheniusReactionRateI.H +++ b/src/thermophysicalModels/solidSpecie/reaction/reactionRate/solidArrheniusReactionRate/solidArrheniusReactionRateI.H @@ -45,9 +45,9 @@ inline Foam::solidArrheniusReactionRate::solidArrheniusReactionRate const dictionary& dict ) : - A_(readScalar(dict.lookup("A"))), - Ta_(readScalar(dict.lookup("Ta"))), - Tcrit_(readScalar(dict.lookup("Tcrit"))) + A_(dict.get<scalar>("A")), + Ta_(dict.get<scalar>("Ta")), + Tcrit_(dict.get<scalar>("Tcrit")) {} diff --git a/src/thermophysicalModels/solidSpecie/transport/const/constAnIsoSolidTransport.C b/src/thermophysicalModels/solidSpecie/transport/const/constAnIsoSolidTransport.C index 5a99f4caaabf6d676ade8d377641c9655c4801ea..b4be7bb1536dd6b6af4d92dda4ce0b50948dedfb 100644 --- a/src/thermophysicalModels/solidSpecie/transport/const/constAnIsoSolidTransport.C +++ b/src/thermophysicalModels/solidSpecie/transport/const/constAnIsoSolidTransport.C @@ -35,7 +35,7 @@ Foam::constAnIsoSolidTransport<Thermo>::constAnIsoSolidTransport ) : Thermo(dict), - kappa_(dict.subDict("transport").lookup("kappa")) + kappa_(dict.subDict("transport").get<vector>("kappa")) {} diff --git a/src/thermophysicalModels/solidSpecie/transport/const/constIsoSolidTransport.C b/src/thermophysicalModels/solidSpecie/transport/const/constIsoSolidTransport.C index 2d9135e811061c7cc93c81498eef3aaa487d3ce7..3531060f9854debbd343fe74737089d1420e8560 100644 --- a/src/thermophysicalModels/solidSpecie/transport/const/constIsoSolidTransport.C +++ b/src/thermophysicalModels/solidSpecie/transport/const/constIsoSolidTransport.C @@ -35,7 +35,7 @@ Foam::constIsoSolidTransport<Thermo>::constIsoSolidTransport ) : Thermo(dict), - kappa_(readScalar(dict.subDict("transport").lookup("kappa"))) + kappa_(dict.subDict("transport").get<scalar>("kappa")) {} diff --git a/src/thermophysicalModels/solidSpecie/transport/exponential/exponentialSolidTransport.C b/src/thermophysicalModels/solidSpecie/transport/exponential/exponentialSolidTransport.C index 02d6635d3f5a692bfadf15c71d5606b07bf78b0f..b3a361e559be102a7823a9f2ad196480bffc9e6b 100644 --- a/src/thermophysicalModels/solidSpecie/transport/exponential/exponentialSolidTransport.C +++ b/src/thermophysicalModels/solidSpecie/transport/exponential/exponentialSolidTransport.C @@ -40,9 +40,9 @@ Foam::exponentialSolidTransport<Thermo>::exponentialSolidTransport Tref_(0.0) { const dictionary& subDict = dict.subDict("transport"); - kappa0_ = readScalar(subDict.lookup("kappa0")); - n0_ = readScalar(subDict.lookup("n0")); - Tref_ = readScalar(subDict.lookup("Tref")); + subDict.readEntry("kappa0", kappa0_); + subDict.readEntry("n0", n0_); + subDict.readEntry("Tref", Tref_); } diff --git a/src/thermophysicalModels/specie/equationOfState/Boussinesq/Boussinesq.C b/src/thermophysicalModels/specie/equationOfState/Boussinesq/Boussinesq.C index 66ae9a7cf7a6ab0455486bcbe4d387ff0eb0b05a..0675f3ff8620d990831b1026bcae14d8df24c01a 100644 --- a/src/thermophysicalModels/specie/equationOfState/Boussinesq/Boussinesq.C +++ b/src/thermophysicalModels/specie/equationOfState/Boussinesq/Boussinesq.C @@ -35,9 +35,9 @@ Foam::Boussinesq<Specie>::Boussinesq ) : Specie(dict), - rho0_(readScalar(dict.subDict("equationOfState").lookup("rho0"))), - T0_(readScalar(dict.subDict("equationOfState").lookup("T0"))), - beta_(readScalar(dict.subDict("equationOfState").lookup("beta"))) + rho0_(dict.subDict("equationOfState").get<scalar>("rho0")), + T0_(dict.subDict("equationOfState").get<scalar>("T0")), + beta_(dict.subDict("equationOfState").get<scalar>("beta")) {} diff --git a/src/thermophysicalModels/specie/equationOfState/PengRobinsonGas/PengRobinsonGas.C b/src/thermophysicalModels/specie/equationOfState/PengRobinsonGas/PengRobinsonGas.C index e61f40d5f220898fbcc0a818414267043ed13ff5..5e119d1fde41e254a4dd31f4a5619f93590fa5ad 100644 --- a/src/thermophysicalModels/specie/equationOfState/PengRobinsonGas/PengRobinsonGas.C +++ b/src/thermophysicalModels/specie/equationOfState/PengRobinsonGas/PengRobinsonGas.C @@ -35,11 +35,11 @@ Foam::PengRobinsonGas<Specie>::PengRobinsonGas ) : Specie(dict), - Tc_(readScalar(dict.subDict("equationOfState").lookup("Tc"))), - Vc_(readScalar(dict.subDict("equationOfState").lookup("Vc"))), + Tc_(dict.subDict("equationOfState").get<scalar>("Tc")), + Vc_(dict.subDict("equationOfState").get<scalar>("Vc")), Zc_(1.0), - Pc_(readScalar(dict.subDict("equationOfState").lookup("Pc"))), - omega_(readScalar(dict.subDict("equationOfState").lookup("omega"))) + Pc_(dict.subDict("equationOfState").get<scalar>("Pc")), + omega_(dict.subDict("equationOfState").get<scalar>("omega")) { Zc_ = Pc_*Vc_/(RR*Tc_); } diff --git a/src/thermophysicalModels/specie/equationOfState/adiabaticPerfectFluid/adiabaticPerfectFluid.C b/src/thermophysicalModels/specie/equationOfState/adiabaticPerfectFluid/adiabaticPerfectFluid.C index 2c415b874818b77767011c3e3732cd7021a017be..0c2cce50810a59e86ce5c6e6b1478fd9fbbb82aa 100644 --- a/src/thermophysicalModels/specie/equationOfState/adiabaticPerfectFluid/adiabaticPerfectFluid.C +++ b/src/thermophysicalModels/specie/equationOfState/adiabaticPerfectFluid/adiabaticPerfectFluid.C @@ -35,10 +35,10 @@ Foam::adiabaticPerfectFluid<Specie>::adiabaticPerfectFluid ) : Specie(dict), - p0_(readScalar(dict.subDict("equationOfState").lookup("p0"))), - rho0_(readScalar(dict.subDict("equationOfState").lookup("rho0"))), - gamma_(readScalar(dict.subDict("equationOfState").lookup("gamma"))), - B_(readScalar(dict.subDict("equationOfState").lookup("B"))) + p0_(dict.subDict("equationOfState").get<scalar>("p0")), + rho0_(dict.subDict("equationOfState").get<scalar>("rho0")), + gamma_(dict.subDict("equationOfState").get<scalar>("gamma")), + B_(dict.subDict("equationOfState").get<scalar>("B")) {} diff --git a/src/thermophysicalModels/specie/equationOfState/incompressiblePerfectGas/incompressiblePerfectGas.C b/src/thermophysicalModels/specie/equationOfState/incompressiblePerfectGas/incompressiblePerfectGas.C index c2aa3c0a8fbf7f7d76dc47502e0ffcf0e7ff29b4..ffd1234235d5bfaaf23304df281351bc9f34c52e 100644 --- a/src/thermophysicalModels/specie/equationOfState/incompressiblePerfectGas/incompressiblePerfectGas.C +++ b/src/thermophysicalModels/specie/equationOfState/incompressiblePerfectGas/incompressiblePerfectGas.C @@ -35,7 +35,7 @@ Foam::incompressiblePerfectGas<Specie>::incompressiblePerfectGas ) : Specie(dict), - pRef_(readScalar(dict.subDict("equationOfState").lookup("pRef"))) + pRef_(dict.subDict("equationOfState").get<scalar>("pRef")) {} diff --git a/src/thermophysicalModels/specie/equationOfState/linear/linear.C b/src/thermophysicalModels/specie/equationOfState/linear/linear.C index 723eef4639c93b1bc32824a0c1c307479bce370c..6f4e2c00f2e7867c2cf874f12d0af0ca646e2e93 100644 --- a/src/thermophysicalModels/specie/equationOfState/linear/linear.C +++ b/src/thermophysicalModels/specie/equationOfState/linear/linear.C @@ -32,8 +32,8 @@ template<class Specie> Foam::linear<Specie>::linear(const dictionary& dict) : Specie(dict), - psi_(readScalar(dict.subDict("equationOfState").lookup("psi"))), - rho0_(readScalar(dict.subDict("equationOfState").lookup("rho0"))) + psi_(dict.subDict("equationOfState").get<scalar>("psi")), + rho0_(dict.subDict("equationOfState").get<scalar>("rho0")) {} diff --git a/src/thermophysicalModels/specie/equationOfState/perfectFluid/perfectFluid.C b/src/thermophysicalModels/specie/equationOfState/perfectFluid/perfectFluid.C index cf64fb75a845a51a7f8ccceb3950de5c82c95d8f..5e161a28a23b37edb5db74f3d554122f78d25c6a 100644 --- a/src/thermophysicalModels/specie/equationOfState/perfectFluid/perfectFluid.C +++ b/src/thermophysicalModels/specie/equationOfState/perfectFluid/perfectFluid.C @@ -32,8 +32,8 @@ template<class Specie> Foam::perfectFluid<Specie>::perfectFluid(const dictionary& dict) : Specie(dict), - R_(readScalar(dict.subDict("equationOfState").lookup("R"))), - rho0_(readScalar(dict.subDict("equationOfState").lookup("rho0"))) + R_(dict.subDict("equationOfState").get<scalar>("R")), + rho0_(dict.subDict("equationOfState").get<scalar>("rho0")) {} diff --git a/src/thermophysicalModels/specie/equationOfState/rhoConst/rhoConst.C b/src/thermophysicalModels/specie/equationOfState/rhoConst/rhoConst.C index f7ccfdb5a5025162ec0313257bb99a4a09b1c00b..9907eb46f1146ef0806d46e1b89a00cb4c3922a1 100644 --- a/src/thermophysicalModels/specie/equationOfState/rhoConst/rhoConst.C +++ b/src/thermophysicalModels/specie/equationOfState/rhoConst/rhoConst.C @@ -32,7 +32,7 @@ template<class Specie> Foam::rhoConst<Specie>::rhoConst(const dictionary& dict) : Specie(dict), - rho_(readScalar(dict.subDict("equationOfState").lookup("rho"))) + rho_(dict.subDict("equationOfState").get<scalar>("rho")) {} diff --git a/src/thermophysicalModels/specie/reaction/reactionRate/ArrheniusReactionRate/ArrheniusReactionRateI.H b/src/thermophysicalModels/specie/reaction/reactionRate/ArrheniusReactionRate/ArrheniusReactionRateI.H index 75bed82ef27039299ae3c5db202233f9352bd750..b6f73b357ae3c1921330b1db01dae5963c4ffd8d 100644 --- a/src/thermophysicalModels/specie/reaction/reactionRate/ArrheniusReactionRate/ArrheniusReactionRateI.H +++ b/src/thermophysicalModels/specie/reaction/reactionRate/ArrheniusReactionRate/ArrheniusReactionRateI.H @@ -44,9 +44,9 @@ inline Foam::ArrheniusReactionRate::ArrheniusReactionRate const dictionary& dict ) : - A_(readScalar(dict.lookup("A"))), - beta_(readScalar(dict.lookup("beta"))), - Ta_(readScalar(dict.lookup("Ta"))) + A_(dict.get<scalar>("A")), + beta_(dict.get<scalar>("beta")), + Ta_(dict.get<scalar>("Ta")) {} diff --git a/src/thermophysicalModels/specie/reaction/reactionRate/JanevReactionRate/JanevReactionRateI.H b/src/thermophysicalModels/specie/reaction/reactionRate/JanevReactionRate/JanevReactionRateI.H index cc76c2c2c5ea82754519657092eef9e1bbb69d8c..c9d10e755dc8f60feefc22a68d9bfdc8b78f7281 100644 --- a/src/thermophysicalModels/specie/reaction/reactionRate/JanevReactionRate/JanevReactionRateI.H +++ b/src/thermophysicalModels/specie/reaction/reactionRate/JanevReactionRate/JanevReactionRateI.H @@ -46,9 +46,9 @@ inline Foam::JanevReactionRate::JanevReactionRate const dictionary& dict ) : - A_(readScalar(dict.lookup("A"))), - beta_(readScalar(dict.lookup("beta"))), - Ta_(readScalar(dict.lookup("Ta"))), + A_(dict.get<scalar>("A")), + beta_(dict.get<scalar>("beta")), + Ta_(dict.get<scalar>("Ta")), b_(dict.lookup("b")) {} diff --git a/src/thermophysicalModels/specie/reaction/reactionRate/LandauTellerReactionRate/LandauTellerReactionRateI.H b/src/thermophysicalModels/specie/reaction/reactionRate/LandauTellerReactionRate/LandauTellerReactionRateI.H index 992b3d9ea429023a2eb630867bb6727081fbd1a2..19640ec90ee2c886ab3b1f887f7d6cd632ff1b84 100644 --- a/src/thermophysicalModels/specie/reaction/reactionRate/LandauTellerReactionRate/LandauTellerReactionRateI.H +++ b/src/thermophysicalModels/specie/reaction/reactionRate/LandauTellerReactionRate/LandauTellerReactionRateI.H @@ -48,11 +48,11 @@ inline Foam::LandauTellerReactionRate::LandauTellerReactionRate const dictionary& dict ) : - A_(readScalar(dict.lookup("A"))), - beta_(readScalar(dict.lookup("beta"))), - Ta_(readScalar(dict.lookup("Ta"))), - B_(readScalar(dict.lookup("B"))), - C_(readScalar(dict.lookup("C"))) + A_(dict.get<scalar>("A")), + beta_(dict.get<scalar>("beta")), + Ta_(dict.get<scalar>("Ta")), + B_(dict.get<scalar>("B")), + C_(dict.get<scalar>("C")) {} diff --git a/src/thermophysicalModels/specie/reaction/reactionRate/fallOffFunctions/SRIFallOffFunction/SRIFallOffFunctionI.H b/src/thermophysicalModels/specie/reaction/reactionRate/fallOffFunctions/SRIFallOffFunction/SRIFallOffFunctionI.H index 58975727b4e71f2595973c516edfb6dc284acbdf..15a86d0cfb82cf7e8c34e16688f859eb1b662f02 100644 --- a/src/thermophysicalModels/specie/reaction/reactionRate/fallOffFunctions/SRIFallOffFunction/SRIFallOffFunctionI.H +++ b/src/thermophysicalModels/specie/reaction/reactionRate/fallOffFunctions/SRIFallOffFunction/SRIFallOffFunctionI.H @@ -44,11 +44,11 @@ inline Foam::SRIFallOffFunction::SRIFallOffFunction inline Foam::SRIFallOffFunction::SRIFallOffFunction(const dictionary& dict) : - a_(readScalar(dict.lookup("a"))), - b_(readScalar(dict.lookup("b"))), - c_(readScalar(dict.lookup("c"))), - d_(readScalar(dict.lookup("d"))), - e_(readScalar(dict.lookup("e"))) + a_(dict.get<scalar>("a")), + b_(dict.get<scalar>("b")), + c_(dict.get<scalar>("c")), + d_(dict.get<scalar>("d")), + e_(dict.get<scalar>("e")) {} diff --git a/src/thermophysicalModels/specie/reaction/reactionRate/fallOffFunctions/TroeFallOffFunction/TroeFallOffFunctionI.H b/src/thermophysicalModels/specie/reaction/reactionRate/fallOffFunctions/TroeFallOffFunction/TroeFallOffFunctionI.H index ab654e2103e1381f6b056ace13e882e8e828b7b9..c27cd6a5232f411e5875ff2318baf5de1a16f3a9 100644 --- a/src/thermophysicalModels/specie/reaction/reactionRate/fallOffFunctions/TroeFallOffFunction/TroeFallOffFunctionI.H +++ b/src/thermophysicalModels/specie/reaction/reactionRate/fallOffFunctions/TroeFallOffFunction/TroeFallOffFunctionI.H @@ -42,10 +42,10 @@ inline Foam::TroeFallOffFunction::TroeFallOffFunction inline Foam::TroeFallOffFunction::TroeFallOffFunction(const dictionary& dict) : - alpha_(readScalar(dict.lookup("alpha"))), - Tsss_(readScalar(dict.lookup("Tsss"))), - Ts_(readScalar(dict.lookup("Ts"))), - Tss_(readScalar(dict.lookup("Tss"))) + alpha_(dict.get<scalar>("alpha")), + Tsss_(dict.get<scalar>("Tsss")), + Ts_(dict.get<scalar>("Ts")), + Tss_(dict.get<scalar>("Tss")) {} diff --git a/src/thermophysicalModels/specie/reaction/reactionRate/powerSeries/powerSeriesReactionRateI.H b/src/thermophysicalModels/specie/reaction/reactionRate/powerSeries/powerSeriesReactionRateI.H index 40dd268003271ec88e817839fa0d2385beeffe75..051322b7206f01c756b2d734b31504bb95e59630 100644 --- a/src/thermophysicalModels/specie/reaction/reactionRate/powerSeries/powerSeriesReactionRateI.H +++ b/src/thermophysicalModels/specie/reaction/reactionRate/powerSeries/powerSeriesReactionRateI.H @@ -46,9 +46,9 @@ inline Foam::powerSeriesReactionRate::powerSeriesReactionRate const dictionary& dict ) : - A_(readScalar(dict.lookup("A"))), - beta_(readScalar(dict.lookup("beta"))), - Ta_(readScalar(dict.lookup("Ta"))), + A_(dict.get<scalar>("A")), + beta_(dict.get<scalar>("beta")), + Ta_(dict.get<scalar>("Ta")), coeffs_(dict.lookup("coeffs")) {} diff --git a/src/thermophysicalModels/specie/reaction/reactionRate/thirdBodyEfficiencies/thirdBodyEfficienciesI.H b/src/thermophysicalModels/specie/reaction/reactionRate/thirdBodyEfficiencies/thirdBodyEfficienciesI.H index f2f87bccae3fafdd92ff6c5422c8367bcaa5de99..85eed6fa1bc796c00d7159237674b7845275e8e0 100644 --- a/src/thermophysicalModels/specie/reaction/reactionRate/thirdBodyEfficiencies/thirdBodyEfficienciesI.H +++ b/src/thermophysicalModels/specie/reaction/reactionRate/thirdBodyEfficiencies/thirdBodyEfficienciesI.H @@ -73,7 +73,7 @@ inline Foam::thirdBodyEfficiencies::thirdBodyEfficiencies } else { - scalar defaultEff = dict.get<scalar>("defaultEfficiency"); + const scalar defaultEff = dict.get<scalar>("defaultEfficiency"); scalarList::operator=(defaultEff); } } diff --git a/src/thermophysicalModels/specie/specie/specie.C b/src/thermophysicalModels/specie/specie/specie.C index a0e81f0a0b47b3be8cbe8b5bbe03c6035dfd70cd..58c7a52db1a407adf6e2d0b40e07a6e665c83eef 100644 --- a/src/thermophysicalModels/specie/specie/specie.C +++ b/src/thermophysicalModels/specie/specie/specie.C @@ -40,7 +40,7 @@ Foam::specie::specie(const dictionary& dict) : name_(dict.dictName()), Y_(dict.subDict("specie").lookupOrDefault("massFraction", 1.0)), - molWeight_(readScalar(dict.subDict("specie").lookup("molWeight"))) + molWeight_(dict.subDict("specie").get<scalar>("molWeight")) {} diff --git a/src/thermophysicalModels/specie/thermo/eConst/eConstThermo.C b/src/thermophysicalModels/specie/thermo/eConst/eConstThermo.C index fa283c7116acf56f88ac491655a6803f3b3c0760..d2768bfd78cc1422879c85ceeb5222d2031970a4 100644 --- a/src/thermophysicalModels/specie/thermo/eConst/eConstThermo.C +++ b/src/thermophysicalModels/specie/thermo/eConst/eConstThermo.C @@ -32,8 +32,8 @@ template<class EquationOfState> Foam::eConstThermo<EquationOfState>::eConstThermo(const dictionary& dict) : EquationOfState(dict), - Cv_(readScalar(dict.subDict("thermodynamics").lookup("Cv"))), - Hf_(readScalar(dict.subDict("thermodynamics").lookup("Hf"))) + Cv_(dict.subDict("thermodynamics").get<scalar>("Cv")), + Hf_(dict.subDict("thermodynamics").get<scalar>("Hf")) {} diff --git a/src/thermophysicalModels/specie/thermo/hConst/hConstThermo.C b/src/thermophysicalModels/specie/thermo/hConst/hConstThermo.C index 1bfc380457f4a5e9e201cb449bbf62eb4b7405f8..37f027ce8389fb38927478cad99683ece81ae25d 100644 --- a/src/thermophysicalModels/specie/thermo/hConst/hConstThermo.C +++ b/src/thermophysicalModels/specie/thermo/hConst/hConstThermo.C @@ -32,8 +32,8 @@ template<class EquationOfState> Foam::hConstThermo<EquationOfState>::hConstThermo(const dictionary& dict) : EquationOfState(dict), - Cp_(readScalar(dict.subDict("thermodynamics").lookup("Cp"))), - Hf_(readScalar(dict.subDict("thermodynamics").lookup("Hf"))) + Cp_(dict.subDict("thermodynamics").get<scalar>("Cp")), + Hf_(dict.subDict("thermodynamics").get<scalar>("Hf")) {} diff --git a/src/thermophysicalModels/specie/thermo/hPolynomial/hPolynomialThermo.C b/src/thermophysicalModels/specie/thermo/hPolynomial/hPolynomialThermo.C index 2f7817e0b8c77cbf0a9eb6617a50077473354cc3..c0d34b90759471d09693cb6e92b735d8135639dd 100644 --- a/src/thermophysicalModels/specie/thermo/hPolynomial/hPolynomialThermo.C +++ b/src/thermophysicalModels/specie/thermo/hPolynomial/hPolynomialThermo.C @@ -35,8 +35,8 @@ Foam::hPolynomialThermo<EquationOfState, PolySize>::hPolynomialThermo ) : EquationOfState(dict), - Hf_(readScalar(dict.subDict("thermodynamics").lookup("Hf"))), - Sf_(readScalar(dict.subDict("thermodynamics").lookup("Sf"))), + Hf_(dict.subDict("thermodynamics").get<scalar>("Hf")), + Sf_(dict.subDict("thermodynamics").get<scalar>("Sf")), CpCoeffs_ ( dict.subDict("thermodynamics").lookup diff --git a/src/thermophysicalModels/specie/thermo/hPower/hPowerThermo.C b/src/thermophysicalModels/specie/thermo/hPower/hPowerThermo.C index 5e742e2388c99f26ace1c016750757b826a1843b..1f5275441562dd81a9902f0cad38abbf5f2adb35 100644 --- a/src/thermophysicalModels/specie/thermo/hPower/hPowerThermo.C +++ b/src/thermophysicalModels/specie/thermo/hPower/hPowerThermo.C @@ -35,10 +35,10 @@ Foam::hPowerThermo<EquationOfState>::hPowerThermo ) : EquationOfState(dict), - c0_(readScalar(dict.subDict("thermodynamics").lookup("C0"))), - n0_(readScalar(dict.subDict("thermodynamics").lookup("n0"))), - Tref_(readScalar(dict.subDict("thermodynamics").lookup("Tref"))), - Hf_(readScalar(dict.subDict("thermodynamics").lookup("Hf"))) + c0_(dict.subDict("thermodynamics").get<scalar>("C0")), + n0_(dict.subDict("thermodynamics").get<scalar>("n0")), + Tref_(dict.subDict("thermodynamics").get<scalar>("Tref")), + Hf_(dict.subDict("thermodynamics").get<scalar>("Hf")) {} diff --git a/src/thermophysicalModels/specie/thermo/hRefConst/hRefConstThermo.C b/src/thermophysicalModels/specie/thermo/hRefConst/hRefConstThermo.C index c7a8cb42215a0e67843322dfbf5819aa926cf4cd..3dd8a7f063d091c171d24e510f5bbf46d2533bf6 100644 --- a/src/thermophysicalModels/specie/thermo/hRefConst/hRefConstThermo.C +++ b/src/thermophysicalModels/specie/thermo/hRefConst/hRefConstThermo.C @@ -32,10 +32,10 @@ template<class EquationOfState> Foam::hRefConstThermo<EquationOfState>::hRefConstThermo(const dictionary& dict) : EquationOfState(dict), - Cp_(readScalar(dict.subDict("thermodynamics").lookup("Cp"))), - Hf_(readScalar(dict.subDict("thermodynamics").lookup("Hf"))), - Tref_(readScalar(dict.subDict("thermodynamics").lookup("Tref"))), - Href_(readScalar(dict.subDict("thermodynamics").lookup("Href"))) + Cp_(dict.subDict("thermodynamics").get<scalar>("Cp")), + Hf_(dict.subDict("thermodynamics").get<scalar>("Hf")), + Tref_(dict.subDict("thermodynamics").get<scalar>("Tref")), + Href_(dict.subDict("thermodynamics").get<scalar>("Href")) {} diff --git a/src/thermophysicalModels/specie/thermo/janaf/janafThermo.C b/src/thermophysicalModels/specie/thermo/janaf/janafThermo.C index 6a4d0d4dc046b2602f55d7e1825d6f4732c38460..306ad79efad7d2e4525325ad4ebf3265deef472d 100644 --- a/src/thermophysicalModels/specie/thermo/janaf/janafThermo.C +++ b/src/thermophysicalModels/specie/thermo/janaf/janafThermo.C @@ -60,9 +60,9 @@ template<class EquationOfState> Foam::janafThermo<EquationOfState>::janafThermo(const dictionary& dict) : EquationOfState(dict), - Tlow_(readScalar(dict.subDict("thermodynamics").lookup("Tlow"))), - Thigh_(readScalar(dict.subDict("thermodynamics").lookup("Thigh"))), - Tcommon_(readScalar(dict.subDict("thermodynamics").lookup("Tcommon"))), + Tlow_(dict.subDict("thermodynamics").get<scalar>("Tlow")), + Thigh_(dict.subDict("thermodynamics").get<scalar>("Thigh")), + Tcommon_(dict.subDict("thermodynamics").get<scalar>("Tcommon")), highCpCoeffs_(dict.subDict("thermodynamics").lookup("highCpCoeffs")), lowCpCoeffs_(dict.subDict("thermodynamics").lookup("lowCpCoeffs")) { diff --git a/src/thermophysicalModels/specie/transport/const/constTransport.C b/src/thermophysicalModels/specie/transport/const/constTransport.C index 2408dfb9cc6d38f469f112eb91e7a3611922b1c4..74a6bc3b221a160651148e7eb8fa98d8c3fa9b3f 100644 --- a/src/thermophysicalModels/specie/transport/const/constTransport.C +++ b/src/thermophysicalModels/specie/transport/const/constTransport.C @@ -32,8 +32,8 @@ template<class Thermo> Foam::constTransport<Thermo>::constTransport(const dictionary& dict) : Thermo(dict), - mu_(readScalar(dict.subDict("transport").lookup("mu"))), - rPr_(1.0/readScalar(dict.subDict("transport").lookup("Pr"))) + mu_(dict.subDict("transport").get<scalar>("mu")), + rPr_(1.0/dict.subDict("transport").get<scalar>("Pr")) {} diff --git a/src/thermophysicalModels/specie/transport/sutherland/sutherlandTransport.C b/src/thermophysicalModels/specie/transport/sutherland/sutherlandTransport.C index d3576c52ee3d3b95421247e29f74433bfa701714..67a4665e739fc18557f0aeb8b26cecad1962d813 100644 --- a/src/thermophysicalModels/specie/transport/sutherland/sutherlandTransport.C +++ b/src/thermophysicalModels/specie/transport/sutherland/sutherlandTransport.C @@ -35,7 +35,7 @@ Foam::scalar Foam::sutherlandTransport<Thermo>::readCoeff const dictionary& dict ) { - return readScalar(dict.subDict("transport").lookup(coeffName)); + return dict.subDict("transport").get<scalar>(coeffName); } diff --git a/src/thermophysicalModels/thermophysicalProperties/liquidProperties/liquidProperties/liquidProperties.C b/src/thermophysicalModels/thermophysicalProperties/liquidProperties/liquidProperties/liquidProperties.C index ef91f7c3c943c47b01b2ae3c855f63da1004eb1b..568ce48c9291b255b3ee8cb1f98eaa76fa966ba4 100644 --- a/src/thermophysicalModels/thermophysicalProperties/liquidProperties/liquidProperties/liquidProperties.C +++ b/src/thermophysicalModels/thermophysicalProperties/liquidProperties/liquidProperties/liquidProperties.C @@ -69,16 +69,16 @@ Foam::liquidProperties::liquidProperties Foam::liquidProperties::liquidProperties(const dictionary& dict) : thermophysicalProperties(dict), - Tc_(readScalar(dict.lookup("Tc"))), - Pc_(readScalar(dict.lookup("Pc"))), - Vc_(readScalar(dict.lookup("Vc"))), - Zc_(readScalar(dict.lookup("Zc"))), - Tt_(readScalar(dict.lookup("Tt"))), - Pt_(readScalar(dict.lookup("Pt"))), - Tb_(readScalar(dict.lookup("Tb"))), - dipm_(readScalar(dict.lookup("dipm"))), - omega_(readScalar(dict.lookup("omega"))), - delta_(readScalar(dict.lookup("delta"))) + Tc_(dict.get<label>("Tc")), + Pc_(dict.get<label>("Pc")), + Vc_(dict.get<label>("Vc")), + Zc_(dict.get<label>("Zc")), + Tt_(dict.get<label>("Tt")), + Pt_(dict.get<label>("Pt")), + Tb_(dict.get<label>("Tb")), + dipm_(dict.get<label>("dipm")), + omega_(dict.get<label>("omega")), + delta_(dict.get<label>("delta")) {} diff --git a/src/thermophysicalModels/thermophysicalProperties/solidProperties/solidProperties/solidProperties.C b/src/thermophysicalModels/thermophysicalProperties/solidProperties/solidProperties/solidProperties.C index 1d9eb8fe65a4bae8df7b0c42d7f898673058ca70..439f913ada54f0c778b168270531e4bba2404bb6 100644 --- a/src/thermophysicalModels/thermophysicalProperties/solidProperties/solidProperties/solidProperties.C +++ b/src/thermophysicalModels/thermophysicalProperties/solidProperties/solidProperties/solidProperties.C @@ -55,16 +55,11 @@ Foam::solidProperties::solidProperties Foam::solidProperties::solidProperties(const dictionary& dict) : - rho_(readScalar(dict.lookup("rho"))), - Cp_(readScalar(dict.lookup("Cp"))), - kappa_ - ( - dict.found("K") - ? readScalar(dict.lookup("K")) - : readScalar(dict.lookup("kappa")) - ), - Hf_(readScalar(dict.lookup("Hf"))), - emissivity_(readScalar(dict.lookup("emissivity"))) + rho_(dict.get<scalar>("rho")), + Cp_(dict.get<scalar>("Cp")), + kappa_(dict.getCompat<scalar>("kappa", {{"K", 1612}})), + Hf_(dict.get<scalar>("Hf")), + emissivity_(dict.get<scalar>("emissivity")) {} @@ -74,8 +69,7 @@ void Foam::solidProperties::readIfPresent(const dictionary& dict) { dict.readIfPresent("rho", rho_); dict.readIfPresent("Cp", Cp_); - dict.readIfPresent("K", kappa_); - dict.readIfPresent("kappa", kappa_); + dict.readIfPresentCompat("kappa", {{"K", 1612}}, kappa_); dict.readIfPresent("Hf_", Hf_); dict.readIfPresent("emissivity", emissivity_); } diff --git a/src/thermophysicalModels/thermophysicalProperties/solidProperties/solidProperties/solidProperties.H b/src/thermophysicalModels/thermophysicalProperties/solidProperties/solidProperties/solidProperties.H index 7f9b957764e3927ffb9e113b0ca510ca5ed717dd..f48c65dd3e4f0e7465bb80c35c7d5008e90bc1fc 100644 --- a/src/thermophysicalModels/thermophysicalProperties/solidProperties/solidProperties/solidProperties.H +++ b/src/thermophysicalModels/thermophysicalProperties/solidProperties/solidProperties/solidProperties.H @@ -128,8 +128,7 @@ public: //- Destructor - virtual ~solidProperties() - {} + virtual ~solidProperties() = default; // Member Functions @@ -157,7 +156,7 @@ public: // I-O - //- Read and set the properties present it the given dictionary + //- Read and set the properties if present in the given dictionary void readIfPresent(const dictionary& dict); //- Write the solidProperties properties diff --git a/src/thermophysicalModels/thermophysicalProperties/thermophysicalFunctions/APIfunctions/APIdiffCoefFunc/APIdiffCoefFunc.C b/src/thermophysicalModels/thermophysicalProperties/thermophysicalFunctions/APIfunctions/APIdiffCoefFunc/APIdiffCoefFunc.C index ff23b184027960294c5f975a3ed41e96a77897ce..11f7bd02624f8ec249d77d56804616b4269dd289 100644 --- a/src/thermophysicalModels/thermophysicalProperties/thermophysicalFunctions/APIfunctions/APIdiffCoefFunc/APIdiffCoefFunc.C +++ b/src/thermophysicalModels/thermophysicalProperties/thermophysicalFunctions/APIfunctions/APIdiffCoefFunc/APIdiffCoefFunc.C @@ -60,10 +60,10 @@ Foam::APIdiffCoefFunc::APIdiffCoefFunc Foam::APIdiffCoefFunc::APIdiffCoefFunc(const dictionary& dict) : - a_(readScalar(dict.lookup("a"))), - b_(readScalar(dict.lookup("b"))), - wf_(readScalar(dict.lookup("wf"))), - wa_(readScalar(dict.lookup("wa"))), + a_(dict.get<scalar>("a")), + b_(dict.get<scalar>("b")), + wf_(dict.get<scalar>("wf")), + wa_(dict.get<scalar>("wa")), alpha_(sqrt(1/wf_ + 1/wa_)), beta_(sqr((cbrt(a_) + cbrt(b_)))) {} diff --git a/src/thermophysicalModels/thermophysicalProperties/thermophysicalFunctions/NSRDSfunctions/NSRDSfunc0/NSRDSfunc0.C b/src/thermophysicalModels/thermophysicalProperties/thermophysicalFunctions/NSRDSfunctions/NSRDSfunc0/NSRDSfunc0.C index 0fccd567f5d99c73c15d36c112da8f8b75a75da0..96c66b43ebbae44ac05d4a6eabefbb836413d9f9 100644 --- a/src/thermophysicalModels/thermophysicalProperties/thermophysicalFunctions/NSRDSfunctions/NSRDSfunc0/NSRDSfunc0.C +++ b/src/thermophysicalModels/thermophysicalProperties/thermophysicalFunctions/NSRDSfunctions/NSRDSfunc0/NSRDSfunc0.C @@ -57,12 +57,12 @@ Foam::NSRDSfunc0::NSRDSfunc0 Foam::NSRDSfunc0::NSRDSfunc0(const dictionary& dict) : - a_(readScalar(dict.lookup("a"))), - b_(readScalar(dict.lookup("b"))), - c_(readScalar(dict.lookup("c"))), - d_(readScalar(dict.lookup("d"))), - e_(readScalar(dict.lookup("e"))), - f_(readScalar(dict.lookup("f"))) + a_(dict.get<scalar>("a")), + b_(dict.get<scalar>("b")), + c_(dict.get<scalar>("c")), + d_(dict.get<scalar>("d")), + e_(dict.get<scalar>("e")), + f_(dict.get<scalar>("f")) {} diff --git a/src/thermophysicalModels/thermophysicalProperties/thermophysicalFunctions/NSRDSfunctions/NSRDSfunc1/NSRDSfunc1.C b/src/thermophysicalModels/thermophysicalProperties/thermophysicalFunctions/NSRDSfunctions/NSRDSfunc1/NSRDSfunc1.C index 60b61614b1a67cd3c672d564d82f44a7a6136e14..cd896eacb7e27b2f918b40909b96f53e7e51f462 100644 --- a/src/thermophysicalModels/thermophysicalProperties/thermophysicalFunctions/NSRDSfunctions/NSRDSfunc1/NSRDSfunc1.C +++ b/src/thermophysicalModels/thermophysicalProperties/thermophysicalFunctions/NSRDSfunctions/NSRDSfunc1/NSRDSfunc1.C @@ -55,11 +55,11 @@ Foam::NSRDSfunc1::NSRDSfunc1 Foam::NSRDSfunc1::NSRDSfunc1(const dictionary& dict) : - a_(readScalar(dict.lookup("a"))), - b_(readScalar(dict.lookup("b"))), - c_(readScalar(dict.lookup("c"))), - d_(readScalar(dict.lookup("d"))), - e_(readScalar(dict.lookup("e"))) + a_(dict.get<scalar>("a")), + b_(dict.get<scalar>("b")), + c_(dict.get<scalar>("c")), + d_(dict.get<scalar>("d")), + e_(dict.get<scalar>("e")) {} diff --git a/src/thermophysicalModels/thermophysicalProperties/thermophysicalFunctions/NSRDSfunctions/NSRDSfunc14/NSRDSfunc14.C b/src/thermophysicalModels/thermophysicalProperties/thermophysicalFunctions/NSRDSfunctions/NSRDSfunc14/NSRDSfunc14.C index b5aa0669333d960e6a923ff8fd61212ef01a003f..34c7ea2e1267d677fbcfc27758a7a7993e96bac9 100644 --- a/src/thermophysicalModels/thermophysicalProperties/thermophysicalFunctions/NSRDSfunctions/NSRDSfunc14/NSRDSfunc14.C +++ b/src/thermophysicalModels/thermophysicalProperties/thermophysicalFunctions/NSRDSfunctions/NSRDSfunc14/NSRDSfunc14.C @@ -60,11 +60,11 @@ Foam::NSRDSfunc14::NSRDSfunc14 Foam::NSRDSfunc14::NSRDSfunc14(const dictionary& dict) : - Tc_(readScalar(dict.lookup("Tc"))), - a_(readScalar(dict.lookup("a"))), - b_(readScalar(dict.lookup("b"))), - c_(readScalar(dict.lookup("c"))), - d_(readScalar(dict.lookup("d"))) + Tc_(dict.get<scalar>("Tc")), + a_(dict.get<scalar>("a")), + b_(dict.get<scalar>("b")), + c_(dict.get<scalar>("c")), + d_(dict.get<scalar>("d")) {} diff --git a/src/thermophysicalModels/thermophysicalProperties/thermophysicalFunctions/NSRDSfunctions/NSRDSfunc2/NSRDSfunc2.C b/src/thermophysicalModels/thermophysicalProperties/thermophysicalFunctions/NSRDSfunctions/NSRDSfunc2/NSRDSfunc2.C index 3365d08c5cc1e032109317d87558a5d86f8246fb..aeb67d6493776480fb7c94beac806e7ca4f6642b 100644 --- a/src/thermophysicalModels/thermophysicalProperties/thermophysicalFunctions/NSRDSfunctions/NSRDSfunc2/NSRDSfunc2.C +++ b/src/thermophysicalModels/thermophysicalProperties/thermophysicalFunctions/NSRDSfunctions/NSRDSfunc2/NSRDSfunc2.C @@ -53,10 +53,10 @@ Foam::NSRDSfunc2::NSRDSfunc2 Foam::NSRDSfunc2::NSRDSfunc2(const dictionary& dict) : - a_(readScalar(dict.lookup("a"))), - b_(readScalar(dict.lookup("b"))), - c_(readScalar(dict.lookup("c"))), - d_(readScalar(dict.lookup("d"))) + a_(dict.get<scalar>("a")), + b_(dict.get<scalar>("b")), + c_(dict.get<scalar>("c")), + d_(dict.get<scalar>("d")) {} diff --git a/src/thermophysicalModels/thermophysicalProperties/thermophysicalFunctions/NSRDSfunctions/NSRDSfunc3/NSRDSfunc3.C b/src/thermophysicalModels/thermophysicalProperties/thermophysicalFunctions/NSRDSfunctions/NSRDSfunc3/NSRDSfunc3.C index 2c25a0ae6e575628f4809583d7772007479240a5..d35a8f29156f924d50c404db77010c6cc771dedc 100644 --- a/src/thermophysicalModels/thermophysicalProperties/thermophysicalFunctions/NSRDSfunctions/NSRDSfunc3/NSRDSfunc3.C +++ b/src/thermophysicalModels/thermophysicalProperties/thermophysicalFunctions/NSRDSfunctions/NSRDSfunc3/NSRDSfunc3.C @@ -53,10 +53,10 @@ Foam::NSRDSfunc3::NSRDSfunc3 Foam::NSRDSfunc3::NSRDSfunc3(const dictionary& dict) : - a_(readScalar(dict.lookup("a"))), - b_(readScalar(dict.lookup("b"))), - c_(readScalar(dict.lookup("c"))), - d_(readScalar(dict.lookup("d"))) + a_(dict.get<scalar>("a")), + b_(dict.get<scalar>("b")), + c_(dict.get<scalar>("c")), + d_(dict.get<scalar>("d")) {} diff --git a/src/thermophysicalModels/thermophysicalProperties/thermophysicalFunctions/NSRDSfunctions/NSRDSfunc4/NSRDSfunc4.C b/src/thermophysicalModels/thermophysicalProperties/thermophysicalFunctions/NSRDSfunctions/NSRDSfunc4/NSRDSfunc4.C index 809af7aa4a807c8dd251ec243283e575044532ef..084dcf6326583ba18ebac9eb2a7655d7128bda24 100644 --- a/src/thermophysicalModels/thermophysicalProperties/thermophysicalFunctions/NSRDSfunctions/NSRDSfunc4/NSRDSfunc4.C +++ b/src/thermophysicalModels/thermophysicalProperties/thermophysicalFunctions/NSRDSfunctions/NSRDSfunc4/NSRDSfunc4.C @@ -55,11 +55,11 @@ Foam::NSRDSfunc4::NSRDSfunc4 Foam::NSRDSfunc4::NSRDSfunc4(const dictionary& dict) : - a_(readScalar(dict.lookup("a"))), - b_(readScalar(dict.lookup("b"))), - c_(readScalar(dict.lookup("c"))), - d_(readScalar(dict.lookup("d"))), - e_(readScalar(dict.lookup("e"))) + a_(dict.get<scalar>("a")), + b_(dict.get<scalar>("b")), + c_(dict.get<scalar>("c")), + d_(dict.get<scalar>("d")), + e_(dict.get<scalar>("e")) {} diff --git a/src/thermophysicalModels/thermophysicalProperties/thermophysicalFunctions/NSRDSfunctions/NSRDSfunc5/NSRDSfunc5.C b/src/thermophysicalModels/thermophysicalProperties/thermophysicalFunctions/NSRDSfunctions/NSRDSfunc5/NSRDSfunc5.C index 0c6100beb5296607cbb5c6db2bebac5a49e7c55f..b5aa1cad8c03f5b300cd2b548d592ceef4590700 100644 --- a/src/thermophysicalModels/thermophysicalProperties/thermophysicalFunctions/NSRDSfunctions/NSRDSfunc5/NSRDSfunc5.C +++ b/src/thermophysicalModels/thermophysicalProperties/thermophysicalFunctions/NSRDSfunctions/NSRDSfunc5/NSRDSfunc5.C @@ -53,10 +53,10 @@ Foam::NSRDSfunc5::NSRDSfunc5 Foam::NSRDSfunc5::NSRDSfunc5(const dictionary& dict) : - a_(readScalar(dict.lookup("a"))), - b_(readScalar(dict.lookup("b"))), - c_(readScalar(dict.lookup("c"))), - d_(readScalar(dict.lookup("d"))) + a_(dict.get<scalar>("a")), + b_(dict.get<scalar>("b")), + c_(dict.get<scalar>("c")), + d_(dict.get<scalar>("d")) {} diff --git a/src/thermophysicalModels/thermophysicalProperties/thermophysicalFunctions/NSRDSfunctions/NSRDSfunc6/NSRDSfunc6.C b/src/thermophysicalModels/thermophysicalProperties/thermophysicalFunctions/NSRDSfunctions/NSRDSfunc6/NSRDSfunc6.C index 766d9e883981c25a5d42929fe4c03df14a45c79f..c3294377fe5f71004072280dde4c79353a723191 100644 --- a/src/thermophysicalModels/thermophysicalProperties/thermophysicalFunctions/NSRDSfunctions/NSRDSfunc6/NSRDSfunc6.C +++ b/src/thermophysicalModels/thermophysicalProperties/thermophysicalFunctions/NSRDSfunctions/NSRDSfunc6/NSRDSfunc6.C @@ -57,12 +57,12 @@ Foam::NSRDSfunc6::NSRDSfunc6 Foam::NSRDSfunc6::NSRDSfunc6(const dictionary& dict) : - Tc_(readScalar(dict.lookup("Tc"))), - a_(readScalar(dict.lookup("a"))), - b_(readScalar(dict.lookup("b"))), - c_(readScalar(dict.lookup("c"))), - d_(readScalar(dict.lookup("d"))), - e_(readScalar(dict.lookup("e"))) + Tc_(dict.get<scalar>("Tc")), + a_(dict.get<scalar>("a")), + b_(dict.get<scalar>("b")), + c_(dict.get<scalar>("c")), + d_(dict.get<scalar>("d")), + e_(dict.get<scalar>("e")) {} diff --git a/src/thermophysicalModels/thermophysicalProperties/thermophysicalFunctions/NSRDSfunctions/NSRDSfunc7/NSRDSfunc7.C b/src/thermophysicalModels/thermophysicalProperties/thermophysicalFunctions/NSRDSfunctions/NSRDSfunc7/NSRDSfunc7.C index a508c91d95f4fe93fb6eeeb92589a2a00baf700d..4fd472d35116642217ceb2a0af4425ac0ae08f62 100644 --- a/src/thermophysicalModels/thermophysicalProperties/thermophysicalFunctions/NSRDSfunctions/NSRDSfunc7/NSRDSfunc7.C +++ b/src/thermophysicalModels/thermophysicalProperties/thermophysicalFunctions/NSRDSfunctions/NSRDSfunc7/NSRDSfunc7.C @@ -55,11 +55,11 @@ Foam::NSRDSfunc7::NSRDSfunc7 Foam::NSRDSfunc7::NSRDSfunc7(const dictionary& dict) : - a_(readScalar(dict.lookup("a"))), - b_(readScalar(dict.lookup("b"))), - c_(readScalar(dict.lookup("c"))), - d_(readScalar(dict.lookup("d"))), - e_(readScalar(dict.lookup("e"))) + a_(dict.get<scalar>("a")), + b_(dict.get<scalar>("b")), + c_(dict.get<scalar>("c")), + d_(dict.get<scalar>("d")), + e_(dict.get<scalar>("e")) {} diff --git a/src/thermophysicalModels/thermophysicalProperties/thermophysicalProperties/thermophysicalProperties.C b/src/thermophysicalModels/thermophysicalProperties/thermophysicalProperties/thermophysicalProperties.C index 52570ede1089bbbcfcbdd23051d3c440579f13e5..33bfb076ace494f5a717bb8ad4e98a4b31a612b1 100644 --- a/src/thermophysicalModels/thermophysicalProperties/thermophysicalProperties/thermophysicalProperties.C +++ b/src/thermophysicalModels/thermophysicalProperties/thermophysicalProperties/thermophysicalProperties.C @@ -44,7 +44,7 @@ Foam::thermophysicalProperties::thermophysicalProperties(scalar W) Foam::thermophysicalProperties::thermophysicalProperties(const dictionary& dict) : - W_(readScalar(dict.lookup("W"))) + W_(dict.get<scalar>("W")) {} diff --git a/src/thermophysicalModels/thermophysicalPropertiesFvPatchFields/liquidProperties/humidityTemperatureCoupledMixed/humidityTemperatureCoupledMixedFvPatchScalarField.C b/src/thermophysicalModels/thermophysicalPropertiesFvPatchFields/liquidProperties/humidityTemperatureCoupledMixed/humidityTemperatureCoupledMixedFvPatchScalarField.C index cab53b7688fe87424702af955d3ac676e39ca1b9..a0e5e284a69b7ed77bcd10c8151d2ff79f5c108c 100644 --- a/src/thermophysicalModels/thermophysicalPropertiesFvPatchFields/liquidProperties/humidityTemperatureCoupledMixed/humidityTemperatureCoupledMixedFvPatchScalarField.C +++ b/src/thermophysicalModels/thermophysicalPropertiesFvPatchFields/liquidProperties/humidityTemperatureCoupledMixed/humidityTemperatureCoupledMixedFvPatchScalarField.C @@ -267,9 +267,9 @@ humidityTemperatureCoupledMixedFvPatchScalarField case mtEvaporation: case mtCondensationAndEvaporation: { - Mcomp_ = readScalar(dict.lookup("carrierMolWeight")); - L_ = readScalar(dict.lookup("L")); - Tvap_ = readScalar(dict.lookup("Tvap")); + dict.readEntry("carrierMolWeight", Mcomp_); + dict.readEntry("L", L_); + dict.readEntry("Tvap", Tvap_); liquidDict_ = dict.subDict("liquid"); liquid_ = liquidProperties::New(liquidDict_.subDict(specieName_)); diff --git a/src/topoChangerFvMesh/linearValveLayersFvMesh/linearValveLayersFvMesh.C b/src/topoChangerFvMesh/linearValveLayersFvMesh/linearValveLayersFvMesh.C index 607485d9c3cb956f467ac84163e945782b2fddcd..7c733c2343ab12198a651514ca624110a5a2ce45 100644 --- a/src/topoChangerFvMesh/linearValveLayersFvMesh/linearValveLayersFvMesh.C +++ b/src/topoChangerFvMesh/linearValveLayersFvMesh/linearValveLayersFvMesh.C @@ -159,14 +159,8 @@ void Foam::linearValveLayersFvMesh::addZonesAndModifiers() 1, topoChanger_, "valveLayerZone", - readScalar - ( - motionDict_.subDict("layer").lookup("minThickness") - ), - readScalar - ( - motionDict_.subDict("layer").lookup("maxThickness") - ) + motionDict_.subDict("layer").get<scalar>("minThickness"), + motionDict_.subDict("layer").get<scalar>("maxThickness") ); diff --git a/src/topoChangerFvMesh/movingConeTopoFvMesh/movingConeTopoFvMesh.C b/src/topoChangerFvMesh/movingConeTopoFvMesh/movingConeTopoFvMesh.C index e19c60194bbfd86de70583b934dd959834834c95..fef108d67ac0265c6ea5e0065c7ebbc8c01dfdfd 100644 --- a/src/topoChangerFvMesh/movingConeTopoFvMesh/movingConeTopoFvMesh.C +++ b/src/topoChangerFvMesh/movingConeTopoFvMesh/movingConeTopoFvMesh.C @@ -209,14 +209,8 @@ void Foam::movingConeTopoFvMesh::addZonesAndModifiers() nMods, topoChanger_, "rightExtrusionFaces", - readScalar - ( - motionDict_.subDict("right").lookup("minThickness") - ), - readScalar - ( - motionDict_.subDict("right").lookup("maxThickness") - ) + motionDict_.subDict("right").get<scalar>("minThickness"), + motionDict_.subDict("right").get<scalar>("maxThickness") ); ++nMods; @@ -226,14 +220,8 @@ void Foam::movingConeTopoFvMesh::addZonesAndModifiers() nMods, topoChanger_, "leftExtrusionFaces", - readScalar - ( - motionDict_.subDict("left").lookup("minThickness") - ), - readScalar - ( - motionDict_.subDict("left").lookup("maxThickness") - ) + motionDict_.subDict("left").get<scalar>("minThickness"), + motionDict_.subDict("left").get<scalar>("maxThickness") ); ++nMods; tm.setSize(nMods); @@ -266,14 +254,14 @@ Foam::movingConeTopoFvMesh::movingConeTopoFvMesh(const IOobject& io) ).optionalSubDict(typeName + "Coeffs") ), motionVelAmplitude_(motionDict_.lookup("motionVelAmplitude")), - motionVelPeriod_(readScalar(motionDict_.lookup("motionVelPeriod"))), + motionVelPeriod_(motionDict_.get<scalar>("motionVelPeriod")), curMotionVel_ ( motionVelAmplitude_*sin(time().value()*pi/motionVelPeriod_) ), - leftEdge_(readScalar(motionDict_.lookup("leftEdge"))), - curLeft_(readScalar(motionDict_.lookup("leftObstacleEdge"))), - curRight_(readScalar(motionDict_.lookup("rightObstacleEdge"))) + leftEdge_(motionDict_.get<scalar>("leftEdge")), + curLeft_(motionDict_.get<scalar>("leftObstacleEdge")), + curRight_(motionDict_.get<scalar>("rightObstacleEdge")) { Pout<< "Initial time:" << time().value() << " Initial curMotionVel_:" << curMotionVel_ diff --git a/src/waveModels/waveGenerationModels/base/irregularWaveModel/irregularWaveModel.C b/src/waveModels/waveGenerationModels/base/irregularWaveModel/irregularWaveModel.C index dc8af033a5d5ef417068432f94db1cdea18abfe7..eba24da0e83f494a9d1f76483ddb7dfbe5f51819 100644 --- a/src/waveModels/waveGenerationModels/base/irregularWaveModel/irregularWaveModel.C +++ b/src/waveModels/waveGenerationModels/base/irregularWaveModel/irregularWaveModel.C @@ -76,7 +76,7 @@ bool Foam::waveModels::irregularWaveModel::readDict { if (waveGenerationModel::readDict(overrideDict)) { - rampTime_ = get<scalar>("rampTime"); + readEntry("rampTime", rampTime_); return true; } diff --git a/src/waveModels/waveGenerationModels/base/regularWaveModel/regularWaveModel.C b/src/waveModels/waveGenerationModels/base/regularWaveModel/regularWaveModel.C index 921736f0801f6b4313c9971f234d42275b0952e1..e99b101be4c7a0680287a34f9c426d7074a3ef0c 100644 --- a/src/waveModels/waveGenerationModels/base/regularWaveModel/regularWaveModel.C +++ b/src/waveModels/waveGenerationModels/base/regularWaveModel/regularWaveModel.C @@ -95,7 +95,8 @@ bool Foam::waveModels::regularWaveModel::readDict waveHeight_ = readWaveHeight(); waveAngle_ = readWaveAngle(); - wavePeriod_ = get<scalar>("wavePeriod"); + readEntry("wavePeriod", wavePeriod_); + if (wavePeriod_ < 0) { FatalIOErrorInFunction(*this) diff --git a/src/waveModels/waveGenerationModels/base/waveGenerationModel/waveGenerationModel.C b/src/waveModels/waveGenerationModels/base/waveGenerationModel/waveGenerationModel.C index a239903aea9be28389c7cb962203fd8a863a1456..40d492f8c5abc132d12ec1e68520fd3c29170b87 100644 --- a/src/waveModels/waveGenerationModels/base/waveGenerationModel/waveGenerationModel.C +++ b/src/waveModels/waveGenerationModels/base/waveGenerationModel/waveGenerationModel.C @@ -88,7 +88,7 @@ bool Foam::waveModels::waveGenerationModel::readDict { if (waveModel::readDict(overrideDict)) { - activeAbsorption_ = get<bool>("activeAbsorption"); + readEntry("activeAbsorption", activeAbsorption_); return true; } diff --git a/src/waveModels/waveModel/waveModel.C b/src/waveModels/waveModel/waveModel.C index 4a9f7d7135358322500a1ff94242df14bb4ce4fb..9d340922b752edf5ba3a547c7c33d74115638101 100644 --- a/src/waveModels/waveModel/waveModel.C +++ b/src/waveModels/waveModel/waveModel.C @@ -302,7 +302,7 @@ bool Foam::waveModel::readDict(const dictionary& overrideDict) readIfPresent("U", UName_); readIfPresent("alpha", alphaName_); - nPaddle_ = get<label>("nPaddle"); + readEntry("nPaddle", nPaddle_); if (nPaddle_ < 1) { FatalIOErrorInFunction(*this)