From 79048eb68f4184bf6c8e28ded941af722118789b Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Thu, 23 Apr 2020 16:17:38 +0200 Subject: [PATCH] STYLE: use writeEntry(), beginBlock(), endBlock() methods - use dictionary::get<..> instead of lookup in a few more places --- .../chemFoam/readInitialConditions.H | 12 +- ...woPhaseRadCoupledMixedFvPatchScalarField.C | 9 +- .../solvers/lagrangian/DPMFoam/createFields.H | 2 +- .../compressibleInterPhaseTransportModel.C | 5 +- .../VoFPatchTransfer/VoFPatchTransfer.C | 34 +++--- .../MultiComponentPhaseModel.C | 4 +- .../phasesSystem/phaseSystem/phaseSystem.C | 2 +- .../incompressibleThreePhaseMixture.C | 8 +- .../kineticTheoryModel/kineticTheoryModel.C | 2 +- .../kineticTheoryModel/kineticTheoryModel.H | 2 +- .../blendingMethods/noBlending/noBlending.C | 3 +- .../twoPhaseSystem/twoPhaseSystem.C | 9 +- applications/test/wordRe/Test-wordRe.C | 4 +- .../extrude/extrudeMesh/extrudeMesh.C | 8 +- .../faceSelection/faceZoneSelection.C | 3 +- .../manipulation/createPatch/createPatch.C | 4 +- .../surface/surfaceInertia/surfaceInertia.C | 17 +-- .../searchableSurfaceModifier/cut.C | 2 +- .../functionObjectList/functionObjectList.C | 2 +- .../powerLawLopesdaCosta.C | 5 +- .../zoneCombustion/zoneCombustion.C | 8 +- .../interfaceTrackingFvMesh.C | 14 +-- .../meshCut/directions/directions.C | 13 ++- .../multiDirRefinement/multiDirRefinement.C | 6 +- .../componentDisplacementMotionSolver.C | 3 +- .../solidBodyMotionFunctions/SDA/SDA.C | 3 +- .../rotatingMotion/rotatingMotion.C | 5 +- .../tabulated6DoFMotion/tabulated6DoFMotion.C | 4 +- .../perfectInterface/perfectInterface.C | 8 +- .../slidingInterface/slidingInterface.C | 17 +-- src/engine/engineValve/engineValve.C | 29 +++-- src/engine/ignition/ignition.H | 3 +- src/engine/ignition/ignitionIO.C | 5 +- src/engine/ignition/ignitionSiteIO.C | 5 +- src/finiteArea/faMesh/faMesh.C | 6 +- .../faMesh/faPatches/faPatch/faPatch.C | 4 +- .../cfdTools/general/MRF/MRFZone.C | 8 +- .../SRFFreestreamVelocityFvPatchVectorField.C | 5 +- .../field/externalCoupled/externalCoupled.H | 4 +- .../field/fieldExtents/fieldExtents.C | 4 +- .../field/interfaceHeight/interfaceHeight.C | 3 +- .../field/nearWallFields/nearWallFields.C | 4 +- .../field/wallHeatFlux/wallHeatFlux.C | 2 +- .../field/wallShearStress/wallShearStress.C | 4 +- .../coalCloudList/coalCloudList.C | 3 +- .../ParticleErosion/ParticleErosion.C | 7 +- .../triSurfaceLoader/triSurfaceLoader.H | 4 +- .../zeroATCcells/zeroATCcells/zeroATCcells.C | 27 +++-- .../objectiveForce/objectiveForce.C | 6 +- .../objectiveMoment/objectiveMoment.C | 6 +- .../objectivePartialVolume.C | 12 +- .../objectivePtLosses/objectivePtLosses.C | 21 ++-- ...allBoilingWallFunctionFvPatchScalarField.C | 109 +++++++----------- .../CHFModels/CHFModel/CHFModel.C | 4 +- .../CHFModels/Zuber/Zuber.C | 4 +- .../CHFSubCoolModel/CHFSubCoolModel.C | 4 +- .../CHFSubCoolModels/HuaXu/HuaXu.C | 4 +- .../LeidenfrostModel/LeidenfrostModel.C | 4 +- .../LeidenfrostModels/Spiegler/Spiegler.C | 4 +- .../MHFModels/Jeschar/Jeschar.C | 4 +- .../MHFModels/MHFModel/MHFModel.C | 4 +- .../TDNBModels/Schroeder/Schroeder.C | 4 +- .../TDNBModels/TDNBModel/TDNBModel.C | 4 +- .../KocamustafaogullariIshii.C | 4 +- .../filmBoilingModels/Bromley/Bromley.C | 8 +- .../filmBoilingModel/filmBoilingModel.C | 4 +- .../Lavieville/Lavieville.C | 5 +- .../partitioningModels/cosine/cosine.C | 5 +- .../partitioningModels/linear/linear.C | 5 +- .../deposition/deposition.C | 7 +- .../wallLubricationModels/Frank/Frank.C | 3 +- .../blendingMethods/noBlending/noBlending.C | 3 +- .../constantDiameter/constantDiameter.C | 3 +- .../isothermalDiameter/isothermalDiameter.C | 5 +- .../linearTsubDiameter/linearTsubDiameter.C | 11 +- .../velocityGroup/sizeGroup/sizeGroup.C | 5 +- .../powerLawUniformBinary.C | 3 +- .../breakupModels/exponential/exponential.C | 5 +- .../breakupModels/powerLaw/powerLaw.C | 3 +- .../populationBalanceModel.C | 8 +- .../kineticTheoryModel/kineticTheoryModel.C | 4 +- .../kineticTheoryModel/kineticTheoryModel.H | 2 +- .../phasePressureModel/phasePressureModel.C | 6 +- .../twoPhaseSystem/diameterModels/IATE/IATE.C | 5 +- .../transferModelList/transferModelList.C | 3 +- .../thermalBaffleFvPatchScalarField.C | 14 +-- .../manualRenumber/manualRenumber.C | 4 +- .../structuredRenumber/structuredRenumber.C | 4 +- src/rigidBodyDynamics/joints/Pa/Pa.C | 8 +- src/rigidBodyDynamics/joints/Ra/Ra.C | 8 +- .../restraints/externalForce/externalForce.C | 6 +- .../rigidBodyInertia/rigidBodyInertiaI.H | 7 +- .../rigidBodyModel/rigidBodyModel.C | 5 +- .../rigidBodyMeshMotion/rigidBodyMeshMotion.C | 2 +- .../rigidBodyMeshMotionSolver.C | 2 +- .../sixDoFRigidBodyMotion.C | 6 +- .../basicChemistryModel/basicChemistryModel.C | 5 +- .../EulerImplicit/EulerImplicit.C | 3 +- .../laminarFlameSpeed/laminarFlameSpeed.C | 3 +- .../foamChemistryReader/foamChemistryReader.C | 17 ++- .../equationOfState/rPolynomial/rPolynomial.C | 8 +- .../specie/thermo/eRefConst/eRefConstThermo.C | 23 ++-- .../specie/thermo/eRefConst/eRefConstThermo.H | 12 +- .../specie/transport/WLF/WLFTransport.C | 37 +++--- .../specie/transport/WLF/WLFTransport.H | 7 +- .../movingConeTopoFvMesh.C | 4 +- 106 files changed, 421 insertions(+), 410 deletions(-) diff --git a/applications/solvers/combustion/chemFoam/readInitialConditions.H b/applications/solvers/combustion/chemFoam/readInitialConditions.H index 5ffe9c97a9..2ca7222b4e 100644 --- a/applications/solvers/combustion/chemFoam/readInitialConditions.H +++ b/applications/solvers/combustion/chemFoam/readInitialConditions.H @@ -37,11 +37,7 @@ { forAll(Y, i) { - const word& name = Y[i].name(); - if (fractions.found(name)) - { - X0[i] = fractions.get(name); - } + fractions.readIfPresent(Y[i].name(), X0[i]); } scalar mw = 0.0; @@ -61,11 +57,7 @@ { forAll(Y, i) { - const word& name = Y[i].name(); - if (fractions.found(name)) - { - Y0[i] = fractions.get(name); - } + fractions.readIfPresent(Y[i].name(), Y0[i]); } scalar invW = 0.0; diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionTwoPhaseEulerFoam/derivedFvPatchFields/turbulentTemperatureTwoPhaseRadCoupledMixed/turbulentTemperatureTwoPhaseRadCoupledMixedFvPatchScalarField.C b/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionTwoPhaseEulerFoam/derivedFvPatchFields/turbulentTemperatureTwoPhaseRadCoupledMixed/turbulentTemperatureTwoPhaseRadCoupledMixedFvPatchScalarField.C index bb4eee1efa..3f11c2b353 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionTwoPhaseEulerFoam/derivedFvPatchFields/turbulentTemperatureTwoPhaseRadCoupledMixed/turbulentTemperatureTwoPhaseRadCoupledMixedFvPatchScalarField.C +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionTwoPhaseEulerFoam/derivedFvPatchFields/turbulentTemperatureTwoPhaseRadCoupledMixed/turbulentTemperatureTwoPhaseRadCoupledMixedFvPatchScalarField.C @@ -5,7 +5,7 @@ \\ / A nd | www.openfoam.com \\/ M anipulation | ------------------------------------------------------------------------------- - Copyright (C) 2018 OpenCFD Ltd + Copyright (C) 2018-2020 OpenCFD Ltd ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -495,11 +495,8 @@ void turbulentTemperatureTwoPhaseRadCoupledMixedFvPatchScalarField::write os.writeEntryIfDifferent("qrNbr", "none", qrNbrName_); os.writeEntryIfDifferent("qr", "none", qrName_); - os.writeKeyword("region") << regionTypeNames_[regionType_] - << token::END_STATEMENT << nl; - - os.writeKeyword("otherPhase") << otherPhaseName_ << token::END_STATEMENT - << nl; + os.writeEntry("region", regionTypeNames_[regionType_]); + os.writeEntry("otherPhase", otherPhaseName_); } diff --git a/applications/solvers/lagrangian/DPMFoam/createFields.H b/applications/solvers/lagrangian/DPMFoam/createFields.H index 7e386cf415..aa78161d58 100644 --- a/applications/solvers/lagrangian/DPMFoam/createFields.H +++ b/applications/solvers/lagrangian/DPMFoam/createFields.H @@ -11,7 +11,7 @@ word continuousPhaseName mesh, IOobject::MUST_READ ) - ).lookup("continuousPhase") + ).get("continuousPhase") ); Info<< "Reading field U\n" << endl; diff --git a/applications/solvers/multiphase/compressibleInterFoam/VoFphaseCompressibleTurbulenceModels/compressibleInterPhaseTransportModel.C b/applications/solvers/multiphase/compressibleInterFoam/VoFphaseCompressibleTurbulenceModels/compressibleInterPhaseTransportModel.C index ea529e97cf..19ccb4eef9 100644 --- a/applications/solvers/multiphase/compressibleInterFoam/VoFphaseCompressibleTurbulenceModels/compressibleInterPhaseTransportModel.C +++ b/applications/solvers/multiphase/compressibleInterFoam/VoFphaseCompressibleTurbulenceModels/compressibleInterPhaseTransportModel.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2017-2018 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -57,9 +58,9 @@ Foam::compressibleInterPhaseTransportModel::compressibleInterPhaseTransportModel ) ); - word simulationType + const word simulationType ( - turbulenceProperties.lookup("simulationType") + turbulenceProperties.get("simulationType") ); if (simulationType == "twoPhaseTransport") diff --git a/applications/solvers/multiphase/compressibleInterFoam/compressibleInterFilmFoam/VoFPatchTransfer/VoFPatchTransfer.C b/applications/solvers/multiphase/compressibleInterFoam/compressibleInterFilmFoam/VoFPatchTransfer/VoFPatchTransfer.C index 754f1c6cdb..6ac9371428 100644 --- a/applications/solvers/multiphase/compressibleInterFoam/compressibleInterFilmFoam/VoFPatchTransfer/VoFPatchTransfer.C +++ b/applications/solvers/multiphase/compressibleInterFoam/compressibleInterFilmFoam/VoFPatchTransfer/VoFPatchTransfer.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2017 OpenFOAM Foundation - Copyright (C) 2018 OpenCFD Ltd. + Copyright (C) 2018-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -72,43 +72,39 @@ VoFPatchTransfer::VoFPatchTransfer transferRateCoeff_ ( coeffDict_.lookupOrDefault("transferRateCoeff", 0.1) - ) + ), + patchIDs_(), + patchTransferredMasses_() { const polyBoundaryMesh& pbm = film.regionMesh().boundaryMesh(); - patchIDs_.setSize + + const label nPatches ( pbm.size() - film.regionMesh().globalData().processorPatches().size() ); - if (coeffDict_.found("patches")) + wordReList patchNames; + if (coeffDict_.readIfPresent("patches", patchNames)) { - const wordReList patchNames(coeffDict_.lookup("patches")); - const labelHashSet patchSet = pbm.patchSet(patchNames); + patchIDs_ = pbm.patchSet(patchNames).sortedToc(); - Info<< " applying to patches:" << nl; + Info<< " applying to " << patchIDs_.size() << " patches:" << nl; - label pidi = 0; - for (const label patchi : patchSet) + for (const label patchi : patchIDs_) { - patchIDs_[pidi++] = patchi; Info<< " " << pbm[patchi].name() << endl; } - patchIDs_.setSize(pidi); - patchTransferredMasses_.setSize(pidi, 0); } else { Info<< " applying to all patches" << endl; - forAll(patchIDs_, patchi) - { - patchIDs_[patchi] = patchi; - } - - patchTransferredMasses_.setSize(patchIDs_.size(), 0); + patchIDs_ = identity(nPatches); } - if (!patchIDs_.size()) + patchTransferredMasses_.resize(patchIDs_.size(), Zero); + + if (patchIDs_.empty()) { FatalErrorInFunction << "No patches selected" diff --git a/applications/solvers/multiphase/icoReactingMultiphaseInterFoam/phasesSystem/phaseModel/MultiComponentPhaseModel/MultiComponentPhaseModel.C b/applications/solvers/multiphase/icoReactingMultiphaseInterFoam/phasesSystem/phaseModel/MultiComponentPhaseModel/MultiComponentPhaseModel.C index d06b50380c..b35ea0eeaa 100644 --- a/applications/solvers/multiphase/icoReactingMultiphaseInterFoam/phasesSystem/phaseModel/MultiComponentPhaseModel/MultiComponentPhaseModel.C +++ b/applications/solvers/multiphase/icoReactingMultiphaseInterFoam/phasesSystem/phaseModel/MultiComponentPhaseModel/MultiComponentPhaseModel.C @@ -5,7 +5,7 @@ \\ / A nd | www.openfoam.com \\/ M anipulation | ------------------------------------------------------------------------------- - Copyright (C) 2017 OpenCFD Ltd. + Copyright (C) 2017-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -191,7 +191,7 @@ void Foam::MultiComponentPhaseModel::solveYi const dictionary& MULEScontrols = mesh.solverDict(alpha1.name()); - scalar cAlpha(readScalar(MULEScontrols.lookup("cYi"))); + scalar cAlpha(MULEScontrols.get("cYi")); PtrList phiYiCorrs(species_.size()); const surfaceScalarField& phi = this->fluid().phi(); diff --git a/applications/solvers/multiphase/icoReactingMultiphaseInterFoam/phasesSystem/phaseSystem/phaseSystem.C b/applications/solvers/multiphase/icoReactingMultiphaseInterFoam/phasesSystem/phaseSystem/phaseSystem.C index 395a4aa648..84d5af3a5c 100644 --- a/applications/solvers/multiphase/icoReactingMultiphaseInterFoam/phasesSystem/phaseSystem/phaseSystem.C +++ b/applications/solvers/multiphase/icoReactingMultiphaseInterFoam/phasesSystem/phaseSystem/phaseSystem.C @@ -220,7 +220,7 @@ Foam::phaseSystem::phaseSystem dimensionedScalar(dimViscosity*dimDensity, Zero), calculatedFvPatchScalarField::typeName ), - phaseNames_(lookup("phases")), + phaseNames_(get("phases")), phi_ ( IOobject diff --git a/applications/solvers/multiphase/interFoam/interMixingFoam/incompressibleThreePhaseMixture/incompressibleThreePhaseMixture.C b/applications/solvers/multiphase/interFoam/interMixingFoam/incompressibleThreePhaseMixture/incompressibleThreePhaseMixture.C index 197fe26211..8f49f07ad5 100644 --- a/applications/solvers/multiphase/interFoam/interMixingFoam/incompressibleThreePhaseMixture/incompressibleThreePhaseMixture.C +++ b/applications/solvers/multiphase/interFoam/interMixingFoam/incompressibleThreePhaseMixture/incompressibleThreePhaseMixture.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2016 OpenFOAM Foundation - Copyright (C) 2019 OpenCFD Ltd. + Copyright (C) 2019-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -64,9 +64,9 @@ Foam::incompressibleThreePhaseMixture::incompressibleThreePhaseMixture ) ), - phase1Name_(wordList(lookup("phases"))[0]), - phase2Name_(wordList(lookup("phases"))[1]), - phase3Name_(wordList(lookup("phases"))[2]), + phase1Name_(get("phases")[0]), + phase2Name_(get("phases")[1]), + phase3Name_(get("phases")[2]), alpha1_ ( diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/kineticTheoryModel/kineticTheoryModel.C b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/kineticTheoryModel/kineticTheoryModel.C index ec11a77878..588a310b1a 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/kineticTheoryModel/kineticTheoryModel.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/kineticTheoryModel/kineticTheoryModel.C @@ -98,7 +98,7 @@ Foam::RASModels::kineticTheoryModel::kineticTheoryModel ) ), - equilibrium_(coeffDict_.lookup("equilibrium")), + equilibrium_(coeffDict_.get("equilibrium")), e_("e", dimless, coeffDict_), alphaMax_("alphaMax", dimless, coeffDict_), alphaMinFriction_("alphaMinFriction", dimless, coeffDict_), diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/kineticTheoryModel/kineticTheoryModel.H b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/kineticTheoryModel/kineticTheoryModel.H index 3fe5101b6e..a9180f6afd 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/kineticTheoryModel/kineticTheoryModel.H +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/kineticTheoryModel/kineticTheoryModel.H @@ -109,7 +109,7 @@ class kineticTheoryModel // Kinetic Theory Model coefficients //- Use equilibrium approximation: generation == dissipation - Switch equilibrium_; + bool equilibrium_; //- Coefficient of restitution dimensionedScalar e_; diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/BlendedInterfacialModel/blendingMethods/noBlending/noBlending.C b/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/BlendedInterfacialModel/blendingMethods/noBlending/noBlending.C index ced174cba2..3f3dfe09aa 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/BlendedInterfacialModel/blendingMethods/noBlending/noBlending.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/BlendedInterfacialModel/blendingMethods/noBlending/noBlending.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2014 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -54,7 +55,7 @@ Foam::blendingMethods::noBlending::noBlending ) : blendingMethod(dict), - continuousPhase_(dict.lookup("continuousPhase")) + continuousPhase_(dict.get("continuousPhase")) {} diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/twoPhaseSystem.C b/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/twoPhaseSystem.C index 91cf04e3ac..7093ecd55c 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/twoPhaseSystem.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/twoPhaseSystem.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2013-2018 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -75,14 +76,14 @@ Foam::twoPhaseSystem::twoPhaseSystem ( *this, *this, - wordList(lookup("phases"))[0] + this->get("phases")[0] ), phase2_ ( *this, *this, - wordList(lookup("phases"))[1] + this->get("phases")[1] ), phi_ @@ -109,7 +110,7 @@ Foam::twoPhaseSystem::twoPhaseSystem IOobject::AUTO_WRITE ), mesh, - dimensionedScalar("dgdt", dimless/dimTime, 0) + dimensionedScalar("dgdt", dimless/dimTime, Zero) ) { phase2_.volScalarField::operator=(scalar(1) - phase1_); @@ -124,7 +125,7 @@ Foam::twoPhaseSystem::twoPhaseSystem blendingMethod::New ( iter().dict(), - wordList(lookup("phases")) + this->get("phases") ) ); } diff --git a/applications/test/wordRe/Test-wordRe.C b/applications/test/wordRe/Test-wordRe.C index 820576bf01..37c34a71dc 100644 --- a/applications/test/wordRe/Test-wordRe.C +++ b/applications/test/wordRe/Test-wordRe.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2016 OpenFOAM Foundation - Copyright (C) 2017-2019 OpenCFD Ltd. + Copyright (C) 2017-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -63,7 +63,7 @@ int main(int argc, char *argv[]) keyType keyre("x.*", keyType::REGEX); - wordReList wordrelist + wordRes wordrelist { {"this", wordRe::LITERAL}, {"x.*", wordRe::REGEX}, diff --git a/applications/utilities/mesh/generation/extrude/extrudeMesh/extrudeMesh.C b/applications/utilities/mesh/generation/extrude/extrudeMesh/extrudeMesh.C index 192f87536e..2082ef5b50 100644 --- a/applications/utilities/mesh/generation/extrude/extrudeMesh/extrudeMesh.C +++ b/applications/utilities/mesh/generation/extrude/extrudeMesh/extrudeMesh.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2016 OpenFOAM Foundation - Copyright (C) 2015-2019 OpenCFD Ltd. + Copyright (C) 2015-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -308,8 +308,7 @@ int main(int argc, char *argv[]) << exit(FatalError); } - fileName sourceCasePath(dict.lookup("sourceCase")); - sourceCasePath.expand(); + fileName sourceCasePath(dict.get("sourceCase").expand()); fileName sourceRootDir = sourceCasePath.path(); fileName sourceCaseDir = sourceCasePath.name(); if (Pstream::parRun()) @@ -758,8 +757,7 @@ int main(int argc, char *argv[]) else { // Read from surface - fileName surfName(dict.lookup("surface")); - surfName.expand(); + fileName surfName(dict.get("surface").expand()); Info<< "Extruding surfaceMesh read from file " << surfName << nl << endl; diff --git a/applications/utilities/mesh/manipulation/createBaffles/faceSelection/faceZoneSelection.C b/applications/utilities/mesh/manipulation/createBaffles/faceSelection/faceZoneSelection.C index e38b591582..aca1abc73d 100644 --- a/applications/utilities/mesh/manipulation/createBaffles/faceSelection/faceZoneSelection.C +++ b/applications/utilities/mesh/manipulation/createBaffles/faceSelection/faceZoneSelection.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2012-2016 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -50,7 +51,7 @@ Foam::faceSelections::faceZoneSelection::faceZoneSelection ) : faceSelection(name, mesh, dict), - zoneName_(dict_.lookup("zoneName")) + zoneName_(dict_.get("zoneName")) {} diff --git a/applications/utilities/mesh/manipulation/createPatch/createPatch.C b/applications/utilities/mesh/manipulation/createPatch/createPatch.C index b1fccfc255..ef476976b6 100644 --- a/applications/utilities/mesh/manipulation/createPatch/createPatch.C +++ b/applications/utilities/mesh/manipulation/createPatch/createPatch.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2017 OpenFOAM Foundation - Copyright (C) 2016-2018 OpenCFD Ltd. + Copyright (C) 2016-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -54,7 +54,7 @@ Description #include "IOPtrList.H" #include "polyTopoChange.H" #include "polyModifyFace.H" -#include "wordReList.H" +#include "wordRes.H" #include "processorMeshes.H" #include "IOdictionary.H" diff --git a/applications/utilities/surface/surfaceInertia/surfaceInertia.C b/applications/utilities/surface/surfaceInertia/surfaceInertia.C index 44c5e9ffad..f0cf7de59b 100644 --- a/applications/utilities/surface/surfaceInertia/surfaceInertia.C +++ b/applications/utilities/surface/surfaceInertia/surfaceInertia.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2016 OpenFOAM Foundation - Copyright (C) 2015-2018 OpenCFD Ltd. + Copyright (C) 2015-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -378,16 +378,17 @@ int main(int argc, char *argv[]) "from the body reference frame to the global " "reference frame, i.e.:" << nl << "globalVector = orientation & bodyLocalVector" - << endl; + << nl; Info<< nl << "Entries for sixDoFRigidBodyDisplacement boundary condition:" - << nl - << " mass " << m << token::END_STATEMENT << nl - << " centreOfMass " << cM << token::END_STATEMENT << nl - << " momentOfInertia " << eVal << token::END_STATEMENT << nl - << " orientation " << eVec.T() << token::END_STATEMENT - << endl; + << nl; + + Info() + .writeEntry("mass", m) + .writeEntry("centreOfMass", cM) + .writeEntry("momentOfInertia", eVal) + .writeEntry("orientation", eVec.T()); } if (calcAroundRefPt) diff --git a/applications/utilities/surface/surfacePatch/searchableSurfaceModifier/cut.C b/applications/utilities/surface/surfacePatch/searchableSurfaceModifier/cut.C index 73d630018f..247b33116a 100644 --- a/applications/utilities/surface/surfacePatch/searchableSurfaceModifier/cut.C +++ b/applications/utilities/surface/surfacePatch/searchableSurfaceModifier/cut.C @@ -275,7 +275,7 @@ Foam::searchableSurfaceModifiers::cut::cut ) : searchableSurfaceModifier(geometry, dict), - cutterNames_(dict_.lookup("cutters")) + cutterNames_(dict_.get("cutters")) {} diff --git a/src/OpenFOAM/db/functionObjects/functionObjectList/functionObjectList.C b/src/OpenFOAM/db/functionObjects/functionObjectList/functionObjectList.C index 7a5d05e43c..32795b9c4c 100644 --- a/src/OpenFOAM/db/functionObjects/functionObjectList/functionObjectList.C +++ b/src/OpenFOAM/db/functionObjects/functionObjectList/functionObjectList.C @@ -197,7 +197,7 @@ bool Foam::functionObjectList::readFunctionObject word funcName(funcNameArgs); int argLevel = 0; - wordReList args; + wordRes args; List> namedArgs; bool hasNamedArg = false; diff --git a/src/atmosphericModels/porosityModels/powerLawLopesdaCosta/powerLawLopesdaCosta.C b/src/atmosphericModels/porosityModels/powerLawLopesdaCosta/powerLawLopesdaCosta.C index b88ba430cb..630968fd98 100644 --- a/src/atmosphericModels/porosityModels/powerLawLopesdaCosta/powerLawLopesdaCosta.C +++ b/src/atmosphericModels/porosityModels/powerLawLopesdaCosta/powerLawLopesdaCosta.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2018 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -59,7 +60,7 @@ Foam::porosityModels::powerLawLopesdaCostaZone::powerLawLopesdaCostaZone dictionary coeffs(dict.optionalSubDict(modelType + "Coeffs")); // Vertical direction within porous region - vector zDir(coeffs.lookup("zDir")); + vector zDir(coeffs.get("zDir")); // Span of the search for the cells in the porous region scalar searchSpan(coeffs.get("searchSpan")); @@ -69,7 +70,7 @@ Foam::porosityModels::powerLawLopesdaCostaZone::powerLawLopesdaCostaZone // List of the ground patches defining the lower surface // of the porous region - List groundPatches(coeffs.lookup("groundPatches")); + wordRes groundPatches(coeffs.get("groundPatches")); // Functional form of the porosity surface area per unit volume as a // function of the normalized vertical position diff --git a/src/combustionModels/zoneCombustion/zoneCombustion.C b/src/combustionModels/zoneCombustion/zoneCombustion.C index b1b185bbd8..1113e46ed5 100644 --- a/src/combustionModels/zoneCombustion/zoneCombustion.C +++ b/src/combustionModels/zoneCombustion/zoneCombustion.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2016-2017 OpenFOAM Foundation - Copyright (C) 2019 OpenCFD Ltd. + Copyright (C) 2019-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -128,8 +128,10 @@ Foam::combustionModels::zoneCombustion::zoneCombustion "zoneCombustionProperties" ) ), - zoneNames_(this->coeffs().lookup("zones")) -{} + zoneNames_() +{ + this->coeffs().readEntry("zones", zoneNames_); +} // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // diff --git a/src/dynamicFaMesh/interfaceTrackingFvMesh/interfaceTrackingFvMesh.C b/src/dynamicFaMesh/interfaceTrackingFvMesh/interfaceTrackingFvMesh.C index d588bc3060..880c98ca0e 100644 --- a/src/dynamicFaMesh/interfaceTrackingFvMesh/interfaceTrackingFvMesh.C +++ b/src/dynamicFaMesh/interfaceTrackingFvMesh/interfaceTrackingFvMesh.C @@ -945,7 +945,7 @@ Foam::vector Foam::interfaceTrackingFvMesh::totalViscousForce() const // "transportProperties" // ); - // dimensionedScalar nu(properties.lookup("nu")); + // dimensionedScalar nu("nu", properties); const scalarField& S = aMesh().S(); const vectorField& n = aMesh().faceAreaNormals().internalField(); @@ -1557,16 +1557,16 @@ Foam::interfaceTrackingFvMesh::interfaceTrackingFvMesh(const IOobject& io) fsPatchIndex_(-1), fixedFreeSurfacePatches_ ( - motion().lookup("fixedFreeSurfacePatches") + motion().get("fixedFreeSurfacePatches") ), nonReflectingFreeSurfacePatches_(), pointNormalsCorrectionPatches_ ( - motion().lookup("pointNormalsCorrectionPatches") + motion().get("pointNormalsCorrectionPatches") ), normalMotionDir_ ( - motion().lookup("normalMotionDir") + motion().get("normalMotionDir") ), motionDir_(Zero), smoothing_(motion().lookupOrDefault("smoothing", false)), @@ -1619,16 +1619,16 @@ Foam::interfaceTrackingFvMesh::interfaceTrackingFvMesh fsPatchIndex_(-1), fixedFreeSurfacePatches_ ( - motion().lookup("fixedFreeSurfacePatches") + motion().get("fixedFreeSurfacePatches") ), nonReflectingFreeSurfacePatches_(), pointNormalsCorrectionPatches_ ( - motion().lookup("pointNormalsCorrectionPatches") + motion().get("pointNormalsCorrectionPatches") ), normalMotionDir_ ( - motion().lookup("normalMotionDir") + motion().get("normalMotionDir") ), motionDir_(Zero), smoothing_(motion().lookupOrDefault("smoothing", false)), diff --git a/src/dynamicMesh/meshCut/directions/directions.C b/src/dynamicMesh/meshCut/directions/directions.C index f9c4ef8661..fb566f919c 100644 --- a/src/dynamicMesh/meshCut/directions/directions.C +++ b/src/dynamicMesh/meshCut/directions/directions.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2017 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -275,11 +276,13 @@ Foam::directions::directions const twoDPointCorrector* correct2DPtr ) : - List(wordList(dict.lookup("directions")).size()) + List() { - const wordList wantedDirs(dict.lookup("directions")); + const wordList wantedDirs(dict.get("directions")); const word coordSystem(dict.get("coordinateSystem")); + List::resize(wantedDirs.size()); + bool wantNormal = false; bool wantTan1 = false; bool wantTan2 = false; @@ -311,10 +314,10 @@ Foam::directions::directions { const dictionary& globalDict = dict.subDict("globalCoeffs"); - vector tan1(globalDict.lookup("tan1")); + vector tan1(globalDict.get("tan1")); check2D(correct2DPtr, tan1); - vector tan2(globalDict.lookup("tan2")); + vector tan2(globalDict.get("tan2")); check2D(correct2DPtr, tan2); const vector normal = normalised(tan1 ^ tan2); @@ -357,7 +360,7 @@ Foam::directions::directions // Take zeroth face on patch const polyPatch& pp = mesh.boundaryMesh()[patchi]; - vector tan1(patchDict.lookup("tan1")); + vector tan1(patchDict.get("tan1")); const vector& n0 = pp.faceNormals()[0]; diff --git a/src/dynamicMesh/meshCut/meshModifiers/multiDirRefinement/multiDirRefinement.C b/src/dynamicMesh/meshCut/meshModifiers/multiDirRefinement/multiDirRefinement.C index 323b047dd9..c7efb0cff6 100644 --- a/src/dynamicMesh/meshCut/meshModifiers/multiDirRefinement/multiDirRefinement.C +++ b/src/dynamicMesh/meshCut/meshModifiers/multiDirRefinement/multiDirRefinement.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2016 OpenFOAM Foundation - Copyright (C) 2015-2019 OpenCFD Ltd. + Copyright (C) 2015-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -494,7 +494,7 @@ Foam::multiDirRefinement::multiDirRefinement const bool writeMesh(dict.get("writeMesh")); - wordList dirNames(dict.lookup("directions")); + const wordList dirNames(dict.get("directions")); if (useHex && dirNames.size() == 3) { @@ -537,7 +537,7 @@ Foam::multiDirRefinement::multiDirRefinement const bool writeMesh(dict.get("writeMesh")); - wordList dirNames(dict.lookup("directions")); + const wordList dirNames(dict.get("directions")); if (useHex && dirNames.size() == 3) { diff --git a/src/dynamicMesh/motionSolvers/componentDisplacement/componentDisplacementMotionSolver.C b/src/dynamicMesh/motionSolvers/componentDisplacement/componentDisplacementMotionSolver.C index 32c84127d1..e82844508a 100644 --- a/src/dynamicMesh/motionSolvers/componentDisplacement/componentDisplacementMotionSolver.C +++ b/src/dynamicMesh/motionSolvers/componentDisplacement/componentDisplacementMotionSolver.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2012-2017 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -76,7 +77,7 @@ Foam::componentDisplacementMotionSolver::componentDisplacementMotionSolver ) : motionSolver(mesh, dict, type), - cmptName_(coeffDict().lookup("component")), + cmptName_(coeffDict().get("component")), cmpt_(cmpt(cmptName_)), points0_ ( diff --git a/src/dynamicMesh/motionSolvers/displacement/solidBody/solidBodyMotionFunctions/SDA/SDA.C b/src/dynamicMesh/motionSolvers/displacement/solidBody/solidBodyMotionFunctions/SDA/SDA.C index db1fcb30c7..e1c0464908 100644 --- a/src/dynamicMesh/motionSolvers/displacement/solidBody/solidBodyMotionFunctions/SDA/SDA.C +++ b/src/dynamicMesh/motionSolvers/displacement/solidBody/solidBodyMotionFunctions/SDA/SDA.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2016 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -52,7 +53,7 @@ Foam::solidBodyMotionFunctions::SDA::SDA ) : solidBodyMotionFunction(SBMFCoeffs, runTime), - CofG_(SBMFCoeffs_.lookup("CofG")) + CofG_(SBMFCoeffs_.get("CofG")) { read(SBMFCoeffs); } diff --git a/src/dynamicMesh/motionSolvers/displacement/solidBody/solidBodyMotionFunctions/rotatingMotion/rotatingMotion.C b/src/dynamicMesh/motionSolvers/displacement/solidBody/solidBodyMotionFunctions/rotatingMotion/rotatingMotion.C index 6d682ffaf6..10387ff5ec 100644 --- a/src/dynamicMesh/motionSolvers/displacement/solidBody/solidBodyMotionFunctions/rotatingMotion/rotatingMotion.C +++ b/src/dynamicMesh/motionSolvers/displacement/solidBody/solidBodyMotionFunctions/rotatingMotion/rotatingMotion.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2016 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -57,8 +58,8 @@ Foam::solidBodyMotionFunctions::rotatingMotion::rotatingMotion ) : solidBodyMotionFunction(SBMFCoeffs, runTime), - origin_(SBMFCoeffs_.lookup("origin")), - axis_(SBMFCoeffs_.lookup("axis")), + origin_(SBMFCoeffs_.get("origin")), + axis_(SBMFCoeffs_.get("axis")), omega_(Function1::New("omega", SBMFCoeffs_)) {} diff --git a/src/dynamicMesh/motionSolvers/displacement/solidBody/solidBodyMotionFunctions/tabulated6DoFMotion/tabulated6DoFMotion.C b/src/dynamicMesh/motionSolvers/displacement/solidBody/solidBodyMotionFunctions/tabulated6DoFMotion/tabulated6DoFMotion.C index 0a73d8c830..7f8fa57e1a 100644 --- a/src/dynamicMesh/motionSolvers/displacement/solidBody/solidBodyMotionFunctions/tabulated6DoFMotion/tabulated6DoFMotion.C +++ b/src/dynamicMesh/motionSolvers/displacement/solidBody/solidBodyMotionFunctions/tabulated6DoFMotion/tabulated6DoFMotion.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2016 OpenFOAM Foundation - Copyright (C) 2019 OpenCFD Ltd. + Copyright (C) 2019-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -126,7 +126,7 @@ bool Foam::solidBodyMotionFunctions::tabulated6DoFMotion::read fileName newTimeDataFileName ( - fileName(SBMFCoeffs_.lookup("timeDataFileName")).expand() + SBMFCoeffs_.get("timeDataFileName").expand() ); if (newTimeDataFileName != timeDataFileName_) diff --git a/src/dynamicMesh/perfectInterface/perfectInterface.C b/src/dynamicMesh/perfectInterface/perfectInterface.C index f71de62882..bd24e60198 100644 --- a/src/dynamicMesh/perfectInterface/perfectInterface.C +++ b/src/dynamicMesh/perfectInterface/perfectInterface.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2016 OpenFOAM Foundation - Copyright (C) 2018 OpenCFD Ltd. + Copyright (C) 2018-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -110,17 +110,17 @@ Foam::perfectInterface::perfectInterface polyMeshModifier(name, index, mme, dict.get("active")), faceZoneID_ ( - dict.lookup("faceZoneName"), + dict.get("faceZoneName"), mme.mesh().faceZones() ), masterPatchID_ ( - dict.lookup("masterPatchName"), + dict.get("masterPatchName"), mme.mesh().boundaryMesh() ), slavePatchID_ ( - dict.lookup("slavePatchName"), + dict.get("slavePatchName"), mme.mesh().boundaryMesh() ) {} diff --git a/src/dynamicMesh/slidingInterface/slidingInterface.C b/src/dynamicMesh/slidingInterface/slidingInterface.C index fc4c36b441..6498192299 100644 --- a/src/dynamicMesh/slidingInterface/slidingInterface.C +++ b/src/dynamicMesh/slidingInterface/slidingInterface.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2016 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -215,37 +216,37 @@ Foam::slidingInterface::slidingInterface polyMeshModifier(name, index, mme, dict.get("active")), masterFaceZoneID_ ( - dict.lookup("masterFaceZoneName"), + dict.get("masterFaceZoneName"), mme.mesh().faceZones() ), slaveFaceZoneID_ ( - dict.lookup("slaveFaceZoneName"), + dict.get("slaveFaceZoneName"), mme.mesh().faceZones() ), cutPointZoneID_ ( - dict.lookup("cutPointZoneName"), + dict.get("cutPointZoneName"), mme.mesh().pointZones() ), cutFaceZoneID_ ( - dict.lookup("cutFaceZoneName"), + dict.get("cutFaceZoneName"), mme.mesh().faceZones() ), masterPatchID_ ( - dict.lookup("masterPatchName"), + dict.get("masterPatchName"), mme.mesh().boundaryMesh() ), slavePatchID_ ( - dict.lookup("slavePatchName"), + dict.get("slavePatchName"), mme.mesh().boundaryMesh() ), matchType_(typeOfMatchNames.get("typeOfMatch", dict)), - coupleDecouple_(dict.lookup("coupleDecouple")), - attached_(dict.lookup("attached")), + coupleDecouple_(dict.get("coupleDecouple")), + attached_(dict.get("attached")), projectionAlgo_ ( intersection::algorithmNames_.get("projection", dict) diff --git a/src/engine/engineValve/engineValve.C b/src/engine/engineValve/engineValve.C index a988451389..48849c799d 100644 --- a/src/engine/engineValve/engineValve.C +++ b/src/engine/engineValve/engineValve.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2013 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -125,30 +126,42 @@ Foam::engineValve::engineValve ( coordinateSystem::New(mesh_, dict, coordinateSystem::typeName_()) ), - bottomPatch_(dict.lookup("bottomPatch"), mesh.boundaryMesh()), - poppetPatch_(dict.lookup("poppetPatch"), mesh.boundaryMesh()), - stemPatch_(dict.lookup("stemPatch"), mesh.boundaryMesh()), + bottomPatch_ + ( + dict.get("bottomPatch"), + mesh.boundaryMesh() + ), + poppetPatch_ + ( + dict.get("poppetPatch"), + mesh.boundaryMesh() + ), + stemPatch_ + ( + dict.get("stemPatch"), + mesh.boundaryMesh() + ), curtainInPortPatch_ ( - dict.lookup("curtainInPortPatch"), + dict.get("curtainInPortPatch"), mesh.boundaryMesh() ), curtainInCylinderPatch_ ( - dict.lookup("curtainInCylinderPatch"), + dict.get("curtainInCylinderPatch"), mesh.boundaryMesh() ), detachInCylinderPatch_ ( - dict.lookup("detachInCylinderPatch"), + dict.get("detachInCylinderPatch"), mesh.boundaryMesh() ), detachInPortPatch_ ( - dict.lookup("detachInPortPatch"), + dict.get("detachInPortPatch"), mesh.boundaryMesh() ), - detachFaces_(dict.lookup("detachFaces")), + detachFaces_(dict.get("detachFaces")), liftProfile_("theta", "lift", name_, dict.lookup("liftProfile")), liftProfileStart_(min(liftProfile_.x())), liftProfileEnd_(max(liftProfile_.x())), diff --git a/src/engine/ignition/ignition.H b/src/engine/ignition/ignition.H index c0a00b1b1d..701cdf285b 100644 --- a/src/engine/ignition/ignition.H +++ b/src/engine/ignition/ignition.H @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -58,7 +59,7 @@ class ignition const fvMesh& mesh_; - Switch ignite_; + bool ignite_; PtrList ignSites_; diff --git a/src/engine/ignition/ignitionIO.C b/src/engine/ignition/ignitionIO.C index ce4fb85713..566a90d060 100644 --- a/src/engine/ignition/ignitionIO.C +++ b/src/engine/ignition/ignitionIO.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -38,7 +39,7 @@ Foam::ignition::ignition ) : mesh_(mesh), - ignite_(combustionProperties.lookup("ignite")), + ignite_(combustionProperties.get("ignite")), ignSites_ ( combustionProperties.lookup("ignitionSites"), @@ -64,7 +65,7 @@ Foam::ignition::ignition ) : mesh_(mesh), - ignite_(combustionProperties.lookup("ignite")), + ignite_(combustionProperties.get("ignite")), ignSites_ ( combustionProperties.lookup("ignitionSites"), diff --git a/src/engine/ignition/ignitionSiteIO.C b/src/engine/ignition/ignitionSiteIO.C index 11b0a182a2..13682b5c2f 100644 --- a/src/engine/ignition/ignitionSiteIO.C +++ b/src/engine/ignition/ignitionSiteIO.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2017 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -40,7 +41,7 @@ Foam::ignitionSite::ignitionSite db_(db), mesh_(mesh), ignitionSiteDict_(is), - location_(ignitionSiteDict_.lookup("location")), + location_(ignitionSiteDict_.get("location")), diameter_(ignitionSiteDict_.get("diameter")), time_ ( @@ -76,7 +77,7 @@ Foam::ignitionSite::ignitionSite db_(edb), mesh_(mesh), ignitionSiteDict_(is), - location_(ignitionSiteDict_.lookup("location")), + location_(ignitionSiteDict_.get("location")), diameter_(ignitionSiteDict_.get("diameter")), time_ ( diff --git a/src/finiteArea/faMesh/faMesh.C b/src/finiteArea/faMesh/faMesh.C index 2edb6c8892..8c8c2961f6 100644 --- a/src/finiteArea/faMesh/faMesh.C +++ b/src/finiteArea/faMesh/faMesh.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2016-2017 Wikki Ltd + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -392,7 +393,10 @@ Foam::faMesh::faMesh ) ); - const wordList polyMeshPatches(faMeshDefinition.lookup("polyMeshPatches")); + const wordList polyMeshPatches + ( + faMeshDefinition.get("polyMeshPatches") + ); const dictionary& bndDict = faMeshDefinition.subDict("boundary"); diff --git a/src/finiteArea/faMesh/faPatches/faPatch/faPatch.C b/src/finiteArea/faMesh/faPatches/faPatch/faPatch.C index ced9ed04e5..be6d21cc90 100644 --- a/src/finiteArea/faMesh/faPatches/faPatch/faPatch.C +++ b/src/finiteArea/faMesh/faPatches/faPatch/faPatch.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2016-2017 Wikki Ltd - Copyright (C) 2019 OpenCFD Ltd. + Copyright (C) 2019-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -83,7 +83,7 @@ Foam::faPatch::faPatch const faBoundaryMesh& bm ) : - labelList(dict.lookup("edgeLabels")), + labelList(dict.get("edgeLabels")), patchIdentifier(name, dict, index), ngbPolyPatchIndex_(dict.get