From 3e43edf0566313830f08f8122cb1efbf9c753fee Mon Sep 17 00:00:00 2001 From: Mark Olesen <Mark.Olesen@esi-group.com> Date: Tue, 2 Jun 2020 16:38:55 +0200 Subject: [PATCH] ENH: unify use of dictionary method names - previously introduced `getOrDefault` as a dictionary _get_ method, now complete the transition and use it everywhere instead of `lookupOrDefault`. This avoids mixed usage of the two methods that are identical in behaviour, makes for shorter names, and promotes the distinction between "lookup" access (ie, return a token stream, locate and return an entry) and "get" access (ie, the above with conversion to concrete types such as scalar, label etc). --- .../basic/potentialFoam/createControls.H | 2 +- .../overPotentialFoam/createControls.H | 2 +- .../turbulence/PDRkEpsilon/PDRkEpsilon.C | 4 +- .../XiFoam/XiDyMFoam/createControls.H | 4 +- .../XiFoam/XiDyMFoam/readControls.H | 4 +- .../fireFoam/createRegionControls.H | 4 +- .../solvers/combustion/fireFoam/phrghEqn.H | 4 +- .../combustion/reactingFoam/setRDeltaT.H | 11 ++-- .../T/smoluchowskiJumpTFvPatchScalarField.C | 11 ++-- .../BCs/U/maxwellSlipUFvPatchVectorField.C | 15 ++--- .../BCs/rho/fixedRhoFvPatchScalarField.C | 5 +- .../compressible/rhoCentralFoam/setRDeltaT.H | 2 +- .../rhoPimpleAdiabaticFoam/EEqn.H | 2 +- .../overRhoPimpleDyMFoam/createControls.H | 2 +- .../overRhoPimpleDyMFoam/readControls.H | 6 +- .../compressible/rhoPimpleFoam/setRDeltaT.H | 8 +-- .../overRhoSimpleFoam/createFields.H | 2 +- .../mhdFoam/readBPISOControls.H | 2 +- .../overBuoyantPimpleDyMFoam/readControls.H | 6 +- .../readFluidMultiRegionSIMPLEControls.H | 4 +- .../readSolidMultiRegionSIMPLEControls.H | 2 +- ...woPhaseRadCoupledMixedFvPatchScalarField.C | 8 +-- .../readFluidMultiRegionPIMPLEControls.H | 4 +- .../readFluidMultiRegionPIMPLEControls.H | 6 +- .../chtMultiRegionFoam/readPIMPLEControls.H | 2 +- .../readSolidMultiRegionPIMPLEControls.H | 2 +- .../solid/readSolidTimeControls.H | 3 +- .../overPimpleDyMFoam/createControls.H | 10 ++-- .../overPimpleDyMFoam/readControls.H | 8 +-- .../overSimpleFoam/createOversetFields.H | 4 +- .../porousSimpleFoam/setPorosityTreatment.H | 2 +- .../lagrangian/coalChemistryFoam/setRDeltaT.H | 9 +-- .../reactingParcelFoam/createRegionControls.H | 2 +- .../reactingParcelFoam/setRDeltaT.H | 9 +-- .../solvers/multiphase/VoF/setRDeltaT.H | 20 +++---- .../cavitatingDyMFoam/readControls.H | 2 +- .../VoFPatchTransfer/VoFPatchTransfer.C | 10 ++-- .../VoFSolidificationMeltingSource.C | 7 ++- .../multiphase/driftFluxFoam/alphaControls.H | 4 +- ...incompressibleTwoPhaseInteractingMixture.C | 10 ++-- .../mixtureViscosityModels/plastic/plastic.C | 3 +- .../mixtureViscosityModels/slurry/slurry.C | 3 +- .../alphaCourantNo.H | 5 +- .../laserDTRM/laserDTRM.C | 8 +-- .../massTransferModels/Lee/Lee.C | 4 +- .../interfaceCompositionModel.C | 6 +- .../interfaceHeatResistance.C | 4 +- .../kineticGasEvaporation.C | 2 +- .../MultiComponentPhaseModel.C | 2 +- .../phasesSystem/phaseSystem/phaseSystem.C | 2 +- .../overInterDyMFoam/createDyMControls.H | 12 ++-- .../interFoam/overInterDyMFoam/readControls.H | 12 ++-- .../interPhaseChangeFoam/alphaControls.H | 6 +- .../multiphaseEulerFoam/multiphaseEulerFoam.C | 3 +- .../sizeDistribution/sizeDistribution.C | 8 +-- .../reactingMultiphaseEulerFoam.C | 7 ++- .../reactingMultiphaseEulerFoam/setRDeltaT.H | 6 +- .../reactingTwoPhaseEulerFoam.C | 5 +- .../reactingTwoPhaseEulerFoam/setRDeltaT.H | 6 +- .../twoPhaseEulerFoam/twoPhaseEulerFoam.C | 5 +- .../twoPhaseSystem/phaseModel/phaseModel.C | 3 +- .../solidDisplacementFoam/createControls.H | 2 +- .../readSolidDisplacementFoamControls.H | 2 +- .../test/PatchFunction1/MappedField.C | 10 ++-- .../extrude/extrudeMesh/extrudeMesh.C | 2 +- .../extrudeToRegionMesh/extrudeToRegionMesh.C | 4 +- .../cellSizeAndAlignmentGrid.C | 3 +- .../cv2DControls/cv2DControls.C | 5 +- .../backgroundMeshDecomposition.C | 4 +- .../cellAspectRatioControl.C | 5 +- .../cellSizeAndAlignmentControl.C | 4 +- .../searchableSurfaceControl.C | 3 +- .../fieldFromFile/fieldFromFile.C | 3 +- .../surfaceCellSizeFunction.C | 4 +- .../conformalVoronoiMesh.C | 3 +- .../conformalVoronoiMeshCalcDualMesh.C | 6 +- .../conformationSurfaces.C | 9 +-- .../cvControls/cvControls.C | 11 ++-- .../autoDensity/autoDensity.C | 6 +- .../searchableBoxFeatures.C | 3 +- .../searchablePlateFeatures.C | 3 +- .../triSurfaceMeshFeatures.C | 4 +- .../foamyMesh/foamyHexMesh/foamyHexMesh.C | 2 +- .../foamyHexMeshBackgroundMesh.C | 2 +- .../foamyHexMeshSurfaceSimplify.C | 2 +- .../foamyHexMeshSurfaceSimplify_non_octree.C | 2 +- .../generation/foamyMesh/foamyQuadMesh/CV2D.C | 3 +- .../foamyQuadMesh/shortEdgeFilter2D.C | 3 +- .../generation/snappyHexMesh/snappyHexMesh.C | 18 +++--- .../createBaffles/createBaffles.C | 6 +- .../faceSelection/faceSelection.C | 4 +- .../searchableSurfaceSelection.C | 3 +- .../moveDynamicMesh/moveDynamicMesh.C | 4 +- .../manipulation/renumberMesh/renumberMesh.C | 6 +- .../lagrangian/particleTracks/createFields.H | 2 +- .../setAlphaField/setAlphaField.C | 4 +- .../preProcessing/viewFactorsGen/shootRays.H | 2 +- .../viewFactorsGen/viewFactorsGen.C | 8 +-- .../surfaceFeatureExtract.C | 20 +++---- .../surface/surfacePatch/surfacePatch.C | 2 +- etc/codeTemplates/BC/BC.C | 2 +- .../functionObject/FUNCTIONOBJECT.C | 2 +- src/ODE/ODESolvers/ODESolver/ODESolver.C | 8 +-- .../adaptiveSolver/adaptiveSolver.C | 11 ++-- .../algorithms/indexedOctree/volumeType.C | 4 +- .../algorithms/indexedOctree/volumeType.H | 4 +- src/OpenFOAM/db/Time/Time.C | 8 +-- src/OpenFOAM/db/dictionary/dictionary.H | 12 ++-- .../functionEntries/inputMode/inputMode.C | 4 +- .../functionObject/functionObject.C | 4 +- .../functionObjectList/functionObjectList.C | 2 +- .../regionFunctionObject.C | 10 ++-- .../stateFunctionObject/stateFunctionObject.C | 6 +- .../db/functionObjects/writeFile/writeFile.C | 8 +-- .../expressions/exprDriver/exprDriver.C | 14 ++--- .../GeometricField/GeometricField.C | 4 +- .../pointPatchField/pointPatchField.C | 3 +- .../global/constants/dimensionedConstants.H | 3 +- .../fileOperation/fileOperation.C | 2 +- src/OpenFOAM/global/profiling/profiling.C | 6 +- .../interpolation2DTable.C | 2 +- .../interpolationTable/interpolationTable.C | 2 +- .../tableReaders/tableReader.C | 4 +- .../uniformInterpolationTable.C | 5 +- .../lduMatrix/lduMatrix/lduMatrixSolver.C | 10 ++-- .../GAMGPreconditioner/GAMGPreconditioner.C | 4 +- .../GAMGAgglomeration/GAMGAgglomeration.C | 10 ++-- .../pairGAMGAgglomeration.C | 3 +- .../eagerGAMGProcAgglomeration.C | 3 +- .../solvers/smoothSolver/smoothSolver.C | 4 +- src/OpenFOAM/matrices/solution/solution.C | 8 +-- .../basic/coupled/coupledPolyPatch.C | 5 +- .../constraint/cyclic/cyclicPolyPatch.C | 4 +- .../processorCyclicPolyPatch.C | 2 +- src/OpenFOAM/orientedType/orientedType.C | 4 +- .../functions/Function1/Sine/Sine.C | 4 +- .../primitives/subModelBase/subModelBase.C | 4 +- .../RAS/buoyantKEpsilon/buoyantKEpsilon.C | 4 +- ...tletMachNumberPressureFvPatchScalarField.C | 16 +++--- ...ppedUniformInletHeatAdditionFvPatchField.C | 8 +-- .../temperatureCoupledBase.C | 8 +-- .../thermalBaffle1DFvPatchScalarField.C | 7 ++- ...RateAdvectiveDiffusiveFvPatchScalarField.C | 8 +-- ...eratureRadCoupledMixedFvPatchScalarField.C | 8 +-- ...ayatillekeWallFunctionFvPatchScalarField.C | 8 +-- .../alphatWallFunctionFvPatchScalarField.C | 3 +- .../RAS/LamBremhorstKE/LamBremhorstKE.C | 10 ++-- .../RAS/LienCubicKE/LienCubicKE.C | 36 ++++++------ .../RAS/LienLeschziner/LienLeschziner.C | 20 +++---- .../RAS/ShihQuadraticKE/ShihQuadraticKE.C | 22 ++++---- .../RAS/kkLOmega/kkLOmega.C | 56 +++++++++---------- .../RAS/qZeta/qZeta.C | 12 ++-- ...ayatillekeWallFunctionFvPatchScalarField.C | 6 +- .../phaseCompressible/LES/Niceno/NicenoKEqn.C | 8 +-- .../LES/SmagorinskyZhang/SmagorinskyZhang.C | 4 +- .../LES/continuousGasKEqn/continuousGasKEqn.C | 4 +- .../RAS/LaheyKEpsilon/LaheyKEpsilon.C | 10 ++-- .../continuousGasKEpsilon.C | 4 +- .../RAS/kOmegaSSTSato/kOmegaSSTSato.C | 4 +- .../RAS/mixtureKEpsilon/mixtureKEpsilon.C | 15 ++--- .../Base/kOmegaSST/kOmegaSSTBase.C | 32 +++++------ .../SpalartAllmarasDDES/SpalartAllmarasDDES.C | 6 +- .../SpalartAllmarasDES/SpalartAllmarasDES.C | 30 +++++----- .../SpalartAllmarasIDDES.C | 10 ++-- .../DES/kOmegaSSTDDES/kOmegaSSTDDES.C | 6 +- .../DES/kOmegaSSTDES/kOmegaSSTDES.C | 8 +-- .../DES/kOmegaSSTIDDES/kOmegaSSTIDDES.C | 10 ++-- .../DeardorffDiffStress/DeardorffDiffStress.C | 8 +-- .../turbulenceModels/LES/LESModel/LESModel.C | 10 ++-- .../LES/LESdeltas/IDDESDelta/IDDESDelta.C | 4 +- .../LES/LESdeltas/PrandtlDelta/PrandtlDelta.C | 5 +- .../cubeRootVolDelta/cubeRootVolDelta.C | 4 +- .../LES/LESdeltas/maxDeltaxyz/maxDeltaxyz.C | 4 +- .../LESdeltas/vanDriestDelta/vanDriestDelta.C | 9 +-- .../LES/LESeddyViscosity/LESeddyViscosity.C | 2 +- .../LES/Smagorinsky/Smagorinsky.C | 2 +- .../turbulenceModels/LES/WALE/WALE.C | 4 +- .../LES/dynamicLagrangian/dynamicLagrangian.C | 4 +- .../turbulenceModels/LES/kEqn/kEqn.C | 2 +- .../turbulenceModels/RAS/LRR/LRR.C | 24 ++++---- .../RAS/LaunderSharmaKE/LaunderSharmaKE.C | 14 ++--- .../turbulenceModels/RAS/RASModel/RASModel.C | 10 ++-- .../RAS/RNGkEpsilon/RNGkEpsilon.C | 18 +++--- .../turbulenceModels/RAS/SSG/SSG.C | 26 ++++----- .../RAS/SpalartAllmaras/SpalartAllmaras.C | 16 +++--- ...thDissipationRateInletFvPatchScalarField.C | 7 ++- ...ngLengthFrequencyInletFvPatchScalarField.C | 7 ++- .../turbulenceModels/RAS/kEpsilon/kEpsilon.C | 14 ++--- .../turbulenceModels/RAS/kOmega/kOmega.C | 12 ++-- .../RAS/kOmegaSSTLM/kOmegaSSTLM.C | 18 +++--- .../RAS/kOmegaSSTSAS/kOmegaSSTSAS.C | 12 ++-- .../RAS/realizableKE/realizableKE.C | 10 ++-- .../ReynoldsStress/ReynoldsStress.C | 3 +- .../fixedShearStressFvPatchVectorField.C | 3 +- .../porousBafflePressureFvPatchField.C | 7 ++- ...utUBlendedWallFunctionFvPatchScalarField.C | 4 +- .../nutURoughWallFunctionFvPatchScalarField.C | 6 +- ...tUSpaldingWallFunctionFvPatchScalarField.C | 6 +- .../omegaWallFunctionFvPatchScalarField.C | 2 +- .../laminar/laminarModel/laminarModel.C | 2 +- .../atmBoundaryLayer/atmBoundaryLayer.C | 6 +- ...ndaryLayerInletEpsilonFvPatchScalarField.C | 3 +- ...atmBoundaryLayerInletKFvPatchScalarField.C | 3 +- ...daryLayerInletVelocityFvPatchVectorField.C | 3 +- .../kEpsilonLopesdaCosta.C | 12 ++-- .../powerLawLopesdaCosta.C | 2 +- src/combustionModels/EDC/EDC.C | 30 +++++----- .../combustionModel/combustionModel.C | 3 +- src/combustionModels/diffusion/diffusion.C | 4 +- src/combustionModels/laminar/laminar.C | 6 +- src/conversion/ccm/reader/ccmReaderAux.C | 4 +- src/conversion/common/tables/boundaryRegion.C | 10 ++-- src/conversion/common/tables/cellTable.C | 14 ++--- .../freeSurfaceVelocityFvPatchVectorField.C | 3 +- .../interfaceTrackingFvMesh.C | 13 +++-- .../dynamicRefineFvMesh/dynamicRefineFvMesh.C | 2 +- src/dynamicFvMesh/include/createDyMControls.H | 6 +- src/dynamicFvMesh/include/readDyMControls.H | 6 +- .../layerAdditionRemoval.C | 2 +- .../motionSmoother/motionSmootherAlgoCheck.C | 3 +- .../displacement/displacement/zoneMotion.C | 5 +- .../drivenLinearMotion/drivenLinearMotion.C | 4 +- .../solidBody/solidBodyMotionSolver.C | 5 +- .../polyMeshFilter/polyMeshFilterSettings.C | 27 +++------ .../polyTopoChange/edgeCollapser.C | 8 +-- .../slidingInterface/slidingInterface.C | 16 +++--- .../inletOutlet/inletOutletFaPatchField.C | 3 +- .../faPatchFields/faPatchField/faPatchField.C | 3 +- .../cfdTools/general/MRF/MRFZone.C | 6 +- .../SRFFreestreamVelocityFvPatchVectorField.C | 4 +- .../general/coupling/externalFileCoupler.C | 12 ++-- .../cfdTools/general/fvOptions/fvOption.C | 4 +- .../cfdTools/general/include/alphaControls.H | 8 +-- .../general/include/createTimeControls.H | 7 ++- .../general/include/readTimeControls.H | 7 ++- .../DarcyForchheimer/DarcyForchheimer.C | 8 +-- .../general/porosityModel/powerLaw/powerLaw.C | 3 +- .../solidification/solidification.C | 7 ++- .../solutionControl/loopControl/loopControl.C | 6 +- .../pimpleControl/pimpleControl.C | 12 ++-- .../solutionControl/solutionControl.C | 11 ++-- .../expressions/base/fvExprDriver.C | 8 +-- .../fields/base/patchExprFieldBase.C | 2 +- .../activeBaffleVelocityFvPatchVectorField.C | 3 +- ...ureForceBaffleVelocityFvPatchVectorField.C | 4 +- .../derived/advective/advectiveFvPatchField.C | 5 +- .../derived/fan/fanFvPatchField.C | 10 ++-- .../derived/fan/fanFvPatchFields.C | 10 ++-- .../fanPressureFvPatchScalarField.C | 4 +- .../fixedFluxPressureFvPatchScalarField.C | 4 +- .../derived/fixedMean/fixedMeanFvPatchField.C | 4 +- .../fixedMeanOutletInletFvPatchField.C | 3 +- ...malInletOutletVelocityFvPatchVectorField.C | 6 +- .../fixedNormalSlipFvPatchField.C | 4 +- ...ureCompressibleDensityFvPatchScalarField.C | 4 +- .../flowRateInletVelocityFvPatchVectorField.C | 8 +-- ...flowRateOutletVelocityFvPatchVectorField.C | 5 +- .../fluxCorrectedVelocityFvPatchVectorField.C | 8 +-- .../freestream/freestreamFvPatchField.C | 6 +- .../freestreamPressureFvPatchScalarField.C | 3 +- .../inletOutlet/inletOutletFvPatchField.C | 6 +- ...OutletTotalTemperatureFvPatchScalarField.C | 10 ++-- ...erstitialInletVelocityFvPatchVectorField.C | 3 +- .../derived/mappedField/Sampled/Sampled.C | 4 +- .../mappedField/mappedPatchFieldBase.C | 6 +- .../mappedFlowRateFvPatchVectorField.C | 7 ++- ...mappedVelocityFluxFixedValueFvPatchField.C | 3 +- ...FlowRateOutletVelocityFvPatchVectorField.C | 5 +- .../derived/noSlip/noSlipFvPatchVectorField.C | 4 +- .../outletInlet/outletInletFvPatchField.C | 6 +- .../outletMappedUniformInletFvPatchField.C | 3 +- ...utletPhaseMeanVelocityFvPatchVectorField.C | 4 +- .../partialSlip/partialSlipFvPatchField.C | 4 +- ...aseHydrostaticPressureFvPatchScalarField.C | 6 +- .../plenumPressureFvPatchScalarField.C | 7 ++- ...tedInletOutletVelocityFvPatchVectorField.C | 8 +-- ...eDirectedInletVelocityFvPatchVectorField.C | 5 +- ...tOutletParSlipVelocityFvPatchVectorField.C | 8 +-- ...ureInletOutletVelocityFvPatchVectorField.C | 6 +- .../pressureInletVelocityFvPatchVectorField.C | 5 +- ...malInletOutletVelocityFvPatchVectorField.C | 8 +-- ...IDControlInletVelocityFvPatchVectorField.C | 14 ++--- .../prghPressureFvPatchScalarField.C | 4 +- ...talHydrostaticPressureFvPatchScalarField.C | 9 +-- .../prghTotalPressureFvPatchScalarField.C | 8 +-- ...ureInletOutletVelocityFvPatchVectorField.C | 4 +- .../supersonicFreestreamFvPatchVectorField.C | 10 ++-- .../swirlFanVelocityFvPatchField.C | 20 +++---- ...lFlowRateInletVelocityFvPatchVectorField.C | 10 ++-- .../syringePressureFvPatchScalarField.C | 3 +- .../totalPressureFvPatchScalarField.C | 9 +-- .../totalTemperatureFvPatchScalarField.C | 7 ++- .../turbulentDFSEMInletFvPatchVectorField.C | 10 ++-- ...sityKineticEnergyInletFvPatchScalarField.C | 8 +-- .../uniformFixedGradientFvPatchField.C | 4 +- .../uniformInletOutletFvPatchField.C | 6 +- .../uniformTotalPressureFvPatchScalarField.C | 9 +-- .../variableHeightFlowRateFvPatchField.C | 6 +- .../waveSurfacePressureFvPatchScalarField.C | 8 +-- .../waveTransmissiveFvPatchField.C | 3 +- .../fvPatchFields/fvPatchField/fvPatchField.C | 4 +- .../functionObjects/volRegion/volRegion.C | 4 +- .../fvMatrices/fvMatrix/fvMatrix.C | 4 +- .../fvMatrices/fvMatrix/fvMatrixSolve.C | 4 +- .../solvers/MULES/CMULESTemplates.C | 8 +-- .../fvMatrices/solvers/MULES/MULESTemplates.C | 9 +-- .../isoAdvection/isoAdvection/isoAdvection.C | 20 +++---- .../advectionDiffusionPatchDistMethod.C | 8 +-- .../meshWave/meshWavePatchDistMethod.C | 3 +- .../fvMesh/wallDist/wallDist/wallDist.C | 10 ++-- .../field/CourantNo/CourantNo.C | 3 +- src/functionObjects/field/PecletNo/PecletNo.C | 4 +- .../field/blendingFactor/blendingFactor.C | 4 +- src/functionObjects/field/ddt2/ddt2.C | 6 +- .../field/derivedFields/derivedFields.C | 4 +- .../field/externalCoupled/externalCoupled.C | 4 +- ...oupledTemperatureMixedFvPatchScalarField.C | 4 +- .../fieldAverageItem/fieldAverageItemIO.C | 6 +- .../field/fieldMinMax/fieldMinMax.C | 6 +- .../field/fieldValues/fieldValue/fieldValue.C | 4 +- .../surfaceFieldValue/surfaceFieldValue.C | 2 +- src/functionObjects/field/flux/flux.C | 4 +- .../field/fluxSummary/fluxSummary.C | 6 +- .../field/histogram/histogram.C | 6 +- src/functionObjects/field/momentum/momentum.C | 18 +++--- src/functionObjects/field/pressure/pressure.C | 8 +-- .../field/reference/reference.C | 4 +- .../regionSizeDistribution.C | 2 +- .../stabilityBlendingFactor.C | 52 ++++++++--------- .../field/streamLine/streamLineBase.C | 8 +-- .../field/surfaceDistance/surfaceDistance.C | 4 +- .../field/zeroGradient/zeroGradient.C | 4 +- src/functionObjects/forces/forces/forces.C | 4 +- .../hydrostaticPressure/hydrostaticPressure.C | 4 +- .../lagrangian/dataCloud/dataCloud.C | 8 +-- .../icoUncoupledKinematicCloud.C | 6 +- .../lagrangian/vtkCloud/vtkCloud.C | 10 ++-- .../solvers/energyTransport/energyTransport.C | 10 ++-- .../solvers/scalarTransport/scalarTransport.C | 22 ++++---- src/functionObjects/utilities/abort/abort.C | 4 +- .../utilities/areaWrite/areaWrite.C | 4 +- .../utilities/ensightWrite/ensightWrite.C | 14 ++--- .../averageCondition/averageCondition.C | 8 +-- .../equationInitialResidualCondition.C | 4 +- .../equationMaxIterCondition.C | 4 +- .../maxDurationCondition.C | 4 +- .../runTimeCondition/runTimeCondition.C | 8 +-- .../utilities/runTimeControl/runTimeControl.C | 4 +- .../setTimeStep/setTimeStepFunctionObject.C | 4 +- .../utilities/solverInfo/solverInfo.C | 4 +- .../utilities/systemCall/systemCall.C | 4 +- .../thermoCoupleProbes/thermoCoupleProbes.C | 4 +- .../utilities/timeInfo/timeInfo.C | 4 +- .../utilities/vtkWrite/vtkWrite.C | 16 +++--- .../utilities/vtkWrite/vtkWriteUpdate.C | 4 +- .../utilities/writeObjects/writeObjects.C | 6 +- .../pairPatchAgglomeration.C | 6 +- ...lacementComponentLaplacianFvMotionSolver.C | 4 +- .../surfaceAlignedSBRStressFvMotionSolver.C | 12 ++-- .../velocityLaplacianFvMotionSolver.C | 4 +- ...surfaceDisplacementPointPatchVectorField.C | 5 +- ...aceSlipDisplacementPointPatchVectorField.C | 5 +- ...meVaryingMappedFixedValuePointPatchField.C | 7 ++- .../waveDisplacementPointPatchVectorField.C | 3 +- .../fixedTemperatureConstraint.C | 3 +- .../limitTemperature/limitTemperature.C | 2 +- .../corrections/limitVelocity/limitVelocity.C | 4 +- .../interRegionOption/interRegionOption.C | 8 +-- .../acousticDampingSource.C | 4 +- .../derived/buoyancyEnergy/buoyancyEnergy.C | 4 +- ...irectionalPressureGradientExplicitSource.C | 6 +- .../effectivenessHeatExchangerSource.C | 8 +-- .../explicitPorositySource.C | 3 +- .../meanVelocityForce/meanVelocityForce.C | 4 +- .../multiphaseStabilizedTurbulence.C | 10 ++-- .../profileModel/profileModel.C | 4 +- .../trimModel/targetCoeff/targetCoeffTrim.C | 3 +- .../solidificationMeltingSource.C | 16 +++--- .../tabulatedAccelerationSource.C | 3 +- .../viscousDissipation/viscousDissipation.C | 8 +-- .../interRegionExplicitPorositySource.C | 5 +- .../interRegionHeatTransferModel.C | 5 +- .../tabulatedHeatTransfer.C | 5 +- .../tabulatedNTUHeatTransfer.C | 10 ++-- .../variableHeatTransfer.C | 3 +- src/lagrangian/basic/Cloud/CloudIO.C | 2 +- .../COxidationIntrinsicRate.C | 4 +- .../Templates/KinematicCloud/KinematicCloud.C | 4 +- .../cloudSolution/cloudSolution.C | 3 +- .../ParticleCollector/ParticleCollector.C | 4 +- .../ParticleErosion/ParticleErosion.C | 4 +- .../ParticleTrap/ParticleTrap.C | 3 +- .../PatchCollisionDensity.C | 3 +- .../HeterogeneousReactingModel.C | 4 +- .../PairCollision/PairCollision.C | 6 +- .../PairModel/PairModel/PairModel.C | 4 +- .../InflationInjection/InflationInjection.C | 4 +- .../InjectedParticleDistributionInjection.C | 6 +- .../InjectedParticleInjection.C | 4 +- .../InjectionModel/InjectionModel.C | 6 +- .../ManualInjection/ManualInjection.C | 4 +- .../PatchFlowRateInjection.C | 6 +- .../ParticleForces/Lift/LiftForce/LiftForce.C | 3 +- .../NonInertialFrame/NonInertialFrameForce.C | 9 +-- .../Paramagnetic/ParamagneticForce.C | 3 +- .../PressureGradient/PressureGradientForce.C | 3 +- .../LocalInteraction/LocalInteraction.C | 6 +- .../LocalInteraction/patchInteractionData.C | 5 +- .../PatchInteractionModel.C | 4 +- .../StandardWallInteraction.C | 8 +-- .../SurfaceFilmModel/SurfaceFilmModel.C | 3 +- .../SuppressionCollision.C | 4 +- .../ThermoSurfaceFilm/ThermoSurfaceFilm.C | 6 +- .../BreakupModel/BreakupModel/BreakupModel.C | 5 +- .../movement/lumpedPointMovement.C | 12 ++-- .../state/lumpedPointState.C | 4 +- .../extrudeModel/extrudeModel/extrudeModel.C | 5 +- .../extrudeModel/linearNormal/linearNormal.C | 4 +- .../extrudeModel/linearRadial/linearRadial.C | 3 +- .../offsetSurface/offsetSurface.C | 4 +- .../medialAxisMeshMover.C | 18 +++--- .../meshRefinementProblemCells.C | 4 +- .../refinementSurfaces/refinementSurfaces.C | 10 ++-- .../shellSurfaces/shellSurfaces.C | 8 +-- .../layerParameters/layerParameters.C | 6 +- .../refinementParameters.C | 18 +++--- .../snapParameters/snapParameters.C | 31 +++++----- .../cyclicAMIPolyPatch/cyclicAMIPolyPatch.C | 14 ++--- .../cyclicPeriodicAMIPolyPatch.C | 6 +- .../PatchFunction1/MappedFile/MappedFile.C | 16 +++--- .../rotation/EulerCoordinateRotation.C | 6 +- .../rotation/STARCDCoordinateRotation.C | 4 +- .../coordinate/rotation/axisAngleRotation.C | 4 +- .../coordinate/systems/coordinateSystemNew.C | 6 +- .../coordinate/systems/cylindricalCS.C | 8 +-- .../mappedPolyPatch/mappedPatchBase.C | 18 +++--- .../searchableCone/searchableCone.C | 6 +- .../searchableSurfaces/searchableSurfaces.C | 4 +- .../cylinderToCell/cylinderToCell.C | 4 +- .../cellSources/regionToCell/regionToCell.C | 6 +- .../searchableSurfaceToCell.C | 4 +- .../cellSources/sphereToCell/sphereToCell.C | 4 +- .../cellSources/surfaceToCell/surfaceToCell.C | 4 +- .../targetVolumeToCell/targetVolumeToCell.C | 4 +- .../cylinderToFace/cylinderToFace.C | 4 +- .../searchableSurfaceToFace.C | 4 +- .../faceSources/sphereToFace/sphereToFace.C | 4 +- .../searchableSurfaceToFaceZone.C | 4 +- .../setsToFaceZone/setsToFaceZone.C | 4 +- .../cylinderToPoint/cylinderToPoint.C | 4 +- .../searchableSurfaceToPoint.C | 4 +- .../sphereToPoint/sphereToPoint.C | 4 +- .../surfaceToPoint/surfaceToPoint.C | 2 +- .../surfaceIntersection/surfaceIntersection.C | 2 +- .../adjoint/ATCModel/ATCModel/ATCModel.C | 12 ++-- .../adjointWallVelocityFvPatchVectorField.C | 6 +- .../displacementMethoddisplacementLaplacian.C | 4 +- ...displacementMethodelasticityMotionSolver.C | 4 +- .../displacementMethodlaplacianMotionSolver.C | 4 +- .../displacementMethodvelocityLaplacian.C | 4 +- .../FIBase/FIBaseIncompressible.C | 4 +- .../SIBase/SIBaseIncompressible.C | 4 +- .../adjointEikonalSolverIncompressible.C | 8 +-- .../adjointMeshMovementSolverIncompressible.C | 6 +- .../sensitivityBezierFIIncompressible.C | 6 +- .../sensitivitySurfaceIncompressible.C | 20 +++---- .../sensitivitySurfacePointsIncompressible.C | 18 +++--- .../shapeSensitivitiesBase.C | 4 +- .../ArmijoConditions/ArmijoConditions.C | 4 +- .../lineSearch/lineSearch/lineSearch.C | 12 ++-- .../stepUpdate/bisection/bisection.C | 4 +- .../stepUpdate/quadratic/quadratic.C | 4 +- .../stepUpdate/stepUpdate/stepUpdate.C | 4 +- .../optMeshMovement/optMeshMovement.C | 4 +- .../shapeOptimisationIncompressible.C | 6 +- .../optimisation/updateMethod/BFGS/BFGS.C | 10 ++-- .../optimisation/updateMethod/DBFGS/DBFGS.C | 12 ++-- .../optimisation/updateMethod/LBFGS/LBFGS.C | 8 +-- .../optimisation/updateMethod/SQP/SQP.C | 10 ++-- .../optimisation/updateMethod/SR1/SR1.C | 8 +-- .../conjugateGradient/conjugateGradient.C | 4 +- .../constraintProjection.C | 4 +- .../updateMethod/updateMethod/updateMethod.C | 2 +- .../NURBS3DVolume/NURBS3DVolume.C | 28 +++++----- .../adjointSolverManager.C | 4 +- .../adjointSolver/adjointSolver.C | 8 +-- .../incompressiblePrimalSolver.C | 6 +- .../adjoint/solvers/solver/solver.C | 6 +- .../optimisation/SIMPLEControlOpt.C | 4 +- .../solverControl/solverControl.C | 12 ++-- .../incompressible/incompressibleVars.C | 4 +- .../variablesSet/variablesSet/variablesSet.C | 4 +- .../adjointRASModel/adjointRASModel.C | 4 +- .../adjointSpalartAllmaras.C | 20 +++---- .../cellVolumeWeightCellCellStencil.C | 4 +- .../inverseDistanceCellCellStencil.C | 6 +- .../trackingInverseDistanceCellCellStencil.C | 4 +- src/overset/regionsToCell/regionsToCell.C | 6 +- .../geometric/geometricConstraint.C | 4 +- .../decompositionMethod/decompositionMethod.C | 4 +- .../hierarchGeomDecomp/hierarchGeomDecomp.C | 4 +- .../decompose/ptscotchDecomp/ptscotchDecomp.C | 4 +- .../decompose/scotchDecomp/scotchDecomp.C | 4 +- ...allBoilingWallFunctionFvPatchScalarField.C | 7 ++- ...ayatillekeWallFunctionFvPatchScalarField.C | 9 +-- ...ixedMultiPhaseHeatFluxFvPatchScalarField.C | 13 ++--- .../CHFModels/Zuber/Zuber.C | 2 +- .../CHFSubCoolModels/HuaXu/HuaXu.C | 2 +- .../LeidenfrostModels/Spiegler/Spiegler.C | 2 +- .../MHFModels/Jeschar/Jeschar.C | 2 +- .../TDNBModels/Schroeder/Schroeder.C | 2 +- .../TolubinskiKostanchuk.C | 7 ++- .../filmBoilingModels/Bromley/Bromley.C | 4 +- .../LemmertChawla/LemmertChawla.C | 3 +- .../heatTransferModel/heatTransferModel.C | 3 +- ...terfaceCompositionPhaseChangePhaseSystem.C | 3 +- .../MomentumTransferPhaseSystem.C | 5 +- .../ThermalPhaseChangePhaseSystem.C | 2 +- .../linearTsubDiameter/linearTsubDiameter.C | 8 +-- .../velocityGroup/velocityGroup.C | 7 ++- .../AnisothermalPhaseModel.C | 3 +- .../MultiComponentPhaseModel.C | 3 +- .../phaseModel/phaseModel/phaseModel.C | 3 +- .../LuoSvendsen/LuoSvendsen.C | 7 ++- .../LaakkonenAlopaeusAittamaa.C | 7 ++- .../CoulaloglouTavlaridesCoalescence.C | 5 +- .../LehrMilliesMewesCoalescence.C | 5 +- .../coalescenceModels/Luo/Luo.C | 5 +- .../PrinceBlanch/PrinceBlanch.C | 7 ++- .../driftModels/phaseChange/phaseChange.C | 3 +- .../populationBalanceModelI.H | 3 +- .../windowModels/Hanning/Hanning.C | 4 +- .../windowModels/windowModel/windowModel.C | 4 +- .../reactingOneDim/reactingOneDim.C | 4 +- ...sRadiativeCoupledMixedFvPatchScalarField.C | 8 +-- ...ysisTemperatureCoupledFvPatchScalarField.C | 9 +-- ...rolysisVelocityCoupledFvPatchVectorField.C | 9 +-- ...ilmHeightInletVelocityFvPatchVectorField.C | 7 ++- ...linedFilmNusseltHeightFvPatchScalarField.C | 4 +- ...lmNusseltInletVelocityFvPatchVectorField.C | 4 +- ...alphatFilmWallFunctionFvPatchScalarField.C | 13 +++-- .../nutkFilmWallFunctionFvPatchScalarField.C | 7 ++- .../kinematicSingleLayer.C | 4 +- .../contactAngleForce/contactAngleForce.C | 4 +- .../BrunDrippingInjection.C | 7 ++- .../curvatureSeparation/curvatureSeparation.C | 3 +- .../patchInjection/patchInjection.C | 4 +- .../transferModelList/transferModelList.C | 2 +- .../solidification/solidification.C | 3 +- .../standardPhaseChange/standardPhaseChange.C | 5 +- .../waxSolventEvaporation.C | 5 +- .../thermalBaffleModel/thermalBaffleModel.C | 5 +- src/renumber/SloanRenumber/SloanRenumber.C | 3 +- .../CuthillMcKeeRenumber.C | 3 +- .../linearAxialAngularSpring.C | 4 +- .../prescribedRotation/prescribedRotation.C | 4 +- .../rigidBodyModelState/rigidBodyModelState.C | 12 ++-- .../rigidBodyMotion/rigidBodyMotion.C | 13 +++-- .../rigidBodyMotion/rigidBodyMotionIO.C | 7 ++- .../CrankNicolson/CrankNicolson.C | 5 +- .../rigidBodySolvers/Newmark/Newmark.C | 5 +- .../rigidBodyMeshMotion/rigidBodyMeshMotion.C | 6 +- .../rigidBodyMeshMotionSolver.C | 4 +- src/sampling/probes/probes.C | 4 +- .../sampledSet/cellCentre/cellCentreSet.C | 6 +- .../sampledSet/patchEdge/patchEdgeSet.C | 4 +- .../sampledSet/patchSeed/patchSeedSet.C | 2 +- .../sampledSet/shortestPath/shortestPathSet.C | 4 +- .../distanceSurface/sampledDistanceSurface.C | 4 +- .../sampledCuttingSurface.C | 6 +- .../sampledPatch/sampledPatch.C | 4 +- .../sampledPatchInternalField.C | 4 +- .../sampledPlane/sampledPlane.C | 4 +- .../sampledSurface/sampledSurface.C | 10 ++-- .../sampledSurfaces/sampledSurfaces.C | 20 +++---- .../sampledThresholdCellFaces.C | 8 +-- src/sampling/surface/cutting/cuttingSurface.C | 4 +- ...ableBaffleMassFractionFvPatchScalarField.C | 5 +- ...ermeableBaffleVelocityFvPatchVectorField.C | 3 +- ...gidBodyDisplacementPointPatchVectorField.C | 3 +- .../sixDoFRigidBodyMotionLineConstraint.C | 3 +- .../sixDoFRigidBodyMotionPlaneConstraint.C | 3 +- .../sixDoFRigidBodyMotionPointConstraint.C | 3 +- .../linearAxialAngularSpring.C | 2 +- .../linearSpringDamper/linearSpringDamper.C | 8 +-- .../sphericalAngularSpring.C | 4 +- .../tabulatedAxialAngularSpring.C | 4 +- .../sixDoFRigidBodyMotion.C | 12 ++-- .../sixDoFRigidBodyMotionIO.C | 7 ++- .../sixDoFRigidBodyMotionState.C | 15 ++--- .../sixDoFRigidBodyMotionSolver.C | 6 +- .../CrankNicolson/CrankNicolson.C | 5 +- .../sixDoFSolvers/Newmark/Newmark.C | 5 +- .../sixDoFRigidBodyState.C | 4 +- .../writers/nastran/nastranSurfaceWriter.C | 2 +- .../basic/basicThermo/basicThermo.C | 14 ++--- .../StandardChemistryModel.C | 3 +- .../TDACChemistryModel/TDACChemistryModel.C | 4 +- .../TDACChemistryModel/reduction/DAC/DAC.C | 21 +++---- .../chemistryReductionMethod.C | 7 ++- .../TDACChemistryModel/tabulation/ISAT/ISAT.C | 16 +++--- .../tabulation/ISAT/binaryTree/binaryTree.C | 2 +- .../ISAT/chemPointISAT/chemPointISAT.C | 6 +- .../chemistryTabulationMethod.C | 7 ++- .../basicChemistryModelTemplates.C | 6 +- .../MarshakRadiationFvPatchScalarField.C | 2 +- ...iffusiveRadiationMixedFvPatchScalarField.C | 4 +- .../radiationModels/fvDOM/fvDOM/fvDOM.C | 24 +++++--- .../radiationModel/radiationModel.C | 10 ++-- .../solarLoad/faceReflecting/faceReflecting.C | 6 +- .../radiationModels/viewFactor/viewFactor.C | 4 +- .../mixtureFractionSoot/mixtureFractionSoot.C | 3 +- .../chemistryReader/chemistryReader.C | 4 +- .../chemkinReader/chemkinReader.C | 5 +- .../foamChemistryReader/foamChemistryReader.C | 2 +- .../specie/specie/specie.C | 3 +- ...emperatureCoupledMixedFvPatchScalarField.C | 18 +++--- .../viscosityModels/Arrhenius/Arrhenius.C | 4 +- .../viscosityModels/BirdCarreau/BirdCarreau.C | 6 +- .../temperatureDependentSurfaceTension.C | 5 +- ...ndentAlphaContactAngleFvPatchScalarField.C | 4 +- .../waveAlpha/waveAlphaFvPatchScalarField.C | 4 +- .../waveVelocityFvPatchVectorField.C | 4 +- .../multiphaseMangrovesSource.C | 4 +- 624 files changed, 2109 insertions(+), 1954 deletions(-) diff --git a/applications/solvers/basic/potentialFoam/createControls.H b/applications/solvers/basic/potentialFoam/createControls.H index 7015cae02e8..1d0c80b47e7 100644 --- a/applications/solvers/basic/potentialFoam/createControls.H +++ b/applications/solvers/basic/potentialFoam/createControls.H @@ -5,5 +5,5 @@ const dictionary& potentialFlow const int nNonOrthCorr ( - potentialFlow.lookupOrDefault<int>("nNonOrthogonalCorrectors", 0) + potentialFlow.getOrDefault<int>("nNonOrthogonalCorrectors", 0) ); diff --git a/applications/solvers/basic/potentialFoam/overPotentialFoam/createControls.H b/applications/solvers/basic/potentialFoam/overPotentialFoam/createControls.H index 7015cae02e8..1d0c80b47e7 100644 --- a/applications/solvers/basic/potentialFoam/overPotentialFoam/createControls.H +++ b/applications/solvers/basic/potentialFoam/overPotentialFoam/createControls.H @@ -5,5 +5,5 @@ const dictionary& potentialFlow const int nNonOrthCorr ( - potentialFlow.lookupOrDefault<int>("nNonOrthogonalCorrectors", 0) + potentialFlow.getOrDefault<int>("nNonOrthogonalCorrectors", 0) ); diff --git a/applications/solvers/combustion/PDRFoam/PDRModels/turbulence/PDRkEpsilon/PDRkEpsilon.C b/applications/solvers/combustion/PDRFoam/PDRModels/turbulence/PDRkEpsilon/PDRkEpsilon.C index a2f6deab5e5..e8c36a390c0 100644 --- a/applications/solvers/combustion/PDRFoam/PDRModels/turbulence/PDRkEpsilon/PDRkEpsilon.C +++ b/applications/solvers/combustion/PDRFoam/PDRModels/turbulence/PDRkEpsilon/PDRkEpsilon.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. @@ -72,7 +72,7 @@ PDRkEpsilon::PDRkEpsilon C4_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "C4", coeffDict_, diff --git a/applications/solvers/combustion/XiFoam/XiDyMFoam/createControls.H b/applications/solvers/combustion/XiFoam/XiDyMFoam/createControls.H index 4c888d9e3a1..135a62f1316 100644 --- a/applications/solvers/combustion/XiFoam/XiDyMFoam/createControls.H +++ b/applications/solvers/combustion/XiFoam/XiDyMFoam/createControls.H @@ -2,10 +2,10 @@ bool correctPhi ( - pimple.dict().lookupOrDefault("correctPhi", true) + pimple.dict().getOrDefault("correctPhi", true) ); bool checkMeshCourantNo ( - pimple.dict().lookupOrDefault("checkMeshCourantNo", false) + pimple.dict().getOrDefault("checkMeshCourantNo", false) ); diff --git a/applications/solvers/combustion/XiFoam/XiDyMFoam/readControls.H b/applications/solvers/combustion/XiFoam/XiDyMFoam/readControls.H index 08ab3a6af7a..7d966e2cf9a 100644 --- a/applications/solvers/combustion/XiFoam/XiDyMFoam/readControls.H +++ b/applications/solvers/combustion/XiFoam/XiDyMFoam/readControls.H @@ -1,6 +1,6 @@ #include "readTimeControls.H" -correctPhi = pimple.dict().lookupOrDefault("correctPhi", true); +correctPhi = pimple.dict().getOrDefault("correctPhi", true); checkMeshCourantNo = - pimple.dict().lookupOrDefault("checkMeshCourantNo", false); + pimple.dict().getOrDefault("checkMeshCourantNo", false); diff --git a/applications/solvers/combustion/fireFoam/createRegionControls.H b/applications/solvers/combustion/fireFoam/createRegionControls.H index 6734f6168ee..4f0206ecfe9 100644 --- a/applications/solvers/combustion/fireFoam/createRegionControls.H +++ b/applications/solvers/combustion/fireFoam/createRegionControls.H @@ -12,12 +12,12 @@ IOdictionary additionalControlsDict bool solvePrimaryRegion ( - additionalControlsDict.lookupOrDefault("solvePrimaryRegion", true) + additionalControlsDict.getOrDefault("solvePrimaryRegion", true) ); bool solvePyrolysisRegion ( - additionalControlsDict.lookupOrDefault("solvePyrolysisRegion", true) + additionalControlsDict.getOrDefault("solvePyrolysisRegion", true) ); scalar maxDi = pyrolysis.maxDiff(); diff --git a/applications/solvers/combustion/fireFoam/phrghEqn.H b/applications/solvers/combustion/fireFoam/phrghEqn.H index 5d844d61cc9..482355f12ae 100644 --- a/applications/solvers/combustion/fireFoam/phrghEqn.H +++ b/applications/solvers/combustion/fireFoam/phrghEqn.H @@ -1,4 +1,4 @@ -if (pimple.dict().lookupOrDefault("hydrostaticInitialization", false)) +if (pimple.dict().getOrDefault("hydrostaticInitialization", false)) { volScalarField& ph_rgh = regIOobject::store ( @@ -24,7 +24,7 @@ if (pimple.dict().lookupOrDefault("hydrostaticInitialization", false)) label nCorr ( - pimple.dict().lookupOrDefault<label>("nHydrostaticCorrectors", 5) + pimple.dict().getOrDefault<label>("nHydrostaticCorrectors", 5) ); for (label i=0; i<nCorr; i++) diff --git a/applications/solvers/combustion/reactingFoam/setRDeltaT.H b/applications/solvers/combustion/reactingFoam/setRDeltaT.H index 43055896a48..6bf4cf8375f 100644 --- a/applications/solvers/combustion/reactingFoam/setRDeltaT.H +++ b/applications/solvers/combustion/reactingFoam/setRDeltaT.H @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2013-2016 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -34,27 +35,27 @@ License scalar maxCo(pimpleDict.get<scalar>("maxCo")); // Maximum time scale - scalar maxDeltaT(pimpleDict.lookupOrDefault<scalar>("maxDeltaT", GREAT)); + scalar maxDeltaT(pimpleDict.getOrDefault<scalar>("maxDeltaT", GREAT)); // Smoothing parameter (0-1) when smoothing iterations > 0 scalar rDeltaTSmoothingCoeff ( - pimpleDict.lookupOrDefault<scalar>("rDeltaTSmoothingCoeff", 0.1) + pimpleDict.getOrDefault<scalar>("rDeltaTSmoothingCoeff", 0.1) ); // Damping coefficient (1-0) scalar rDeltaTDampingCoeff ( - pimpleDict.lookupOrDefault<scalar>("rDeltaTDampingCoeff", 1.0) + pimpleDict.getOrDefault<scalar>("rDeltaTDampingCoeff", 1.0) ); // Maximum change in cell temperature per iteration // (relative to previous value) - scalar alphaTemp(pimpleDict.lookupOrDefault("alphaTemp", 0.05)); + scalar alphaTemp(pimpleDict.getOrDefault<scalar>("alphaTemp", 0.05)); // Maximum change in cell concentration per iteration // (relative to reference value) - scalar alphaY(pimpleDict.lookupOrDefault("alphaY", 1.0)); + scalar alphaY(pimpleDict.getOrDefault<scalar>("alphaY", 1.0)); Info<< "Time scales min/max:" << endl; diff --git a/applications/solvers/compressible/rhoCentralFoam/BCs/T/smoluchowskiJumpTFvPatchScalarField.C b/applications/solvers/compressible/rhoCentralFoam/BCs/T/smoluchowskiJumpTFvPatchScalarField.C index b2972f00972..d9fbc8f1dd4 100644 --- a/applications/solvers/compressible/rhoCentralFoam/BCs/T/smoluchowskiJumpTFvPatchScalarField.C +++ b/applications/solvers/compressible/rhoCentralFoam/BCs/T/smoluchowskiJumpTFvPatchScalarField.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2015 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -82,13 +83,13 @@ Foam::smoluchowskiJumpTFvPatchScalarField::smoluchowskiJumpTFvPatchScalarField ) : mixedFvPatchScalarField(p, iF), - UName_(dict.lookupOrDefault<word>("U", "U")), - rhoName_(dict.lookupOrDefault<word>("rho", "rho")), - psiName_(dict.lookupOrDefault<word>("psi", "thermo:psi")), - muName_(dict.lookupOrDefault<word>("mu", "thermo:mu")), + UName_(dict.getOrDefault<word>("U", "U")), + rhoName_(dict.getOrDefault<word>("rho", "rho")), + psiName_(dict.getOrDefault<word>("psi", "thermo:psi")), + muName_(dict.getOrDefault<word>("mu", "thermo:mu")), accommodationCoeff_(dict.get<scalar>("accommodationCoeff")), Twall_("Twall", dict, p.size()), - gamma_(dict.lookupOrDefault<scalar>("gamma", 1.4)) + gamma_(dict.getOrDefault<scalar>("gamma", 1.4)) { if ( diff --git a/applications/solvers/compressible/rhoCentralFoam/BCs/U/maxwellSlipUFvPatchVectorField.C b/applications/solvers/compressible/rhoCentralFoam/BCs/U/maxwellSlipUFvPatchVectorField.C index 77ac46379aa..65ab5787b70 100644 --- a/applications/solvers/compressible/rhoCentralFoam/BCs/U/maxwellSlipUFvPatchVectorField.C +++ b/applications/solvers/compressible/rhoCentralFoam/BCs/U/maxwellSlipUFvPatchVectorField.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2015 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -82,15 +83,15 @@ Foam::maxwellSlipUFvPatchVectorField::maxwellSlipUFvPatchVectorField ) : partialSlipFvPatchVectorField(p, iF), - TName_(dict.lookupOrDefault<word>("T", "T")), - rhoName_(dict.lookupOrDefault<word>("rho", "rho")), - psiName_(dict.lookupOrDefault<word>("psi", "thermo:psi")), - muName_(dict.lookupOrDefault<word>("mu", "thermo:mu")), - tauMCName_(dict.lookupOrDefault<word>("tauMC", "tauMC")), + TName_(dict.getOrDefault<word>("T", "T")), + rhoName_(dict.getOrDefault<word>("rho", "rho")), + psiName_(dict.getOrDefault<word>("psi", "thermo:psi")), + muName_(dict.getOrDefault<word>("mu", "thermo:mu")), + tauMCName_(dict.getOrDefault<word>("tauMC", "tauMC")), accommodationCoeff_(dict.get<scalar>("accommodationCoeff")), Uwall_("Uwall", dict, p.size()), - thermalCreep_(dict.lookupOrDefault("thermalCreep", true)), - curvature_(dict.lookupOrDefault("curvature", true)) + thermalCreep_(dict.getOrDefault("thermalCreep", true)), + curvature_(dict.getOrDefault("curvature", true)) { if ( diff --git a/applications/solvers/compressible/rhoCentralFoam/BCs/rho/fixedRhoFvPatchScalarField.C b/applications/solvers/compressible/rhoCentralFoam/BCs/rho/fixedRhoFvPatchScalarField.C index 34b5d77dad9..08064c0ab28 100644 --- a/applications/solvers/compressible/rhoCentralFoam/BCs/rho/fixedRhoFvPatchScalarField.C +++ b/applications/solvers/compressible/rhoCentralFoam/BCs/rho/fixedRhoFvPatchScalarField.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2012 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -66,8 +67,8 @@ Foam::fixedRhoFvPatchScalarField::fixedRhoFvPatchScalarField ) : fixedValueFvPatchScalarField(p, iF, dict), - pName_(dict.lookupOrDefault<word>("p", "p")), - psiName_(dict.lookupOrDefault<word>("psi", "thermo:psi")) + pName_(dict.getOrDefault<word>("p", "p")), + psiName_(dict.getOrDefault<word>("psi", "thermo:psi")) {} diff --git a/applications/solvers/compressible/rhoCentralFoam/setRDeltaT.H b/applications/solvers/compressible/rhoCentralFoam/setRDeltaT.H index 4ad54b23ba0..5e2a2b302ca 100644 --- a/applications/solvers/compressible/rhoCentralFoam/setRDeltaT.H +++ b/applications/solvers/compressible/rhoCentralFoam/setRDeltaT.H @@ -3,7 +3,7 @@ scalar rDeltaTSmoothingCoeff ( - runTime.controlDict().lookupOrDefault<scalar> + runTime.controlDict().getOrDefault<scalar> ( "rDeltaTSmoothingCoeff", 0.02 diff --git a/applications/solvers/compressible/rhoPimpleAdiabaticFoam/EEqn.H b/applications/solvers/compressible/rhoPimpleAdiabaticFoam/EEqn.H index e15261990ac..a6a7aaffc1f 100644 --- a/applications/solvers/compressible/rhoPimpleAdiabaticFoam/EEqn.H +++ b/applications/solvers/compressible/rhoPimpleAdiabaticFoam/EEqn.H @@ -17,7 +17,7 @@ const dictionary& eosDict = thermoDict.subDict("equationOfState"); - bool local = eosDict.lookupOrDefault("local", false); + bool local = eosDict.getOrDefault("local", false); // Evolve T as: // diff --git a/applications/solvers/compressible/rhoPimpleFoam/overRhoPimpleDyMFoam/createControls.H b/applications/solvers/compressible/rhoPimpleFoam/overRhoPimpleDyMFoam/createControls.H index 724bc2ca9af..320608dfcf5 100644 --- a/applications/solvers/compressible/rhoPimpleFoam/overRhoPimpleDyMFoam/createControls.H +++ b/applications/solvers/compressible/rhoPimpleFoam/overRhoPimpleDyMFoam/createControls.H @@ -1,4 +1,4 @@ bool ddtCorr ( - pimple.dict().lookupOrDefault("ddtCorr", true) + pimple.dict().getOrDefault("ddtCorr", true) ); diff --git a/applications/solvers/compressible/rhoPimpleFoam/overRhoPimpleDyMFoam/readControls.H b/applications/solvers/compressible/rhoPimpleFoam/overRhoPimpleDyMFoam/readControls.H index 8f43318cabe..83b43ffbf17 100644 --- a/applications/solvers/compressible/rhoPimpleFoam/overRhoPimpleDyMFoam/readControls.H +++ b/applications/solvers/compressible/rhoPimpleFoam/overRhoPimpleDyMFoam/readControls.H @@ -1,9 +1,9 @@ #include "readTimeControls.H" -correctPhi = pimple.dict().lookupOrDefault("correctPhi", false); +correctPhi = pimple.dict().getOrDefault("correctPhi", false); checkMeshCourantNo = - pimple.dict().lookupOrDefault("checkMeshCourantNo", false); + pimple.dict().getOrDefault("checkMeshCourantNo", false); -ddtCorr = pimple.dict().lookupOrDefault("ddtCorr", true); +ddtCorr = pimple.dict().getOrDefault("ddtCorr", true); diff --git a/applications/solvers/compressible/rhoPimpleFoam/setRDeltaT.H b/applications/solvers/compressible/rhoPimpleFoam/setRDeltaT.H index db42fb0221a..76a6553c546 100644 --- a/applications/solvers/compressible/rhoPimpleFoam/setRDeltaT.H +++ b/applications/solvers/compressible/rhoPimpleFoam/setRDeltaT.H @@ -5,22 +5,22 @@ scalar maxCo ( - pimpleDict.lookupOrDefault<scalar>("maxCo", 0.8) + pimpleDict.getOrDefault<scalar>("maxCo", 0.8) ); scalar rDeltaTSmoothingCoeff ( - pimpleDict.lookupOrDefault<scalar>("rDeltaTSmoothingCoeff", 0.02) + pimpleDict.getOrDefault<scalar>("rDeltaTSmoothingCoeff", 0.02) ); scalar rDeltaTDampingCoeff ( - pimpleDict.lookupOrDefault<scalar>("rDeltaTDampingCoeff", 1.0) + pimpleDict.getOrDefault<scalar>("rDeltaTDampingCoeff", 1.0) ); scalar maxDeltaT ( - pimpleDict.lookupOrDefault<scalar>("maxDeltaT", GREAT) + pimpleDict.getOrDefault<scalar>("maxDeltaT", GREAT) ); volScalarField rDeltaT0("rDeltaT0", rDeltaT); diff --git a/applications/solvers/compressible/rhoSimpleFoam/overRhoSimpleFoam/createFields.H b/applications/solvers/compressible/rhoSimpleFoam/overRhoSimpleFoam/createFields.H index 4114962be72..1be0fe5f77e 100644 --- a/applications/solvers/compressible/rhoSimpleFoam/overRhoSimpleFoam/createFields.H +++ b/applications/solvers/compressible/rhoSimpleFoam/overRhoSimpleFoam/createFields.H @@ -82,5 +82,5 @@ dimensionedScalar initialMass = fvc::domainIntegrate(rho); bool adjustFringe ( - simple.dict().lookupOrDefault("oversetAdjustPhi", false) + simple.dict().getOrDefault("oversetAdjustPhi", false) ); diff --git a/applications/solvers/electromagnetics/mhdFoam/readBPISOControls.H b/applications/solvers/electromagnetics/mhdFoam/readBPISOControls.H index 7f280b8aa3d..cb4e3505e95 100644 --- a/applications/solvers/electromagnetics/mhdFoam/readBPISOControls.H +++ b/applications/solvers/electromagnetics/mhdFoam/readBPISOControls.H @@ -1,3 +1,3 @@ const dictionary& Bpiso = mesh.solutionDict().subDict("BPISO"); - const int nBcorr = Bpiso.lookupOrDefault<int>("nCorrectors", 1); + const int nBcorr = Bpiso.getOrDefault<int>("nCorrectors", 1); diff --git a/applications/solvers/heatTransfer/buoyantPimpleFoam/overBuoyantPimpleDyMFoam/readControls.H b/applications/solvers/heatTransfer/buoyantPimpleFoam/overBuoyantPimpleDyMFoam/readControls.H index 8f43318cabe..83b43ffbf17 100644 --- a/applications/solvers/heatTransfer/buoyantPimpleFoam/overBuoyantPimpleDyMFoam/readControls.H +++ b/applications/solvers/heatTransfer/buoyantPimpleFoam/overBuoyantPimpleDyMFoam/readControls.H @@ -1,9 +1,9 @@ #include "readTimeControls.H" -correctPhi = pimple.dict().lookupOrDefault("correctPhi", false); +correctPhi = pimple.dict().getOrDefault("correctPhi", false); checkMeshCourantNo = - pimple.dict().lookupOrDefault("checkMeshCourantNo", false); + pimple.dict().getOrDefault("checkMeshCourantNo", false); -ddtCorr = pimple.dict().lookupOrDefault("ddtCorr", true); +ddtCorr = pimple.dict().getOrDefault("ddtCorr", true); diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/fluid/readFluidMultiRegionSIMPLEControls.H b/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/fluid/readFluidMultiRegionSIMPLEControls.H index 3ce2a2b7b4c..332001c2945 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/fluid/readFluidMultiRegionSIMPLEControls.H +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/fluid/readFluidMultiRegionSIMPLEControls.H @@ -1,7 +1,7 @@ const dictionary& simple = fluidRegions[i].solutionDict().subDict("SIMPLE"); const int nNonOrthCorr = - simple.lookupOrDefault<int>("nNonOrthogonalCorrectors", 0); + simple.getOrDefault<int>("nNonOrthogonalCorrectors", 0); const bool momentumPredictor = - simple.lookupOrDefault("momentumPredictor", true); + simple.getOrDefault("momentumPredictor", true); diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/solid/readSolidMultiRegionSIMPLEControls.H b/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/solid/readSolidMultiRegionSIMPLEControls.H index 41b76293ef9..1320e4ecc13 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/solid/readSolidMultiRegionSIMPLEControls.H +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/solid/readSolidMultiRegionSIMPLEControls.H @@ -1,4 +1,4 @@ const dictionary& simple = mesh.solutionDict().subDict("SIMPLE"); const int nNonOrthCorr = - simple.lookupOrDefault<int>("nNonOrthogonalCorrectors", 0); + simple.getOrDefault<int>("nNonOrthogonalCorrectors", 0); diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionTwoPhaseEulerFoam/derivedFvPatchFields/turbulentTemperatureTwoPhaseRadCoupledMixed/turbulentTemperatureTwoPhaseRadCoupledMixedFvPatchScalarField.C b/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionTwoPhaseEulerFoam/derivedFvPatchFields/turbulentTemperatureTwoPhaseRadCoupledMixed/turbulentTemperatureTwoPhaseRadCoupledMixedFvPatchScalarField.C index 3f11c2b3533..df3a1c5020b 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionTwoPhaseEulerFoam/derivedFvPatchFields/turbulentTemperatureTwoPhaseRadCoupledMixed/turbulentTemperatureTwoPhaseRadCoupledMixedFvPatchScalarField.C +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionTwoPhaseEulerFoam/derivedFvPatchFields/turbulentTemperatureTwoPhaseRadCoupledMixed/turbulentTemperatureTwoPhaseRadCoupledMixedFvPatchScalarField.C @@ -227,11 +227,11 @@ turbulentTemperatureTwoPhaseRadCoupledMixedFvPatchScalarField mixedFvPatchScalarField(p, iF), regionType_(regionTypeNames_.get("region", dict)), method_(KMethodTypeNames_.get("kappaMethod", dict)), - kappaName_(dict.lookupOrDefault<word>("kappa", "none")), + kappaName_(dict.getOrDefault<word>("kappa", "none")), otherPhaseName_(dict.get<word>("otherPhase")), - TnbrName_(dict.lookupOrDefault<word>("Tnbr", "T")), - qrNbrName_(dict.lookupOrDefault<word>("qrNbr", "none")), - qrName_(dict.lookupOrDefault<word>("qr", "none")) + TnbrName_(dict.getOrDefault<word>("Tnbr", "T")), + qrNbrName_(dict.getOrDefault<word>("qrNbr", "none")), + qrName_(dict.getOrDefault<word>("qr", "none")) { if (!isA<mappedPatchBase>(this->patch().patch())) { diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionTwoPhaseEulerFoam/fluid/readFluidMultiRegionPIMPLEControls.H b/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionTwoPhaseEulerFoam/fluid/readFluidMultiRegionPIMPLEControls.H index f4ced506227..7238b5a67a9 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionTwoPhaseEulerFoam/fluid/readFluidMultiRegionPIMPLEControls.H +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionTwoPhaseEulerFoam/fluid/readFluidMultiRegionPIMPLEControls.H @@ -2,10 +2,10 @@ Switch faceMomentum ( - pimpleDict.lookupOrDefault<Switch>("faceMomentum", false) + pimpleDict.getOrDefault<Switch>("faceMomentum", false) ); int nEnergyCorrectors ( - pimpleDict.lookupOrDefault<int>("nEnergyCorrectors", 1) + pimpleDict.getOrDefault<int>("nEnergyCorrectors", 1) ); diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/readFluidMultiRegionPIMPLEControls.H b/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/readFluidMultiRegionPIMPLEControls.H index a6f6aad8afe..af3cbe03c59 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/readFluidMultiRegionPIMPLEControls.H +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/readFluidMultiRegionPIMPLEControls.H @@ -1,10 +1,10 @@ const dictionary& pimple = mesh.solutionDict().subDict("PIMPLE"); const int nCorr = - pimple.lookupOrDefault<int>("nCorrectors", 1); + pimple.getOrDefault<int>("nCorrectors", 1); const int nNonOrthCorr = - pimple.lookupOrDefault<int>("nNonOrthogonalCorrectors", 0); + pimple.getOrDefault<int>("nNonOrthogonalCorrectors", 0); const bool momentumPredictor = - pimple.lookupOrDefault("momentumPredictor", true); + pimple.getOrDefault("momentumPredictor", true); diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/readPIMPLEControls.H b/applications/solvers/heatTransfer/chtMultiRegionFoam/readPIMPLEControls.H index 7405dee8d5a..377a28a3f4d 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/readPIMPLEControls.H +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/readPIMPLEControls.H @@ -5,4 +5,4 @@ const dictionary& pimple = solutionDict.subDict("PIMPLE"); const int nOuterCorr = - pimple.lookupOrDefault<int>("nOuterCorrectors", 1); + pimple.getOrDefault<int>("nOuterCorrectors", 1); diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/solid/readSolidMultiRegionPIMPLEControls.H b/applications/solvers/heatTransfer/chtMultiRegionFoam/solid/readSolidMultiRegionPIMPLEControls.H index fbed7f41e0d..13d35be3cac 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/solid/readSolidMultiRegionPIMPLEControls.H +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/solid/readSolidMultiRegionPIMPLEControls.H @@ -1,4 +1,4 @@ const dictionary& pimple = mesh.solutionDict().subDict("PIMPLE"); int nNonOrthCorr = - pimple.lookupOrDefault<int>("nNonOrthogonalCorrectors", 0); + pimple.getOrDefault<int>("nNonOrthogonalCorrectors", 0); diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/solid/readSolidTimeControls.H b/applications/solvers/heatTransfer/chtMultiRegionFoam/solid/readSolidTimeControls.H index f319fa2edda..bed10ad9941 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/solid/readSolidTimeControls.H +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/solid/readSolidTimeControls.H @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -31,6 +32,6 @@ Description \*---------------------------------------------------------------------------*/ -scalar maxDi = runTime.controlDict().lookupOrDefault<scalar>("maxDi", 10.0); +scalar maxDi = runTime.controlDict().getOrDefault<scalar>("maxDi", 10); // ************************************************************************* // diff --git a/applications/solvers/incompressible/pimpleFoam/overPimpleDyMFoam/createControls.H b/applications/solvers/incompressible/pimpleFoam/overPimpleDyMFoam/createControls.H index 53ed2009c74..eec5afdfc8e 100644 --- a/applications/solvers/incompressible/pimpleFoam/overPimpleDyMFoam/createControls.H +++ b/applications/solvers/incompressible/pimpleFoam/overPimpleDyMFoam/createControls.H @@ -2,25 +2,25 @@ bool correctPhi ( - pimple.dict().lookupOrDefault("correctPhi", false) + pimple.dict().getOrDefault("correctPhi", false) ); bool checkMeshCourantNo ( - pimple.dict().lookupOrDefault("checkMeshCourantNo", false) + pimple.dict().getOrDefault("checkMeshCourantNo", false) ); bool massFluxInterpolation ( - pimple.dict().lookupOrDefault("massFluxInterpolation", false) + pimple.dict().getOrDefault("massFluxInterpolation", false) ); bool adjustFringe ( - pimple.dict().lookupOrDefault("oversetAdjustPhi", false) + pimple.dict().getOrDefault("oversetAdjustPhi", false) ); bool ddtCorr ( - pimple.dict().lookupOrDefault("ddtCorr", true) + pimple.dict().getOrDefault("ddtCorr", true) ); diff --git a/applications/solvers/incompressible/pimpleFoam/overPimpleDyMFoam/readControls.H b/applications/solvers/incompressible/pimpleFoam/overPimpleDyMFoam/readControls.H index 0141c85225b..238a3e5c8f1 100644 --- a/applications/solvers/incompressible/pimpleFoam/overPimpleDyMFoam/readControls.H +++ b/applications/solvers/incompressible/pimpleFoam/overPimpleDyMFoam/readControls.H @@ -1,10 +1,10 @@ #include "readTimeControls.H" -correctPhi = pimple.dict().lookupOrDefault("correctPhi", false); +correctPhi = pimple.dict().getOrDefault("correctPhi", false); -checkMeshCourantNo = pimple.dict().lookupOrDefault("checkMeshCourantNo", false); +checkMeshCourantNo = pimple.dict().getOrDefault("checkMeshCourantNo", false); massFluxInterpolation = - pimple.dict().lookupOrDefault("massFluxInterpolation", false); + pimple.dict().getOrDefault("massFluxInterpolation", false); -ddtCorr = pimple.dict().lookupOrDefault("ddtCorr", true); +ddtCorr = pimple.dict().getOrDefault("ddtCorr", true); diff --git a/applications/solvers/incompressible/simpleFoam/overSimpleFoam/createOversetFields.H b/applications/solvers/incompressible/simpleFoam/overSimpleFoam/createOversetFields.H index 77454095d1f..e4f473cbf3a 100644 --- a/applications/solvers/incompressible/simpleFoam/overSimpleFoam/createOversetFields.H +++ b/applications/solvers/incompressible/simpleFoam/overSimpleFoam/createOversetFields.H @@ -22,9 +22,9 @@ bool adjustFringe ( - simple.dict().lookupOrDefault("oversetAdjustPhi", false) + simple.dict().getOrDefault("oversetAdjustPhi", false) ); bool massFluxInterpolation ( - simple.dict().lookupOrDefault("massFluxInterpolation", false) + simple.dict().getOrDefault("massFluxInterpolation", false) ); diff --git a/applications/solvers/incompressible/simpleFoam/porousSimpleFoam/setPorosityTreatment.H b/applications/solvers/incompressible/simpleFoam/porousSimpleFoam/setPorosityTreatment.H index 7dc7ae15374..06f407b2212 100644 --- a/applications/solvers/incompressible/simpleFoam/porousSimpleFoam/setPorosityTreatment.H +++ b/applications/solvers/incompressible/simpleFoam/porousSimpleFoam/setPorosityTreatment.H @@ -5,7 +5,7 @@ int nUCorr = 0; if (pZones.active()) { // nUCorrectors for pressureImplicitPorosity - nUCorr = simple.dict().lookupOrDefault<int>("nUCorrectors", 0); + nUCorr = simple.dict().getOrDefault<int>("nUCorrectors", 0); if (nUCorr > 0) { diff --git a/applications/solvers/lagrangian/coalChemistryFoam/setRDeltaT.H b/applications/solvers/lagrangian/coalChemistryFoam/setRDeltaT.H index 43057177bbd..bda1cc2d883 100644 --- a/applications/solvers/lagrangian/coalChemistryFoam/setRDeltaT.H +++ b/applications/solvers/lagrangian/coalChemistryFoam/setRDeltaT.H @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2016 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -34,23 +35,23 @@ License scalar maxCo(pimpleDict.get<scalar>("maxCo")); // Maximum time scale - scalar maxDeltaT(pimpleDict.lookupOrDefault<scalar>("maxDeltaT", GREAT)); + scalar maxDeltaT(pimpleDict.getOrDefault<scalar>("maxDeltaT", GREAT)); // Smoothing parameter (0-1) when smoothing iterations > 0 scalar rDeltaTSmoothingCoeff ( - pimpleDict.lookupOrDefault<scalar>("rDeltaTSmoothingCoeff", 0.1) + pimpleDict.getOrDefault<scalar>("rDeltaTSmoothingCoeff", 0.1) ); // Damping coefficient (1-0) scalar rDeltaTDampingCoeff ( - pimpleDict.lookupOrDefault<scalar>("rDeltaTDampingCoeff", 0.2) + pimpleDict.getOrDefault<scalar>("rDeltaTDampingCoeff", 0.2) ); // Maximum change in cell temperature per iteration // (relative to previous value) - scalar alphaTemp(pimpleDict.lookupOrDefault("alphaTemp", 0.05)); + scalar alphaTemp(pimpleDict.getOrDefault("alphaTemp", 0.05)); Info<< "Time scales min/max:" << endl; diff --git a/applications/solvers/lagrangian/reactingParcelFoam/createRegionControls.H b/applications/solvers/lagrangian/reactingParcelFoam/createRegionControls.H index 07ac2a9e4ee..6fe7a52edf5 100644 --- a/applications/solvers/lagrangian/reactingParcelFoam/createRegionControls.H +++ b/applications/solvers/lagrangian/reactingParcelFoam/createRegionControls.H @@ -1,5 +1,5 @@ bool solvePrimaryRegion ( - pimple.dict().lookupOrDefault("solvePrimaryRegion", true) + pimple.dict().getOrDefault("solvePrimaryRegion", true) ); diff --git a/applications/solvers/lagrangian/reactingParcelFoam/setRDeltaT.H b/applications/solvers/lagrangian/reactingParcelFoam/setRDeltaT.H index 89ce98e1a1e..fbb69464c2d 100644 --- a/applications/solvers/lagrangian/reactingParcelFoam/setRDeltaT.H +++ b/applications/solvers/lagrangian/reactingParcelFoam/setRDeltaT.H @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2016 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -34,23 +35,23 @@ License scalar maxCo(pimpleDict.get<scalar>("maxCo")); // Maximum time scale - scalar maxDeltaT(pimpleDict.lookupOrDefault<scalar>("maxDeltaT", GREAT)); + scalar maxDeltaT(pimpleDict.getOrDefault<scalar>("maxDeltaT", GREAT)); // Smoothing parameter (0-1) when smoothing iterations > 0 scalar rDeltaTSmoothingCoeff ( - pimpleDict.lookupOrDefault<scalar>("rDeltaTSmoothingCoeff", 0.1) + pimpleDict.getOrDefault<scalar>("rDeltaTSmoothingCoeff", 0.1) ); // Damping coefficient (1-0) scalar rDeltaTDampingCoeff ( - pimpleDict.lookupOrDefault<scalar>("rDeltaTDampingCoeff", 0.2) + pimpleDict.getOrDefault<scalar>("rDeltaTDampingCoeff", 0.2) ); // Maximum change in cell temperature per iteration // (relative to previous value) - scalar alphaTemp(pimpleDict.lookupOrDefault("alphaTemp", 0.05)); + scalar alphaTemp(pimpleDict.getOrDefault("alphaTemp", 0.05)); Info<< "Time scales min/max:" << endl; diff --git a/applications/solvers/multiphase/VoF/setRDeltaT.H b/applications/solvers/multiphase/VoF/setRDeltaT.H index f9725ec9720..313fca2e33b 100644 --- a/applications/solvers/multiphase/VoF/setRDeltaT.H +++ b/applications/solvers/multiphase/VoF/setRDeltaT.H @@ -5,52 +5,52 @@ scalar maxCo ( - pimpleDict.lookupOrDefault<scalar>("maxCo", 0.9) + pimpleDict.getOrDefault<scalar>("maxCo", 0.9) ); scalar maxAlphaCo ( - pimpleDict.lookupOrDefault<scalar>("maxAlphaCo", 0.2) + pimpleDict.getOrDefault<scalar>("maxAlphaCo", 0.2) ); scalar rDeltaTSmoothingCoeff ( - pimpleDict.lookupOrDefault<scalar>("rDeltaTSmoothingCoeff", 0.1) + pimpleDict.getOrDefault<scalar>("rDeltaTSmoothingCoeff", 0.1) ); label nAlphaSpreadIter ( - pimpleDict.lookupOrDefault<label>("nAlphaSpreadIter", 1) + pimpleDict.getOrDefault<label>("nAlphaSpreadIter", 1) ); scalar alphaSpreadDiff ( - pimpleDict.lookupOrDefault<scalar>("alphaSpreadDiff", 0.2) + pimpleDict.getOrDefault<scalar>("alphaSpreadDiff", 0.2) ); scalar alphaSpreadMax ( - pimpleDict.lookupOrDefault<scalar>("alphaSpreadMax", 0.99) + pimpleDict.getOrDefault<scalar>("alphaSpreadMax", 0.99) ); scalar alphaSpreadMin ( - pimpleDict.lookupOrDefault<scalar>("alphaSpreadMin", 0.01) + pimpleDict.getOrDefault<scalar>("alphaSpreadMin", 0.01) ); label nAlphaSweepIter ( - pimpleDict.lookupOrDefault<label>("nAlphaSweepIter", 5) + pimpleDict.getOrDefault<label>("nAlphaSweepIter", 5) ); scalar rDeltaTDampingCoeff ( - pimpleDict.lookupOrDefault<scalar>("rDeltaTDampingCoeff", 1.0) + pimpleDict.getOrDefault<scalar>("rDeltaTDampingCoeff", 1.0) ); scalar maxDeltaT ( - pimpleDict.lookupOrDefault<scalar>("maxDeltaT", GREAT) + pimpleDict.getOrDefault<scalar>("maxDeltaT", GREAT) ); volScalarField rDeltaT0("rDeltaT0", rDeltaT); diff --git a/applications/solvers/multiphase/cavitatingFoam/cavitatingDyMFoam/readControls.H b/applications/solvers/multiphase/cavitatingFoam/cavitatingDyMFoam/readControls.H index d0b85b18a1a..c93a5eb24a2 100644 --- a/applications/solvers/multiphase/cavitatingFoam/cavitatingDyMFoam/readControls.H +++ b/applications/solvers/multiphase/cavitatingFoam/cavitatingDyMFoam/readControls.H @@ -1,4 +1,4 @@ #include "readDyMControls.H" -correctPhi = pimple.dict().lookupOrDefault("correctPhi", true); +correctPhi = pimple.dict().getOrDefault("correctPhi", true); maxAcousticCo = runTime.controlDict().get<scalar>("maxAcousticCo"); diff --git a/applications/solvers/multiphase/compressibleInterFoam/compressibleInterFilmFoam/VoFPatchTransfer/VoFPatchTransfer.C b/applications/solvers/multiphase/compressibleInterFoam/compressibleInterFilmFoam/VoFPatchTransfer/VoFPatchTransfer.C index 6ac93714286..650bf920a7c 100644 --- a/applications/solvers/multiphase/compressibleInterFoam/compressibleInterFilmFoam/VoFPatchTransfer/VoFPatchTransfer.C +++ b/applications/solvers/multiphase/compressibleInterFoam/compressibleInterFilmFoam/VoFPatchTransfer/VoFPatchTransfer.C @@ -55,23 +55,23 @@ VoFPatchTransfer::VoFPatchTransfer transferModel(type(), film, dict), deltaFactorToVoF_ ( - coeffDict_.lookupOrDefault<scalar>("deltaFactorToVoF", 1.0) + coeffDict_.getOrDefault<scalar>("deltaFactorToVoF", 1.0) ), deltaFactorToFilm_ ( - coeffDict_.lookupOrDefault<scalar>("deltaFactorToFilm", 0.5) + coeffDict_.getOrDefault<scalar>("deltaFactorToFilm", 0.5) ), alphaToVoF_ ( - coeffDict_.lookupOrDefault<scalar>("alphaToVoF", 0.5) + coeffDict_.getOrDefault<scalar>("alphaToVoF", 0.5) ), alphaToFilm_ ( - coeffDict_.lookupOrDefault<scalar>("alphaToFilm", 0.1) + coeffDict_.getOrDefault<scalar>("alphaToFilm", 0.1) ), transferRateCoeff_ ( - coeffDict_.lookupOrDefault<scalar>("transferRateCoeff", 0.1) + coeffDict_.getOrDefault<scalar>("transferRateCoeff", 0.1) ), patchIDs_(), patchTransferredMasses_() diff --git a/applications/solvers/multiphase/compressibleInterFoam/compressibleInterFilmFoam/VoFSolidificationMeltingSource/VoFSolidificationMeltingSource.C b/applications/solvers/multiphase/compressibleInterFoam/compressibleInterFilmFoam/VoFSolidificationMeltingSource/VoFSolidificationMeltingSource.C index 212516dfd5b..16eff5c6f91 100644 --- a/applications/solvers/multiphase/compressibleInterFoam/compressibleInterFilmFoam/VoFSolidificationMeltingSource/VoFSolidificationMeltingSource.C +++ b/applications/solvers/multiphase/compressibleInterFoam/compressibleInterFilmFoam/VoFSolidificationMeltingSource/VoFSolidificationMeltingSource.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2017 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -124,9 +125,9 @@ Foam::fv::VoFSolidificationMeltingSource::VoFSolidificationMeltingSource cellSetOption(sourceName, modelType, dict, mesh), alphaSolidT_(Function1<scalar>::New("alphaSolidT", coeffs_)), L_("L", dimEnergy/dimMass, coeffs_), - relax_(coeffs_.lookupOrDefault("relax", 0.9)), - Cu_(coeffs_.lookupOrDefault<scalar>("Cu", 100000)), - q_(coeffs_.lookupOrDefault("q", 0.001)), + relax_(coeffs_.getOrDefault("relax", 0.9)), + Cu_(coeffs_.getOrDefault<scalar>("Cu", 100000)), + q_(coeffs_.getOrDefault<scalar>("q", 0.001)), alphaSolid_ ( IOobject diff --git a/applications/solvers/multiphase/driftFluxFoam/alphaControls.H b/applications/solvers/multiphase/driftFluxFoam/alphaControls.H index b677b4ae993..133df85af87 100644 --- a/applications/solvers/multiphase/driftFluxFoam/alphaControls.H +++ b/applications/solvers/multiphase/driftFluxFoam/alphaControls.H @@ -4,12 +4,12 @@ label nAlphaCorr(alphaControls.get<label>("nAlphaCorr")); label nAlphaSubCycles(alphaControls.get<label>("nAlphaSubCycles")); -bool MULESCorr(alphaControls.lookupOrDefault("MULESCorr", false)); +bool MULESCorr(alphaControls.getOrDefault("MULESCorr", false)); // Apply the compression correction from the previous iteration // Improves efficiency for steady-simulations but can only be applied // once the alpha field is reasonably steady, i.e. fully developed bool alphaApplyPrevCorr ( - alphaControls.lookupOrDefault("alphaApplyPrevCorr", false) + alphaControls.getOrDefault("alphaApplyPrevCorr", false) ); diff --git a/applications/solvers/multiphase/driftFluxFoam/incompressibleTwoPhaseInteractingMixture/incompressibleTwoPhaseInteractingMixture.C b/applications/solvers/multiphase/driftFluxFoam/incompressibleTwoPhaseInteractingMixture/incompressibleTwoPhaseInteractingMixture.C index d8117b5e371..fe72321c032 100644 --- a/applications/solvers/multiphase/driftFluxFoam/incompressibleTwoPhaseInteractingMixture/incompressibleTwoPhaseInteractingMixture.C +++ b/applications/solvers/multiphase/driftFluxFoam/incompressibleTwoPhaseInteractingMixture/incompressibleTwoPhaseInteractingMixture.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2014-2015 OpenFOAM Foundation - Copyright (C) 2019 OpenCFD Ltd. + Copyright (C) 2019-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -89,9 +89,9 @@ incompressibleTwoPhaseInteractingMixture ( "d", dimLength, - muModel_->viscosityProperties().lookupOrDefault("d", 0.0) + muModel_->viscosityProperties().getOrDefault("d", 0.0) ), - alphaMax_(muModel_->viscosityProperties().lookupOrDefault("alphaMax", 1.0)), + alphaMax_(muModel_->viscosityProperties().getOrDefault("alphaMax", 1.0)), U_(U), phi_(phi), @@ -132,11 +132,11 @@ bool Foam::incompressibleTwoPhaseInteractingMixture::read() ( "d", dimLength, - muModel_->viscosityProperties().lookupOrDefault("d", 0) + muModel_->viscosityProperties().getOrDefault("d", 0) ); alphaMax_ = - muModel_->viscosityProperties().lookupOrDefault + muModel_->viscosityProperties().getOrDefault ( "alphaMax", 1.0 diff --git a/applications/solvers/multiphase/driftFluxFoam/mixtureViscosityModels/plastic/plastic.C b/applications/solvers/multiphase/driftFluxFoam/mixtureViscosityModels/plastic/plastic.C index d89ff771019..7777d0c01c1 100644 --- a/applications/solvers/multiphase/driftFluxFoam/mixtureViscosityModels/plastic/plastic.C +++ b/applications/solvers/multiphase/driftFluxFoam/mixtureViscosityModels/plastic/plastic.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2014-2017 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -68,7 +69,7 @@ Foam::mixtureViscosityModels::plastic::plastic ( IOobject::groupName ( - viscosityProperties.lookupOrDefault<word>("alpha", "alpha"), + viscosityProperties.getOrDefault<word>("alpha", "alpha"), viscosityProperties.dictName() ) ) diff --git a/applications/solvers/multiphase/driftFluxFoam/mixtureViscosityModels/slurry/slurry.C b/applications/solvers/multiphase/driftFluxFoam/mixtureViscosityModels/slurry/slurry.C index a5c1484a9fc..9eb771285b3 100644 --- a/applications/solvers/multiphase/driftFluxFoam/mixtureViscosityModels/slurry/slurry.C +++ b/applications/solvers/multiphase/driftFluxFoam/mixtureViscosityModels/slurry/slurry.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2014 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -64,7 +65,7 @@ Foam::mixtureViscosityModels::slurry::slurry ( IOobject::groupName ( - viscosityProperties.lookupOrDefault<word>("alpha", "alpha"), + viscosityProperties.getOrDefault<word>("alpha", "alpha"), viscosityProperties.dictName() ) ) diff --git a/applications/solvers/multiphase/icoReactingMultiphaseInterFoam/alphaCourantNo.H b/applications/solvers/multiphase/icoReactingMultiphaseInterFoam/alphaCourantNo.H index 270833733fb..e00a46546e9 100644 --- a/applications/solvers/multiphase/icoReactingMultiphaseInterFoam/alphaCourantNo.H +++ b/applications/solvers/multiphase/icoReactingMultiphaseInterFoam/alphaCourantNo.H @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2014 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -38,12 +39,12 @@ scalar maxAlphaCo scalar maxAlphaDdt ( - runTime.controlDict().lookupOrDefault("maxAlphaDdt", GREAT) + runTime.controlDict().getOrDefault("maxAlphaDdt", GREAT) ); scalar maxDi ( - runTime.controlDict().lookupOrDefault<scalar>("maxDi", GREAT) + runTime.controlDict().getOrDefault<scalar>("maxDi", GREAT) ); scalar alphaCoNum = 0.0; diff --git a/applications/solvers/multiphase/icoReactingMultiphaseInterFoam/laserDTRM/laserDTRM.C b/applications/solvers/multiphase/icoReactingMultiphaseInterFoam/laserDTRM/laserDTRM.C index db0cebfc4f0..41b5a02546d 100644 --- a/applications/solvers/multiphase/icoReactingMultiphaseInterFoam/laserDTRM/laserDTRM.C +++ b/applications/solvers/multiphase/icoReactingMultiphaseInterFoam/laserDTRM/laserDTRM.C @@ -354,7 +354,7 @@ Foam::radiation::laserDTRM::laserDTRM(const volScalarField& T) focalLaserRadius_(get<scalar>("focalLaserRadius")), qualityBeamLaser_ ( - lookupOrDefault<scalar>("qualityBeamLaser", 0.0) + getOrDefault<scalar>("qualityBeamLaser", 0) ), sigma_(0), @@ -364,7 +364,7 @@ Foam::radiation::laserDTRM::laserDTRM(const volScalarField& T) reflectionSwitch_(false), - alphaCut_(lookupOrDefault<scalar>("alphaCut", 0.5)), + alphaCut_(getOrDefault<scalar>("alphaCut", 0.5)), a_ ( @@ -451,7 +451,7 @@ Foam::radiation::laserDTRM::laserDTRM focalLaserRadius_(get<scalar>("focalLaserRadius")), qualityBeamLaser_ ( - lookupOrDefault<scalar>("qualityBeamLaser", 0.0) + getOrDefault<scalar>("qualityBeamLaser", 0) ), sigma_(0), @@ -461,7 +461,7 @@ Foam::radiation::laserDTRM::laserDTRM reflectionSwitch_(false), - alphaCut_(lookupOrDefault<scalar>("alphaCut", 0.5)), + alphaCut_(getOrDefault<scalar>("alphaCut", 0.5)), a_ ( diff --git a/applications/solvers/multiphase/icoReactingMultiphaseInterFoam/massTransferModels/Lee/Lee.C b/applications/solvers/multiphase/icoReactingMultiphaseInterFoam/massTransferModels/Lee/Lee.C index 9f5a3b03ce2..d7aaacd8f07 100644 --- a/applications/solvers/multiphase/icoReactingMultiphaseInterFoam/massTransferModels/Lee/Lee.C +++ b/applications/solvers/multiphase/icoReactingMultiphaseInterFoam/massTransferModels/Lee/Lee.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. @@ -41,7 +41,7 @@ Foam::meltingEvaporationModels::Lee<Thermo, OtherThermo>::Lee InterfaceCompositionModel<Thermo, OtherThermo>(dict, pair), C_("C", inv(dimTime), dict), Tactivate_("Tactivate", dimTemperature, dict), - alphaMin_(dict.lookupOrDefault<scalar>("alphaMin", 0)) + alphaMin_(dict.getOrDefault<scalar>("alphaMin", 0)) {} diff --git a/applications/solvers/multiphase/icoReactingMultiphaseInterFoam/massTransferModels/interfaceCompositionModel/interfaceCompositionModel.C b/applications/solvers/multiphase/icoReactingMultiphaseInterFoam/massTransferModels/interfaceCompositionModel/interfaceCompositionModel.C index fb2806f2abf..c6404fa54a1 100644 --- a/applications/solvers/multiphase/icoReactingMultiphaseInterFoam/massTransferModels/interfaceCompositionModel/interfaceCompositionModel.C +++ b/applications/solvers/multiphase/icoReactingMultiphaseInterFoam/massTransferModels/interfaceCompositionModel/interfaceCompositionModel.C @@ -58,16 +58,16 @@ Foam::interfaceCompositionModel::interfaceCompositionModel : modelVariable_ ( - modelVariableNames.lookupOrDefault + modelVariableNames.getOrDefault ( "variable", dict, modelVariable::T ) ), - includeVolChange_(dict.lookupOrDefault("includeVolChange", true)), + includeVolChange_(dict.getOrDefault("includeVolChange", true)), pair_(pair), - speciesName_(dict.lookupOrDefault<word>("species", "none")), + speciesName_(dict.getOrDefault<word>("species", "none")), mesh_(pair_.from().mesh()) {} diff --git a/applications/solvers/multiphase/icoReactingMultiphaseInterFoam/massTransferModels/interfaceHeatResistance/interfaceHeatResistance.C b/applications/solvers/multiphase/icoReactingMultiphaseInterFoam/massTransferModels/interfaceHeatResistance/interfaceHeatResistance.C index bf7bc315f7e..8b854c76dfd 100644 --- a/applications/solvers/multiphase/icoReactingMultiphaseInterFoam/massTransferModels/interfaceHeatResistance/interfaceHeatResistance.C +++ b/applications/solvers/multiphase/icoReactingMultiphaseInterFoam/massTransferModels/interfaceHeatResistance/interfaceHeatResistance.C @@ -178,8 +178,8 @@ Foam::meltingEvaporationModels::interfaceHeatResistance<Thermo, OtherThermo> this->mesh_, dimensionedScalar(dimMass/dimArea/dimTemperature/dimTime, Zero) ), - isoAlpha_(dict.lookupOrDefault<scalar>("isoAlpha", 0.5)), - spread_(dict.lookupOrDefault<scalar>("spread", 3)) + isoAlpha_(dict.getOrDefault<scalar>("isoAlpha", 0.5)), + spread_(dict.getOrDefault<scalar>("spread", 3)) {} diff --git a/applications/solvers/multiphase/icoReactingMultiphaseInterFoam/massTransferModels/kineticGasEvaporation/kineticGasEvaporation.C b/applications/solvers/multiphase/icoReactingMultiphaseInterFoam/massTransferModels/kineticGasEvaporation/kineticGasEvaporation.C index aa8af7f4e70..54d79777ce2 100644 --- a/applications/solvers/multiphase/icoReactingMultiphaseInterFoam/massTransferModels/kineticGasEvaporation/kineticGasEvaporation.C +++ b/applications/solvers/multiphase/icoReactingMultiphaseInterFoam/massTransferModels/kineticGasEvaporation/kineticGasEvaporation.C @@ -161,7 +161,7 @@ Foam::meltingEvaporationModels::kineticGasEvaporation<Thermo, OtherThermo> this->mesh_, dimensionedScalar(dimDensity/dimTime, Zero) ), - isoAlpha_(dict.lookupOrDefault<scalar>("isoAlpha", 0.5)) + isoAlpha_(dict.getOrDefault<scalar>("isoAlpha", 0.5)) { word speciesName = IOobject::member(this->transferSpecie()); diff --git a/applications/solvers/multiphase/icoReactingMultiphaseInterFoam/phasesSystem/phaseModel/MultiComponentPhaseModel/MultiComponentPhaseModel.C b/applications/solvers/multiphase/icoReactingMultiphaseInterFoam/phasesSystem/phaseModel/MultiComponentPhaseModel/MultiComponentPhaseModel.C index b35ea0eeaae..8e10cfbd394 100644 --- a/applications/solvers/multiphase/icoReactingMultiphaseInterFoam/phasesSystem/phaseModel/MultiComponentPhaseModel/MultiComponentPhaseModel.C +++ b/applications/solvers/multiphase/icoReactingMultiphaseInterFoam/phasesSystem/phaseModel/MultiComponentPhaseModel/MultiComponentPhaseModel.C @@ -313,7 +313,7 @@ void Foam::MultiComponentPhaseModel<BasePhaseModel, phaseThermo>::solveYi scalar nYiSubCycles ( - MULEScontrols.lookupOrDefault<scalar>("nYiSubCycles", 1) + MULEScontrols.getOrDefault<scalar>("nYiSubCycles", 1) ); forAll(X_, i) diff --git a/applications/solvers/multiphase/icoReactingMultiphaseInterFoam/phasesSystem/phaseSystem/phaseSystem.C b/applications/solvers/multiphase/icoReactingMultiphaseInterFoam/phasesSystem/phaseSystem/phaseSystem.C index 84d5af3a5ca..03d7a0fd963 100644 --- a/applications/solvers/multiphase/icoReactingMultiphaseInterFoam/phasesSystem/phaseSystem/phaseSystem.C +++ b/applications/solvers/multiphase/icoReactingMultiphaseInterFoam/phasesSystem/phaseSystem/phaseSystem.C @@ -250,7 +250,7 @@ Foam::phaseSystem::phaseSystem totalPhasePairs_(), Prt_ ( - dimensionedScalar::lookupOrAddToDict + dimensionedScalar::getOrAddToDict ( "Prt", *this, 1.0 ) diff --git a/applications/solvers/multiphase/interFoam/overInterDyMFoam/createDyMControls.H b/applications/solvers/multiphase/interFoam/overInterDyMFoam/createDyMControls.H index 603ae1f5451..584b8eca254 100644 --- a/applications/solvers/multiphase/interFoam/overInterDyMFoam/createDyMControls.H +++ b/applications/solvers/multiphase/interFoam/overInterDyMFoam/createDyMControls.H @@ -1,30 +1,30 @@ bool correctPhi ( - pimple.dict().lookupOrDefault("correctPhi", true) + pimple.dict().getOrDefault("correctPhi", true) ); bool checkMeshCourantNo ( - pimple.dict().lookupOrDefault("checkMeshCourantNo", false) + pimple.dict().getOrDefault("checkMeshCourantNo", false) ); bool moveMeshOuterCorrectors ( - pimple.dict().lookupOrDefault("moveMeshOuterCorrectors", false) + pimple.dict().getOrDefault("moveMeshOuterCorrectors", false) ); bool massFluxInterpolation ( - pimple.dict().lookupOrDefault("massFluxInterpolation", false) + pimple.dict().getOrDefault("massFluxInterpolation", false) ); bool adjustFringe ( - pimple.dict().lookupOrDefault("oversetAdjustPhi", false) + pimple.dict().getOrDefault("oversetAdjustPhi", false) ); bool ddtCorr ( - pimple.dict().lookupOrDefault("ddtCorr", true) + pimple.dict().getOrDefault("ddtCorr", true) ); diff --git a/applications/solvers/multiphase/interFoam/overInterDyMFoam/readControls.H b/applications/solvers/multiphase/interFoam/overInterDyMFoam/readControls.H index 0f9f7c67382..78eb3cccb95 100644 --- a/applications/solvers/multiphase/interFoam/overInterDyMFoam/readControls.H +++ b/applications/solvers/multiphase/interFoam/overInterDyMFoam/readControls.H @@ -1,16 +1,16 @@ #include "readTimeControls.H" -correctPhi = pimple.dict().lookupOrDefault("correctPhi", false); +correctPhi = pimple.dict().getOrDefault("correctPhi", false); checkMeshCourantNo = - pimple.dict().lookupOrDefault("checkMeshCourantNo", false); + pimple.dict().getOrDefault("checkMeshCourantNo", false); moveMeshOuterCorrectors = - pimple.dict().lookupOrDefault("moveMeshOuterCorrectors", false); + pimple.dict().getOrDefault("moveMeshOuterCorrectors", false); massFluxInterpolation = - pimple.dict().lookupOrDefault("massFluxInterpolation", false); + pimple.dict().getOrDefault("massFluxInterpolation", false); -ddtCorr = pimple.dict().lookupOrDefault("ddtCorr", true); +ddtCorr = pimple.dict().getOrDefault("ddtCorr", true); -adjustFringe = pimple.dict().lookupOrDefault("oversetAdjustPhi", false); +adjustFringe = pimple.dict().getOrDefault("oversetAdjustPhi", false); diff --git a/applications/solvers/multiphase/interPhaseChangeFoam/alphaControls.H b/applications/solvers/multiphase/interPhaseChangeFoam/alphaControls.H index 41d51c91350..e9c832e5849 100644 --- a/applications/solvers/multiphase/interPhaseChangeFoam/alphaControls.H +++ b/applications/solvers/multiphase/interPhaseChangeFoam/alphaControls.H @@ -4,18 +4,18 @@ label nAlphaCorr(alphaControls.get<label>("nAlphaCorr")); label nAlphaSubCycles(alphaControls.get<label>("nAlphaSubCycles")); -bool MULESCorr(alphaControls.lookupOrDefault("MULESCorr", false)); +bool MULESCorr(alphaControls.getOrDefault("MULESCorr", false)); // Apply the compression correction from the previous iteration // Improves efficiency for steady-simulations but can only be applied // once the alpha field is reasonably steady, i.e. fully developed //bool alphaApplyPrevCorr //( -// alphaControls.lookupOrDefault("alphaApplyPrevCorr", false) +// alphaControls.getOrDefault("alphaApplyPrevCorr", false) //); // Isotropic compression coefficient scalar icAlpha ( - alphaControls.lookupOrDefault<scalar>("icAlpha", 0) + alphaControls.getOrDefault<scalar>("icAlpha", 0) ); diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseEulerFoam.C b/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseEulerFoam.C index 04cc3a8936a..ffbbac420a9 100644 --- a/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseEulerFoam.C +++ b/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseEulerFoam.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. @@ -72,7 +73,7 @@ int main(int argc, char *argv[]) scalar slamDampCoeff ( - fluid.lookupOrDefault<scalar>("slamDampCoeff", 1) + fluid.getOrDefault<scalar>("slamDampCoeff", 1) ); dimensionedScalar maxSlamVelocity diff --git a/applications/solvers/multiphase/reactingEulerFoam/functionObjects/sizeDistribution/sizeDistribution.C b/applications/solvers/multiphase/reactingEulerFoam/functionObjects/sizeDistribution/sizeDistribution.C index 76f384a4cfd..49dd86c8eb9 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/functionObjects/sizeDistribution/sizeDistribution.C +++ b/applications/solvers/multiphase/reactingEulerFoam/functionObjects/sizeDistribution/sizeDistribution.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2017-2019 OpenFOAM Foundation - Copyright (C) 2019 OpenCFD Ltd. + Copyright (C) 2019-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -362,7 +362,7 @@ Foam::functionObjects::sizeDistribution::sizeDistribution nCells_(0), cellId_(), volume_(0.0), - writeVolume_(dict.lookupOrDefault("writeVolume", false)), + writeVolume_(dict.getOrDefault("writeVolume", false)), popBal_ ( obr_.lookupObject<Foam::diameterModels::populationBalanceModel> @@ -371,8 +371,8 @@ Foam::functionObjects::sizeDistribution::sizeDistribution ) ), N_(popBal_.sizeGroups().size()), - momentOrder_(dict.lookupOrDefault<label>("momentOrder", 0)), - normalize_(dict.lookupOrDefault("normalize", false)), + momentOrder_(dict.getOrDefault<label>("momentOrder", 0)), + normalize_(dict.getOrDefault("normalize", false)), sumN_(0.0), sumV_(0.0) { diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/reactingMultiphaseEulerFoam.C b/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/reactingMultiphaseEulerFoam.C index 443b1aad84a..f80746acfb2 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/reactingMultiphaseEulerFoam.C +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/reactingMultiphaseEulerFoam.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2018 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -65,11 +66,11 @@ int main(int argc, char *argv[]) Switch faceMomentum ( - pimple.dict().lookupOrDefault<Switch>("faceMomentum", false) + pimple.dict().getOrDefault<Switch>("faceMomentum", false) ); Switch partialElimination ( - pimple.dict().lookupOrDefault<Switch>("partialElimination", false) + pimple.dict().getOrDefault<Switch>("partialElimination", false) ); // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -82,7 +83,7 @@ int main(int argc, char *argv[]) int nEnergyCorrectors ( - pimple.dict().lookupOrDefault<int>("nEnergyCorrectors", 1) + pimple.dict().getOrDefault<int>("nEnergyCorrectors", 1) ); if (LTS) diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/setRDeltaT.H b/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/setRDeltaT.H index d89c09f9dc2..1d0c65b1539 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/setRDeltaT.H +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/setRDeltaT.H @@ -5,17 +5,17 @@ scalar maxCo ( - pimpleDict.lookupOrDefault<scalar>("maxCo", 0.2) + pimpleDict.getOrDefault<scalar>("maxCo", 0.2) ); scalar maxDeltaT ( - pimpleDict.lookupOrDefault<scalar>("maxDeltaT", GREAT) + pimpleDict.getOrDefault<scalar>("maxDeltaT", GREAT) ); scalar rDeltaTSmoothingCoeff ( - pimpleDict.lookupOrDefault<scalar>("rDeltaTSmoothingCoeff", 0.02) + pimpleDict.getOrDefault<scalar>("rDeltaTSmoothingCoeff", 0.02) ); surfaceScalarField maxPhi("maxPhi", phi); diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/reactingTwoPhaseEulerFoam.C b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/reactingTwoPhaseEulerFoam.C index 7eb45336715..b5b05da405c 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/reactingTwoPhaseEulerFoam.C +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/reactingTwoPhaseEulerFoam.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. @@ -75,7 +76,7 @@ int main(int argc, char *argv[]) bool faceMomentum ( - pimple.dict().lookupOrDefault("faceMomentum", false) + pimple.dict().getOrDefault("faceMomentum", false) ); #include "pUf/createRDeltaTf.H" @@ -90,7 +91,7 @@ int main(int argc, char *argv[]) int nEnergyCorrectors ( - pimple.dict().lookupOrDefault<int>("nEnergyCorrectors", 1) + pimple.dict().getOrDefault<int>("nEnergyCorrectors", 1) ); if (LTS) diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/setRDeltaT.H b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/setRDeltaT.H index 4cb3de01e99..10a7c9e0f09 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/setRDeltaT.H +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/setRDeltaT.H @@ -5,17 +5,17 @@ scalar maxCo ( - pimpleDict.lookupOrDefault<scalar>("maxCo", 0.2) + pimpleDict.getOrDefault<scalar>("maxCo", 0.2) ); scalar maxDeltaT ( - pimpleDict.lookupOrDefault<scalar>("maxDeltaT", GREAT) + pimpleDict.getOrDefault<scalar>("maxDeltaT", GREAT) ); scalar rDeltaTSmoothingCoeff ( - pimpleDict.lookupOrDefault<scalar>("rDeltaTSmoothingCoeff", 0.02) + pimpleDict.getOrDefault<scalar>("rDeltaTSmoothingCoeff", 0.02) ); // Set the reciprocal time-step from the local Courant number diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseEulerFoam.C b/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseEulerFoam.C index a31fb1dc1b0..2565aa271da 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseEulerFoam.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseEulerFoam.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. @@ -68,12 +69,12 @@ int main(int argc, char *argv[]) bool faceMomentum ( - pimple.dict().lookupOrDefault("faceMomentum", false) + pimple.dict().getOrDefault("faceMomentum", false) ); bool implicitPhasePressure ( - mesh.solverDict(alpha1.name()).lookupOrDefault + mesh.solverDict(alpha1.name()).getOrDefault ( "implicitPhasePressure", false ) diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/phaseModel/phaseModel.C b/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/phaseModel/phaseModel.C index 357eaba6ee8..1538419c7dd 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/phaseModel/phaseModel.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/phaseModel/phaseModel.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. @@ -74,7 +75,7 @@ Foam::phaseModel::phaseModel dimless, fluid.subDict(phaseName) ), - alphaMax_(phaseDict_.lookupOrDefault<scalar>("alphaMax", 1)), + alphaMax_(phaseDict_.getOrDefault<scalar>("alphaMax", 1)), thermo_(rhoThermo::New(fluid.mesh(), name_)), U_ ( diff --git a/applications/solvers/stressAnalysis/solidDisplacementFoam/createControls.H b/applications/solvers/stressAnalysis/solidDisplacementFoam/createControls.H index b35e04e26ed..5ad48633b74 100644 --- a/applications/solvers/stressAnalysis/solidDisplacementFoam/createControls.H +++ b/applications/solvers/stressAnalysis/solidDisplacementFoam/createControls.H @@ -1,5 +1,5 @@ #include "createControl.H" -int nCorr = stressControl.lookupOrDefault<int>("nCorrectors", 1); +int nCorr = stressControl.getOrDefault<int>("nCorrectors", 1); scalar convergenceTolerance(stressControl.get<scalar>("D")); diff --git a/applications/solvers/stressAnalysis/solidDisplacementFoam/readSolidDisplacementFoamControls.H b/applications/solvers/stressAnalysis/solidDisplacementFoam/readSolidDisplacementFoamControls.H index 78beb0e7170..d72cb9dfce0 100644 --- a/applications/solvers/stressAnalysis/solidDisplacementFoam/readSolidDisplacementFoamControls.H +++ b/applications/solvers/stressAnalysis/solidDisplacementFoam/readSolidDisplacementFoamControls.H @@ -1,3 +1,3 @@ -nCorr = stressControl.lookupOrDefault<int>("nCorrectors", 1); +nCorr = stressControl.getOrDefault<int>("nCorrectors", 1); convergenceTolerance = stressControl.get<scalar>("D"); compactNormalStress = stressControl.get<bool>("compactNormalStress"); diff --git a/applications/test/PatchFunction1/MappedField.C b/applications/test/PatchFunction1/MappedField.C index 5ec4ad2ad2e..5f295eb5ee5 100644 --- a/applications/test/PatchFunction1/MappedField.C +++ b/applications/test/PatchFunction1/MappedField.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. @@ -41,12 +41,12 @@ Foam::PatchFunction1Types::MappedField<Type>::MappedField : PatchFunction1<Type>(pp, entryName, dict), fieldTableName_(entryName), - setAverage_(dict.lookupOrDefault("setAverage", false)), - perturb_(dict.lookupOrDefault("perturb", 1e-5)), - pointsName_(dict.lookupOrDefault<word>("points", "points")), + setAverage_(dict.getOrDefault("setAverage", false)), + perturb_(dict.getOrDefault<scalar>("perturb", 1e-5)), + pointsName_(dict.getOrDefault<word>("points", "points")), mapMethod_ ( - dict.lookupOrDefault<word> + dict.getOrDefault<word> ( "mapMethod", "planarInterpolation" diff --git a/applications/utilities/mesh/generation/extrude/extrudeMesh/extrudeMesh.C b/applications/utilities/mesh/generation/extrude/extrudeMesh/extrudeMesh.C index c03d3d7ee0d..21ed696555f 100644 --- a/applications/utilities/mesh/generation/extrude/extrudeMesh/extrudeMesh.C +++ b/applications/utilities/mesh/generation/extrude/extrudeMesh/extrudeMesh.C @@ -264,7 +264,7 @@ int main(int argc, char *argv[]) const ExtrudeMode mode = ExtrudeModeNames.get("constructFrom", dict); // Any merging of small edges - const scalar mergeTol(dict.lookupOrDefault<scalar>("mergeTol", 1e-4)); + const scalar mergeTol(dict.getOrDefault<scalar>("mergeTol", 1e-4)); Info<< "Extruding from " << ExtrudeModeNames[mode] << " using model " << model().type() << endl; diff --git a/applications/utilities/mesh/generation/extrude/extrudeToRegionMesh/extrudeToRegionMesh.C b/applications/utilities/mesh/generation/extrude/extrudeToRegionMesh/extrudeToRegionMesh.C index 2f6ec5def09..cba010f5c50 100644 --- a/applications/utilities/mesh/generation/extrude/extrudeToRegionMesh/extrudeToRegionMesh.C +++ b/applications/utilities/mesh/generation/extrude/extrudeToRegionMesh/extrudeToRegionMesh.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. @@ -1498,7 +1498,7 @@ int main(int argc, char *argv[]) word oneDPatchType(emptyPolyPatch::typeName); if (oneD) { - oneDNonManifoldEdges = dict.lookupOrDefault("nonManifold", false); + oneDNonManifoldEdges = dict.getOrDefault("nonManifold", false); oneDPatchType = dict.get<word>("oneDPolyPatchType"); } diff --git a/applications/utilities/mesh/generation/foamyMesh/cellSizeAndAlignmentGrid/cellSizeAndAlignmentGrid.C b/applications/utilities/mesh/generation/foamyMesh/cellSizeAndAlignmentGrid/cellSizeAndAlignmentGrid.C index c724a9f916e..6d96b054a29 100644 --- a/applications/utilities/mesh/generation/foamyMesh/cellSizeAndAlignmentGrid/cellSizeAndAlignmentGrid.C +++ b/applications/utilities/mesh/generation/foamyMesh/cellSizeAndAlignmentGrid/cellSizeAndAlignmentGrid.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. @@ -310,7 +311,7 @@ int main(int argc, char *argv[]) IOobject::NO_WRITE ), foamyHexMeshDict.subDict("geometry"), - foamyHexMeshDict.lookupOrDefault("singleRegionName", true) + foamyHexMeshDict.getOrDefault("singleRegionName", true) ); conformationSurfaces geometryToConformTo diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoi2DMesh/cv2DControls/cv2DControls.C b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoi2DMesh/cv2DControls/cv2DControls.C index 97f6553e5c4..c63ddc5fe41 100644 --- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoi2DMesh/cv2DControls/cv2DControls.C +++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoi2DMesh/cv2DControls/cv2DControls.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2013-2015 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -75,12 +76,12 @@ Foam::cv2DControls::cv2DControls objOutput_ ( - motionControl_.lookupOrDefault<Switch>("objOutput", false) + motionControl_.getOrDefault<Switch>("objOutput", false) ), meshedSurfaceOutput_ ( - motionControl_.lookupOrDefault<Switch>("meshedSurfaceOutput", false) + motionControl_.getOrDefault<Switch>("meshedSurfaceOutput", false) ), randomiseInitialGrid_ diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/backgroundMeshDecomposition/backgroundMeshDecomposition.C b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/backgroundMeshDecomposition/backgroundMeshDecomposition.C index 36f4f20adfa..1b022e59e46 100644 --- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/backgroundMeshDecomposition/backgroundMeshDecomposition.C +++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/backgroundMeshDecomposition/backgroundMeshDecomposition.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2016 OpenFOAM Foundation - Copyright (C) 2017-2018 OpenCFD Ltd. + Copyright (C) 2017-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -806,7 +806,7 @@ Foam::backgroundMeshDecomposition::backgroundMeshDecomposition spanScale_(coeffsDict.get<scalar>("spanScale")), minCellSizeLimit_ ( - coeffsDict.lookupOrDefault<scalar>("minCellSizeLimit", 0.0) + coeffsDict.getOrDefault<scalar>("minCellSizeLimit", 0) ), minLevels_(coeffsDict.get<label>("minLevels")), volRes_(coeffsDict.get<label>("sampleResolution")), diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/cellShapeControl/cellAspectRatioControl/cellAspectRatioControl.C b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/cellShapeControl/cellAspectRatioControl/cellAspectRatioControl.C index 7e385d8e9b3..104ba364ed8 100644 --- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/cellShapeControl/cellAspectRatioControl/cellAspectRatioControl.C +++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/cellShapeControl/cellAspectRatioControl/cellAspectRatioControl.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. @@ -36,10 +37,10 @@ Foam::cellAspectRatioControl::cellAspectRatioControl ) : aspectRatioDict_(motionDict.subOrEmptyDict("cellAspectRatioControl")), - aspectRatio_(aspectRatioDict_.lookupOrDefault<scalar>("aspectRatio", 1.0)), + aspectRatio_(aspectRatioDict_.getOrDefault<scalar>("aspectRatio", 1)), aspectRatioDirection_ ( - aspectRatioDict_.lookupOrDefault<vector> + aspectRatioDict_.getOrDefault<vector> ( "aspectRatioDirection", Zero diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/cellShapeControl/cellSizeAndAlignmentControl/cellSizeAndAlignmentControl/cellSizeAndAlignmentControl.C b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/cellShapeControl/cellSizeAndAlignmentControl/cellSizeAndAlignmentControl/cellSizeAndAlignmentControl.C index 5455e596592..441f5391d51 100644 --- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/cellShapeControl/cellSizeAndAlignmentControl/cellSizeAndAlignmentControl/cellSizeAndAlignmentControl.C +++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/cellShapeControl/cellSizeAndAlignmentControl/cellSizeAndAlignmentControl/cellSizeAndAlignmentControl.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2012-2015 OpenFOAM Foundation - Copyright (C) 2019 OpenCFD Ltd. + Copyright (C) 2019-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -53,7 +53,7 @@ Foam::cellSizeAndAlignmentControl::cellSizeAndAlignmentControl defaultCellSize_(defaultCellSize), forceInitialPointInsertion_ ( - dict.lookupOrDefault<Switch> + dict.getOrDefault<Switch> ( "forceInitialPointInsertion", Switch::OFF diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/cellShapeControl/cellSizeAndAlignmentControl/searchableSurfaceControl/searchableSurfaceControl.C b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/cellShapeControl/cellSizeAndAlignmentControl/searchableSurfaceControl/searchableSurfaceControl.C index d35524a69e0..16edb18b5c6 100644 --- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/cellShapeControl/cellSizeAndAlignmentControl/searchableSurfaceControl/searchableSurfaceControl.C +++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/cellShapeControl/cellSizeAndAlignmentControl/searchableSurfaceControl/searchableSurfaceControl.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. @@ -169,7 +170,7 @@ Foam::searchableSurfaceControl::searchableSurfaceControl geometryToConformTo, defaultCellSize ), - surfaceName_(controlFunctionDict.lookupOrDefault<word>("surface", name)), + surfaceName_(controlFunctionDict.getOrDefault<word>("surface", name)), searchableSurface_(geometryToConformTo.geometry()[surfaceName_]), geometryToConformTo_(geometryToConformTo), cellSizeFunctions_(1), diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/cellSizeControlSurfaces/surfaceCellSizeFunction/cellSizeCalculationType/fieldFromFile/fieldFromFile.C b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/cellSizeControlSurfaces/surfaceCellSizeFunction/cellSizeCalculationType/fieldFromFile/fieldFromFile.C index 4865d11caa0..479eda7b229 100644 --- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/cellSizeControlSurfaces/surfaceCellSizeFunction/cellSizeCalculationType/fieldFromFile/fieldFromFile.C +++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/cellSizeControlSurfaces/surfaceCellSizeFunction/cellSizeCalculationType/fieldFromFile/fieldFromFile.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. @@ -70,7 +71,7 @@ Foam::fieldFromFile::fieldFromFile ), cellSizeMultipleCoeff_ ( - coeffsDict_.lookupOrDefault<scalar>("cellSizeMultipleCoeff", 1) + coeffsDict_.getOrDefault<scalar>("cellSizeMultipleCoeff", 1) ) {} diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/cellSizeControlSurfaces/surfaceCellSizeFunction/surfaceCellSizeFunction/surfaceCellSizeFunction.C b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/cellSizeControlSurfaces/surfaceCellSizeFunction/surfaceCellSizeFunction/surfaceCellSizeFunction.C index 58cdaa9bfad..da5e87dda5c 100644 --- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/cellSizeControlSurfaces/surfaceCellSizeFunction/surfaceCellSizeFunction/surfaceCellSizeFunction.C +++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/cellSizeControlSurfaces/surfaceCellSizeFunction/surfaceCellSizeFunction/surfaceCellSizeFunction.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2012-2017 OpenFOAM Foundation - Copyright (C) 2019 OpenCFD Ltd. + Copyright (C) 2019-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -54,7 +54,7 @@ Foam::surfaceCellSizeFunction::surfaceCellSizeFunction defaultCellSize_(defaultCellSize), refinementFactor_ ( - lookupOrDefault<scalar>("refinementFactor", 1.0) + getOrDefault<scalar>("refinementFactor", 1) ) {} diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMesh.C b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMesh.C index a4fbb752b39..00a843e5312 100644 --- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMesh.C +++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMesh.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. @@ -840,7 +841,7 @@ Foam::conformalVoronoiMesh::conformalVoronoiMesh IOobject::NO_WRITE ), foamyHexMeshDict.subDict("geometry"), - foamyHexMeshDict.lookupOrDefault("singleRegionName", true) + foamyHexMeshDict.getOrDefault("singleRegionName", true) ), geometryToConformTo_ ( diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshCalcDualMesh.C b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshCalcDualMesh.C index 9528e39be8c..013e6c8d2fc 100644 --- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshCalcDualMesh.C +++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshCalcDualMesh.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2012-2016 OpenFOAM Foundation - Copyright (C) 2018-2019 OpenCFD Ltd. + Copyright (C) 2018-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -1716,7 +1716,7 @@ void Foam::conformalVoronoiMesh::createFacesOwnerNeighbourAndPatches forAll(procNeighbours, patchi) { procNeighbours[patchi] = - patchDicts[patchi].lookupOrDefault<label>("neighbProcNo", -1); + patchDicts[patchi].getOrDefault<label>("neighbProcNo", -1); } List<DynamicList<face>> patchFaces(nPatches, DynamicList<face>(0)); @@ -2338,7 +2338,7 @@ void Foam::conformalVoronoiMesh::createFacesOwnerNeighbourAndPatches if (patchFaces[nbI].size() > 0) { const label neighbour = - patchDicts[nbI].lookupOrDefault<label>("neighbProcNo", -1); + patchDicts[nbI].getOrDefault<label>("neighbProcNo", -1); faceList procPatchFaces = patchFaces[nbI]; diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformationSurfaces/conformationSurfaces.C b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformationSurfaces/conformationSurfaces.C index 600ee89ca95..0fb81bc8c1a 100644 --- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformationSurfaces/conformationSurfaces.C +++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformationSurfaces/conformationSurfaces.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. @@ -134,7 +135,7 @@ void Foam::conformationSurfaces::readFeatures ) { const word featureMethod = - featureDict.lookupOrDefault<word>("featureMethod", "none"); + featureDict.getOrDefault<word>("featureMethod", "none"); if (featureMethod == "extendedFeatureEdgeMesh") { @@ -217,7 +218,7 @@ void Foam::conformationSurfaces::readFeatures ) { const word featureMethod = - featureDict.lookupOrDefault<word>("featureMethod", "none"); + featureDict.getOrDefault<word>("featureMethod", "none"); if (featureMethod == "extendedFeatureEdgeMesh") { @@ -380,7 +381,7 @@ Foam::conformationSurfaces::conformationSurfaces ( extendedFeatureEdgeMesh::sideVolumeTypeNames_ [ - dict.lookupOrDefault<word> + dict.getOrDefault<word> ( "meshableSide", "inside" @@ -452,7 +453,7 @@ Foam::conformationSurfaces::conformationSurfaces regionI, extendedFeatureEdgeMesh::sideVolumeTypeNames_ [ - regionDict.lookupOrDefault<word> + regionDict.getOrDefault<word> ( "meshableSide", extendedFeatureEdgeMesh:: diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/cvControls/cvControls.C b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/cvControls/cvControls.C index c5e8d515cba..1041d10b1ca 100644 --- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/cvControls/cvControls.C +++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/cvControls/cvControls.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2012-2015 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -131,13 +132,13 @@ Foam::cvControls::cvControls motionDict.get<scalar>("minimumCellSizeCoeff")*defaultCellSize_; objOutput_ = - motionDict.lookupOrDefault<Switch>("objOutput", false); + motionDict.getOrDefault<Switch>("objOutput", false); timeChecks_ = - motionDict.lookupOrDefault<Switch>("timeChecks", false); + motionDict.getOrDefault<Switch>("timeChecks", false); printVertexInfo_ = - motionDict.lookupOrDefault<Switch>("printVertexInfo", false); + motionDict.getOrDefault<Switch>("printVertexInfo", false); if (Pstream::parRun()) { @@ -190,10 +191,10 @@ Foam::cvControls::cvControls ); filterEdges_ = - filteringDict.lookupOrDefault<Switch>("filterEdges", true); + filteringDict.getOrDefault<Switch>("filterEdges", true); filterFaces_ = - filteringDict.lookupOrDefault<Switch>("filterFaces", false); + filteringDict.getOrDefault<Switch>("filterFaces", false); if (filterFaces_) { diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/initialPointsMethod/autoDensity/autoDensity.C b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/initialPointsMethod/autoDensity/autoDensity.C index d164619048f..f209dab182b 100644 --- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/initialPointsMethod/autoDensity/autoDensity.C +++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/initialPointsMethod/autoDensity/autoDensity.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2012-2016 OpenFOAM Foundation - Copyright (C) 2018-2019 OpenCFD Ltd. + Copyright (C) 2018-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -884,14 +884,14 @@ autoDensity::autoDensity globalTrialPoints_(0), minCellSizeLimit_ ( - detailsDict().lookupOrDefault<scalar>("minCellSizeLimit", 0.0) + detailsDict().getOrDefault<scalar>("minCellSizeLimit", 0) ), minLevels_(detailsDict().get<label>("minLevels")), maxSizeRatio_(detailsDict().get<scalar>("maxSizeRatio")), volRes_(detailsDict().get<label>("sampleResolution")), surfRes_ ( - detailsDict().lookupOrDefault<label>("surfaceSampleResolution", volRes_) + detailsDict().getOrDefault<label>("surfaceSampleResolution", volRes_) ) { if (maxSizeRatio_ <= 1.0) diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/searchableSurfaceFeatures/searchableBoxFeatures.C b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/searchableSurfaceFeatures/searchableBoxFeatures.C index a5ff22f4b2b..bfda76b822a 100644 --- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/searchableSurfaceFeatures/searchableBoxFeatures.C +++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/searchableSurfaceFeatures/searchableBoxFeatures.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2013-2016 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -58,7 +59,7 @@ Foam::searchableBoxFeatures::searchableBoxFeatures ( extendedFeatureEdgeMesh::sideVolumeTypeNames_ [ - dict.lookupOrDefault<word>("meshableSide", "inside") + dict.getOrDefault<word>("meshableSide", "inside") ] ) { diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/searchableSurfaceFeatures/searchablePlateFeatures.C b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/searchableSurfaceFeatures/searchablePlateFeatures.C index b04d5e3ab85..b813bee45bb 100644 --- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/searchableSurfaceFeatures/searchablePlateFeatures.C +++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/searchableSurfaceFeatures/searchablePlateFeatures.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2013-2015 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -87,7 +88,7 @@ Foam::searchablePlateFeatures::searchablePlateFeatures ( extendedFeatureEdgeMesh::sideVolumeTypeNames_ [ - dict.lookupOrDefault<word>("meshableSide", "inside") + dict.getOrDefault<word>("meshableSide", "inside") ] ) { diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/searchableSurfaceFeatures/triSurfaceMeshFeatures.C b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/searchableSurfaceFeatures/triSurfaceMeshFeatures.C index 0891df447ca..1abc1758aa6 100644 --- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/searchableSurfaceFeatures/triSurfaceMeshFeatures.C +++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/searchableSurfaceFeatures/triSurfaceMeshFeatures.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2013-2015 OpenFOAM Foundation - Copyright (C) 2018 OpenCFD Ltd. + Copyright (C) 2018-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -59,7 +59,7 @@ Foam::triSurfaceMeshFeatures::triSurfaceMeshFeatures ( extendedFeatureEdgeMesh::sideVolumeTypeNames_ [ - dict.lookupOrDefault<word>("meshableSide", "inside") + dict.getOrDefault<word>("meshableSide", "inside") ] ) { diff --git a/applications/utilities/mesh/generation/foamyMesh/foamyHexMesh/foamyHexMesh.C b/applications/utilities/mesh/generation/foamyMesh/foamyHexMesh/foamyHexMesh.C index f9ce1378677..caff0c54744 100644 --- a/applications/utilities/mesh/generation/foamyMesh/foamyHexMesh/foamyHexMesh.C +++ b/applications/utilities/mesh/generation/foamyMesh/foamyHexMesh/foamyHexMesh.C @@ -103,7 +103,7 @@ int main(int argc, char *argv[]) IOobject::NO_WRITE ), foamyHexMeshDict.subDict("geometry"), - foamyHexMeshDict.lookupOrDefault("singleRegionName", true) + foamyHexMeshDict.getOrDefault("singleRegionName", true) ); // Write some stats diff --git a/applications/utilities/mesh/generation/foamyMesh/foamyHexMeshBackgroundMesh/foamyHexMeshBackgroundMesh.C b/applications/utilities/mesh/generation/foamyMesh/foamyHexMeshBackgroundMesh/foamyHexMeshBackgroundMesh.C index 19a0c25ad87..51a68564c58 100644 --- a/applications/utilities/mesh/generation/foamyMesh/foamyHexMeshBackgroundMesh/foamyHexMeshBackgroundMesh.C +++ b/applications/utilities/mesh/generation/foamyMesh/foamyHexMeshBackgroundMesh/foamyHexMeshBackgroundMesh.C @@ -438,7 +438,7 @@ int main(int argc, char *argv[]) IOobject::NO_WRITE ), foamyHexMeshDict.subDict("geometry"), - foamyHexMeshDict.lookupOrDefault("singleRegionName", true) + foamyHexMeshDict.getOrDefault("singleRegionName", true) ); Random rndGen(64293*Pstream::myProcNo()); diff --git a/applications/utilities/mesh/generation/foamyMesh/foamyHexMeshSurfaceSimplify/foamyHexMeshSurfaceSimplify.C b/applications/utilities/mesh/generation/foamyMesh/foamyHexMeshSurfaceSimplify/foamyHexMeshSurfaceSimplify.C index 0c785baf25a..699c0f1a7d8 100644 --- a/applications/utilities/mesh/generation/foamyMesh/foamyHexMeshSurfaceSimplify/foamyHexMeshSurfaceSimplify.C +++ b/applications/utilities/mesh/generation/foamyMesh/foamyHexMeshSurfaceSimplify/foamyHexMeshSurfaceSimplify.C @@ -411,7 +411,7 @@ int main(int argc, char *argv[]) IOobject::NO_WRITE ), foamyHexMeshDict.subDict("geometry"), - foamyHexMeshDict.lookupOrDefault("singleRegionName", true) + foamyHexMeshDict.getOrDefault("singleRegionName", true) ); Info<< "Geometry read in = " diff --git a/applications/utilities/mesh/generation/foamyMesh/foamyHexMeshSurfaceSimplify/foamyHexMeshSurfaceSimplify_non_octree.C b/applications/utilities/mesh/generation/foamyMesh/foamyHexMeshSurfaceSimplify/foamyHexMeshSurfaceSimplify_non_octree.C index 986417f9d5b..611bc527930 100644 --- a/applications/utilities/mesh/generation/foamyMesh/foamyHexMeshSurfaceSimplify/foamyHexMeshSurfaceSimplify_non_octree.C +++ b/applications/utilities/mesh/generation/foamyMesh/foamyHexMeshSurfaceSimplify/foamyHexMeshSurfaceSimplify_non_octree.C @@ -98,7 +98,7 @@ int main(int argc, char *argv[]) IOobject::NO_WRITE ), foamyHexMeshDict.subDict("geometry"), - foamyHexMeshDict.lookupOrDefault("singleRegionName", true) + foamyHexMeshDict.getOrDefault("singleRegionName", true) ); Info<< "Geometry read in = " diff --git a/applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh/CV2D.C b/applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh/CV2D.C index f591a863f3e..f346b061c5b 100644 --- a/applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh/CV2D.C +++ b/applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh/CV2D.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2013-2016 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -125,7 +126,7 @@ Foam::CV2D::CV2D IOobject::NO_WRITE ), cvMeshDict.subDict("geometry"), - cvMeshDict.lookupOrDefault("singleRegionName", true) + cvMeshDict.getOrDefault("singleRegionName", true) ), qSurf_ ( diff --git a/applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh/shortEdgeFilter2D.C b/applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh/shortEdgeFilter2D.C index 4a2a5f1303c..445416cc9ea 100644 --- a/applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh/shortEdgeFilter2D.C +++ b/applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh/shortEdgeFilter2D.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2013-2016 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -157,7 +158,7 @@ Foam::shortEdgeFilter2D::shortEdgeFilter2D shortEdgeFilterFactor_(dict.get<scalar>("shortEdgeFilterFactor")), edgeAttachedToBoundaryFactor_ ( - dict.lookupOrDefault<scalar>("edgeAttachedToBoundaryFactor", 2.0) + dict.getOrDefault<scalar>("edgeAttachedToBoundaryFactor", 2.0) ), patchNames_(wordList()), patchSizes_(labelList()), diff --git a/applications/utilities/mesh/generation/snappyHexMesh/snappyHexMesh.C b/applications/utilities/mesh/generation/snappyHexMesh/snappyHexMesh.C index 48e27e28b3c..95a6829c105 100644 --- a/applications/utilities/mesh/generation/snappyHexMesh/snappyHexMesh.C +++ b/applications/utilities/mesh/generation/snappyHexMesh/snappyHexMesh.C @@ -853,12 +853,12 @@ int main(int argc, char *argv[]) dryRun ); - const bool keepPatches(meshDict.lookupOrDefault("keepPatches", false)); + const bool keepPatches(meshDict.getOrDefault("keepPatches", false)); // format to be used for writing lines const word setFormat ( - meshDict.lookupOrDefault + meshDict.getOrDefault<word> ( "setFormat", vtkSetWriter<scalar>::typeName @@ -871,7 +871,7 @@ int main(int argc, char *argv[]) const scalar maxSizeRatio ( - meshDict.lookupOrDefault<scalar>("maxSizeRatio", 100.0) + meshDict.getOrDefault<scalar>("maxSizeRatio", 100) ); @@ -919,7 +919,7 @@ int main(int argc, char *argv[]) // Set debug level meshRefinement::debugType debugLevel = meshRefinement::debugType ( - meshDict.lookupOrDefault<label> + meshDict.getOrDefault<label> ( "debug", 0 @@ -1004,7 +1004,7 @@ int main(int argc, char *argv[]) IOobject::NO_WRITE ), geometryDict, - meshDict.lookupOrDefault("singleRegionName", true) + meshDict.getOrDefault("singleRegionName", true) ); @@ -1059,7 +1059,7 @@ int main(int argc, char *argv[]) allGeometry, conformationDict, shapeControlDict, - refineDict.lookupOrDefault("gapLevelIncrement", 0), + refineDict.getOrDefault("gapLevelIncrement", 0), initialCellSize/defaultCellSize ); @@ -1078,7 +1078,7 @@ int main(int argc, char *argv[]) "refinementSurfaces", dryRun ), - refineDict.lookupOrDefault("gapLevelIncrement", 0), + refineDict.getOrDefault("gapLevelIncrement", 0), dryRun ) ); @@ -1714,7 +1714,7 @@ int main(int argc, char *argv[]) { const bool mergePatchFaces ( - meshDict.lookupOrDefault("mergePatchFaces", true) + meshDict.getOrDefault("mergePatchFaces", true) ); if (!mergePatchFaces) @@ -1728,7 +1728,7 @@ int main(int argc, char *argv[]) { const bool mergeAcrossPatches ( - meshDict.lookupOrDefault("mergeAcrossPatches", false) + meshDict.getOrDefault("mergeAcrossPatches", false) ); if (mergeAcrossPatches) diff --git a/applications/utilities/mesh/manipulation/createBaffles/createBaffles.C b/applications/utilities/mesh/manipulation/createBaffles/createBaffles.C index 13423ae10a2..0fa4f2cd7b0 100644 --- a/applications/utilities/mesh/manipulation/createBaffles/createBaffles.C +++ b/applications/utilities/mesh/manipulation/createBaffles/createBaffles.C @@ -472,7 +472,7 @@ int main(int argc, char *argv[]) IOdictionary dict(dictIO); internalFacesOnly = dict.get<bool>("internalFacesOnly"); - noFields = dict.lookupOrDefault("noFields", false); + noFields = dict.getOrDefault("noFields", false); const dictionary& selectionsDict = dict.subDict("baffles"); @@ -735,7 +735,7 @@ int main(int argc, char *argv[]) // (ie 3D thermal baffles) const bool sameGroup = - patchSource.lookupOrDefault("sameGroup", true); + patchSource.getOrDefault("sameGroup", true); if (!sameGroup) { @@ -915,7 +915,7 @@ int main(int argc, char *argv[]) const dictionary& patchSource = dict.subDict("patchPairs"); const bool sameGroup = - patchSource.lookupOrDefault("sameGroup", true); + patchSource.getOrDefault("sameGroup", true); const word& groupName = selectors[selectorI].name(); diff --git a/applications/utilities/mesh/manipulation/createBaffles/faceSelection/faceSelection.C b/applications/utilities/mesh/manipulation/createBaffles/faceSelection/faceSelection.C index 557bbaeaaaf..bc30bb2c8aa 100644 --- a/applications/utilities/mesh/manipulation/createBaffles/faceSelection/faceSelection.C +++ b/applications/utilities/mesh/manipulation/createBaffles/faceSelection/faceSelection.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2012-2016 OpenFOAM Foundation - Copyright (C) 2019 OpenCFD Ltd. + Copyright (C) 2019-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -50,7 +50,7 @@ Foam::faceSelection::faceSelection name_(name), mesh_(mesh), dict_(dict), - flip_(dict.lookupOrDefault("flip", false)) + flip_(dict.getOrDefault("flip", false)) {} diff --git a/applications/utilities/mesh/manipulation/createBaffles/faceSelection/searchableSurfaceSelection.C b/applications/utilities/mesh/manipulation/createBaffles/faceSelection/searchableSurfaceSelection.C index d308e3ec76f..917f4f67840 100644 --- a/applications/utilities/mesh/manipulation/createBaffles/faceSelection/searchableSurfaceSelection.C +++ b/applications/utilities/mesh/manipulation/createBaffles/faceSelection/searchableSurfaceSelection.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. @@ -66,7 +67,7 @@ Foam::faceSelections::searchableSurfaceSelection::searchableSurfaceSelection dict.get<word>("surface"), IOobject ( - dict.lookupOrDefault("name", mesh.objectRegistry::db().name()), + dict.getOrDefault("name", mesh.objectRegistry::db().name()), mesh.time().constant(), "triSurface", mesh.objectRegistry::db(), diff --git a/applications/utilities/mesh/manipulation/moveDynamicMesh/moveDynamicMesh.C b/applications/utilities/mesh/manipulation/moveDynamicMesh/moveDynamicMesh.C index 6c753917406..e8872027e1b 100644 --- a/applications/utilities/mesh/manipulation/moveDynamicMesh/moveDynamicMesh.C +++ b/applications/utilities/mesh/manipulation/moveDynamicMesh/moveDynamicMesh.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2016 OpenFOAM Foundation - Copyright (C) 2016-2019 OpenCFD Ltd. + Copyright (C) 2016-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -190,7 +190,7 @@ int main(int argc, char *argv[]) bool moveMeshOuterCorrectors ( - pimple.dict().lookupOrDefault("moveMeshOuterCorrectors", false) + pimple.dict().getOrDefault("moveMeshOuterCorrectors", false) ); while (runTime.loop()) diff --git a/applications/utilities/mesh/manipulation/renumberMesh/renumberMesh.C b/applications/utilities/mesh/manipulation/renumberMesh/renumberMesh.C index d82a9fb2107..b6bf8476a1c 100644 --- a/applications/utilities/mesh/manipulation/renumberMesh/renumberMesh.C +++ b/applications/utilities/mesh/manipulation/renumberMesh/renumberMesh.C @@ -714,7 +714,7 @@ int main(int argc, char *argv[]) renumberPtr = renumberMethod::New(renumberDict); - sortCoupledFaceCells = renumberDict.lookupOrDefault + sortCoupledFaceCells = renumberDict.getOrDefault ( "sortCoupledFaceCells", false @@ -725,7 +725,7 @@ int main(int argc, char *argv[]) << endl; } - blockSize = renumberDict.lookupOrDefault("blockSize", 0); + blockSize = renumberDict.getOrDefault("blockSize", 0); if (blockSize > 0) { Info<< "Ordering cells into regions of size " << blockSize @@ -743,7 +743,7 @@ int main(int argc, char *argv[]) } } - orderPoints = renumberDict.lookupOrDefault("orderPoints", false); + orderPoints = renumberDict.getOrDefault("orderPoints", false); if (orderPoints) { Info<< "Ordering points into internal and boundary points." << nl diff --git a/applications/utilities/postProcessing/lagrangian/particleTracks/createFields.H b/applications/utilities/postProcessing/lagrangian/particleTracks/createFields.H index d3b933d2d76..742fe261d2f 100644 --- a/applications/utilities/postProcessing/lagrangian/particleTracks/createFields.H +++ b/applications/utilities/postProcessing/lagrangian/particleTracks/createFields.H @@ -15,4 +15,4 @@ const label sampleFrequency(propsDict.get<label>("sampleFrequency")); const label maxPositions(propsDict.get<label>("maxPositions")); -const word setFormat(propsDict.lookupOrDefault<word>("setFormat", "vtk")); +const word setFormat(propsDict.getOrDefault<word>("setFormat", "vtk")); diff --git a/applications/utilities/preProcessing/setAlphaField/setAlphaField.C b/applications/utilities/preProcessing/setAlphaField/setAlphaField.C index 67a574ceb03..dc343ab657e 100644 --- a/applications/utilities/preProcessing/setAlphaField/setAlphaField.C +++ b/applications/utilities/preProcessing/setAlphaField/setAlphaField.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2016-2017 DHI - Copyright (C) 2017 OpenCFD Ltd. + Copyright (C) 2017-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -184,7 +184,7 @@ int main(int argc, char *argv[]) isoCutCell icc(mesh, f); icc.volumeOfFluid(alpha1, f0); - if (dict.lookupOrDefault("invertAlpha", false)) + if (dict.getOrDefault("invertAlpha", false)) { alpha1 = 1 - alpha1; } diff --git a/applications/utilities/preProcessing/viewFactorsGen/shootRays.H b/applications/utilities/preProcessing/viewFactorsGen/shootRays.H index c20c0bd6624..9a44e73addc 100644 --- a/applications/utilities/preProcessing/viewFactorsGen/shootRays.H +++ b/applications/utilities/preProcessing/viewFactorsGen/shootRays.H @@ -4,7 +4,7 @@ // Maximum length for dynamicList const label maxDynListLength ( - viewFactorDict.lookupOrDefault<label>("maxDynListLength", 100000) + viewFactorDict.getOrDefault<label>("maxDynListLength", 100000) ); for (label proci = 0; proci < Pstream::nProcs(); proci++) diff --git a/applications/utilities/preProcessing/viewFactorsGen/viewFactorsGen.C b/applications/utilities/preProcessing/viewFactorsGen/viewFactorsGen.C index 808ab2b9067..231f58424d6 100644 --- a/applications/utilities/preProcessing/viewFactorsGen/viewFactorsGen.C +++ b/applications/utilities/preProcessing/viewFactorsGen/viewFactorsGen.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2016 OpenFOAM Foundation - Copyright (C) 2016-2018 OpenCFD Ltd. + Copyright (C) 2016-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -281,12 +281,12 @@ int main(int argc, char *argv[]) const word viewFactorWall("viewFactorWall"); const bool writeViewFactors = - viewFactorDict.lookupOrDefault("writeViewFactorMatrix", false); + viewFactorDict.getOrDefault("writeViewFactorMatrix", false); const bool dumpRays = - viewFactorDict.lookupOrDefault("dumpRays", false); + viewFactorDict.getOrDefault("dumpRays", false); - const label debug = viewFactorDict.lookupOrDefault<label>("debug", 0); + const label debug = viewFactorDict.getOrDefault<label>("debug", 0); // Read agglomeration map labelListIOList finalAgglom diff --git a/applications/utilities/surface/surfaceFeatureExtract/surfaceFeatureExtract.C b/applications/utilities/surface/surfaceFeatureExtract/surfaceFeatureExtract.C index 1152e0828f0..010cec6bd6c 100644 --- a/applications/utilities/surface/surfaceFeatureExtract/surfaceFeatureExtract.C +++ b/applications/utilities/surface/surfaceFeatureExtract/surfaceFeatureExtract.C @@ -272,7 +272,7 @@ int main(int argc, char *argv[]) // We don't needs the intersectionMethod yet, but can use it // for setting a reasonable loading option const surfaceIntersection::intersectionType selfIntersect = - surfaceIntersection::selfIntersectionNames.lookupOrDefault + surfaceIntersection::selfIntersectionNames.getOrDefault ( "intersectionMethod", surfaceDict, @@ -320,7 +320,7 @@ int main(int argc, char *argv[]) // Loading option - default depends on context triSurfaceLoader::loadingOption loadingOption = - triSurfaceLoader::loadingOptionNames.lookupOrDefault + triSurfaceLoader::loadingOptionNames.getOrDefault ( "loadingOption", surfaceDict, @@ -384,9 +384,9 @@ int main(int argc, char *argv[]) const dictionary& trimDict = surfaceDict.subDict("trimFeatures"); const scalar minLen = - trimDict.lookupOrDefault<scalar>("minLen", 0); + trimDict.getOrDefault<scalar>("minLen", 0); const label minElem = - trimDict.lookupOrDefault<label>("minElem", 0); + trimDict.getOrDefault<label>("minElem", 0); // Trim away small groups of features if (minLen > 0 || minElem > 0) @@ -461,7 +461,7 @@ int main(int argc, char *argv[]) } // Suboption: "nonManifoldEdges" (false: remove non-manifold edges) - if (!subsetDict.lookupOrDefault("nonManifoldEdges", true)) + if (!subsetDict.getOrDefault("nonManifoldEdges", true)) { Info<< "Removing all non-manifold edges" << " (edges with > 2 connected faces) unless they" @@ -476,7 +476,7 @@ int main(int argc, char *argv[]) } // Suboption: "openEdges" (false: remove open edges) - if (!subsetDict.lookupOrDefault("openEdges", true)) + if (!subsetDict.getOrDefault("openEdges", true)) { Info<< "Removing all open edges" << " (edges with 1 connected face)" << endl; @@ -656,13 +656,13 @@ int main(int argc, char *argv[]) // Output information const bool optCloseness = - surfaceDict.lookupOrDefault("closeness", false); + surfaceDict.getOrDefault("closeness", false); const bool optProximity = - surfaceDict.lookupOrDefault("featureProximity", false); + surfaceDict.getOrDefault("featureProximity", false); const bool optCurvature = - surfaceDict.lookupOrDefault("curvature", false); + surfaceDict.getOrDefault("curvature", false); // For VTK legacy format, we would need an a priori count of @@ -723,7 +723,7 @@ int main(int argc, char *argv[]) if (optCloseness) { const scalar maxProximity = - surfaceDict.lookupOrDefault<scalar>("maxFeatureProximity", 1); + surfaceDict.getOrDefault<scalar>("maxFeatureProximity", 1); tmp<scalarField> tproximity = edgeMeshTools::writeFeatureProximity diff --git a/applications/utilities/surface/surfacePatch/surfacePatch.C b/applications/utilities/surface/surfacePatch/surfacePatch.C index f58a5543ae4..5a5cc8b36e5 100644 --- a/applications/utilities/surface/surfacePatch/surfacePatch.C +++ b/applications/utilities/surface/surfacePatch/surfacePatch.C @@ -85,7 +85,7 @@ int main(int argc, char *argv[]) IOobject::NO_WRITE ), meshDict.subDict("geometry"), - meshDict.lookupOrDefault("singleRegionName", true) + meshDict.getOrDefault("singleRegionName", true) ); diff --git a/etc/codeTemplates/BC/BC.C b/etc/codeTemplates/BC/BC.C index 5c9f9ddebb6..a36fd713afa 100644 --- a/etc/codeTemplates/BC/BC.C +++ b/etc/codeTemplates/BC/BC.C @@ -79,7 +79,7 @@ CONSTRUCT data_(dict.get<TYPE>("data")), fieldData_("fieldData", dict, p.size()), timeVsData_(Function1<TYPE>::New("timeVsData", dict)), - wordData_(dict.lookupOrDefault<word>("wordName", "wordDefault")), + wordData_(dict.getOrDefault<word>("wordName", "wordDefault")), labelData_(-1), boolData_(false) { diff --git a/etc/codeTemplates/functionObject/FUNCTIONOBJECT.C b/etc/codeTemplates/functionObject/FUNCTIONOBJECT.C index b9563baa7e4..40f456e632d 100644 --- a/etc/codeTemplates/functionObject/FUNCTIONOBJECT.C +++ b/etc/codeTemplates/functionObject/FUNCTIONOBJECT.C @@ -52,7 +52,7 @@ Foam::functionObjects::FUNCTIONOBJECT::FUNCTIONOBJECT ) : fvMeshFunctionObject(name, runTime, dict), - wordData_(dict.lookupOrDefault<word>("wordData", "defaultWord")), + wordData_(dict.getOrDefault<word>("wordData", "defaultWord")), scalarData_(dict.get<scalar>("scalarData")), labelData_(dict.get<label>("labelData")) { diff --git a/src/ODE/ODESolvers/ODESolver/ODESolver.C b/src/ODE/ODESolvers/ODESolver/ODESolver.C index 015a056d298..2d6a824d358 100644 --- a/src/ODE/ODESolvers/ODESolver/ODESolver.C +++ b/src/ODE/ODESolvers/ODESolver/ODESolver.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2017 OpenFOAM Foundation - Copyright (C) 2019 OpenCFD Ltd. + Copyright (C) 2019-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -65,9 +65,9 @@ Foam::ODESolver::ODESolver(const ODESystem& ode, const dictionary& dict) odes_(ode), maxN_(ode.nEqns()), n_(ode.nEqns()), - absTol_(n_, dict.lookupOrDefault<scalar>("absTol", SMALL)), - relTol_(n_, dict.lookupOrDefault<scalar>("relTol", 1e-4)), - maxSteps_(dict.lookupOrDefault<label>("maxSteps", 10000)) + absTol_(n_, dict.getOrDefault<scalar>("absTol", SMALL)), + relTol_(n_, dict.getOrDefault<scalar>("relTol", 1e-4)), + maxSteps_(dict.getOrDefault<label>("maxSteps", 10000)) {} diff --git a/src/ODE/ODESolvers/adaptiveSolver/adaptiveSolver.C b/src/ODE/ODESolvers/adaptiveSolver/adaptiveSolver.C index 8ece0ea0c50..126b0cbc1e7 100644 --- a/src/ODE/ODESolvers/adaptiveSolver/adaptiveSolver.C +++ b/src/ODE/ODESolvers/adaptiveSolver/adaptiveSolver.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. @@ -36,11 +37,11 @@ Foam::adaptiveSolver::adaptiveSolver const dictionary& dict ) : - safeScale_(dict.lookupOrDefault<scalar>("safeScale", 0.9)), - alphaInc_(dict.lookupOrDefault<scalar>("alphaIncrease", 0.2)), - alphaDec_(dict.lookupOrDefault<scalar>("alphaDecrease", 0.25)), - minScale_(dict.lookupOrDefault<scalar>("minScale", 0.2)), - maxScale_(dict.lookupOrDefault<scalar>("maxScale", 10)), + safeScale_(dict.getOrDefault<scalar>("safeScale", 0.9)), + alphaInc_(dict.getOrDefault<scalar>("alphaIncrease", 0.2)), + alphaDec_(dict.getOrDefault<scalar>("alphaDecrease", 0.25)), + minScale_(dict.getOrDefault<scalar>("minScale", 0.2)), + maxScale_(dict.getOrDefault<scalar>("maxScale", 10)), dydx0_(ode.nEqns()), yTemp_(ode.nEqns()) {} diff --git a/src/OpenFOAM/algorithms/indexedOctree/volumeType.C b/src/OpenFOAM/algorithms/indexedOctree/volumeType.C index 52d4706d797..f33e1784507 100644 --- a/src/OpenFOAM/algorithms/indexedOctree/volumeType.C +++ b/src/OpenFOAM/algorithms/indexedOctree/volumeType.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2013 OpenFOAM Foundation - Copyright (C) 2018 OpenCFD Ltd. + Copyright (C) 2018-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -53,7 +53,7 @@ Foam::volumeType::volumeType const type deflt ) : - t_(names.lookupOrDefault(key, dict, deflt)) + t_(names.getOrDefault(key, dict, deflt)) {} diff --git a/src/OpenFOAM/algorithms/indexedOctree/volumeType.H b/src/OpenFOAM/algorithms/indexedOctree/volumeType.H index 87867366c76..c4864d295b2 100644 --- a/src/OpenFOAM/algorithms/indexedOctree/volumeType.H +++ b/src/OpenFOAM/algorithms/indexedOctree/volumeType.H @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2014 OpenFOAM Foundation - Copyright (C) 2015-2019 OpenCFD Ltd. + Copyright (C) 2015-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -101,7 +101,7 @@ public: t_(t) {} - //- Construct as lookupOrDefault by name from dictionary + //- Construct as getOrDefault by name from dictionary volumeType(const word& key, const dictionary& dict, const type deflt); //- Construct from integer diff --git a/src/OpenFOAM/db/Time/Time.C b/src/OpenFOAM/db/Time/Time.C index c1aee25f3fe..e428a60a3ef 100644 --- a/src/OpenFOAM/db/Time/Time.C +++ b/src/OpenFOAM/db/Time/Time.C @@ -145,7 +145,7 @@ void Foam::Time::adjustDeltaT() void Foam::Time::setControls() { // default is to resume calculation from "latestTime" - const word startFrom = controlDict_.lookupOrDefault<word> + const word startFrom = controlDict_.getOrDefault<word> ( "startFrom", "latestTime" @@ -290,7 +290,7 @@ void Foam::Time::setControls() // Read and set the deltaT only if time-step adjustment is active // otherwise use the deltaT from the controlDict - if (controlDict_.lookupOrDefault("adjustTimeStep", false)) + if (controlDict_.getOrDefault("adjustTimeStep", false)) { if (timeDict.readIfPresent("deltaT", deltaT_)) { @@ -379,7 +379,7 @@ void Foam::Time::setMonitoring(const bool forceProfiling) else if ( profilingDict - && profilingDict->lookupOrDefault("active", true) + && profilingDict->getOrDefault("active", true) ) { profiling::initialize @@ -999,7 +999,7 @@ bool Foam::Time::stopAt(const stopAtControls stopCtrl) const bool Foam::Time::isAdjustTimeStep() const { - return controlDict_.lookupOrDefault("adjustTimeStep", false); + return controlDict_.getOrDefault("adjustTimeStep", false); } diff --git a/src/OpenFOAM/db/dictionary/dictionary.H b/src/OpenFOAM/db/dictionary/dictionary.H index 22f8a84f95d..82c6749de25 100644 --- a/src/OpenFOAM/db/dictionary/dictionary.H +++ b/src/OpenFOAM/db/dictionary/dictionary.H @@ -1416,7 +1416,7 @@ public: //- Deprecated(2018-10) // \deprecated(2018-10) - use keyType::option version template<class T> - FOAM_DEPRECATED_FOR(2018-10, "lookupOrDefault(keyType::option)") + FOAM_DEPRECATED_FOR(2018-10, "getOrDefault(keyType::option)") T lookupOrDefault ( const word& keyword, @@ -1425,15 +1425,13 @@ public: bool patternMatch = true ) const { - return - lookupOrDefault - (keyword, matchOpt(recursive, patternMatch)); + return getOrDefault(keyword, matchOpt(recursive, patternMatch)); } //- Deprecated(2018-10) // \deprecated(2018-10) - use keyType::option version template<class T> - FOAM_DEPRECATED_FOR(2018-10, "lookupOrAddDefault(keyType::option)") + FOAM_DEPRECATED_FOR(2018-10, "getOrAdd(keyType::option)") T lookupOrAddDefault ( const word& keyword, @@ -1442,9 +1440,7 @@ public: bool patternMatch = true ) { - return - lookupOrAddDefault - (keyword, deflt, matchOpt(recursive, patternMatch)); + return getOrAdd(keyword, deflt, matchOpt(recursive, patternMatch)); } //- Deprecated(2018-10) diff --git a/src/OpenFOAM/db/dictionary/functionEntries/inputMode/inputMode.C b/src/OpenFOAM/db/dictionary/functionEntries/inputMode/inputMode.C index 44988fabe28..0595f9e5c87 100644 --- a/src/OpenFOAM/db/dictionary/functionEntries/inputMode/inputMode.C +++ b/src/OpenFOAM/db/dictionary/functionEntries/inputMode/inputMode.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. @@ -118,7 +118,7 @@ bool Foam::functionEntries::inputMode::execute { const word modeName(is); - // Like Enum::lookupOrDefault() with failsafe behaviour + // Like Enum::getOrDefault() with failsafe behaviour if (selectableNames.found(modeName)) { entry::globalInputMode = selectableNames.get(modeName); diff --git a/src/OpenFOAM/db/functionObjects/functionObject/functionObject.C b/src/OpenFOAM/db/functionObjects/functionObject/functionObject.C index 1dc559eb5aa..d4cd1c4e50b 100644 --- a/src/OpenFOAM/db/functionObjects/functionObject/functionObject.C +++ b/src/OpenFOAM/db/functionObjects/functionObject/functionObject.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. @@ -138,7 +138,7 @@ bool Foam::functionObject::read(const dictionary& dict) { if (!postProcess) { - log = dict.lookupOrDefault("log", true); + log = dict.getOrDefault("log", true); } return true; diff --git a/src/OpenFOAM/db/functionObjects/functionObjectList/functionObjectList.C b/src/OpenFOAM/db/functionObjects/functionObjectList/functionObjectList.C index d62d1ae4765..1fe141879a0 100644 --- a/src/OpenFOAM/db/functionObjects/functionObjectList/functionObjectList.C +++ b/src/OpenFOAM/db/functionObjects/functionObjectList/functionObjectList.C @@ -797,7 +797,7 @@ bool Foam::functionObjectList::read() const dictionary& dict = dEntry.dict(); - bool enabled = dict.lookupOrDefault("enabled", true); + bool enabled = dict.getOrDefault("enabled", true); newDigs[nFunc] = dict.digest(); diff --git a/src/OpenFOAM/db/functionObjects/regionFunctionObject/regionFunctionObject.C b/src/OpenFOAM/db/functionObjects/regionFunctionObject/regionFunctionObject.C index f81618c4018..0b2fba28b72 100644 --- a/src/OpenFOAM/db/functionObjects/regionFunctionObject/regionFunctionObject.C +++ b/src/OpenFOAM/db/functionObjects/regionFunctionObject/regionFunctionObject.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2016 OpenFOAM Foundation - Copyright (C) 2016-2019 OpenCFD Ltd. + Copyright (C) 2016-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -135,12 +135,12 @@ Foam::functionObjects::regionFunctionObject::regionFunctionObject ) : stateFunctionObject(name, runTime), - subRegistryName_(dict.lookupOrDefault<word>("subRegion", word::null)), + subRegistryName_(dict.getOrDefault<word>("subRegion", word::null)), obr_ ( runTime.lookupObject<objectRegistry> ( - dict.lookupOrDefault("region", polyMesh::defaultRegion) + dict.getOrDefault("region", polyMesh::defaultRegion) ) ), obrPtr_(nullptr) @@ -155,7 +155,7 @@ Foam::functionObjects::regionFunctionObject::regionFunctionObject ) : stateFunctionObject(name, obr.time()), - subRegistryName_(dict.lookupOrDefault<word>("subRegion", word::null)), + subRegistryName_(dict.getOrDefault<word>("subRegion", word::null)), obr_(obr), obrPtr_(nullptr) {} @@ -167,7 +167,7 @@ bool Foam::functionObjects::regionFunctionObject::read(const dictionary& dict) { stateFunctionObject::read(dict); - subRegistryName_ = dict.lookupOrDefault<word>("subRegion", word::null); + subRegistryName_ = dict.getOrDefault<word>("subRegion", word::null); obrPtr_ = nullptr; diff --git a/src/OpenFOAM/db/functionObjects/stateFunctionObject/stateFunctionObject.C b/src/OpenFOAM/db/functionObjects/stateFunctionObject/stateFunctionObject.C index d1b704fbbbb..8aa1595030b 100644 --- a/src/OpenFOAM/db/functionObjects/stateFunctionObject/stateFunctionObject.C +++ b/src/OpenFOAM/db/functionObjects/stateFunctionObject/stateFunctionObject.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2015 OpenFOAM Foundation - Copyright (C) 2015-2019 OpenCFD Ltd. + Copyright (C) 2015-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -85,7 +85,7 @@ bool Foam::functionObjects::stateFunctionObject::setTrigger IOdictionary& stateDict = this->stateDict(); label oldTriggeri = - stateDict.lookupOrDefault<label>("triggerIndex", labelMin); + stateDict.getOrDefault<label>("triggerIndex", labelMin); if (triggeri > oldTriggeri) { @@ -101,7 +101,7 @@ Foam::label Foam::functionObjects::stateFunctionObject::getTrigger() const { const IOdictionary& stateDict = this->stateDict(); - return stateDict.lookupOrDefault<label>("triggerIndex", labelMin); + return stateDict.getOrDefault<label>("triggerIndex", labelMin); } diff --git a/src/OpenFOAM/db/functionObjects/writeFile/writeFile.C b/src/OpenFOAM/db/functionObjects/writeFile/writeFile.C index 3453c1b8148..8bfb29b03b6 100644 --- a/src/OpenFOAM/db/functionObjects/writeFile/writeFile.C +++ b/src/OpenFOAM/db/functionObjects/writeFile/writeFile.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2012-2018 OpenFOAM Foundation - Copyright (C) 2015-2019 OpenCFD Ltd. + Copyright (C) 2015-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -212,14 +212,14 @@ Foam::functionObjects::writeFile::writeFile bool Foam::functionObjects::writeFile::read(const dictionary& dict) { writePrecision_ = - dict.lookupOrDefault("writePrecision", IOstream::defaultPrecision()); + dict.getOrDefault("writePrecision", IOstream::defaultPrecision()); // Only write on master writeToFile_ = - Pstream::master() && dict.lookupOrDefault("writeToFile", writeToFile_); + Pstream::master() && dict.getOrDefault("writeToFile", writeToFile_); // Use user time, e.g. CA deg in preference to seconds - useUserTime_ = dict.lookupOrDefault("useUserTime", true); + useUserTime_ = dict.getOrDefault("useUserTime", true); return true; } diff --git a/src/OpenFOAM/expressions/exprDriver/exprDriver.C b/src/OpenFOAM/expressions/exprDriver/exprDriver.C index 0af06ea570f..c9304bd1810 100644 --- a/src/OpenFOAM/expressions/exprDriver/exprDriver.C +++ b/src/OpenFOAM/expressions/exprDriver/exprDriver.C @@ -96,15 +96,15 @@ Foam::expressions::exprDriver::exprDriver stashedTokenId_(0), // Controls - debugScanner_(dict.lookupOrDefault("debugScanner", false)), - debugParser_(dict.lookupOrDefault("debugParser", false)), + debugScanner_(dict.getOrDefault("debugScanner", false)), + debugParser_(dict.getOrDefault("debugParser", false)), allowShadowing_ ( - dict.lookupOrDefault("allowShadowing", false) + dict.getOrDefault("allowShadowing", false) ), prevIterIsOldTime_ ( - dict.lookupOrDefault("prevIterIsOldTime", false) + dict.getOrDefault("prevIterIsOldTime", false) ), cacheReadFields_(cacheReadFields), searchInMemory_(searchInMemory || cacheReadFields), @@ -142,9 +142,9 @@ Foam::expressions::exprDriver::exprDriver : exprDriver ( - dict.lookupOrDefault("cacheReadFields", false), - dict.lookupOrDefault("searchInMemory", true), - dict.lookupOrDefault("searchFiles", false), + dict.getOrDefault("cacheReadFields", false), + dict.getOrDefault("searchInMemory", true), + dict.getOrDefault("searchFiles", false), dict ) { diff --git a/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricField.C b/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricField.C index e6282a24d97..43c3f1536c2 100644 --- a/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricField.C +++ b/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricField.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2017 OpenFOAM Foundation - Copyright (C) 2015-2019 OpenCFD Ltd. + Copyright (C) 2015-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -985,7 +985,7 @@ void Foam::GeometricField<Type, PatchField, GeoMesh>::relax() if ( - this->mesh().data::template lookupOrDefault<bool> + this->mesh().data::template getOrDefault<bool> ( "finalIteration", false diff --git a/src/OpenFOAM/fields/pointPatchFields/pointPatchField/pointPatchField.C b/src/OpenFOAM/fields/pointPatchFields/pointPatchField/pointPatchField.C index 775488b6768..cc4490fe85b 100644 --- a/src/OpenFOAM/fields/pointPatchFields/pointPatchField/pointPatchField.C +++ b/src/OpenFOAM/fields/pointPatchFields/pointPatchField/pointPatchField.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. @@ -56,7 +57,7 @@ Foam::pointPatchField<Type>::pointPatchField patch_(p), internalField_(iF), updated_(false), - patchType_(dict.lookupOrDefault<word>("patchType", word::null)) + patchType_(dict.getOrDefault<word>("patchType", word::null)) {} diff --git a/src/OpenFOAM/global/constants/dimensionedConstants.H b/src/OpenFOAM/global/constants/dimensionedConstants.H index 32fdbe6a2c8..158f8b84939 100644 --- a/src/OpenFOAM/global/constants/dimensionedConstants.H +++ b/src/OpenFOAM/global/constants/dimensionedConstants.H @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2016 OpenFOAM Foundation + Copyright (C) 2018-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -75,7 +76,7 @@ T dimensionedConstant { dictionary& groupDict = unitDict.subDict(group); - // Leaner version of dictionary lookupOrAddDefault() + // Leaner version of dictionary::getOrAdd() // without writeOptionalEntries if (groupDict.found(varName)) diff --git a/src/OpenFOAM/global/fileOperations/fileOperation/fileOperation.C b/src/OpenFOAM/global/fileOperations/fileOperation/fileOperation.C index df1e378a057..677b2995348 100644 --- a/src/OpenFOAM/global/fileOperations/fileOperation/fileOperation.C +++ b/src/OpenFOAM/global/fileOperations/fileOperation/fileOperation.C @@ -46,7 +46,7 @@ namespace Foam word fileOperation::defaultFileHandler ( - debug::optimisationSwitches().lookupOrAddDefault<word> + debug::optimisationSwitches().getOrAdd<word> ( "fileHandler", //Foam::fileOperations::uncollatedFileOperation::typeName, diff --git a/src/OpenFOAM/global/profiling/profiling.C b/src/OpenFOAM/global/profiling/profiling.C index 73bc162f44e..6d69ef02143 100644 --- a/src/OpenFOAM/global/profiling/profiling.C +++ b/src/OpenFOAM/global/profiling/profiling.C @@ -266,17 +266,17 @@ Foam::profiling::profiling times_(), sysInfo_ ( - dict.lookupOrDefault("sysInfo", false) + dict.getOrDefault("sysInfo", false) ? new profilingSysInfo() : nullptr ), cpuInfo_ ( - dict.lookupOrDefault("cpuInfo", false) + dict.getOrDefault("cpuInfo", false) ? new cpuInfo() : nullptr ), memInfo_ ( - dict.lookupOrDefault("memInfo", false) + dict.getOrDefault("memInfo", false) ? new memInfo() : nullptr ) { diff --git a/src/OpenFOAM/interpolations/interpolation2DTable/interpolation2DTable.C b/src/OpenFOAM/interpolations/interpolation2DTable/interpolation2DTable.C index f68e20015b8..aeeeb1d22b6 100644 --- a/src/OpenFOAM/interpolations/interpolation2DTable/interpolation2DTable.C +++ b/src/OpenFOAM/interpolations/interpolation2DTable/interpolation2DTable.C @@ -96,7 +96,7 @@ Foam::interpolation2DTable<Type>::interpolation2DTable(const dictionary& dict) List<value_type>(), bounding_ ( - bounds::normalBoundingNames.lookupOrDefault + bounds::normalBoundingNames.getOrDefault ( "outOfBounds", dict, diff --git a/src/OpenFOAM/interpolations/interpolationTable/interpolationTable.C b/src/OpenFOAM/interpolations/interpolationTable/interpolationTable.C index d9d5664cde5..18eaf5bc56d 100644 --- a/src/OpenFOAM/interpolations/interpolationTable/interpolationTable.C +++ b/src/OpenFOAM/interpolations/interpolationTable/interpolationTable.C @@ -100,7 +100,7 @@ Foam::interpolationTable<Type>::interpolationTable(const dictionary& dict) List<value_type>(), bounding_ ( - bounds::repeatableBoundingNames.lookupOrDefault + bounds::repeatableBoundingNames.getOrDefault ( "outOfBounds", dict, diff --git a/src/OpenFOAM/interpolations/interpolationTable/tableReaders/tableReader.C b/src/OpenFOAM/interpolations/interpolationTable/tableReaders/tableReader.C index 8176508e8d5..c3d2423de6e 100644 --- a/src/OpenFOAM/interpolations/interpolationTable/tableReaders/tableReader.C +++ b/src/OpenFOAM/interpolations/interpolationTable/tableReaders/tableReader.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. @@ -36,7 +36,7 @@ Foam::autoPtr<Foam::tableReader<Type>> Foam::tableReader<Type>::New const dictionary& spec ) { - const word readerType = spec.lookupOrDefault<word> + const word readerType = spec.getOrDefault<word> ( "readerType", "openFoam" diff --git a/src/OpenFOAM/interpolations/uniformInterpolationTable/uniformInterpolationTable.C b/src/OpenFOAM/interpolations/uniformInterpolationTable/uniformInterpolationTable.C index 9d1e207d8c7..f8512133ab0 100644 --- a/src/OpenFOAM/interpolations/uniformInterpolationTable/uniformInterpolationTable.C +++ b/src/OpenFOAM/interpolations/uniformInterpolationTable/uniformInterpolationTable.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. @@ -98,8 +99,8 @@ Foam::uniformInterpolationTable<Type>::uniformInterpolationTable List<scalar>(2, Zero), x0_(dict.get<scalar>("x0")), dx_(dict.get<scalar>("dx")), - log10_(dict.lookupOrDefault<Switch>("log10", false)), - bound_(dict.lookupOrDefault<Switch>("bound", false)) + log10_(dict.getOrDefault<Switch>("log10", false)), + bound_(dict.getOrDefault<Switch>("bound", false)) { if (initialiseOnly) { diff --git a/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrixSolver.C b/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrixSolver.C index 79096142855..d3da2cf324d 100644 --- a/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrixSolver.C +++ b/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrixSolver.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2017 OpenFOAM Foundation - Copyright (C) 2016-2019 OpenCFD Ltd. + Copyright (C) 2016-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -162,10 +162,10 @@ Foam::lduMatrix::solver::solver void Foam::lduMatrix::solver::readControls() { - maxIter_ = controlDict_.lookupOrDefault<label>("maxIter", defaultMaxIter_); - minIter_ = controlDict_.lookupOrDefault<label>("minIter", 0); - tolerance_ = controlDict_.lookupOrDefault<scalar>("tolerance", 1e-6); - relTol_ = controlDict_.lookupOrDefault<scalar>("relTol", 0); + maxIter_ = controlDict_.getOrDefault<label>("maxIter", defaultMaxIter_); + minIter_ = controlDict_.getOrDefault<label>("minIter", 0); + tolerance_ = controlDict_.getOrDefault<scalar>("tolerance", 1e-6); + relTol_ = controlDict_.getOrDefault<scalar>("relTol", 0); } diff --git a/src/OpenFOAM/matrices/lduMatrix/preconditioners/GAMGPreconditioner/GAMGPreconditioner.C b/src/OpenFOAM/matrices/lduMatrix/preconditioners/GAMGPreconditioner/GAMGPreconditioner.C index 82c4671bbde..40cebad6ea2 100644 --- a/src/OpenFOAM/matrices/lduMatrix/preconditioners/GAMGPreconditioner/GAMGPreconditioner.C +++ b/src/OpenFOAM/matrices/lduMatrix/preconditioners/GAMGPreconditioner/GAMGPreconditioner.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2013 OpenFOAM Foundation - Copyright (C) 2019 OpenCFD Ltd. + Copyright (C) 2019-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -78,7 +78,7 @@ Foam::GAMGPreconditioner::~GAMGPreconditioner() void Foam::GAMGPreconditioner::readControls() { GAMGSolver::readControls(); - nVcycles_ = controlDict_.lookupOrDefault<label>("nVcycles", 2); + nVcycles_ = controlDict_.getOrDefault<label>("nVcycles", 2); } diff --git a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/GAMGAgglomeration/GAMGAgglomeration.C b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/GAMGAgglomeration/GAMGAgglomeration.C index 0bd888e17a4..fcdea118cb5 100644 --- a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/GAMGAgglomeration/GAMGAgglomeration.C +++ b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/GAMGAgglomeration/GAMGAgglomeration.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. @@ -240,7 +240,7 @@ Foam::GAMGAgglomeration::GAMGAgglomeration nCellsInCoarsestLevel_ ( - controlDict.lookupOrDefault<label>("nCellsInCoarsestLevel", 10) + controlDict.getOrDefault<label>("nCellsInCoarsestLevel", 10) ), meshInterfaces_(mesh.interfaces()), procAgglomeratorPtr_ @@ -305,7 +305,7 @@ const Foam::GAMGAgglomeration& Foam::GAMGAgglomeration::New { const word agglomeratorType ( - controlDict.lookupOrDefault<word>("agglomerator", "faceAreaPair") + controlDict.getOrDefault<word>("agglomerator", "faceAreaPair") ); const_cast<Time&>(mesh.thisDb().time()).libs().open @@ -359,7 +359,7 @@ const Foam::GAMGAgglomeration& Foam::GAMGAgglomeration::New { const word agglomeratorType ( - controlDict.lookupOrDefault<word>("agglomerator", "faceAreaPair") + controlDict.getOrDefault<word>("agglomerator", "faceAreaPair") ); const_cast<Time&>(mesh.thisDb().time()).libs().open @@ -405,7 +405,7 @@ Foam::autoPtr<Foam::GAMGAgglomeration> Foam::GAMGAgglomeration::New { const word agglomeratorType ( - controlDict.lookupOrDefault<word>("agglomerator", "faceAreaPair") + controlDict.getOrDefault<word>("agglomerator", "faceAreaPair") ); const_cast<Time&>(mesh.thisDb().time()).libs().open diff --git a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/pairGAMGAgglomeration/pairGAMGAgglomeration.C b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/pairGAMGAgglomeration/pairGAMGAgglomeration.C index 51ae806fb28..771d6ee2cf8 100644 --- a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/pairGAMGAgglomeration/pairGAMGAgglomeration.C +++ b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/pairGAMGAgglomeration/pairGAMGAgglomeration.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2015 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -45,7 +46,7 @@ Foam::pairGAMGAgglomeration::pairGAMGAgglomeration ) : GAMGAgglomeration(mesh, controlDict), - mergeLevels_(controlDict.lookupOrDefault<label>("mergeLevels", 1)) + mergeLevels_(controlDict.getOrDefault<label>("mergeLevels", 1)) {} diff --git a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGProcAgglomerations/eagerGAMGProcAgglomeration/eagerGAMGProcAgglomeration.C b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGProcAgglomerations/eagerGAMGProcAgglomeration/eagerGAMGProcAgglomeration.C index 9b0c24d0ddb..f49db33303d 100644 --- a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGProcAgglomerations/eagerGAMGProcAgglomeration/eagerGAMGProcAgglomeration.C +++ b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGProcAgglomerations/eagerGAMGProcAgglomeration/eagerGAMGProcAgglomeration.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2013-2016 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -53,7 +54,7 @@ Foam::eagerGAMGProcAgglomeration::eagerGAMGProcAgglomeration ) : GAMGProcAgglomeration(agglom, controlDict), - mergeLevels_(controlDict.lookupOrDefault<label>("mergeLevels", 1)) + mergeLevels_(controlDict.getOrDefault<label>("mergeLevels", 1)) {} diff --git a/src/OpenFOAM/matrices/lduMatrix/solvers/smoothSolver/smoothSolver.C b/src/OpenFOAM/matrices/lduMatrix/solvers/smoothSolver/smoothSolver.C index b812e2ebb9a..6296dacd6ad 100644 --- a/src/OpenFOAM/matrices/lduMatrix/solvers/smoothSolver/smoothSolver.C +++ b/src/OpenFOAM/matrices/lduMatrix/solvers/smoothSolver/smoothSolver.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2014 OpenFOAM Foundation - Copyright (C) 2016-2019 OpenCFD Ltd. + Copyright (C) 2016-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -75,7 +75,7 @@ Foam::smoothSolver::smoothSolver void Foam::smoothSolver::readControls() { lduMatrix::solver::readControls(); - nSweeps_ = controlDict_.lookupOrDefault<label>("nSweeps", 1); + nSweeps_ = controlDict_.getOrDefault<label>("nSweeps", 1); } diff --git a/src/OpenFOAM/matrices/solution/solution.C b/src/OpenFOAM/matrices/solution/solution.C index 916b64369f0..b38406b32d4 100644 --- a/src/OpenFOAM/matrices/solution/solution.C +++ b/src/OpenFOAM/matrices/solution/solution.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. @@ -50,7 +50,7 @@ void Foam::solution::read(const dictionary& dict) if (dict.found("cache")) { cache_ = dict.subDict("cache"); - caching_ = cache_.lookupOrDefault("active", true); + caching_ = cache_.getOrDefault("active", true); } if (dict.found("relaxationFactors")) @@ -92,10 +92,10 @@ void Foam::solution::read(const dictionary& dict) } fieldRelaxDefault_ = - fieldRelaxDict_.lookupOrDefault<scalar>("default", 0.0); + fieldRelaxDict_.getOrDefault<scalar>("default", 0); eqnRelaxDefault_ = - eqnRelaxDict_.lookupOrDefault<scalar>("default", 0.0); + eqnRelaxDict_.getOrDefault<scalar>("default", 0); DebugInfo << "Relaxation factors:" << nl diff --git a/src/OpenFOAM/meshes/polyMesh/polyPatches/basic/coupled/coupledPolyPatch.C b/src/OpenFOAM/meshes/polyMesh/polyPatches/basic/coupled/coupledPolyPatch.C index c26de012e68..c41960bc731 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyPatches/basic/coupled/coupledPolyPatch.C +++ b/src/OpenFOAM/meshes/polyMesh/polyPatches/basic/coupled/coupledPolyPatch.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. @@ -500,10 +501,10 @@ Foam::coupledPolyPatch::coupledPolyPatch ) : polyPatch(name, dict, index, bm, patchType), - matchTolerance_(dict.lookupOrDefault("matchTolerance", defaultMatchTol_)), + matchTolerance_(dict.getOrDefault("matchTolerance", defaultMatchTol_)), transform_ ( - transformTypeNames.lookupOrDefault + transformTypeNames.getOrDefault ( "transform", dict, diff --git a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/cyclic/cyclicPolyPatch.C b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/cyclic/cyclicPolyPatch.C index 4c1d7dbd0f7..aea5b63c8c0 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/cyclic/cyclicPolyPatch.C +++ b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/cyclic/cyclicPolyPatch.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. @@ -652,7 +652,7 @@ Foam::cyclicPolyPatch::cyclicPolyPatch ) : coupledPolyPatch(name, dict, index, bm, patchType), - neighbPatchName_(dict.lookupOrDefault("neighbourPatch", word::null)), + neighbPatchName_(dict.getOrDefault("neighbourPatch", word::null)), coupleGroup_(dict), neighbPatchID_(-1), rotationAxis_(Zero), diff --git a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/processorCyclic/processorCyclicPolyPatch.C b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/processorCyclic/processorCyclicPolyPatch.C index 4ea3d6af444..14e6ca4e484 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/processorCyclic/processorCyclicPolyPatch.C +++ b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/processorCyclic/processorCyclicPolyPatch.C @@ -84,7 +84,7 @@ Foam::processorCyclicPolyPatch::processorCyclicPolyPatch : processorPolyPatch(name, dict, index, bm, patchType), referPatchName_(dict.lookup("referPatch")), - tag_(dict.lookupOrDefault<int>("tag", -1)), + tag_(dict.getOrDefault<int>("tag", -1)), referPatchID_(-1) {} diff --git a/src/OpenFOAM/orientedType/orientedType.C b/src/OpenFOAM/orientedType/orientedType.C index 70c464f7da1..0335e7083b1 100644 --- a/src/OpenFOAM/orientedType/orientedType.C +++ b/src/OpenFOAM/orientedType/orientedType.C @@ -5,7 +5,7 @@ \\ / A nd | www.openfoam.com \\/ M anipulation | ------------------------------------------------------------------------------- - Copyright (C) 2017-2019 OpenCFD Ltd. + Copyright (C) 2017-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -106,7 +106,7 @@ void Foam::orientedType::setOriented(const bool oriented) void Foam::orientedType::read(const dictionary& dict) { - oriented_ = orientedOptionNames.lookupOrDefault + oriented_ = orientedOptionNames.getOrDefault ( "oriented", dict, diff --git a/src/OpenFOAM/primitives/functions/Function1/Sine/Sine.C b/src/OpenFOAM/primitives/functions/Function1/Sine/Sine.C index 97c0ce91dea..f5921003611 100644 --- a/src/OpenFOAM/primitives/functions/Function1/Sine/Sine.C +++ b/src/OpenFOAM/primitives/functions/Function1/Sine/Sine.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2016-2017 OpenFOAM Foundation - Copyright (C) 2016 OpenCFD Ltd. + Copyright (C) 2016-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -33,7 +33,7 @@ License template<class Type> void Foam::Function1Types::Sine<Type>::read(const dictionary& coeffs) { - t0_ = coeffs.lookupOrDefault<scalar>("t0", 0); + t0_ = coeffs.getOrDefault<scalar>("t0", 0); amplitude_ = Function1<scalar>::New("amplitude", coeffs); frequency_ = Function1<scalar>::New("frequency", coeffs); scale_ = Function1<Type>::New("scale", coeffs); diff --git a/src/OpenFOAM/primitives/subModelBase/subModelBase.C b/src/OpenFOAM/primitives/subModelBase/subModelBase.C index a8d828a5f8a..01830535f1c 100644 --- a/src/OpenFOAM/primitives/subModelBase/subModelBase.C +++ b/src/OpenFOAM/primitives/subModelBase/subModelBase.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. @@ -142,7 +142,7 @@ const Foam::dictionary& Foam::subModelBase::properties() const bool Foam::subModelBase::defaultCoeffs(const bool printMsg) const { - bool def = coeffDict_.lookupOrDefault("defaultCoeffs", false); + bool def = coeffDict_.getOrDefault("defaultCoeffs", false); if (printMsg && def) { Info<< incrIndent; diff --git a/src/TurbulenceModels/compressible/RAS/buoyantKEpsilon/buoyantKEpsilon.C b/src/TurbulenceModels/compressible/RAS/buoyantKEpsilon/buoyantKEpsilon.C index 896a843d2e5..de93a88357b 100644 --- a/src/TurbulenceModels/compressible/RAS/buoyantKEpsilon/buoyantKEpsilon.C +++ b/src/TurbulenceModels/compressible/RAS/buoyantKEpsilon/buoyantKEpsilon.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2014-2015 OpenFOAM Foundation - Copyright (C) 2018-2019 OpenCFD Ltd. + Copyright (C) 2018-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -67,7 +67,7 @@ buoyantKEpsilon<BasicTurbulenceModel>::buoyantKEpsilon Cg_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "Cg", this->coeffDict_, diff --git a/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/outletMachNumberPressure/outletMachNumberPressureFvPatchScalarField.C b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/outletMachNumberPressure/outletMachNumberPressureFvPatchScalarField.C index 7e29a9defae..e03844a41e9 100644 --- a/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/outletMachNumberPressure/outletMachNumberPressureFvPatchScalarField.C +++ b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/outletMachNumberPressure/outletMachNumberPressureFvPatchScalarField.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. @@ -64,15 +64,15 @@ outletMachNumberPressureFvPatchScalarField ) : fixedValueFvPatchScalarField(p, iF, dict), - M_(dict.lookupOrDefault<scalar>("M", 0)), + M_(dict.getOrDefault<scalar>("M", 0)), pBack_(dict.get<scalar>("pBack")), - c1_(dict.lookupOrDefault<scalar>("c1", 0)), - A1_(dict.lookupOrDefault<scalar>("A1", 0)), - phiName_(dict.lookupOrDefault<word>("phi", "phi")), - rhoName_(dict.lookupOrDefault<word>("rho", "rho")), - UName_(dict.lookupOrDefault<word>("U", "U")), + c1_(dict.getOrDefault<scalar>("c1", 0)), + A1_(dict.getOrDefault<scalar>("A1", 0)), + phiName_(dict.getOrDefault<word>("phi", "phi")), + rhoName_(dict.getOrDefault<word>("rho", "rho")), + UName_(dict.getOrDefault<word>("U", "U")), choked_(dict.get<Switch>("choked")), - relax_(dict.lookupOrDefault<scalar>("relax", 0)) + relax_(dict.getOrDefault<scalar>("relax", 0)) {} diff --git a/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/outletMappedUniformInletHeatAddition/outletMappedUniformInletHeatAdditionFvPatchField.C b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/outletMappedUniformInletHeatAddition/outletMappedUniformInletHeatAdditionFvPatchField.C index 2b05c1b84dd..ac72f78aecf 100644 --- a/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/outletMappedUniformInletHeatAddition/outletMappedUniformInletHeatAdditionFvPatchField.C +++ b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/outletMappedUniformInletHeatAddition/outletMappedUniformInletHeatAdditionFvPatchField.C @@ -5,7 +5,7 @@ \\ / A nd | www.openfoam.com \\/ M anipulation | ------------------------------------------------------------------------------- - Copyright (C) 2016 OpenCFD Ltd. + Copyright (C) 2016-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -77,10 +77,10 @@ outletMappedUniformInletHeatAdditionFvPatchField : fixedValueFvPatchScalarField(p, iF, dict), outletPatchName_(dict.get<word>("outletPatch")), - phiName_(dict.lookupOrDefault<word>("phi", "phi")), + phiName_(dict.getOrDefault<word>("phi", "phi")), Q_(dict.get<scalar>("Q")), - TMin_(dict.lookupOrDefault<scalar>("TMin", 0)), - TMax_(dict.lookupOrDefault<scalar>("TMax", 5000)) + TMin_(dict.getOrDefault<scalar>("TMin", 0)), + TMax_(dict.getOrDefault<scalar>("TMax", 5000)) {} diff --git a/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/temperatureCoupledBase/temperatureCoupledBase.C b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/temperatureCoupledBase/temperatureCoupledBase.C index 6dde4b8d550..5c89fed301a 100644 --- a/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/temperatureCoupledBase/temperatureCoupledBase.C +++ b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/temperatureCoupledBase/temperatureCoupledBase.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. @@ -74,9 +74,9 @@ Foam::temperatureCoupledBase::temperatureCoupledBase : patch_(patch), method_(KMethodTypeNames_.get("kappaMethod", dict)), - kappaName_(dict.lookupOrDefault<word>("kappa", "none")), - alphaAniName_(dict.lookupOrDefault<word>("alphaAni","none")), - alphaName_(dict.lookupOrDefault<word>("alpha","none")) + kappaName_(dict.getOrDefault<word>("kappa", "none")), + alphaAniName_(dict.getOrDefault<word>("alphaAni", "none")), + alphaName_(dict.getOrDefault<word>("alpha", "none")) { switch (method_) { diff --git a/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/thermalBaffle1D/thermalBaffle1DFvPatchScalarField.C b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/thermalBaffle1D/thermalBaffle1DFvPatchScalarField.C index 02863458f79..f982ed44edd 100644 --- a/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/thermalBaffle1D/thermalBaffle1DFvPatchScalarField.C +++ b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/thermalBaffle1D/thermalBaffle1DFvPatchScalarField.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. @@ -97,7 +98,7 @@ thermalBaffle1DFvPatchScalarField mappedPatchBase(p.patch(), NEARESTPATCHFACE, dict), mixedFvPatchScalarField(p, iF), TName_("T"), - baffleActivated_(dict.lookupOrDefault("baffleActivated", true)), + baffleActivated_(dict.getOrDefault("baffleActivated", true)), thickness_(), qs_(p.size(), 0), solidDict_(dict), @@ -105,9 +106,9 @@ thermalBaffle1DFvPatchScalarField qrPrevious_(p.size(), Zero), qrRelaxation_ ( - dict.lookupOrDefaultCompat("qrRelaxation", {{"relaxation", 1712}}, 1) + dict.getOrDefaultCompat("qrRelaxation", {{"relaxation", 1712}}, 1) ), - qrName_(dict.lookupOrDefault<word>("qr", "none")) + qrName_(dict.getOrDefault<word>("qr", "none")) { fvPatchScalarField::operator=(scalarField("value", dict, p.size())); diff --git a/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/totalFlowRateAdvectiveDiffusive/totalFlowRateAdvectiveDiffusiveFvPatchScalarField.C b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/totalFlowRateAdvectiveDiffusive/totalFlowRateAdvectiveDiffusiveFvPatchScalarField.C index 6571b01db03..5d9dc3e2936 100644 --- a/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/totalFlowRateAdvectiveDiffusive/totalFlowRateAdvectiveDiffusiveFvPatchScalarField.C +++ b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/totalFlowRateAdvectiveDiffusive/totalFlowRateAdvectiveDiffusiveFvPatchScalarField.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. @@ -62,9 +62,9 @@ totalFlowRateAdvectiveDiffusiveFvPatchScalarField ) : mixedFvPatchField<scalar>(p, iF), - phiName_(dict.lookupOrDefault<word>("phi", "phi")), - rhoName_(dict.lookupOrDefault<word>("rho", "none")), - massFluxFraction_(dict.lookupOrDefault<scalar>("massFluxFraction", 1.0)) + phiName_(dict.getOrDefault<word>("phi", "phi")), + rhoName_(dict.getOrDefault<word>("rho", "none")), + massFluxFraction_(dict.getOrDefault<scalar>("massFluxFraction", 1)) { refValue() = 1.0; diff --git a/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/turbulentTemperatureRadCoupledMixed/turbulentTemperatureRadCoupledMixedFvPatchScalarField.C b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/turbulentTemperatureRadCoupledMixed/turbulentTemperatureRadCoupledMixedFvPatchScalarField.C index 5d121d4d387..9648d5f7985 100644 --- a/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/turbulentTemperatureRadCoupledMixed/turbulentTemperatureRadCoupledMixedFvPatchScalarField.C +++ b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/turbulentTemperatureRadCoupledMixed/turbulentTemperatureRadCoupledMixedFvPatchScalarField.C @@ -103,13 +103,13 @@ turbulentTemperatureRadCoupledMixedFvPatchScalarField : mixedFvPatchScalarField(p, iF), temperatureCoupledBase(patch(), dict), - TnbrName_(dict.lookupOrDefault<word>("Tnbr", "T")), - qrNbrName_(dict.lookupOrDefault<word>("qrNbr", "none")), - qrName_(dict.lookupOrDefault<word>("qr", "none")), + TnbrName_(dict.getOrDefault<word>("Tnbr", "T")), + qrNbrName_(dict.getOrDefault<word>("qrNbr", "none")), + qrName_(dict.getOrDefault<word>("qr", "none")), thicknessLayers_(0), kappaLayers_(0), contactRes_(0.0), - thermalInertia_(dict.lookupOrDefault<Switch>("thermalInertia", false)) + thermalInertia_(dict.getOrDefault<Switch>("thermalInertia", false)) { if (!isA<mappedPatchBase>(this->patch().patch())) { diff --git a/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatJayatillekeWallFunction/alphatJayatillekeWallFunctionFvPatchScalarField.C b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatJayatillekeWallFunction/alphatJayatillekeWallFunctionFvPatchScalarField.C index d728efda9d5..262c83d5edd 100644 --- a/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatJayatillekeWallFunction/alphatJayatillekeWallFunctionFvPatchScalarField.C +++ b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatJayatillekeWallFunction/alphatJayatillekeWallFunctionFvPatchScalarField.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2016 OpenFOAM Foundation - Copyright (C) 2017 OpenCFD Ltd + Copyright (C) 2017-2020 OpenCFD Ltd ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -175,9 +175,9 @@ alphatJayatillekeWallFunctionFvPatchScalarField ) : fixedValueFvPatchScalarField(p, iF, dict), - Prt_(dict.lookupOrDefault<scalar>("Prt", 0.85)), - kappa_(dict.lookupOrDefault<scalar>("kappa", 0.41)), - E_(dict.lookupOrDefault<scalar>("E", 9.8)) + Prt_(dict.getOrDefault<scalar>("Prt", 0.85)), + kappa_(dict.getOrDefault<scalar>("kappa", 0.41)), + E_(dict.getOrDefault<scalar>("E", 9.8)) { checkType(); } diff --git a/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatWallFunction/alphatWallFunctionFvPatchScalarField.C b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatWallFunction/alphatWallFunctionFvPatchScalarField.C index 968b1766ab5..7a029159a9b 100644 --- a/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatWallFunction/alphatWallFunctionFvPatchScalarField.C +++ b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatWallFunction/alphatWallFunctionFvPatchScalarField.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. @@ -72,7 +73,7 @@ alphatWallFunctionFvPatchScalarField::alphatWallFunctionFvPatchScalarField ) : fixedValueFvPatchScalarField(p, iF, dict), - Prt_(dict.lookupOrDefault<scalar>("Prt", 0.85)) + Prt_(dict.getOrDefault<scalar>("Prt", 0.85)) {} diff --git a/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/LamBremhorstKE/LamBremhorstKE.C b/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/LamBremhorstKE/LamBremhorstKE.C index d2f703766c5..6844e216a47 100644 --- a/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/LamBremhorstKE/LamBremhorstKE.C +++ b/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/LamBremhorstKE/LamBremhorstKE.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2017 OpenFOAM Foundation - Copyright (C) 2019 OpenCFD Ltd. + Copyright (C) 2019-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -115,7 +115,7 @@ LamBremhorstKE::LamBremhorstKE Cmu_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "Cmu", coeffDict_, @@ -124,7 +124,7 @@ LamBremhorstKE::LamBremhorstKE ), Ceps1_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "Ceps1", coeffDict_, @@ -133,7 +133,7 @@ LamBremhorstKE::LamBremhorstKE ), Ceps2_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "Ceps2", coeffDict_, @@ -142,7 +142,7 @@ LamBremhorstKE::LamBremhorstKE ), sigmaEps_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "alphaEps", coeffDict_, diff --git a/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/LienCubicKE/LienCubicKE.C b/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/LienCubicKE/LienCubicKE.C index f4cd55f0ca3..b1c93932552 100644 --- a/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/LienCubicKE/LienCubicKE.C +++ b/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/LienCubicKE/LienCubicKE.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2017 OpenFOAM Foundation - Copyright (C) 2019 OpenCFD Ltd. + Copyright (C) 2019-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -148,7 +148,7 @@ LienCubicKE::LienCubicKE Ceps1_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "Ceps1", coeffDict_, @@ -157,7 +157,7 @@ LienCubicKE::LienCubicKE ), Ceps2_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "Ceps2", coeffDict_, @@ -166,7 +166,7 @@ LienCubicKE::LienCubicKE ), sigmak_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "sigmak", coeffDict_, @@ -175,7 +175,7 @@ LienCubicKE::LienCubicKE ), sigmaEps_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "sigmaEps", coeffDict_, @@ -184,7 +184,7 @@ LienCubicKE::LienCubicKE ), Cmu1_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "Cmu1", coeffDict_, @@ -193,7 +193,7 @@ LienCubicKE::LienCubicKE ), Cmu2_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "Cmu2", coeffDict_, @@ -202,7 +202,7 @@ LienCubicKE::LienCubicKE ), Cbeta_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "Cbeta", coeffDict_, @@ -211,7 +211,7 @@ LienCubicKE::LienCubicKE ), Cbeta1_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "Cbeta1", coeffDict_, @@ -220,7 +220,7 @@ LienCubicKE::LienCubicKE ), Cbeta2_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "Cbeta2", coeffDict_, @@ -229,7 +229,7 @@ LienCubicKE::LienCubicKE ), Cbeta3_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "Cbeta3", coeffDict_, @@ -238,7 +238,7 @@ LienCubicKE::LienCubicKE ), Cgamma1_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "Cgamma1", coeffDict_, @@ -247,7 +247,7 @@ LienCubicKE::LienCubicKE ), Cgamma2_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "Cgamma2", coeffDict_, @@ -256,7 +256,7 @@ LienCubicKE::LienCubicKE ), Cgamma4_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "Cgamma4", coeffDict_, @@ -265,7 +265,7 @@ LienCubicKE::LienCubicKE ), Cmu_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "Cmu", coeffDict_, @@ -274,7 +274,7 @@ LienCubicKE::LienCubicKE ), kappa_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "kappa", coeffDict_, @@ -283,7 +283,7 @@ LienCubicKE::LienCubicKE ), Anu_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "Anu", coeffDict_, @@ -292,7 +292,7 @@ LienCubicKE::LienCubicKE ), AE_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "AE", coeffDict_, diff --git a/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/LienLeschziner/LienLeschziner.C b/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/LienLeschziner/LienLeschziner.C index 4321aeaff0f..21d0870960e 100644 --- a/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/LienLeschziner/LienLeschziner.C +++ b/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/LienLeschziner/LienLeschziner.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2017 OpenFOAM Foundation - Copyright (C) 2019 OpenCFD Ltd. + Copyright (C) 2019-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -114,7 +114,7 @@ LienLeschziner::LienLeschziner Ceps1_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "Ceps1", coeffDict_, @@ -123,7 +123,7 @@ LienLeschziner::LienLeschziner ), Ceps2_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "Ceps2", coeffDict_, @@ -132,7 +132,7 @@ LienLeschziner::LienLeschziner ), sigmak_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "sigmak", coeffDict_, @@ -141,7 +141,7 @@ LienLeschziner::LienLeschziner ), sigmaEps_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "sigmaEps", coeffDict_, @@ -150,7 +150,7 @@ LienLeschziner::LienLeschziner ), Cmu_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "Cmu", coeffDict_, @@ -159,7 +159,7 @@ LienLeschziner::LienLeschziner ), kappa_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "kappa", coeffDict_, @@ -168,7 +168,7 @@ LienLeschziner::LienLeschziner ), Anu_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "Anu", coeffDict_, @@ -177,7 +177,7 @@ LienLeschziner::LienLeschziner ), Aeps_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "Aeps", coeffDict_, @@ -186,7 +186,7 @@ LienLeschziner::LienLeschziner ), AE_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "AE", coeffDict_, diff --git a/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/ShihQuadraticKE/ShihQuadraticKE.C b/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/ShihQuadraticKE/ShihQuadraticKE.C index 3f88d0d3c49..cd1c39f1fe1 100644 --- a/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/ShihQuadraticKE/ShihQuadraticKE.C +++ b/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/ShihQuadraticKE/ShihQuadraticKE.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2017 OpenFOAM Foundation - Copyright (C) 2019 OpenCFD Ltd. + Copyright (C) 2019-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -105,7 +105,7 @@ ShihQuadraticKE::ShihQuadraticKE Ceps1_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "Ceps1", coeffDict_, @@ -114,7 +114,7 @@ ShihQuadraticKE::ShihQuadraticKE ), Ceps2_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "Ceps2", coeffDict_, @@ -123,7 +123,7 @@ ShihQuadraticKE::ShihQuadraticKE ), sigmak_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "sigmak", coeffDict_, @@ -132,7 +132,7 @@ ShihQuadraticKE::ShihQuadraticKE ), sigmaEps_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "sigmaEps", coeffDict_, @@ -141,7 +141,7 @@ ShihQuadraticKE::ShihQuadraticKE ), Cmu1_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "Cmu1", coeffDict_, @@ -150,7 +150,7 @@ ShihQuadraticKE::ShihQuadraticKE ), Cmu2_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "Cmu2", coeffDict_, @@ -159,7 +159,7 @@ ShihQuadraticKE::ShihQuadraticKE ), Cbeta_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "Cbeta", coeffDict_, @@ -168,7 +168,7 @@ ShihQuadraticKE::ShihQuadraticKE ), Cbeta1_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "Cbeta1", coeffDict_, @@ -177,7 +177,7 @@ ShihQuadraticKE::ShihQuadraticKE ), Cbeta2_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "Cbeta2", coeffDict_, @@ -186,7 +186,7 @@ ShihQuadraticKE::ShihQuadraticKE ), Cbeta3_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "Cbeta3", coeffDict_, diff --git a/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/kkLOmega/kkLOmega.C b/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/kkLOmega/kkLOmega.C index 31498a6be44..7cb08f8398d 100644 --- a/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/kkLOmega/kkLOmega.C +++ b/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/kkLOmega/kkLOmega.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2017 OpenFOAM Foundation - Copyright (C) 2019 OpenCFD Ltd. + Copyright (C) 2019-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -248,7 +248,7 @@ kkLOmega::kkLOmega A0_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "A0", coeffDict_, @@ -257,7 +257,7 @@ kkLOmega::kkLOmega ), As_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "As", coeffDict_, @@ -266,7 +266,7 @@ kkLOmega::kkLOmega ), Av_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "Av", coeffDict_, @@ -275,7 +275,7 @@ kkLOmega::kkLOmega ), Abp_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "Abp", coeffDict_, @@ -284,7 +284,7 @@ kkLOmega::kkLOmega ), Anat_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "Anat", coeffDict_, @@ -293,7 +293,7 @@ kkLOmega::kkLOmega ), Ats_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "Ats", coeffDict_, @@ -302,7 +302,7 @@ kkLOmega::kkLOmega ), CbpCrit_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "CbpCrit", coeffDict_, @@ -311,7 +311,7 @@ kkLOmega::kkLOmega ), Cnc_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "Cnc", coeffDict_, @@ -320,7 +320,7 @@ kkLOmega::kkLOmega ), CnatCrit_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "CnatCrit", coeffDict_, @@ -329,7 +329,7 @@ kkLOmega::kkLOmega ), Cint_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "Cint", coeffDict_, @@ -338,7 +338,7 @@ kkLOmega::kkLOmega ), CtsCrit_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "CtsCrit", coeffDict_, @@ -347,7 +347,7 @@ kkLOmega::kkLOmega ), CrNat_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "CrNat", coeffDict_, @@ -356,7 +356,7 @@ kkLOmega::kkLOmega ), C11_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "C11", coeffDict_, @@ -365,7 +365,7 @@ kkLOmega::kkLOmega ), C12_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "C12", coeffDict_, @@ -374,7 +374,7 @@ kkLOmega::kkLOmega ), CR_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "CR", coeffDict_, @@ -383,7 +383,7 @@ kkLOmega::kkLOmega ), CalphaTheta_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "CalphaTheta", coeffDict_, @@ -392,7 +392,7 @@ kkLOmega::kkLOmega ), Css_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "Css", coeffDict_, @@ -401,7 +401,7 @@ kkLOmega::kkLOmega ), CtauL_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "CtauL", coeffDict_, @@ -410,7 +410,7 @@ kkLOmega::kkLOmega ), Cw1_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "Cw1", coeffDict_, @@ -419,7 +419,7 @@ kkLOmega::kkLOmega ), Cw2_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "Cw2", coeffDict_, @@ -428,7 +428,7 @@ kkLOmega::kkLOmega ), Cw3_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "Cw3", coeffDict_, @@ -437,7 +437,7 @@ kkLOmega::kkLOmega ), CwR_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "CwR", coeffDict_, @@ -446,7 +446,7 @@ kkLOmega::kkLOmega ), Clambda_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "Clambda", coeffDict_, @@ -455,7 +455,7 @@ kkLOmega::kkLOmega ), CmuStd_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "CmuStd", coeffDict_, @@ -464,7 +464,7 @@ kkLOmega::kkLOmega ), Prtheta_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "Prtheta", coeffDict_, @@ -473,7 +473,7 @@ kkLOmega::kkLOmega ), Sigmak_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "Sigmak", coeffDict_, @@ -482,7 +482,7 @@ kkLOmega::kkLOmega ), Sigmaw_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "Sigmaw", coeffDict_, diff --git a/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/qZeta/qZeta.C b/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/qZeta/qZeta.C index 47ba6b9b469..afffcecc76a 100644 --- a/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/qZeta/qZeta.C +++ b/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/qZeta/qZeta.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2017 OpenFOAM Foundation - Copyright (C) 2019 OpenCFD Ltd. + Copyright (C) 2019-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -105,7 +105,7 @@ qZeta::qZeta Cmu_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "Cmu", coeffDict_, @@ -114,7 +114,7 @@ qZeta::qZeta ), C1_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "C1", coeffDict_, @@ -123,7 +123,7 @@ qZeta::qZeta ), C2_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "C2", coeffDict_, @@ -132,7 +132,7 @@ qZeta::qZeta ), sigmaZeta_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "sigmaZeta", coeffDict_, @@ -141,7 +141,7 @@ qZeta::qZeta ), anisotropic_ ( - Switch::lookupOrAddToDict + Switch::getOrAddToDict ( "anisotropic", coeffDict_, 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 4249894bc03..ce1ca3472b4 100644 --- a/src/TurbulenceModels/incompressible/turbulentTransportModels/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatJayatillekeWallFunction/alphatJayatillekeWallFunctionFvPatchScalarField.C +++ b/src/TurbulenceModels/incompressible/turbulentTransportModels/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatJayatillekeWallFunction/alphatJayatillekeWallFunctionFvPatchScalarField.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2016 OpenFOAM Foundation - Copyright (C) 2017 OpenCFD Ltd + Copyright (C) 2017-2020 OpenCFD Ltd ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -179,8 +179,8 @@ alphatJayatillekeWallFunctionFvPatchScalarField : fixedValueFvPatchScalarField(p, iF, dict), Prt_(dict.get<scalar>("Prt")), // force read to avoid ambiguity - kappa_(dict.lookupOrDefault<scalar>("kappa", 0.41)), - E_(dict.lookupOrDefault<scalar>("E", 9.8)) + kappa_(dict.getOrDefault<scalar>("kappa", 0.41)), + E_(dict.getOrDefault<scalar>("E", 9.8)) { checkType(); } diff --git a/src/TurbulenceModels/phaseCompressible/LES/Niceno/NicenoKEqn.C b/src/TurbulenceModels/phaseCompressible/LES/Niceno/NicenoKEqn.C index 7b00994b509..1673ac8ccc1 100644 --- a/src/TurbulenceModels/phaseCompressible/LES/Niceno/NicenoKEqn.C +++ b/src/TurbulenceModels/phaseCompressible/LES/Niceno/NicenoKEqn.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2013-2016 OpenFOAM Foundation - Copyright (C) 2019 OpenCFD Ltd. + Copyright (C) 2019-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -69,7 +69,7 @@ NicenoKEqn<BasicTurbulenceModel>::NicenoKEqn alphaInversion_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "alphaInversion", this->coeffDict_, @@ -79,7 +79,7 @@ NicenoKEqn<BasicTurbulenceModel>::NicenoKEqn Cp_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "Cp", this->coeffDict_, @@ -89,7 +89,7 @@ NicenoKEqn<BasicTurbulenceModel>::NicenoKEqn Cmub_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "Cmub", this->coeffDict_, diff --git a/src/TurbulenceModels/phaseCompressible/LES/SmagorinskyZhang/SmagorinskyZhang.C b/src/TurbulenceModels/phaseCompressible/LES/SmagorinskyZhang/SmagorinskyZhang.C index 7f32927ac3b..09299bec97f 100644 --- a/src/TurbulenceModels/phaseCompressible/LES/SmagorinskyZhang/SmagorinskyZhang.C +++ b/src/TurbulenceModels/phaseCompressible/LES/SmagorinskyZhang/SmagorinskyZhang.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2013-2016 OpenFOAM Foundation - Copyright (C) 2019 OpenCFD Ltd. + Copyright (C) 2019-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -67,7 +67,7 @@ SmagorinskyZhang<BasicTurbulenceModel>::SmagorinskyZhang Cmub_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "Cmub", this->coeffDict_, diff --git a/src/TurbulenceModels/phaseCompressible/LES/continuousGasKEqn/continuousGasKEqn.C b/src/TurbulenceModels/phaseCompressible/LES/continuousGasKEqn/continuousGasKEqn.C index a454b80e824..3231dca8bcc 100644 --- a/src/TurbulenceModels/phaseCompressible/LES/continuousGasKEqn/continuousGasKEqn.C +++ b/src/TurbulenceModels/phaseCompressible/LES/continuousGasKEqn/continuousGasKEqn.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2013-2016 OpenFOAM Foundation - Copyright (C) 2019 OpenCFD Ltd. + Copyright (C) 2019-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -67,7 +67,7 @@ continuousGasKEqn<BasicTurbulenceModel>::continuousGasKEqn alphaInversion_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "alphaInversion", this->coeffDict_, diff --git a/src/TurbulenceModels/phaseCompressible/RAS/LaheyKEpsilon/LaheyKEpsilon.C b/src/TurbulenceModels/phaseCompressible/RAS/LaheyKEpsilon/LaheyKEpsilon.C index 3a69874fd71..b7da989fb25 100644 --- a/src/TurbulenceModels/phaseCompressible/RAS/LaheyKEpsilon/LaheyKEpsilon.C +++ b/src/TurbulenceModels/phaseCompressible/RAS/LaheyKEpsilon/LaheyKEpsilon.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2013-2016 OpenFOAM Foundation - Copyright (C) 2019 OpenCFD Ltd. + Copyright (C) 2019-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -69,7 +69,7 @@ LaheyKEpsilon<BasicTurbulenceModel>::LaheyKEpsilon alphaInversion_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "alphaInversion", this->coeffDict_, @@ -79,7 +79,7 @@ LaheyKEpsilon<BasicTurbulenceModel>::LaheyKEpsilon Cp_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "Cp", this->coeffDict_, @@ -89,7 +89,7 @@ LaheyKEpsilon<BasicTurbulenceModel>::LaheyKEpsilon C3_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "C3", this->coeffDict_, @@ -99,7 +99,7 @@ LaheyKEpsilon<BasicTurbulenceModel>::LaheyKEpsilon Cmub_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "Cmub", this->coeffDict_, diff --git a/src/TurbulenceModels/phaseCompressible/RAS/continuousGasKEpsilon/continuousGasKEpsilon.C b/src/TurbulenceModels/phaseCompressible/RAS/continuousGasKEpsilon/continuousGasKEpsilon.C index 10fee1901b5..8b049d3ec19 100644 --- a/src/TurbulenceModels/phaseCompressible/RAS/continuousGasKEpsilon/continuousGasKEpsilon.C +++ b/src/TurbulenceModels/phaseCompressible/RAS/continuousGasKEpsilon/continuousGasKEpsilon.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2013-2017 OpenFOAM Foundation - Copyright (C) 2019 OpenCFD Ltd. + Copyright (C) 2019-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -83,7 +83,7 @@ continuousGasKEpsilon<BasicTurbulenceModel>::continuousGasKEpsilon alphaInversion_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "alphaInversion", this->coeffDict_, diff --git a/src/TurbulenceModels/phaseCompressible/RAS/kOmegaSSTSato/kOmegaSSTSato.C b/src/TurbulenceModels/phaseCompressible/RAS/kOmegaSSTSato/kOmegaSSTSato.C index f8d8e217e3e..cce24ee45ef 100644 --- a/src/TurbulenceModels/phaseCompressible/RAS/kOmegaSSTSato/kOmegaSSTSato.C +++ b/src/TurbulenceModels/phaseCompressible/RAS/kOmegaSSTSato/kOmegaSSTSato.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2014-2017 OpenFOAM Foundation - Copyright (C) 2019 OpenCFD Ltd. + Copyright (C) 2019-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -68,7 +68,7 @@ kOmegaSSTSato<BasicTurbulenceModel>::kOmegaSSTSato Cmub_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "Cmub", this->coeffDict_, diff --git a/src/TurbulenceModels/phaseCompressible/RAS/mixtureKEpsilon/mixtureKEpsilon.C b/src/TurbulenceModels/phaseCompressible/RAS/mixtureKEpsilon/mixtureKEpsilon.C index eb766bae84c..bbb0e4d0c75 100644 --- a/src/TurbulenceModels/phaseCompressible/RAS/mixtureKEpsilon/mixtureKEpsilon.C +++ b/src/TurbulenceModels/phaseCompressible/RAS/mixtureKEpsilon/mixtureKEpsilon.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2013-2017 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -73,7 +74,7 @@ mixtureKEpsilon<BasicTurbulenceModel>::mixtureKEpsilon Cmu_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "Cmu", this->coeffDict_, @@ -82,7 +83,7 @@ mixtureKEpsilon<BasicTurbulenceModel>::mixtureKEpsilon ), C1_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "C1", this->coeffDict_, @@ -91,7 +92,7 @@ mixtureKEpsilon<BasicTurbulenceModel>::mixtureKEpsilon ), C2_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "C2", this->coeffDict_, @@ -100,7 +101,7 @@ mixtureKEpsilon<BasicTurbulenceModel>::mixtureKEpsilon ), C3_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "C3", this->coeffDict_, @@ -109,7 +110,7 @@ mixtureKEpsilon<BasicTurbulenceModel>::mixtureKEpsilon ), Cp_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "Cp", this->coeffDict_, @@ -118,7 +119,7 @@ mixtureKEpsilon<BasicTurbulenceModel>::mixtureKEpsilon ), sigmak_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "sigmak", this->coeffDict_, @@ -127,7 +128,7 @@ mixtureKEpsilon<BasicTurbulenceModel>::mixtureKEpsilon ), sigmaEps_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "sigmaEps", this->coeffDict_, diff --git a/src/TurbulenceModels/turbulenceModels/Base/kOmegaSST/kOmegaSSTBase.C b/src/TurbulenceModels/turbulenceModels/Base/kOmegaSST/kOmegaSSTBase.C index 185de6e469e..3c622f30a1f 100644 --- a/src/TurbulenceModels/turbulenceModels/Base/kOmegaSST/kOmegaSSTBase.C +++ b/src/TurbulenceModels/turbulenceModels/Base/kOmegaSST/kOmegaSSTBase.C @@ -246,7 +246,7 @@ kOmegaSSTBase<BasicEddyViscosityModel>::kOmegaSSTBase alphaK1_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "alphaK1", this->coeffDict_, @@ -255,7 +255,7 @@ kOmegaSSTBase<BasicEddyViscosityModel>::kOmegaSSTBase ), alphaK2_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "alphaK2", this->coeffDict_, @@ -264,7 +264,7 @@ kOmegaSSTBase<BasicEddyViscosityModel>::kOmegaSSTBase ), alphaOmega1_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "alphaOmega1", this->coeffDict_, @@ -273,7 +273,7 @@ kOmegaSSTBase<BasicEddyViscosityModel>::kOmegaSSTBase ), alphaOmega2_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "alphaOmega2", this->coeffDict_, @@ -282,7 +282,7 @@ kOmegaSSTBase<BasicEddyViscosityModel>::kOmegaSSTBase ), gamma1_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "gamma1", this->coeffDict_, @@ -291,7 +291,7 @@ kOmegaSSTBase<BasicEddyViscosityModel>::kOmegaSSTBase ), gamma2_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "gamma2", this->coeffDict_, @@ -300,7 +300,7 @@ kOmegaSSTBase<BasicEddyViscosityModel>::kOmegaSSTBase ), beta1_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "beta1", this->coeffDict_, @@ -309,7 +309,7 @@ kOmegaSSTBase<BasicEddyViscosityModel>::kOmegaSSTBase ), beta2_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "beta2", this->coeffDict_, @@ -318,7 +318,7 @@ kOmegaSSTBase<BasicEddyViscosityModel>::kOmegaSSTBase ), betaStar_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "betaStar", this->coeffDict_, @@ -327,7 +327,7 @@ kOmegaSSTBase<BasicEddyViscosityModel>::kOmegaSSTBase ), a1_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "a1", this->coeffDict_, @@ -336,7 +336,7 @@ kOmegaSSTBase<BasicEddyViscosityModel>::kOmegaSSTBase ), b1_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "b1", this->coeffDict_, @@ -345,7 +345,7 @@ kOmegaSSTBase<BasicEddyViscosityModel>::kOmegaSSTBase ), c1_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "c1", this->coeffDict_, @@ -354,7 +354,7 @@ kOmegaSSTBase<BasicEddyViscosityModel>::kOmegaSSTBase ), F3_ ( - Switch::lookupOrAddToDict + Switch::getOrAddToDict ( "F3", this->coeffDict_, @@ -390,7 +390,7 @@ kOmegaSSTBase<BasicEddyViscosityModel>::kOmegaSSTBase ), decayControl_ ( - Switch::lookupOrAddToDict + Switch::getOrAddToDict ( "decayControl", this->coeffDict_, @@ -399,7 +399,7 @@ kOmegaSSTBase<BasicEddyViscosityModel>::kOmegaSSTBase ), kInf_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "kInf", this->coeffDict_, @@ -409,7 +409,7 @@ kOmegaSSTBase<BasicEddyViscosityModel>::kOmegaSSTBase ), omegaInf_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "omegaInf", this->coeffDict_, diff --git a/src/TurbulenceModels/turbulenceModels/DES/SpalartAllmarasDDES/SpalartAllmarasDDES.C b/src/TurbulenceModels/turbulenceModels/DES/SpalartAllmarasDDES/SpalartAllmarasDDES.C index 692fc937c80..aa955595b59 100644 --- a/src/TurbulenceModels/turbulenceModels/DES/SpalartAllmarasDDES/SpalartAllmarasDDES.C +++ b/src/TurbulenceModels/turbulenceModels/DES/SpalartAllmarasDDES/SpalartAllmarasDDES.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. @@ -131,7 +131,7 @@ SpalartAllmarasDDES<BasicTurbulenceModel>::SpalartAllmarasDDES Cd1_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "Cd1", this->coeffDict_, @@ -140,7 +140,7 @@ SpalartAllmarasDDES<BasicTurbulenceModel>::SpalartAllmarasDDES ), Cd2_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "Cd2", this->coeffDict_, diff --git a/src/TurbulenceModels/turbulenceModels/DES/SpalartAllmarasDES/SpalartAllmarasDES.C b/src/TurbulenceModels/turbulenceModels/DES/SpalartAllmarasDES/SpalartAllmarasDES.C index 9cd103efc8e..e474d3065fb 100644 --- a/src/TurbulenceModels/turbulenceModels/DES/SpalartAllmarasDES/SpalartAllmarasDES.C +++ b/src/TurbulenceModels/turbulenceModels/DES/SpalartAllmarasDES/SpalartAllmarasDES.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2016 OpenFOAM Foundation - Copyright (C) 2016-2019 OpenCFD Ltd. + Copyright (C) 2016-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -263,7 +263,7 @@ SpalartAllmarasDES<BasicTurbulenceModel>::SpalartAllmarasDES sigmaNut_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "sigmaNut", this->coeffDict_, @@ -272,7 +272,7 @@ SpalartAllmarasDES<BasicTurbulenceModel>::SpalartAllmarasDES ), kappa_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "kappa", this->coeffDict_, @@ -281,7 +281,7 @@ SpalartAllmarasDES<BasicTurbulenceModel>::SpalartAllmarasDES ), Cb1_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "Cb1", this->coeffDict_, @@ -290,7 +290,7 @@ SpalartAllmarasDES<BasicTurbulenceModel>::SpalartAllmarasDES ), Cb2_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "Cb2", this->coeffDict_, @@ -300,7 +300,7 @@ SpalartAllmarasDES<BasicTurbulenceModel>::SpalartAllmarasDES Cw1_(Cb1_/sqr(kappa_) + (1.0 + Cb2_)/sigmaNut_), Cw2_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "Cw2", this->coeffDict_, @@ -309,7 +309,7 @@ SpalartAllmarasDES<BasicTurbulenceModel>::SpalartAllmarasDES ), Cw3_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "Cw3", this->coeffDict_, @@ -318,7 +318,7 @@ SpalartAllmarasDES<BasicTurbulenceModel>::SpalartAllmarasDES ), Cv1_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "Cv1", this->coeffDict_, @@ -327,7 +327,7 @@ SpalartAllmarasDES<BasicTurbulenceModel>::SpalartAllmarasDES ), Cs_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "Cs", this->coeffDict_, @@ -336,7 +336,7 @@ SpalartAllmarasDES<BasicTurbulenceModel>::SpalartAllmarasDES ), CDES_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "CDES", this->coeffDict_, @@ -345,7 +345,7 @@ SpalartAllmarasDES<BasicTurbulenceModel>::SpalartAllmarasDES ), ck_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "ck", this->coeffDict_, @@ -354,7 +354,7 @@ SpalartAllmarasDES<BasicTurbulenceModel>::SpalartAllmarasDES ), lowReCorrection_ ( - Switch::lookupOrAddToDict + Switch::getOrAddToDict ( "lowReCorrection", this->coeffDict_, @@ -363,7 +363,7 @@ SpalartAllmarasDES<BasicTurbulenceModel>::SpalartAllmarasDES ), Ct3_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "Ct3", this->coeffDict_, @@ -372,7 +372,7 @@ SpalartAllmarasDES<BasicTurbulenceModel>::SpalartAllmarasDES ), Ct4_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "Ct4", this->coeffDict_, @@ -381,7 +381,7 @@ SpalartAllmarasDES<BasicTurbulenceModel>::SpalartAllmarasDES ), fwStar_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "fwStar", this->coeffDict_, diff --git a/src/TurbulenceModels/turbulenceModels/DES/SpalartAllmarasIDDES/SpalartAllmarasIDDES.C b/src/TurbulenceModels/turbulenceModels/DES/SpalartAllmarasIDDES/SpalartAllmarasIDDES.C index 1474c2fbf4a..a0a0535955f 100644 --- a/src/TurbulenceModels/turbulenceModels/DES/SpalartAllmarasIDDES/SpalartAllmarasIDDES.C +++ b/src/TurbulenceModels/turbulenceModels/DES/SpalartAllmarasIDDES/SpalartAllmarasIDDES.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2015 OpenFOAM Foundation - Copyright (C) 2015-2019 OpenCFD Ltd. + Copyright (C) 2015-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -189,7 +189,7 @@ SpalartAllmarasIDDES<BasicTurbulenceModel>::SpalartAllmarasIDDES Cdt1_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "Cdt1", this->coeffDict_, @@ -198,7 +198,7 @@ SpalartAllmarasIDDES<BasicTurbulenceModel>::SpalartAllmarasIDDES ), Cdt2_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "Cdt2", this->coeffDict_, @@ -207,7 +207,7 @@ SpalartAllmarasIDDES<BasicTurbulenceModel>::SpalartAllmarasIDDES ), Cl_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "Cl", this->coeffDict_, @@ -216,7 +216,7 @@ SpalartAllmarasIDDES<BasicTurbulenceModel>::SpalartAllmarasIDDES ), Ct_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "Ct", this->coeffDict_, diff --git a/src/TurbulenceModels/turbulenceModels/DES/kOmegaSSTDDES/kOmegaSSTDDES.C b/src/TurbulenceModels/turbulenceModels/DES/kOmegaSSTDDES/kOmegaSSTDDES.C index 30be58ae32c..136421423e6 100644 --- a/src/TurbulenceModels/turbulenceModels/DES/kOmegaSSTDDES/kOmegaSSTDDES.C +++ b/src/TurbulenceModels/turbulenceModels/DES/kOmegaSSTDDES/kOmegaSSTDDES.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2015 OpenFOAM Foundation - Copyright (C) 2016-2019 OpenCFD Ltd. + Copyright (C) 2016-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -133,7 +133,7 @@ kOmegaSSTDDES<BasicTurbulenceModel>::kOmegaSSTDDES Cd1_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "Cd1", this->coeffDict_, @@ -142,7 +142,7 @@ kOmegaSSTDDES<BasicTurbulenceModel>::kOmegaSSTDDES ), Cd2_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "Cd2", this->coeffDict_, diff --git a/src/TurbulenceModels/turbulenceModels/DES/kOmegaSSTDES/kOmegaSSTDES.C b/src/TurbulenceModels/turbulenceModels/DES/kOmegaSSTDES/kOmegaSSTDES.C index 694e794cca8..146050d05de 100644 --- a/src/TurbulenceModels/turbulenceModels/DES/kOmegaSSTDES/kOmegaSSTDES.C +++ b/src/TurbulenceModels/turbulenceModels/DES/kOmegaSSTDES/kOmegaSSTDES.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2015 OpenFOAM Foundation - Copyright (C) 2016-2019 OpenCFD Ltd. + Copyright (C) 2016-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -122,7 +122,7 @@ kOmegaSSTDES<BasicTurbulenceModel>::kOmegaSSTDES kappa_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "kappa", this->coeffDict_, @@ -131,7 +131,7 @@ kOmegaSSTDES<BasicTurbulenceModel>::kOmegaSSTDES ), CDESkom_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "CDESkom", this->coeffDict_, @@ -140,7 +140,7 @@ kOmegaSSTDES<BasicTurbulenceModel>::kOmegaSSTDES ), CDESkeps_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "CDESkeps", this->coeffDict_, diff --git a/src/TurbulenceModels/turbulenceModels/DES/kOmegaSSTIDDES/kOmegaSSTIDDES.C b/src/TurbulenceModels/turbulenceModels/DES/kOmegaSSTIDDES/kOmegaSSTIDDES.C index 6f1729b8f99..1909d02ebc8 100644 --- a/src/TurbulenceModels/turbulenceModels/DES/kOmegaSSTIDDES/kOmegaSSTIDDES.C +++ b/src/TurbulenceModels/turbulenceModels/DES/kOmegaSSTIDDES/kOmegaSSTIDDES.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2015 OpenFOAM Foundation - Copyright (C) 2015-2019 OpenCFD Ltd. + Copyright (C) 2015-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -188,7 +188,7 @@ kOmegaSSTIDDES<BasicTurbulenceModel>::kOmegaSSTIDDES Cdt1_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "Cdt1", this->coeffDict_, @@ -197,7 +197,7 @@ kOmegaSSTIDDES<BasicTurbulenceModel>::kOmegaSSTIDDES ), Cdt2_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "Cdt2", this->coeffDict_, @@ -206,7 +206,7 @@ kOmegaSSTIDDES<BasicTurbulenceModel>::kOmegaSSTIDDES ), Cl_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "Cl", this->coeffDict_, @@ -215,7 +215,7 @@ kOmegaSSTIDDES<BasicTurbulenceModel>::kOmegaSSTIDDES ), Ct_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "Ct", this->coeffDict_, diff --git a/src/TurbulenceModels/turbulenceModels/LES/DeardorffDiffStress/DeardorffDiffStress.C b/src/TurbulenceModels/turbulenceModels/LES/DeardorffDiffStress/DeardorffDiffStress.C index 29162e82e45..ea5c87f35b9 100644 --- a/src/TurbulenceModels/turbulenceModels/LES/DeardorffDiffStress/DeardorffDiffStress.C +++ b/src/TurbulenceModels/turbulenceModels/LES/DeardorffDiffStress/DeardorffDiffStress.C @@ -78,7 +78,7 @@ DeardorffDiffStress<BasicTurbulenceModel>::DeardorffDiffStress Ck_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "Ck", this->coeffDict_, @@ -87,7 +87,7 @@ DeardorffDiffStress<BasicTurbulenceModel>::DeardorffDiffStress ), Cm_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "Cm", this->coeffDict_, @@ -96,7 +96,7 @@ DeardorffDiffStress<BasicTurbulenceModel>::DeardorffDiffStress ), Ce_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "Ce", this->coeffDict_, @@ -105,7 +105,7 @@ DeardorffDiffStress<BasicTurbulenceModel>::DeardorffDiffStress ), Cs_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "Cs", this->coeffDict_, diff --git a/src/TurbulenceModels/turbulenceModels/LES/LESModel/LESModel.C b/src/TurbulenceModels/turbulenceModels/LES/LESModel/LESModel.C index d100d23241f..25dba0baa63 100644 --- a/src/TurbulenceModels/turbulenceModels/LES/LESModel/LESModel.C +++ b/src/TurbulenceModels/turbulenceModels/LES/LESModel/LESModel.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2013-2017 OpenFOAM Foundation - Copyright (C) 2019 OpenCFD Ltd. + Copyright (C) 2019-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -69,12 +69,12 @@ Foam::LESModel<BasicTurbulenceModel>::LESModel LESDict_(this->subOrEmptyDict("LES")), turbulence_(LESDict_.get<Switch>("turbulence")), - printCoeffs_(LESDict_.lookupOrDefault<Switch>("printCoeffs", false)), + printCoeffs_(LESDict_.getOrDefault<Switch>("printCoeffs", false)), coeffDict_(LESDict_.optionalSubDict(type + "Coeffs")), kMin_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "kMin", LESDict_, @@ -85,7 +85,7 @@ Foam::LESModel<BasicTurbulenceModel>::LESModel epsilonMin_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "epsilonMin", LESDict_, @@ -96,7 +96,7 @@ Foam::LESModel<BasicTurbulenceModel>::LESModel omegaMin_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "omegaMin", LESDict_, diff --git a/src/TurbulenceModels/turbulenceModels/LES/LESdeltas/IDDESDelta/IDDESDelta.C b/src/TurbulenceModels/turbulenceModels/LES/LESdeltas/IDDESDelta/IDDESDelta.C index d2b0ca957d6..5ae16f229b9 100644 --- a/src/TurbulenceModels/turbulenceModels/LES/LESdeltas/IDDESDelta/IDDESDelta.C +++ b/src/TurbulenceModels/turbulenceModels/LES/LESdeltas/IDDESDelta/IDDESDelta.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2017 OpenFOAM Foundation - Copyright (C) 2016-2017 OpenCFD Ltd. + Copyright (C) 2016-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -150,7 +150,7 @@ Foam::LESModels::IDDESDelta::IDDESDelta hmaxPtr_(nullptr), Cw_ ( - dict.optionalSubDict(type() + "Coeffs").lookupOrDefault<scalar> + dict.optionalSubDict(type() + "Coeffs").getOrDefault<scalar> ( "Cw", 0.15 diff --git a/src/TurbulenceModels/turbulenceModels/LES/LESdeltas/PrandtlDelta/PrandtlDelta.C b/src/TurbulenceModels/turbulenceModels/LES/LESdeltas/PrandtlDelta/PrandtlDelta.C index 217c1f97f7d..a2dc5d20038 100644 --- a/src/TurbulenceModels/turbulenceModels/LES/LESdeltas/PrandtlDelta/PrandtlDelta.C +++ b/src/TurbulenceModels/turbulenceModels/LES/LESdeltas/PrandtlDelta/PrandtlDelta.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. @@ -72,10 +73,10 @@ Foam::LESModels::PrandtlDelta::PrandtlDelta dict.optionalSubDict(type() + "Coeffs") ) ), - kappa_(dict.lookupOrDefault<scalar>("kappa", 0.41)), + kappa_(dict.getOrDefault<scalar>("kappa", 0.41)), Cdelta_ ( - dict.optionalSubDict(type() + "Coeffs").lookupOrDefault<scalar> + dict.optionalSubDict(type() + "Coeffs").getOrDefault<scalar> ( "Cdelta", 0.158 diff --git a/src/TurbulenceModels/turbulenceModels/LES/LESdeltas/cubeRootVolDelta/cubeRootVolDelta.C b/src/TurbulenceModels/turbulenceModels/LES/LESdeltas/cubeRootVolDelta/cubeRootVolDelta.C index 7f775af718d..c24211e3c8c 100644 --- a/src/TurbulenceModels/turbulenceModels/LES/LESdeltas/cubeRootVolDelta/cubeRootVolDelta.C +++ b/src/TurbulenceModels/turbulenceModels/LES/LESdeltas/cubeRootVolDelta/cubeRootVolDelta.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2017 OpenFOAM Foundation - Copyright (C) 2016 OpenCFD Ltd. + Copyright (C) 2016-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -100,7 +100,7 @@ Foam::LESModels::cubeRootVolDelta::cubeRootVolDelta LESdelta(name, turbulence), deltaCoeff_ ( - dict.optionalSubDict(type() + "Coeffs").lookupOrDefault<scalar> + dict.optionalSubDict(type() + "Coeffs").getOrDefault<scalar> ( "deltaCoeff", 1 diff --git a/src/TurbulenceModels/turbulenceModels/LES/LESdeltas/maxDeltaxyz/maxDeltaxyz.C b/src/TurbulenceModels/turbulenceModels/LES/LESdeltas/maxDeltaxyz/maxDeltaxyz.C index f939777dbdb..fe84d15bdf8 100644 --- a/src/TurbulenceModels/turbulenceModels/LES/LESdeltas/maxDeltaxyz/maxDeltaxyz.C +++ b/src/TurbulenceModels/turbulenceModels/LES/LESdeltas/maxDeltaxyz/maxDeltaxyz.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2017 OpenFOAM Foundation - Copyright (C) 2016 OpenCFD Ltd. + Copyright (C) 2016-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -113,7 +113,7 @@ Foam::LESModels::maxDeltaxyz::maxDeltaxyz LESdelta(name, turbulence), deltaCoeff_ ( - dict.optionalSubDict(type() + "Coeffs").lookupOrDefault<scalar> + dict.optionalSubDict(type() + "Coeffs").getOrDefault<scalar> ( "deltaCoeff", 2 diff --git a/src/TurbulenceModels/turbulenceModels/LES/LESdeltas/vanDriestDelta/vanDriestDelta.C b/src/TurbulenceModels/turbulenceModels/LES/LESdeltas/vanDriestDelta/vanDriestDelta.C index 4a830260e52..9cbaf18e84c 100644 --- a/src/TurbulenceModels/turbulenceModels/LES/LESdeltas/vanDriestDelta/vanDriestDelta.C +++ b/src/TurbulenceModels/turbulenceModels/LES/LESdeltas/vanDriestDelta/vanDriestDelta.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. @@ -116,10 +117,10 @@ Foam::LESModels::vanDriestDelta::vanDriestDelta dict.subDict(type() + "Coeffs") ) ), - kappa_(dict.lookupOrDefault<scalar>("kappa", 0.41)), + kappa_(dict.getOrDefault<scalar>("kappa", 0.41)), Aplus_ ( - dict.optionalSubDict(type() + "Coeffs").lookupOrDefault<scalar> + dict.optionalSubDict(type() + "Coeffs").getOrDefault<scalar> ( "Aplus", 26.0 @@ -127,7 +128,7 @@ Foam::LESModels::vanDriestDelta::vanDriestDelta ), Cdelta_ ( - dict.optionalSubDict(type() + "Coeffs").lookupOrDefault<scalar> + dict.optionalSubDict(type() + "Coeffs").getOrDefault<scalar> ( "Cdelta", 0.158 @@ -135,7 +136,7 @@ Foam::LESModels::vanDriestDelta::vanDriestDelta ), calcInterval_ ( - dict.optionalSubDict(type() + "Coeffs").lookupOrDefault<label> + dict.optionalSubDict(type() + "Coeffs").getOrDefault<label> ( "calcInterval", 1 diff --git a/src/TurbulenceModels/turbulenceModels/LES/LESeddyViscosity/LESeddyViscosity.C b/src/TurbulenceModels/turbulenceModels/LES/LESeddyViscosity/LESeddyViscosity.C index f5d9d1e153b..a52bea945b8 100644 --- a/src/TurbulenceModels/turbulenceModels/LES/LESeddyViscosity/LESeddyViscosity.C +++ b/src/TurbulenceModels/turbulenceModels/LES/LESeddyViscosity/LESeddyViscosity.C @@ -65,7 +65,7 @@ LESeddyViscosity<BasicTurbulenceModel>::LESeddyViscosity Ce_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "Ce", this->coeffDict_, diff --git a/src/TurbulenceModels/turbulenceModels/LES/Smagorinsky/Smagorinsky.C b/src/TurbulenceModels/turbulenceModels/LES/Smagorinsky/Smagorinsky.C index 0ba8f861646..c99bd9e3f9b 100644 --- a/src/TurbulenceModels/turbulenceModels/LES/Smagorinsky/Smagorinsky.C +++ b/src/TurbulenceModels/turbulenceModels/LES/Smagorinsky/Smagorinsky.C @@ -108,7 +108,7 @@ Smagorinsky<BasicTurbulenceModel>::Smagorinsky Ck_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "Ck", this->coeffDict_, diff --git a/src/TurbulenceModels/turbulenceModels/LES/WALE/WALE.C b/src/TurbulenceModels/turbulenceModels/LES/WALE/WALE.C index 98a01a9ac25..053dc1b5c71 100644 --- a/src/TurbulenceModels/turbulenceModels/LES/WALE/WALE.C +++ b/src/TurbulenceModels/turbulenceModels/LES/WALE/WALE.C @@ -128,7 +128,7 @@ WALE<BasicTurbulenceModel>::WALE Ck_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "Ck", this->coeffDict_, @@ -138,7 +138,7 @@ WALE<BasicTurbulenceModel>::WALE Cw_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "Cw", this->coeffDict_, diff --git a/src/TurbulenceModels/turbulenceModels/LES/dynamicLagrangian/dynamicLagrangian.C b/src/TurbulenceModels/turbulenceModels/LES/dynamicLagrangian/dynamicLagrangian.C index 44f05db3f2f..09a292f3000 100644 --- a/src/TurbulenceModels/turbulenceModels/LES/dynamicLagrangian/dynamicLagrangian.C +++ b/src/TurbulenceModels/turbulenceModels/LES/dynamicLagrangian/dynamicLagrangian.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2017 OpenFOAM Foundation - Copyright (C) 2019 OpenCFD Ltd. + Copyright (C) 2019-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -112,7 +112,7 @@ dynamicLagrangian<BasicTurbulenceModel>::dynamicLagrangian ), theta_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "theta", this->coeffDict_, diff --git a/src/TurbulenceModels/turbulenceModels/LES/kEqn/kEqn.C b/src/TurbulenceModels/turbulenceModels/LES/kEqn/kEqn.C index 482b5d636d2..d00b814973c 100644 --- a/src/TurbulenceModels/turbulenceModels/LES/kEqn/kEqn.C +++ b/src/TurbulenceModels/turbulenceModels/LES/kEqn/kEqn.C @@ -106,7 +106,7 @@ kEqn<BasicTurbulenceModel>::kEqn Ck_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "Ck", this->coeffDict_, diff --git a/src/TurbulenceModels/turbulenceModels/RAS/LRR/LRR.C b/src/TurbulenceModels/turbulenceModels/RAS/LRR/LRR.C index 81ab34851d8..ec75293aa11 100644 --- a/src/TurbulenceModels/turbulenceModels/RAS/LRR/LRR.C +++ b/src/TurbulenceModels/turbulenceModels/RAS/LRR/LRR.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. @@ -79,7 +79,7 @@ LRR<BasicTurbulenceModel>::LRR Cmu_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "Cmu", this->coeffDict_, @@ -88,7 +88,7 @@ LRR<BasicTurbulenceModel>::LRR ), C1_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "C1", this->coeffDict_, @@ -97,7 +97,7 @@ LRR<BasicTurbulenceModel>::LRR ), C2_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "C2", this->coeffDict_, @@ -106,7 +106,7 @@ LRR<BasicTurbulenceModel>::LRR ), Ceps1_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "Ceps1", this->coeffDict_, @@ -115,7 +115,7 @@ LRR<BasicTurbulenceModel>::LRR ), Ceps2_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "Ceps2", this->coeffDict_, @@ -124,7 +124,7 @@ LRR<BasicTurbulenceModel>::LRR ), Cs_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "Cs", this->coeffDict_, @@ -133,7 +133,7 @@ LRR<BasicTurbulenceModel>::LRR ), Ceps_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "Ceps", this->coeffDict_, @@ -143,7 +143,7 @@ LRR<BasicTurbulenceModel>::LRR wallReflection_ ( - Switch::lookupOrAddToDict + Switch::getOrAddToDict ( "wallReflection", this->coeffDict_, @@ -152,7 +152,7 @@ LRR<BasicTurbulenceModel>::LRR ), kappa_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "kappa", this->coeffDict_, @@ -161,7 +161,7 @@ LRR<BasicTurbulenceModel>::LRR ), Cref1_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "Cref1", this->coeffDict_, @@ -170,7 +170,7 @@ LRR<BasicTurbulenceModel>::LRR ), Cref2_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "Cref2", this->coeffDict_, diff --git a/src/TurbulenceModels/turbulenceModels/RAS/LaunderSharmaKE/LaunderSharmaKE.C b/src/TurbulenceModels/turbulenceModels/RAS/LaunderSharmaKE/LaunderSharmaKE.C index ec9842ad074..92c53833de9 100644 --- a/src/TurbulenceModels/turbulenceModels/RAS/LaunderSharmaKE/LaunderSharmaKE.C +++ b/src/TurbulenceModels/turbulenceModels/RAS/LaunderSharmaKE/LaunderSharmaKE.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2017 OpenFOAM Foundation - Copyright (C) 2019 OpenCFD Ltd. + Copyright (C) 2019-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -125,7 +125,7 @@ LaunderSharmaKE<BasicTurbulenceModel>::LaunderSharmaKE Cmu_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "Cmu", this->coeffDict_, @@ -134,7 +134,7 @@ LaunderSharmaKE<BasicTurbulenceModel>::LaunderSharmaKE ), C1_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "C1", this->coeffDict_, @@ -143,7 +143,7 @@ LaunderSharmaKE<BasicTurbulenceModel>::LaunderSharmaKE ), C2_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "C2", this->coeffDict_, @@ -152,7 +152,7 @@ LaunderSharmaKE<BasicTurbulenceModel>::LaunderSharmaKE ), C3_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "C3", this->coeffDict_, @@ -161,7 +161,7 @@ LaunderSharmaKE<BasicTurbulenceModel>::LaunderSharmaKE ), sigmak_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "sigmak", this->coeffDict_, @@ -170,7 +170,7 @@ LaunderSharmaKE<BasicTurbulenceModel>::LaunderSharmaKE ), sigmaEps_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "sigmaEps", this->coeffDict_, diff --git a/src/TurbulenceModels/turbulenceModels/RAS/RASModel/RASModel.C b/src/TurbulenceModels/turbulenceModels/RAS/RASModel/RASModel.C index 5b4770a162e..2e463479c24 100644 --- a/src/TurbulenceModels/turbulenceModels/RAS/RASModel/RASModel.C +++ b/src/TurbulenceModels/turbulenceModels/RAS/RASModel/RASModel.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2013-2017 OpenFOAM Foundation - Copyright (C) 2019 OpenCFD Ltd. + Copyright (C) 2019-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -69,12 +69,12 @@ Foam::RASModel<BasicTurbulenceModel>::RASModel RASDict_(this->subOrEmptyDict("RAS")), turbulence_(RASDict_.get<Switch>("turbulence")), - printCoeffs_(RASDict_.lookupOrDefault<Switch>("printCoeffs", false)), + printCoeffs_(RASDict_.getOrDefault<Switch>("printCoeffs", false)), coeffDict_(RASDict_.optionalSubDict(type + "Coeffs")), kMin_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "kMin", RASDict_, @@ -85,7 +85,7 @@ Foam::RASModel<BasicTurbulenceModel>::RASModel epsilonMin_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "epsilonMin", RASDict_, @@ -96,7 +96,7 @@ Foam::RASModel<BasicTurbulenceModel>::RASModel omegaMin_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "omegaMin", RASDict_, diff --git a/src/TurbulenceModels/turbulenceModels/RAS/RNGkEpsilon/RNGkEpsilon.C b/src/TurbulenceModels/turbulenceModels/RAS/RNGkEpsilon/RNGkEpsilon.C index 332c7877a82..d497853fc84 100644 --- a/src/TurbulenceModels/turbulenceModels/RAS/RNGkEpsilon/RNGkEpsilon.C +++ b/src/TurbulenceModels/turbulenceModels/RAS/RNGkEpsilon/RNGkEpsilon.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2017 OpenFOAM Foundation - Copyright (C) 2019 OpenCFD Ltd. + Copyright (C) 2019-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -109,7 +109,7 @@ RNGkEpsilon<BasicTurbulenceModel>::RNGkEpsilon Cmu_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "Cmu", this->coeffDict_, @@ -118,7 +118,7 @@ RNGkEpsilon<BasicTurbulenceModel>::RNGkEpsilon ), C1_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "C1", this->coeffDict_, @@ -127,7 +127,7 @@ RNGkEpsilon<BasicTurbulenceModel>::RNGkEpsilon ), C2_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "C2", this->coeffDict_, @@ -136,7 +136,7 @@ RNGkEpsilon<BasicTurbulenceModel>::RNGkEpsilon ), C3_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "C3", this->coeffDict_, @@ -145,7 +145,7 @@ RNGkEpsilon<BasicTurbulenceModel>::RNGkEpsilon ), sigmak_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "sigmak", this->coeffDict_, @@ -154,7 +154,7 @@ RNGkEpsilon<BasicTurbulenceModel>::RNGkEpsilon ), sigmaEps_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "sigmaEps", this->coeffDict_, @@ -163,7 +163,7 @@ RNGkEpsilon<BasicTurbulenceModel>::RNGkEpsilon ), eta0_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "eta0", this->coeffDict_, @@ -172,7 +172,7 @@ RNGkEpsilon<BasicTurbulenceModel>::RNGkEpsilon ), beta_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "beta", this->coeffDict_, diff --git a/src/TurbulenceModels/turbulenceModels/RAS/SSG/SSG.C b/src/TurbulenceModels/turbulenceModels/RAS/SSG/SSG.C index fcbb2812d7c..4b0f5f5b3f0 100644 --- a/src/TurbulenceModels/turbulenceModels/RAS/SSG/SSG.C +++ b/src/TurbulenceModels/turbulenceModels/RAS/SSG/SSG.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2015-2016 OpenFOAM Foundation - Copyright (C) 2018-2019 OpenCFD Ltd + Copyright (C) 2018-2020 OpenCFD Ltd ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -79,7 +79,7 @@ SSG<BasicTurbulenceModel>::SSG Cmu_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "Cmu", this->coeffDict_, @@ -88,7 +88,7 @@ SSG<BasicTurbulenceModel>::SSG ), C1_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "C1", this->coeffDict_, @@ -97,7 +97,7 @@ SSG<BasicTurbulenceModel>::SSG ), C1s_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "C1s", this->coeffDict_, @@ -106,7 +106,7 @@ SSG<BasicTurbulenceModel>::SSG ), C2_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "C2", this->coeffDict_, @@ -115,7 +115,7 @@ SSG<BasicTurbulenceModel>::SSG ), C3_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "C3", this->coeffDict_, @@ -124,7 +124,7 @@ SSG<BasicTurbulenceModel>::SSG ), C3s_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "C3s", this->coeffDict_, @@ -133,7 +133,7 @@ SSG<BasicTurbulenceModel>::SSG ), C4_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "C4", this->coeffDict_, @@ -142,7 +142,7 @@ SSG<BasicTurbulenceModel>::SSG ), C5_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "C5", this->coeffDict_, @@ -152,7 +152,7 @@ SSG<BasicTurbulenceModel>::SSG Ceps1_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "Ceps1", this->coeffDict_, @@ -161,7 +161,7 @@ SSG<BasicTurbulenceModel>::SSG ), Ceps2_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "Ceps2", this->coeffDict_, @@ -170,7 +170,7 @@ SSG<BasicTurbulenceModel>::SSG ), Cs_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "Cs", this->coeffDict_, @@ -179,7 +179,7 @@ SSG<BasicTurbulenceModel>::SSG ), Ceps_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "Ceps", this->coeffDict_, diff --git a/src/TurbulenceModels/turbulenceModels/RAS/SpalartAllmaras/SpalartAllmaras.C b/src/TurbulenceModels/turbulenceModels/RAS/SpalartAllmaras/SpalartAllmaras.C index b4b797d2a9a..0c9ecfd1a83 100644 --- a/src/TurbulenceModels/turbulenceModels/RAS/SpalartAllmaras/SpalartAllmaras.C +++ b/src/TurbulenceModels/turbulenceModels/RAS/SpalartAllmaras/SpalartAllmaras.C @@ -170,7 +170,7 @@ SpalartAllmaras<BasicTurbulenceModel>::SpalartAllmaras sigmaNut_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "sigmaNut", this->coeffDict_, @@ -179,7 +179,7 @@ SpalartAllmaras<BasicTurbulenceModel>::SpalartAllmaras ), kappa_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "kappa", this->coeffDict_, @@ -189,7 +189,7 @@ SpalartAllmaras<BasicTurbulenceModel>::SpalartAllmaras Cb1_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "Cb1", this->coeffDict_, @@ -198,7 +198,7 @@ SpalartAllmaras<BasicTurbulenceModel>::SpalartAllmaras ), Cb2_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "Cb2", this->coeffDict_, @@ -208,7 +208,7 @@ SpalartAllmaras<BasicTurbulenceModel>::SpalartAllmaras Cw1_(Cb1_/sqr(kappa_) + (1.0 + Cb2_)/sigmaNut_), Cw2_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "Cw2", this->coeffDict_, @@ -217,7 +217,7 @@ SpalartAllmaras<BasicTurbulenceModel>::SpalartAllmaras ), Cw3_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "Cw3", this->coeffDict_, @@ -226,7 +226,7 @@ SpalartAllmaras<BasicTurbulenceModel>::SpalartAllmaras ), Cv1_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "Cv1", this->coeffDict_, @@ -235,7 +235,7 @@ SpalartAllmaras<BasicTurbulenceModel>::SpalartAllmaras ), Cs_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "Cs", this->coeffDict_, diff --git a/src/TurbulenceModels/turbulenceModels/RAS/derivedFvPatchFields/turbulentMixingLengthDissipationRateInlet/turbulentMixingLengthDissipationRateInletFvPatchScalarField.C b/src/TurbulenceModels/turbulenceModels/RAS/derivedFvPatchFields/turbulentMixingLengthDissipationRateInlet/turbulentMixingLengthDissipationRateInletFvPatchScalarField.C index 3901e3ae928..01d8846f1e7 100644 --- a/src/TurbulenceModels/turbulenceModels/RAS/derivedFvPatchFields/turbulentMixingLengthDissipationRateInlet/turbulentMixingLengthDissipationRateInletFvPatchScalarField.C +++ b/src/TurbulenceModels/turbulenceModels/RAS/derivedFvPatchFields/turbulentMixingLengthDissipationRateInlet/turbulentMixingLengthDissipationRateInletFvPatchScalarField.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. @@ -81,9 +82,9 @@ turbulentMixingLengthDissipationRateInletFvPatchScalarField : inletOutletFvPatchScalarField(p, iF), mixingLength_(dict.get<scalar>("mixingLength")), - kName_(dict.lookupOrDefault<word>("k", "k")) + kName_(dict.getOrDefault<word>("k", "k")) { - this->phiName_ = dict.lookupOrDefault<word>("phi", "phi"); + this->phiName_ = dict.getOrDefault<word>("phi", "phi"); fvPatchScalarField::operator=(scalarField("value", dict, p.size())); @@ -138,7 +139,7 @@ void turbulentMixingLengthDissipationRateInletFvPatchScalarField::updateCoeffs() ); const scalar Cmu = - turbModel.coeffDict().lookupOrDefault<scalar>("Cmu", 0.09); + turbModel.coeffDict().getOrDefault<scalar>("Cmu", 0.09); const scalar Cmu75 = pow(Cmu, 0.75); diff --git a/src/TurbulenceModels/turbulenceModels/RAS/derivedFvPatchFields/turbulentMixingLengthFrequencyInlet/turbulentMixingLengthFrequencyInletFvPatchScalarField.C b/src/TurbulenceModels/turbulenceModels/RAS/derivedFvPatchFields/turbulentMixingLengthFrequencyInlet/turbulentMixingLengthFrequencyInletFvPatchScalarField.C index 390cf77cee3..2cbe3bd7591 100644 --- a/src/TurbulenceModels/turbulenceModels/RAS/derivedFvPatchFields/turbulentMixingLengthFrequencyInlet/turbulentMixingLengthFrequencyInletFvPatchScalarField.C +++ b/src/TurbulenceModels/turbulenceModels/RAS/derivedFvPatchFields/turbulentMixingLengthFrequencyInlet/turbulentMixingLengthFrequencyInletFvPatchScalarField.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. @@ -79,9 +80,9 @@ turbulentMixingLengthFrequencyInletFvPatchScalarField : inletOutletFvPatchScalarField(p, iF), mixingLength_(dict.get<scalar>("mixingLength")), - kName_(dict.lookupOrDefault<word>("k", "k")) + kName_(dict.getOrDefault<word>("k", "k")) { - this->phiName_ = dict.lookupOrDefault<word>("phi", "phi"); + this->phiName_ = dict.getOrDefault<word>("phi", "phi"); fvPatchScalarField::operator=(scalarField("value", dict, p.size())); @@ -134,7 +135,7 @@ void turbulentMixingLengthFrequencyInletFvPatchScalarField::updateCoeffs() ); const scalar Cmu = - turbModel.coeffDict().lookupOrDefault<scalar>("Cmu", 0.09); + turbModel.coeffDict().getOrDefault<scalar>("Cmu", 0.09); const scalar Cmu25 = pow(Cmu, 0.25); diff --git a/src/TurbulenceModels/turbulenceModels/RAS/kEpsilon/kEpsilon.C b/src/TurbulenceModels/turbulenceModels/RAS/kEpsilon/kEpsilon.C index 6a234ccdb05..547d4cf47be 100644 --- a/src/TurbulenceModels/turbulenceModels/RAS/kEpsilon/kEpsilon.C +++ b/src/TurbulenceModels/turbulenceModels/RAS/kEpsilon/kEpsilon.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2017 OpenFOAM Foundation - Copyright (C) 2019 OpenCFD Ltd. + Copyright (C) 2019-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -109,7 +109,7 @@ kEpsilon<BasicTurbulenceModel>::kEpsilon Cmu_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "Cmu", this->coeffDict_, @@ -118,7 +118,7 @@ kEpsilon<BasicTurbulenceModel>::kEpsilon ), C1_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "C1", this->coeffDict_, @@ -127,7 +127,7 @@ kEpsilon<BasicTurbulenceModel>::kEpsilon ), C2_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "C2", this->coeffDict_, @@ -136,7 +136,7 @@ kEpsilon<BasicTurbulenceModel>::kEpsilon ), C3_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "C3", this->coeffDict_, @@ -145,7 +145,7 @@ kEpsilon<BasicTurbulenceModel>::kEpsilon ), sigmak_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "sigmak", this->coeffDict_, @@ -154,7 +154,7 @@ kEpsilon<BasicTurbulenceModel>::kEpsilon ), sigmaEps_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "sigmaEps", this->coeffDict_, diff --git a/src/TurbulenceModels/turbulenceModels/RAS/kOmega/kOmega.C b/src/TurbulenceModels/turbulenceModels/RAS/kOmega/kOmega.C index 2a547f53ee7..a70d2c59e64 100644 --- a/src/TurbulenceModels/turbulenceModels/RAS/kOmega/kOmega.C +++ b/src/TurbulenceModels/turbulenceModels/RAS/kOmega/kOmega.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2017 OpenFOAM Foundation - Copyright (C) 2019 OpenCFD Ltd. + Copyright (C) 2019-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -79,7 +79,7 @@ kOmega<BasicTurbulenceModel>::kOmega Cmu_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "betaStar", this->coeffDict_, @@ -88,7 +88,7 @@ kOmega<BasicTurbulenceModel>::kOmega ), beta_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "beta", this->coeffDict_, @@ -97,7 +97,7 @@ kOmega<BasicTurbulenceModel>::kOmega ), gamma_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "gamma", this->coeffDict_, @@ -106,7 +106,7 @@ kOmega<BasicTurbulenceModel>::kOmega ), alphaK_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "alphaK", this->coeffDict_, @@ -115,7 +115,7 @@ kOmega<BasicTurbulenceModel>::kOmega ), alphaOmega_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "alphaOmega", this->coeffDict_, diff --git a/src/TurbulenceModels/turbulenceModels/RAS/kOmegaSSTLM/kOmegaSSTLM.C b/src/TurbulenceModels/turbulenceModels/RAS/kOmegaSSTLM/kOmegaSSTLM.C index d22e00f82ea..da8f28fbe35 100644 --- a/src/TurbulenceModels/turbulenceModels/RAS/kOmegaSSTLM/kOmegaSSTLM.C +++ b/src/TurbulenceModels/turbulenceModels/RAS/kOmegaSSTLM/kOmegaSSTLM.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. @@ -387,7 +387,7 @@ kOmegaSSTLM<BasicTurbulenceModel>::kOmegaSSTLM ca1_ ( - dimensionedScalar::lookupOrAddToDict + dimensionedScalar::getOrAddToDict ( "ca1", this->coeffDict_, @@ -396,7 +396,7 @@ kOmegaSSTLM<BasicTurbulenceModel>::kOmegaSSTLM ), ca2_ ( - dimensionedScalar::lookupOrAddToDict + dimensionedScalar::getOrAddToDict ( "ca2", this->coeffDict_, @@ -405,7 +405,7 @@ kOmegaSSTLM<BasicTurbulenceModel>::kOmegaSSTLM ), ce1_ ( - dimensionedScalar::lookupOrAddToDict + dimensionedScalar::getOrAddToDict ( "ce1", this->coeffDict_, @@ -414,7 +414,7 @@ kOmegaSSTLM<BasicTurbulenceModel>::kOmegaSSTLM ), ce2_ ( - dimensionedScalar::lookupOrAddToDict + dimensionedScalar::getOrAddToDict ( "ce2", this->coeffDict_, @@ -423,7 +423,7 @@ kOmegaSSTLM<BasicTurbulenceModel>::kOmegaSSTLM ), cThetat_ ( - dimensionedScalar::lookupOrAddToDict + dimensionedScalar::getOrAddToDict ( "cThetat", this->coeffDict_, @@ -432,7 +432,7 @@ kOmegaSSTLM<BasicTurbulenceModel>::kOmegaSSTLM ), sigmaThetat_ ( - dimensionedScalar::lookupOrAddToDict + dimensionedScalar::getOrAddToDict ( "sigmaThetat", this->coeffDict_, @@ -441,11 +441,11 @@ kOmegaSSTLM<BasicTurbulenceModel>::kOmegaSSTLM ), lambdaErr_ ( - this->coeffDict_.lookupOrDefault("lambdaErr", 1e-6) + this->coeffDict_.template getOrDefault<scalar>("lambdaErr", 1e-6) ), maxLambdaIter_ ( - this->coeffDict_.lookupOrDefault("maxLambdaIter", 10) + this->coeffDict_.template getOrDefault<label>("maxLambdaIter", 10) ), deltaU_("deltaU", dimVelocity, SMALL), diff --git a/src/TurbulenceModels/turbulenceModels/RAS/kOmegaSSTSAS/kOmegaSSTSAS.C b/src/TurbulenceModels/turbulenceModels/RAS/kOmegaSSTSAS/kOmegaSSTSAS.C index 2aba8887449..fd1cb47912b 100644 --- a/src/TurbulenceModels/turbulenceModels/RAS/kOmegaSSTSAS/kOmegaSSTSAS.C +++ b/src/TurbulenceModels/turbulenceModels/RAS/kOmegaSSTSAS/kOmegaSSTSAS.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2015-2017 OpenFOAM Foundation - Copyright (C) 2019 OpenCFD Ltd. + Copyright (C) 2019-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -122,7 +122,7 @@ kOmegaSSTSAS<BasicTurbulenceModel>::kOmegaSSTSAS Cs_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "Cs", this->coeffDict_, @@ -131,7 +131,7 @@ kOmegaSSTSAS<BasicTurbulenceModel>::kOmegaSSTSAS ), kappa_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "kappa", this->coeffDict_, @@ -140,7 +140,7 @@ kOmegaSSTSAS<BasicTurbulenceModel>::kOmegaSSTSAS ), zeta2_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "zeta2", this->coeffDict_, @@ -149,7 +149,7 @@ kOmegaSSTSAS<BasicTurbulenceModel>::kOmegaSSTSAS ), sigmaPhi_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "sigmaPhi", this->coeffDict_, @@ -158,7 +158,7 @@ kOmegaSSTSAS<BasicTurbulenceModel>::kOmegaSSTSAS ), C_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "C", this->coeffDict_, diff --git a/src/TurbulenceModels/turbulenceModels/RAS/realizableKE/realizableKE.C b/src/TurbulenceModels/turbulenceModels/RAS/realizableKE/realizableKE.C index 4830813fee3..a579204d0e6 100644 --- a/src/TurbulenceModels/turbulenceModels/RAS/realizableKE/realizableKE.C +++ b/src/TurbulenceModels/turbulenceModels/RAS/realizableKE/realizableKE.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2017 OpenFOAM Foundation - Copyright (C) 2019 OpenCFD Ltd. + Copyright (C) 2019-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -156,7 +156,7 @@ realizableKE<BasicTurbulenceModel>::realizableKE ), A0_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "A0", this->coeffDict_, @@ -165,7 +165,7 @@ realizableKE<BasicTurbulenceModel>::realizableKE ), C2_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "C2", this->coeffDict_, @@ -174,7 +174,7 @@ realizableKE<BasicTurbulenceModel>::realizableKE ), sigmak_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "sigmak", this->coeffDict_, @@ -183,7 +183,7 @@ realizableKE<BasicTurbulenceModel>::realizableKE ), sigmaEps_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "sigmaEps", this->coeffDict_, diff --git a/src/TurbulenceModels/turbulenceModels/ReynoldsStress/ReynoldsStress.C b/src/TurbulenceModels/turbulenceModels/ReynoldsStress/ReynoldsStress.C index d2ee256fbda..dcf05d0a576 100644 --- a/src/TurbulenceModels/turbulenceModels/ReynoldsStress/ReynoldsStress.C +++ b/src/TurbulenceModels/turbulenceModels/ReynoldsStress/ReynoldsStress.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2015-2017 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -133,7 +134,7 @@ Foam::ReynoldsStress<BasicTurbulenceModel>::ReynoldsStress couplingFactor_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "couplingFactor", this->coeffDict_, diff --git a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/fixedShearStress/fixedShearStressFvPatchVectorField.C b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/fixedShearStress/fixedShearStressFvPatchVectorField.C index 91ce18bc0ff..f375d61fd9d 100644 --- a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/fixedShearStress/fixedShearStressFvPatchVectorField.C +++ b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/fixedShearStress/fixedShearStressFvPatchVectorField.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. @@ -53,7 +54,7 @@ Foam::fixedShearStressFvPatchVectorField::fixedShearStressFvPatchVectorField ) : fixedValueFvPatchVectorField(p, iF, dict, false), - tau0_(dict.lookupOrDefault<vector>("tau", Zero)) + tau0_(dict.getOrDefault<vector>("tau", Zero)) { fvPatchField<vector>::operator=(patchInternalField()); } diff --git a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/porousBafflePressure/porousBafflePressureFvPatchField.C b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/porousBafflePressure/porousBafflePressureFvPatchField.C index 5c6ff0440d7..7fe61490348 100644 --- a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/porousBafflePressure/porousBafflePressureFvPatchField.C +++ b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/porousBafflePressure/porousBafflePressureFvPatchField.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. @@ -56,12 +57,12 @@ Foam::porousBafflePressureFvPatchField::porousBafflePressureFvPatchField ) : fixedJumpFvPatchField<scalar>(p, iF), - phiName_(dict.lookupOrDefault<word>("phi", "phi")), - rhoName_(dict.lookupOrDefault<word>("rho", "rho")), + phiName_(dict.getOrDefault<word>("phi", "phi")), + rhoName_(dict.getOrDefault<word>("rho", "rho")), D_(Function1<scalar>::New("D", dict)), I_(Function1<scalar>::New("I", dict)), length_(dict.get<scalar>("length")), - uniformJump_(dict.lookupOrDefault("uniformJump", false)) + uniformJump_(dict.getOrDefault("uniformJump", false)) { fvPatchField<scalar>::operator= ( diff --git a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutUBlendedWallFunction/nutUBlendedWallFunctionFvPatchScalarField.C b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutUBlendedWallFunction/nutUBlendedWallFunctionFvPatchScalarField.C index bda7c13f1d9..d72120105f9 100644 --- a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutUBlendedWallFunction/nutUBlendedWallFunctionFvPatchScalarField.C +++ b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutUBlendedWallFunction/nutUBlendedWallFunctionFvPatchScalarField.C @@ -5,7 +5,7 @@ \\ / A nd | www.openfoam.com \\/ M anipulation | ------------------------------------------------------------------------------- - Copyright (C) 2016-2019 OpenCFD Ltd. + Copyright (C) 2016-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -155,7 +155,7 @@ nutUBlendedWallFunctionFvPatchScalarField ) : nutWallFunctionFvPatchScalarField(p, iF, dict), - n_(dict.lookupOrDefault<scalar>("n", 4)) + n_(dict.getOrDefault<scalar>("n", 4)) {} diff --git a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutURoughWallFunction/nutURoughWallFunctionFvPatchScalarField.C b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutURoughWallFunction/nutURoughWallFunctionFvPatchScalarField.C index c7ffa47b63b..9665c4cc4c5 100644 --- a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutURoughWallFunction/nutURoughWallFunctionFvPatchScalarField.C +++ b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutURoughWallFunction/nutURoughWallFunctionFvPatchScalarField.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. @@ -268,8 +268,8 @@ nutURoughWallFunctionFvPatchScalarField roughnessHeight_(dict.get<scalar>("roughnessHeight")), roughnessConstant_(dict.get<scalar>("roughnessConstant")), roughnessFactor_(dict.get<scalar>("roughnessFactor")), - maxIter_(dict.lookupOrDefault<label>("maxIter", 10)), - tolerance_(dict.lookupOrDefault<scalar>("tolerance", 0.0001)) + maxIter_(dict.getOrDefault<label>("maxIter", 10)), + tolerance_(dict.getOrDefault<scalar>("tolerance", 0.0001)) {} diff --git a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutUSpaldingWallFunction/nutUSpaldingWallFunctionFvPatchScalarField.C b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutUSpaldingWallFunction/nutUSpaldingWallFunctionFvPatchScalarField.C index 53cfc8721a8..cb8f249891a 100644 --- a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutUSpaldingWallFunction/nutUSpaldingWallFunctionFvPatchScalarField.C +++ b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutUSpaldingWallFunction/nutUSpaldingWallFunctionFvPatchScalarField.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. @@ -249,8 +249,8 @@ nutUSpaldingWallFunctionFvPatchScalarField ) : nutWallFunctionFvPatchScalarField(p, iF, dict), - maxIter_(dict.lookupOrDefault<label>("maxIter", 10)), - tolerance_(dict.lookupOrDefault<scalar>("tolerance", 0.01)) + maxIter_(dict.getOrDefault<label>("maxIter", 10)), + tolerance_(dict.getOrDefault<scalar>("tolerance", 0.01)) //invocations_(0), //nontrivial_(0), //nonconvergence_(0), diff --git a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C index 0b62a9b5513..bb046292bb3 100644 --- a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C +++ b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C @@ -307,7 +307,7 @@ Foam::omegaWallFunctionFvPatchScalarField::omegaWallFunctionFvPatchScalarField ) : fixedValueFvPatchField<scalar>(p, iF, dict), - blended_(dict.getOrDefault<bool>("blended", true)), + blended_(dict.getOrDefault("blended", true)), initialised_(false), master_(-1), beta1_(dict.getOrDefault<scalar>("beta1", 0.075)), diff --git a/src/TurbulenceModels/turbulenceModels/laminar/laminarModel/laminarModel.C b/src/TurbulenceModels/turbulenceModels/laminar/laminarModel/laminarModel.C index 914060f5b28..17f679cf8b9 100644 --- a/src/TurbulenceModels/turbulenceModels/laminar/laminarModel/laminarModel.C +++ b/src/TurbulenceModels/turbulenceModels/laminar/laminarModel/laminarModel.C @@ -69,7 +69,7 @@ Foam::laminarModel<BasicTurbulenceModel>::laminarModel ), laminarDict_(this->subOrEmptyDict("laminar")), - printCoeffs_(laminarDict_.lookupOrDefault<Switch>("printCoeffs", false)), + printCoeffs_(laminarDict_.getOrDefault<Switch>("printCoeffs", false)), coeffDict_(laminarDict_.optionalSubDict(type + "Coeffs")) { // Force the construction of the mesh deltaCoeffs which may be needed diff --git a/src/atmosphericModels/derivedFvPatchFields/atmBoundaryLayer/atmBoundaryLayer.C b/src/atmosphericModels/derivedFvPatchFields/atmBoundaryLayer/atmBoundaryLayer.C index 1bc235dbeb8..d80ccaac8db 100644 --- a/src/atmosphericModels/derivedFvPatchFields/atmBoundaryLayer/atmBoundaryLayer.C +++ b/src/atmosphericModels/derivedFvPatchFields/atmBoundaryLayer/atmBoundaryLayer.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2014-2016 OpenFOAM Foundation - Copyright (C) 2018 OpenCFD Ltd. + Copyright (C) 2018-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -61,8 +61,8 @@ atmBoundaryLayer::atmBoundaryLayer patch_(pp), flowDir_(TimeFunction1<vector>(time, "flowDir", dict)), zDir_(TimeFunction1<vector>(time, "zDir", dict)), - kappa_(dict.lookupOrDefault<scalar>("kappa", 0.41)), - Cmu_(dict.lookupOrDefault<scalar>("Cmu", 0.09)), + kappa_(dict.getOrDefault<scalar>("kappa", 0.41)), + Cmu_(dict.getOrDefault<scalar>("Cmu", 0.09)), Uref_(TimeFunction1<scalar>(time, "Uref", dict)), Zref_(TimeFunction1<scalar>(time, "Zref", dict)), z0_(PatchFunction1<scalar>::New(pp, "z0", dict)), diff --git a/src/atmosphericModels/derivedFvPatchFields/atmBoundaryLayerInletEpsilon/atmBoundaryLayerInletEpsilonFvPatchScalarField.C b/src/atmosphericModels/derivedFvPatchFields/atmBoundaryLayerInletEpsilon/atmBoundaryLayerInletEpsilonFvPatchScalarField.C index 9063fa309ab..1a78cf0601b 100644 --- a/src/atmosphericModels/derivedFvPatchFields/atmBoundaryLayerInletEpsilon/atmBoundaryLayerInletEpsilonFvPatchScalarField.C +++ b/src/atmosphericModels/derivedFvPatchFields/atmBoundaryLayerInletEpsilon/atmBoundaryLayerInletEpsilonFvPatchScalarField.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2018 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -61,7 +62,7 @@ atmBoundaryLayerInletEpsilonFvPatchScalarField inletOutletFvPatchScalarField(p, iF), atmBoundaryLayer(iF.time(), p.patch(), dict) { - phiName_ = dict.lookupOrDefault<word>("phi", "phi"); + phiName_ = dict.getOrDefault<word>("phi", "phi"); refValue() = epsilon(patch().Cf()); refGrad() = 0; diff --git a/src/atmosphericModels/derivedFvPatchFields/atmBoundaryLayerInletK/atmBoundaryLayerInletKFvPatchScalarField.C b/src/atmosphericModels/derivedFvPatchFields/atmBoundaryLayerInletK/atmBoundaryLayerInletKFvPatchScalarField.C index 4c04f7c4a82..b297eadfeae 100644 --- a/src/atmosphericModels/derivedFvPatchFields/atmBoundaryLayerInletK/atmBoundaryLayerInletKFvPatchScalarField.C +++ b/src/atmosphericModels/derivedFvPatchFields/atmBoundaryLayerInletK/atmBoundaryLayerInletKFvPatchScalarField.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2018 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -61,7 +62,7 @@ atmBoundaryLayerInletKFvPatchScalarField inletOutletFvPatchScalarField(p, iF), atmBoundaryLayer(iF.time(), p.patch(), dict) { - phiName_ = dict.lookupOrDefault<word>("phi", "phi"); + phiName_ = dict.getOrDefault<word>("phi", "phi"); refValue() = k(patch().Cf()); refGrad() = 0; diff --git a/src/atmosphericModels/derivedFvPatchFields/atmBoundaryLayerInletVelocity/atmBoundaryLayerInletVelocityFvPatchVectorField.C b/src/atmosphericModels/derivedFvPatchFields/atmBoundaryLayerInletVelocity/atmBoundaryLayerInletVelocityFvPatchVectorField.C index c57ef0c13c6..23e2e21ac89 100644 --- a/src/atmosphericModels/derivedFvPatchFields/atmBoundaryLayerInletVelocity/atmBoundaryLayerInletVelocityFvPatchVectorField.C +++ b/src/atmosphericModels/derivedFvPatchFields/atmBoundaryLayerInletVelocity/atmBoundaryLayerInletVelocityFvPatchVectorField.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2018 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -61,7 +62,7 @@ atmBoundaryLayerInletVelocityFvPatchVectorField inletOutletFvPatchVectorField(p, iF), atmBoundaryLayer(iF.time(), p.patch(), dict) { - phiName_ = dict.lookupOrDefault<word>("phi", "phi"); + phiName_ = dict.getOrDefault<word>("phi", "phi"); refValue() = U(patch().Cf()); refGrad() = Zero; diff --git a/src/atmosphericModels/kEpsilonLopesdaCosta/kEpsilonLopesdaCosta.C b/src/atmosphericModels/kEpsilonLopesdaCosta/kEpsilonLopesdaCosta.C index bc2f5d1ce18..0506ee878b8 100644 --- a/src/atmosphericModels/kEpsilonLopesdaCosta/kEpsilonLopesdaCosta.C +++ b/src/atmosphericModels/kEpsilonLopesdaCosta/kEpsilonLopesdaCosta.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2018 OpenFOAM Foundation - Copyright (C) 2018-2019 OpenCFD Ltd. + Copyright (C) 2018-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -209,7 +209,7 @@ kEpsilonLopesdaCosta<BasicTurbulenceModel>::kEpsilonLopesdaCosta this->mesh_ ), this->mesh_, - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "Cmu", this->coeffDict_, @@ -225,7 +225,7 @@ kEpsilonLopesdaCosta<BasicTurbulenceModel>::kEpsilonLopesdaCosta this->mesh_ ), this->mesh_, - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "C1", this->coeffDict_, @@ -241,7 +241,7 @@ kEpsilonLopesdaCosta<BasicTurbulenceModel>::kEpsilonLopesdaCosta this->mesh_ ), this->mesh_, - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "C2", this->coeffDict_, @@ -257,7 +257,7 @@ kEpsilonLopesdaCosta<BasicTurbulenceModel>::kEpsilonLopesdaCosta this->mesh_ ), this->mesh_, - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "sigmak", this->coeffDict_, @@ -273,7 +273,7 @@ kEpsilonLopesdaCosta<BasicTurbulenceModel>::kEpsilonLopesdaCosta this->mesh_ ), this->mesh_, - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "sigmaEps", this->coeffDict_, diff --git a/src/atmosphericModels/porosityModels/powerLawLopesdaCosta/powerLawLopesdaCosta.C b/src/atmosphericModels/porosityModels/powerLawLopesdaCosta/powerLawLopesdaCosta.C index 630968fd98e..c8e41752682 100644 --- a/src/atmosphericModels/porosityModels/powerLawLopesdaCosta/powerLawLopesdaCosta.C +++ b/src/atmosphericModels/porosityModels/powerLawLopesdaCosta/powerLawLopesdaCosta.C @@ -310,7 +310,7 @@ Foam::porosityModels::powerLawLopesdaCosta::powerLawLopesdaCosta ), Cd_(coeffs_.get<scalar>("Cd")), C1_(coeffs_.get<scalar>("C1")), - rhoName_(coeffs_.lookupOrDefault<word>("rho", "rho")) + rhoName_(coeffs_.getOrDefault<word>("rho", "rho")) {} diff --git a/src/combustionModels/EDC/EDC.C b/src/combustionModels/EDC/EDC.C index bc9a15bc7ab..d1538ba6b6d 100644 --- a/src/combustionModels/EDC/EDC.C +++ b/src/combustionModels/EDC/EDC.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2017 OpenFOAM Foundation - Copyright (C) 2019 OpenCFD Ltd. + Copyright (C) 2019-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -42,19 +42,19 @@ Foam::combustionModels::EDC<ReactionThermo>::EDC laminar<ReactionThermo>(modelType, thermo, turb, combustionProperties), version_ ( - EDCversionNames.lookupOrDefault + EDCversionNames.getOrDefault ( "version", this->coeffs(), EDCdefaultVersion ) ), - C1_(this->coeffs().lookupOrDefault("C1", 0.05774)), - C2_(this->coeffs().lookupOrDefault("C2", 0.5)), - Cgamma_(this->coeffs().lookupOrDefault("Cgamma", 2.1377)), - Ctau_(this->coeffs().lookupOrDefault("Ctau", 0.4083)), - exp1_(this->coeffs().lookupOrDefault("exp1", EDCexp1[int(version_)])), - exp2_(this->coeffs().lookupOrDefault("exp2", EDCexp2[int(version_)])), + C1_(this->coeffs().getOrDefault("C1", 0.05774)), + C2_(this->coeffs().getOrDefault("C2", 0.5)), + Cgamma_(this->coeffs().getOrDefault("Cgamma", 2.1377)), + Ctau_(this->coeffs().getOrDefault("Ctau", 0.4083)), + exp1_(this->coeffs().getOrDefault("exp1", EDCexp1[int(version_)])), + exp2_(this->coeffs().getOrDefault("exp2", EDCexp2[int(version_)])), kappa_ ( IOobject @@ -221,19 +221,19 @@ bool Foam::combustionModels::EDC<ReactionThermo>::read() { version_ = ( - EDCversionNames.lookupOrDefault + EDCversionNames.getOrDefault ( "version", this->coeffs(), EDCdefaultVersion ) ); - C1_ = this->coeffs().lookupOrDefault("C1", 0.05774); - C2_ = this->coeffs().lookupOrDefault("C2", 0.5); - Cgamma_ = this->coeffs().lookupOrDefault("Cgamma", 2.1377); - Ctau_ = this->coeffs().lookupOrDefault("Ctau", 0.4083); - exp1_ = this->coeffs().lookupOrDefault("exp1", EDCexp1[int(version_)]); - exp2_ = this->coeffs().lookupOrDefault("exp2", EDCexp2[int(version_)]); + C1_ = this->coeffs().getOrDefault("C1", 0.05774); + C2_ = this->coeffs().getOrDefault("C2", 0.5); + Cgamma_ = this->coeffs().getOrDefault("Cgamma", 2.1377); + Ctau_ = this->coeffs().getOrDefault("Ctau", 0.4083); + exp1_ = this->coeffs().getOrDefault("exp1", EDCexp1[int(version_)]); + exp2_ = this->coeffs().getOrDefault("exp2", EDCexp2[int(version_)]); return true; } diff --git a/src/combustionModels/combustionModel/combustionModel.C b/src/combustionModels/combustionModel/combustionModel.C index 692e41aa8a3..a250b04076a 100644 --- a/src/combustionModels/combustionModel/combustionModel.C +++ b/src/combustionModels/combustionModel/combustionModel.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. @@ -83,7 +84,7 @@ Foam::combustionModel::combustionModel IOdictionary(createIOobject(thermo, combustionProperties)), mesh_(thermo.p().mesh()), turb_(turb), - active_(lookupOrDefault<Switch>("active", true)), + active_(getOrDefault<Switch>("active", true)), coeffs_(optionalSubDict(modelType + "Coeffs")), modelType_(modelType) {} diff --git a/src/combustionModels/diffusion/diffusion.C b/src/combustionModels/diffusion/diffusion.C index ecf51b2fbb7..3c38be94ee1 100644 --- a/src/combustionModels/diffusion/diffusion.C +++ b/src/combustionModels/diffusion/diffusion.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2012-2017 OpenFOAM Foundation - Copyright (C) 2019 OpenCFD Ltd. + Copyright (C) 2019-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -53,7 +53,7 @@ diffusion<ReactionThermo, ThermoType>::diffusion combustionProperties ), C_(this->coeffs().getScalar("C")), - oxidantName_(this->coeffs().template lookupOrDefault<word>("oxidant", "O2")) + oxidantName_(this->coeffs().template getOrDefault<word>("oxidant", "O2")) {} diff --git a/src/combustionModels/laminar/laminar.C b/src/combustionModels/laminar/laminar.C index eb3442ffa30..102e417976d 100644 --- a/src/combustionModels/laminar/laminar.C +++ b/src/combustionModels/laminar/laminar.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2013-2017 OpenFOAM Foundation - Copyright (C) 2019 OpenCFD Ltd. + Copyright (C) 2019-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -50,7 +50,7 @@ Foam::combustionModels::laminar<ReactionThermo>::laminar ), integrateReactionRate_ ( - this->coeffs().lookupOrDefault("integrateReactionRate", true) + this->coeffs().getOrDefault("integrateReactionRate", true) ) { if (integrateReactionRate_) @@ -176,7 +176,7 @@ bool Foam::combustionModels::laminar<ReactionThermo>::read() if (ChemistryCombustion<ReactionThermo>::read()) { integrateReactionRate_ = - this->coeffs().lookupOrDefault("integrateReactionRate", true); + this->coeffs().getOrDefault("integrateReactionRate", true); return true; } diff --git a/src/conversion/ccm/reader/ccmReaderAux.C b/src/conversion/ccm/reader/ccmReaderAux.C index d580565df80..8853d2a642c 100644 --- a/src/conversion/ccm/reader/ccmReaderAux.C +++ b/src/conversion/ccm/reader/ccmReaderAux.C @@ -48,12 +48,12 @@ Foam::Map<Foam::word> Foam::ccm::reader::selectPorous forAllConstIters(table, iter) { - if (iter().lookupOrDefault<label>("PorosityId", 0) != 0) + if (iter().getOrDefault<label>("PorosityId", 0) != 0) { lookup.insert ( iter.key(), - iter().lookupOrDefault<word> + iter().getOrDefault<word> ( "Label", "cellTable_" + Foam::name(iter.key()) diff --git a/src/conversion/common/tables/boundaryRegion.C b/src/conversion/common/tables/boundaryRegion.C index f77502dd6aa..002203ecb55 100644 --- a/src/conversion/common/tables/boundaryRegion.C +++ b/src/conversion/common/tables/boundaryRegion.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011 OpenFOAM Foundation - Copyright (C) 2019 OpenCFD Ltd. + Copyright (C) 2019-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -78,7 +78,7 @@ Foam::Map<Foam::word> Foam::boundaryRegion::names() const lookup.insert ( iter.key(), - iter().lookupOrDefault<word> + iter().getOrDefault<word> ( "Label", "boundaryRegion_" + Foam::name(iter.key()) @@ -99,7 +99,7 @@ Foam::Map<Foam::word> Foam::boundaryRegion::names forAllConstIters(*this, iter) { - const word lookupName = iter().lookupOrDefault<word> + const word lookupName = iter().getOrDefault<word> ( "Label", "boundaryRegion_" + Foam::name(iter.key()) @@ -124,7 +124,7 @@ Foam::Map<Foam::word> Foam::boundaryRegion::boundaryTypes() const lookup.insert ( iter.key(), - iter().lookupOrDefault<word>("BoundaryType", "patch") + iter().getOrDefault<word>("BoundaryType", "patch") ); } @@ -141,7 +141,7 @@ Foam::label Foam::boundaryRegion::findIndex(const word& name) const forAllConstIters(*this, iter) { - if (iter().lookupOrDefault<word>("Label", word::null) == name) + if (iter().getOrDefault<word>("Label", word::null) == name) { return iter.key(); } diff --git a/src/conversion/common/tables/cellTable.C b/src/conversion/common/tables/cellTable.C index eff874703db..2e3597aa521 100644 --- a/src/conversion/common/tables/cellTable.C +++ b/src/conversion/common/tables/cellTable.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. @@ -148,7 +148,7 @@ Foam::Map<Foam::word> Foam::cellTable::names() const lookup.insert ( iter.key(), - iter().lookupOrDefault<word> + iter().getOrDefault<word> ( "Label", "cellTable_" + Foam::name(iter.key()) @@ -169,7 +169,7 @@ Foam::Map<Foam::word> Foam::cellTable::names forAllConstIters(*this, iter) { - const word lookupName = iter().lookupOrDefault<word> + const word lookupName = iter().getOrDefault<word> ( "Label", "cellTable_" + Foam::name(iter.key()) @@ -208,7 +208,7 @@ Foam::label Foam::cellTable::findIndex(const word& name) const forAllConstIters(*this, iter) { - if (iter().lookupOrDefault<word>("Label", word::null) == name) + if (iter().getOrDefault<word>("Label", word::null) == name) { return iter.key(); } @@ -227,7 +227,7 @@ Foam::Map<Foam::word> Foam::cellTable::materialTypes() const lookup.insert ( iter.key(), - iter().lookupOrDefault<word>("MaterialType", defaultMaterial_) + iter().getOrDefault<word>("MaterialType", defaultMaterial_) ); } @@ -247,13 +247,13 @@ Foam::Map<Foam::word> Foam::cellTable::selectType(const word& matl) const if ( matl - == dict.lookupOrDefault<word>("MaterialType", defaultMaterial_) + == dict.getOrDefault<word>("MaterialType", defaultMaterial_) ) { lookup.insert ( index, - dict.lookupOrDefault<word> + dict.getOrDefault<word> ( "Label", "cellTable_" + Foam::name(iter.key()) diff --git a/src/dynamicFaMesh/interfaceTrackingFvMesh/fvPatchFields/freeSurfaceVelocity/freeSurfaceVelocityFvPatchVectorField.C b/src/dynamicFaMesh/interfaceTrackingFvMesh/fvPatchFields/freeSurfaceVelocity/freeSurfaceVelocityFvPatchVectorField.C index 06c742d7b40..c7bb86dd29f 100644 --- a/src/dynamicFaMesh/interfaceTrackingFvMesh/fvPatchFields/freeSurfaceVelocity/freeSurfaceVelocityFvPatchVectorField.C +++ b/src/dynamicFaMesh/interfaceTrackingFvMesh/fvPatchFields/freeSurfaceVelocity/freeSurfaceVelocityFvPatchVectorField.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2019 Zeljko Tukovic, FSB Zagreb. + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -68,7 +69,7 @@ freeSurfaceVelocityFvPatchVectorField : fixedGradientFvPatchVectorField(p, iF) { - patchType() = dict.lookupOrDefault<word>("patchType", word::null); + patchType() = dict.getOrDefault<word>("patchType", word::null); fvPatchVectorField::operator=(patchInternalField()); } diff --git a/src/dynamicFaMesh/interfaceTrackingFvMesh/interfaceTrackingFvMesh.C b/src/dynamicFaMesh/interfaceTrackingFvMesh/interfaceTrackingFvMesh.C index 6b1ab727b91..3a13ad4c5e3 100644 --- a/src/dynamicFaMesh/interfaceTrackingFvMesh/interfaceTrackingFvMesh.C +++ b/src/dynamicFaMesh/interfaceTrackingFvMesh/interfaceTrackingFvMesh.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2019 Zeljko Tukovic, FSB Zagreb. + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -1570,12 +1571,12 @@ Foam::interfaceTrackingFvMesh::interfaceTrackingFvMesh(const IOobject& io) motion().get<bool>("normalMotionDir") ), motionDir_(Zero), - smoothing_(motion().lookupOrDefault("smoothing", false)), - pureFreeSurface_(motion().lookupOrDefault("pureFreeSurface", true)), - rigidFreeSurface_(motion().lookupOrDefault("rigidFreeSurface", false)), + smoothing_(motion().getOrDefault("smoothing", false)), + pureFreeSurface_(motion().getOrDefault("pureFreeSurface", true)), + rigidFreeSurface_(motion().getOrDefault("rigidFreeSurface", false)), correctContactLineNormals_ ( - motion().lookupOrDefault("correctContactLineNormals", false) + motion().getOrDefault("correctContactLineNormals", false) ), sigma0_("zero", dimForce/dimLength/dimDensity, Zero), rho_("one", dimDensity, 1.0), @@ -1632,8 +1633,8 @@ Foam::interfaceTrackingFvMesh::interfaceTrackingFvMesh motion().get<bool>("normalMotionDir") ), motionDir_(Zero), - smoothing_(motion().lookupOrDefault("smoothing", false)), - pureFreeSurface_(motion().lookupOrDefault("pureFreeSurface", true)), + smoothing_(motion().getOrDefault("smoothing", false)), + pureFreeSurface_(motion().getOrDefault("pureFreeSurface", true)), sigma0_("zero", dimForce/dimLength/dimDensity, Zero), rho_("one", dimDensity, 1.0), timeIndex_(-1), diff --git a/src/dynamicFvMesh/dynamicRefineFvMesh/dynamicRefineFvMesh.C b/src/dynamicFvMesh/dynamicRefineFvMesh/dynamicRefineFvMesh.C index 06817d4bd0e..b4a35aab64c 100644 --- a/src/dynamicFvMesh/dynamicRefineFvMesh/dynamicRefineFvMesh.C +++ b/src/dynamicFvMesh/dynamicRefineFvMesh/dynamicRefineFvMesh.C @@ -1256,7 +1256,7 @@ bool Foam::dynamicRefineFvMesh::update() refineDict.get<scalar>("lowerRefineLevel"); const scalar upperRefineLevel = refineDict.get<scalar>("upperRefineLevel"); - const scalar unrefineLevel = refineDict.lookupOrDefault<scalar> + const scalar unrefineLevel = refineDict.getOrDefault<scalar> ( "unrefineLevel", GREAT diff --git a/src/dynamicFvMesh/include/createDyMControls.H b/src/dynamicFvMesh/include/createDyMControls.H index 193604f1920..c0867a471a4 100644 --- a/src/dynamicFvMesh/include/createDyMControls.H +++ b/src/dynamicFvMesh/include/createDyMControls.H @@ -3,15 +3,15 @@ bool correctPhi ( - pimple.dict().lookupOrDefault("correctPhi", mesh.dynamic()) + pimple.dict().getOrDefault("correctPhi", mesh.dynamic()) ); bool checkMeshCourantNo ( - pimple.dict().lookupOrDefault("checkMeshCourantNo", false) + pimple.dict().getOrDefault("checkMeshCourantNo", false) ); bool moveMeshOuterCorrectors ( - pimple.dict().lookupOrDefault("moveMeshOuterCorrectors", false) + pimple.dict().getOrDefault("moveMeshOuterCorrectors", false) ); diff --git a/src/dynamicFvMesh/include/readDyMControls.H b/src/dynamicFvMesh/include/readDyMControls.H index 1f96bedb3aa..fbe29dfcf99 100644 --- a/src/dynamicFvMesh/include/readDyMControls.H +++ b/src/dynamicFvMesh/include/readDyMControls.H @@ -1,18 +1,18 @@ #include "readTimeControls.H" -correctPhi = pimple.dict().lookupOrDefault +correctPhi = pimple.dict().getOrDefault ( "correctPhi", correctPhi ); -checkMeshCourantNo = pimple.dict().lookupOrDefault +checkMeshCourantNo = pimple.dict().getOrDefault ( "checkMeshCourantNo", checkMeshCourantNo ); -moveMeshOuterCorrectors = pimple.dict().lookupOrDefault +moveMeshOuterCorrectors = pimple.dict().getOrDefault ( "moveMeshOuterCorrectors", moveMeshOuterCorrectors diff --git a/src/dynamicMesh/layerAdditionRemoval/layerAdditionRemoval.C b/src/dynamicMesh/layerAdditionRemoval/layerAdditionRemoval.C index f727b600fac..74d5d6cd647 100644 --- a/src/dynamicMesh/layerAdditionRemoval/layerAdditionRemoval.C +++ b/src/dynamicMesh/layerAdditionRemoval/layerAdditionRemoval.C @@ -143,7 +143,7 @@ Foam::layerAdditionRemoval::layerAdditionRemoval minLayerThickness_(dict.get<scalar>("minLayerThickness")), maxLayerThickness_(dict.get<scalar>("maxLayerThickness")), thicknessFromVolume_(dict.getOrDefault("thicknessFromVolume", true)), - oldLayerThickness_(dict.getOrDefault<scalar>("oldLayerThickness", -1.0)), + oldLayerThickness_(dict.getOrDefault<scalar>("oldLayerThickness", -1)), pointsPairingPtr_(nullptr), facesPairingPtr_(nullptr), triggerRemoval_(-1), diff --git a/src/dynamicMesh/motionSmoother/motionSmootherAlgoCheck.C b/src/dynamicMesh/motionSmoother/motionSmootherAlgoCheck.C index 63fb39839fb..85c7a72d81f 100644 --- a/src/dynamicMesh/motionSmoother/motionSmootherAlgoCheck.C +++ b/src/dynamicMesh/motionSmoother/motionSmootherAlgoCheck.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2014 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -117,7 +118,7 @@ bool Foam::motionSmootherAlgo::checkMesh ); const scalar minFaceFlatness ( - dict.lookupOrDefault<scalar> + dict.getOrDefault<scalar> ( "minFaceFlatness", -1, keyType::REGEX_RECURSIVE ) diff --git a/src/dynamicMesh/motionSolvers/displacement/displacement/zoneMotion.C b/src/dynamicMesh/motionSolvers/displacement/displacement/zoneMotion.C index 2a2b89aec51..f7fdc70b331 100644 --- a/src/dynamicMesh/motionSolvers/displacement/displacement/zoneMotion.C +++ b/src/dynamicMesh/motionSolvers/displacement/displacement/zoneMotion.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. @@ -43,10 +44,10 @@ Foam::zoneMotion::zoneMotion moveAllCells_(false) { word cellZoneName = - dict.lookupOrDefault<word>("cellZone", "none"); + dict.getOrDefault<word>("cellZone", "none"); word cellSetName = - dict.lookupOrDefault<word>("cellSet", "none"); + dict.getOrDefault<word>("cellSet", "none"); if ((cellZoneName != "none") && (cellSetName != "none")) { diff --git a/src/dynamicMesh/motionSolvers/displacement/solidBody/solidBodyMotionFunctions/drivenLinearMotion/drivenLinearMotion.C b/src/dynamicMesh/motionSolvers/displacement/solidBody/solidBodyMotionFunctions/drivenLinearMotion/drivenLinearMotion.C index 71e51836962..5eef22353a7 100644 --- a/src/dynamicMesh/motionSolvers/displacement/solidBody/solidBodyMotionFunctions/drivenLinearMotion/drivenLinearMotion.C +++ b/src/dynamicMesh/motionSolvers/displacement/solidBody/solidBodyMotionFunctions/drivenLinearMotion/drivenLinearMotion.C @@ -5,7 +5,7 @@ \\ / A nd | www.openfoam.com \\/ M anipulation | ------------------------------------------------------------------------------- - Copyright (C) 2019 OpenCFD Ltd. + Copyright (C) 2019-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -56,7 +56,7 @@ Foam::solidBodyMotionFunctions::drivenLinearMotion::drivenLinearMotion : solidBodyMotionFunction(SBMFCoeffs, runTime), CofGvelocity_(SBMFCoeffs.get<word>("CofGvelocity")), - normal_(SBMFCoeffs.lookupOrDefault<vector>("normal", Zero)), + normal_(SBMFCoeffs.getOrDefault<vector>("normal", Zero)), CofGvel_ ( IOobject diff --git a/src/dynamicMesh/motionSolvers/displacement/solidBody/solidBodyMotionSolver.C b/src/dynamicMesh/motionSolvers/displacement/solidBody/solidBodyMotionSolver.C index dd2ffe4f6de..45c88357bb4 100644 --- a/src/dynamicMesh/motionSolvers/displacement/solidBody/solidBodyMotionSolver.C +++ b/src/dynamicMesh/motionSolvers/displacement/solidBody/solidBodyMotionSolver.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2016 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -61,10 +62,10 @@ Foam::solidBodyMotionSolver::solidBodyMotionSolver moveAllCells_(false) { word cellZoneName = - coeffDict().lookupOrDefault<word>("cellZone", "none"); + coeffDict().getOrDefault<word>("cellZone", "none"); word cellSetName = - coeffDict().lookupOrDefault<word>("cellSet", "none"); + coeffDict().getOrDefault<word>("cellSet", "none"); if ((cellZoneName != "none") && (cellSetName != "none")) { diff --git a/src/dynamicMesh/polyMeshFilter/polyMeshFilterSettings.C b/src/dynamicMesh/polyMeshFilter/polyMeshFilterSettings.C index 0c4a8cbc5ca..92b73e396f3 100644 --- a/src/dynamicMesh/polyMeshFilter/polyMeshFilterSettings.C +++ b/src/dynamicMesh/polyMeshFilter/polyMeshFilterSettings.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2013 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -35,7 +36,7 @@ Foam::polyMeshFilterSettings::polyMeshFilterSettings(const dictionary& dict) dict_(dict), controlMeshQuality_ ( - dict_.lookupOrDefault<Switch>("controlMeshQuality", false) + dict_.getOrDefault<Switch>("controlMeshQuality", false) ), collapseEdgesCoeffDict_(dict_.subDict("collapseEdgesCoeffs")), collapseFacesCoeffDict_(dict_.subOrEmptyDict("collapseFacesCoeffs")), @@ -53,39 +54,27 @@ Foam::polyMeshFilterSettings::polyMeshFilterSettings(const dictionary& dict) ), edgeReductionFactor_ ( - meshQualityCoeffDict_.lookupOrDefault<scalar>("edgeReductionFactor", -1) + meshQualityCoeffDict_.getOrDefault<scalar>("edgeReductionFactor", -1) ), maxIterations_ ( - meshQualityCoeffDict_.lookupOrAddDefault<label>("maximumIterations", 1) + meshQualityCoeffDict_.getOrAdd<label>("maximumIterations", 1) ), maxSmoothIters_ ( - meshQualityCoeffDict_.lookupOrAddDefault<label> - ( - "maximumSmoothingIterations", - 0 - ) + meshQualityCoeffDict_.getOrAdd<label>("maximumSmoothingIterations", 0) ), initialFaceLengthFactor_ ( - collapseFacesCoeffDict_.lookupOrAddDefault<scalar> - ( - "initialFaceLengthFactor", - -1 - ) + collapseFacesCoeffDict_.getOrAdd<scalar>("initialFaceLengthFactor", -1) ), faceReductionFactor_ ( - meshQualityCoeffDict_.lookupOrAddDefault<scalar> - ( - "faceReductionFactor", - -1 - ) + meshQualityCoeffDict_.getOrAdd<scalar>("faceReductionFactor", -1) ), maxPointErrorCount_ ( - meshQualityCoeffDict_.lookupOrAddDefault<label>("maxPointErrorCount", 0) + meshQualityCoeffDict_.getOrAdd<label>("maxPointErrorCount", 0) ) {} diff --git a/src/dynamicMesh/polyTopoChange/polyTopoChange/edgeCollapser.C b/src/dynamicMesh/polyTopoChange/polyTopoChange/edgeCollapser.C index b4f7ad2ebe5..85f5dada833 100644 --- a/src/dynamicMesh/polyTopoChange/polyTopoChange/edgeCollapser.C +++ b/src/dynamicMesh/polyTopoChange/polyTopoChange/edgeCollapser.C @@ -1212,19 +1212,19 @@ Foam::edgeCollapser::edgeCollapser mesh_(mesh), guardFraction_ ( - dict.lookupOrDefault<scalar>("guardFraction", 0) + dict.getOrDefault<scalar>("guardFraction", 0) ), maxCollapseFaceToPointSideLengthCoeff_ ( - dict.lookupOrDefault<scalar>("maxCollapseFaceToPointSideLengthCoeff", 0) + dict.getOrDefault<scalar>("maxCollapseFaceToPointSideLengthCoeff", 0) ), allowEarlyCollapseToPoint_ ( - dict.lookupOrDefault("allowEarlyCollapseToPoint", true) + dict.getOrDefault("allowEarlyCollapseToPoint", true) ), allowEarlyCollapseCoeff_ ( - dict.lookupOrDefault<scalar>("allowEarlyCollapseCoeff", 0) + dict.getOrDefault<scalar>("allowEarlyCollapseCoeff", 0) ) { if (debug) diff --git a/src/dynamicMesh/slidingInterface/slidingInterface.C b/src/dynamicMesh/slidingInterface/slidingInterface.C index 23645166cde..dd2ecfbe407 100644 --- a/src/dynamicMesh/slidingInterface/slidingInterface.C +++ b/src/dynamicMesh/slidingInterface/slidingInterface.C @@ -676,42 +676,42 @@ const Foam::pointField& Foam::slidingInterface::pointProjection() const void Foam::slidingInterface::setTolerances(const dictionary&dict, bool report) { - pointMergeTol_ = dict.lookupOrDefault<scalar> + pointMergeTol_ = dict.getOrDefault<scalar> ( "pointMergeTol", pointMergeTol_ ); - edgeMergeTol_ = dict.lookupOrDefault<scalar> + edgeMergeTol_ = dict.getOrDefault<scalar> ( "edgeMergeTol", edgeMergeTol_ ); - nFacesPerSlaveEdge_ = dict.lookupOrDefault<label> + nFacesPerSlaveEdge_ = dict.getOrDefault<label> ( "nFacesPerSlaveEdge", nFacesPerSlaveEdge_ ); - edgeFaceEscapeLimit_ = dict.lookupOrDefault<label> + edgeFaceEscapeLimit_ = dict.getOrDefault<label> ( "edgeFaceEscapeLimit", edgeFaceEscapeLimit_ ); - integralAdjTol_ = dict.lookupOrDefault<scalar> + integralAdjTol_ = dict.getOrDefault<scalar> ( "integralAdjTol", integralAdjTol_ ); - edgeMasterCatchFraction_ = dict.lookupOrDefault<scalar> + edgeMasterCatchFraction_ = dict.getOrDefault<scalar> ( "edgeMasterCatchFraction", edgeMasterCatchFraction_ ); - edgeCoPlanarTol_ = dict.lookupOrDefault<scalar> + edgeCoPlanarTol_ = dict.getOrDefault<scalar> ( "edgeCoPlanarTol", edgeCoPlanarTol_ ); - edgeEndCutoffTol_ = dict.lookupOrDefault<scalar> + edgeEndCutoffTol_ = dict.getOrDefault<scalar> ( "edgeEndCutoffTol", edgeEndCutoffTol_ diff --git a/src/finiteArea/fields/faPatchFields/derived/inletOutlet/inletOutletFaPatchField.C b/src/finiteArea/fields/faPatchFields/derived/inletOutlet/inletOutletFaPatchField.C index 3c8fac5fb67..d69a4c89a45 100644 --- a/src/finiteArea/fields/faPatchFields/derived/inletOutlet/inletOutletFaPatchField.C +++ b/src/finiteArea/fields/faPatchFields/derived/inletOutlet/inletOutletFaPatchField.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. @@ -68,7 +69,7 @@ Foam::inletOutletFaPatchField<Type>::inletOutletFaPatchField ) : mixedFaPatchField<Type>(p, iF), - phiName_(dict.lookupOrDefault<word>("phi", "phi")) + phiName_(dict.getOrDefault<word>("phi", "phi")) { this->refValue() = Field<Type>("inletValue", dict, p.size()); diff --git a/src/finiteArea/fields/faPatchFields/faPatchField/faPatchField.C b/src/finiteArea/fields/faPatchFields/faPatchField/faPatchField.C index 6cc44990ad6..9a568d7cea4 100644 --- a/src/finiteArea/fields/faPatchFields/faPatchField/faPatchField.C +++ b/src/finiteArea/fields/faPatchFields/faPatchField/faPatchField.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. @@ -90,7 +91,7 @@ Foam::faPatchField<Type>::faPatchField patch_(p), internalField_(iF), updated_(false), - patchType_(dict.lookupOrDefault<word>("patchType", word::null)) + patchType_(dict.getOrDefault<word>("patchType", word::null)) { if (dict.found("value")) { diff --git a/src/finiteVolume/cfdTools/general/MRF/MRFZone.C b/src/finiteVolume/cfdTools/general/MRF/MRFZone.C index ac12dc6ae0b..a6d3653599b 100644 --- a/src/finiteVolume/cfdTools/general/MRF/MRFZone.C +++ b/src/finiteVolume/cfdTools/general/MRF/MRFZone.C @@ -247,12 +247,12 @@ Foam::MRFZone::MRFZone mesh_(mesh), name_(name), coeffs_(dict), - active_(coeffs_.lookupOrDefault("active", true)), + active_(coeffs_.getOrDefault("active", true)), cellZoneName_(cellZoneName), cellZoneID_(), excludedPatchNames_ ( - coeffs_.lookupOrDefault<wordRes>("nonRotatingPatches", wordRes()) + coeffs_.getOrDefault<wordRes>("nonRotatingPatches", wordRes()) ), origin_(coeffs_.get<vector>("origin")), axis_(coeffs_.get<vector>("axis").normalise()), @@ -593,7 +593,7 @@ bool Foam::MRFZone::read(const dictionary& dict) { coeffs_ = dict; - active_ = coeffs_.lookupOrDefault("active", true); + active_ = coeffs_.getOrDefault("active", true); coeffs_.readEntry("cellZone", cellZoneName_); cellZoneID_ = mesh_.cellZones().findZoneID(cellZoneName_); diff --git a/src/finiteVolume/cfdTools/general/SRF/derivedFvPatchFields/SRFFreestreamVelocityFvPatchVectorField/SRFFreestreamVelocityFvPatchVectorField.C b/src/finiteVolume/cfdTools/general/SRF/derivedFvPatchFields/SRFFreestreamVelocityFvPatchVectorField/SRFFreestreamVelocityFvPatchVectorField.C index 6258e6178b4..2293143980b 100644 --- a/src/finiteVolume/cfdTools/general/SRF/derivedFvPatchFields/SRFFreestreamVelocityFvPatchVectorField/SRFFreestreamVelocityFvPatchVectorField.C +++ b/src/finiteVolume/cfdTools/general/SRF/derivedFvPatchFields/SRFFreestreamVelocityFvPatchVectorField/SRFFreestreamVelocityFvPatchVectorField.C @@ -73,10 +73,10 @@ SRFFreestreamVelocityFvPatchVectorField ) : inletOutletFvPatchVectorField(p, iF), - relative_(dict.lookupOrDefault("relative", false)), + relative_(dict.getOrDefault("relative", false)), UInf_(dict.get<vector>("UInf")) { - this->phiName_ = dict.lookupOrDefault<word>("phi", "phi"); + this->phiName_ = dict.getOrDefault<word>("phi", "phi"); fvPatchVectorField::operator=(vectorField("value", dict, p.size())); } diff --git a/src/finiteVolume/cfdTools/general/coupling/externalFileCoupler.C b/src/finiteVolume/cfdTools/general/coupling/externalFileCoupler.C index 27ef80337d7..f52b3a40630 100644 --- a/src/finiteVolume/cfdTools/general/coupling/externalFileCoupler.C +++ b/src/finiteVolume/cfdTools/general/coupling/externalFileCoupler.C @@ -5,7 +5,7 @@ \\ / A nd | www.openfoam.com \\/ M anipulation | ------------------------------------------------------------------------------- - Copyright (C) 2015-2019 OpenCFD Ltd. + Copyright (C) 2015-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -159,24 +159,24 @@ bool Foam::externalFileCoupler::readDict(const dictionary& dict) dict.readEntry("commsDir", commsDir_); commsDir_.expand(); commsDir_.clean(); - statusDone_ = dict.lookupOrDefault<word>("statusDone", "done"); - slaveFirst_ = dict.lookupOrDefault("initByExternal", false); + statusDone_ = dict.getOrDefault<word>("statusDone", "done"); + slaveFirst_ = dict.getOrDefault("initByExternal", false); Info<< type() << ": initialize" << nl << " directory: " << commsDir_ << nl << " slave-first: " << Switch(slaveFirst_) << endl; } - waitInterval_ = dict.lookupOrDefault("waitInterval", 1u); + waitInterval_ = dict.getOrDefault("waitInterval", 1u); if (!waitInterval_) { // Enforce non-zero sleep waitInterval_ = 1u; } - timeOut_ = dict.lookupOrDefault("timeOut", 100*waitInterval_); + timeOut_ = dict.getOrDefault("timeOut", 100*waitInterval_); - log = dict.lookupOrDefault("log", false); + log = dict.getOrDefault("log", false); return true; } diff --git a/src/finiteVolume/cfdTools/general/fvOptions/fvOption.C b/src/finiteVolume/cfdTools/general/fvOptions/fvOption.C index ce65537942f..a98f83db1fc 100644 --- a/src/finiteVolume/cfdTools/general/fvOptions/fvOption.C +++ b/src/finiteVolume/cfdTools/general/fvOptions/fvOption.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2017 OpenFOAM Foundation - Copyright (C) 2019 OpenCFD Ltd. + Copyright (C) 2019-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -56,7 +56,7 @@ Foam::fv::option::option mesh_(mesh), dict_(dict), coeffs_(dict.optionalSubDict(modelType + "Coeffs")), - active_(dict_.lookupOrDefault<Switch>("active", true)), + active_(dict_.getOrDefault<Switch>("active", true)), fieldNames_(), applied_(), log(true) diff --git a/src/finiteVolume/cfdTools/general/include/alphaControls.H b/src/finiteVolume/cfdTools/general/include/alphaControls.H index cb751b43ae6..8b2179c1f7f 100644 --- a/src/finiteVolume/cfdTools/general/include/alphaControls.H +++ b/src/finiteVolume/cfdTools/general/include/alphaControls.H @@ -4,24 +4,24 @@ label nAlphaCorr(alphaControls.get<label>("nAlphaCorr")); label nAlphaSubCycles(alphaControls.get<label>("nAlphaSubCycles")); -bool MULESCorr(alphaControls.lookupOrDefault("MULESCorr", false)); +bool MULESCorr(alphaControls.getOrDefault("MULESCorr", false)); // Apply the compression correction from the previous iteration // Improves efficiency for steady-simulations but can only be applied // once the alpha field is reasonably steady, i.e. fully developed bool alphaApplyPrevCorr ( - alphaControls.lookupOrDefault("alphaApplyPrevCorr", false) + alphaControls.getOrDefault("alphaApplyPrevCorr", false) ); // Isotropic compression coefficient scalar icAlpha ( - alphaControls.lookupOrDefault<scalar>("icAlpha", 0) + alphaControls.getOrDefault<scalar>("icAlpha", 0) ); // Shear compression coefficient scalar scAlpha ( - alphaControls.lookupOrDefault<scalar>("scAlpha", 0) + alphaControls.getOrDefault<scalar>("scAlpha", 0) ); diff --git a/src/finiteVolume/cfdTools/general/include/createTimeControls.H b/src/finiteVolume/cfdTools/general/include/createTimeControls.H index 22e3b6e4492..fa03c7a675e 100644 --- a/src/finiteVolume/cfdTools/general/include/createTimeControls.H +++ b/src/finiteVolume/cfdTools/general/include/createTimeControls.H @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2015 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -32,12 +33,12 @@ Description \*---------------------------------------------------------------------------*/ bool adjustTimeStep = - runTime.controlDict().lookupOrDefault("adjustTimeStep", false); + runTime.controlDict().getOrDefault("adjustTimeStep", false); scalar maxCo = - runTime.controlDict().lookupOrDefault<scalar>("maxCo", 1.0); + runTime.controlDict().getOrDefault<scalar>("maxCo", 1); scalar maxDeltaT = - runTime.controlDict().lookupOrDefault<scalar>("maxDeltaT", GREAT); + runTime.controlDict().getOrDefault<scalar>("maxDeltaT", GREAT); // ************************************************************************* // diff --git a/src/finiteVolume/cfdTools/general/include/readTimeControls.H b/src/finiteVolume/cfdTools/general/include/readTimeControls.H index 1c377b7eddd..edf93b79953 100644 --- a/src/finiteVolume/cfdTools/general/include/readTimeControls.H +++ b/src/finiteVolume/cfdTools/general/include/readTimeControls.H @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2015 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -32,12 +33,12 @@ Description \*---------------------------------------------------------------------------*/ adjustTimeStep = - runTime.controlDict().lookupOrDefault("adjustTimeStep", false); + runTime.controlDict().getOrDefault("adjustTimeStep", false); maxCo = - runTime.controlDict().lookupOrDefault<scalar>("maxCo", 1.0); + runTime.controlDict().getOrDefault<scalar>("maxCo", 1); maxDeltaT = - runTime.controlDict().lookupOrDefault<scalar>("maxDeltaT", GREAT); + runTime.controlDict().getOrDefault<scalar>("maxDeltaT", GREAT); // ************************************************************************* // diff --git a/src/finiteVolume/cfdTools/general/porosityModel/DarcyForchheimer/DarcyForchheimer.C b/src/finiteVolume/cfdTools/general/porosityModel/DarcyForchheimer/DarcyForchheimer.C index 4031bff41e1..f2c9f856d5e 100644 --- a/src/finiteVolume/cfdTools/general/porosityModel/DarcyForchheimer/DarcyForchheimer.C +++ b/src/finiteVolume/cfdTools/general/porosityModel/DarcyForchheimer/DarcyForchheimer.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2012-2016 OpenFOAM Foundation - Copyright (C) 2018 OpenCFD Ltd. + Copyright (C) 2018-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -60,9 +60,9 @@ Foam::porosityModels::DarcyForchheimer::DarcyForchheimer fXYZ_("f", dimless/dimLength, coeffs_), D_(cellZoneIDs_.size()), F_(cellZoneIDs_.size()), - rhoName_(coeffs_.lookupOrDefault<word>("rho", "rho")), - muName_(coeffs_.lookupOrDefault<word>("mu", "thermo:mu")), - nuName_(coeffs_.lookupOrDefault<word>("nu", "nu")) + rhoName_(coeffs_.getOrDefault<word>("rho", "rho")), + muName_(coeffs_.getOrDefault<word>("mu", "thermo:mu")), + nuName_(coeffs_.getOrDefault<word>("nu", "nu")) { adjustNegativeResistance(dXYZ_); adjustNegativeResistance(fXYZ_); diff --git a/src/finiteVolume/cfdTools/general/porosityModel/powerLaw/powerLaw.C b/src/finiteVolume/cfdTools/general/porosityModel/powerLaw/powerLaw.C index d6e9abb76fa..417c292c649 100644 --- a/src/finiteVolume/cfdTools/general/porosityModel/powerLaw/powerLaw.C +++ b/src/finiteVolume/cfdTools/general/porosityModel/powerLaw/powerLaw.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. @@ -56,7 +57,7 @@ Foam::porosityModels::powerLaw::powerLaw porosityModel(name, modelType, mesh, dict, cellZoneName), C0_(coeffs_.get<scalar>("C0")), C1_(coeffs_.get<scalar>("C1")), - rhoName_(coeffs_.lookupOrDefault<word>("rho", "rho")) + rhoName_(coeffs_.getOrDefault<word>("rho", "rho")) {} diff --git a/src/finiteVolume/cfdTools/general/porosityModel/solidification/solidification.C b/src/finiteVolume/cfdTools/general/porosityModel/solidification/solidification.C index 5e17ca8038e..1281b2955fd 100644 --- a/src/finiteVolume/cfdTools/general/porosityModel/solidification/solidification.C +++ b/src/finiteVolume/cfdTools/general/porosityModel/solidification/solidification.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2017 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -54,9 +55,9 @@ Foam::porosityModels::solidification::solidification ) : porosityModel(name, modelType, mesh, dict, cellZoneName), - TName_(coeffs_.lookupOrDefault<word>("T", "T")), - alphaName_(coeffs_.lookupOrDefault<word>("alpha", "none")), - rhoName_(coeffs_.lookupOrDefault<word>("rho", "rho")), + TName_(coeffs_.getOrDefault<word>("T", "T")), + alphaName_(coeffs_.getOrDefault<word>("alpha", "none")), + rhoName_(coeffs_.getOrDefault<word>("rho", "rho")), D_(Function1<scalar>::New("D", coeffs_)) {} diff --git a/src/finiteVolume/cfdTools/general/solutionControl/loopControl/loopControl.C b/src/finiteVolume/cfdTools/general/solutionControl/loopControl/loopControl.C index c5c13b69045..fc2355dc56b 100644 --- a/src/finiteVolume/cfdTools/general/solutionControl/loopControl/loopControl.C +++ b/src/finiteVolume/cfdTools/general/solutionControl/loopControl/loopControl.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. @@ -49,7 +49,7 @@ void Foam::loopControl::read(const dictionary& dict) { clear(); - bool enabled = dict.lookupOrDefault("enabled", true); + bool enabled = dict.getOrDefault("enabled", true); if (enabled) { @@ -119,7 +119,7 @@ bool Foam::loopControl::checkConverged() const const word& variableName = dataDictEntry.keyword(); const scalar absTol = - convergenceDict_.lookupOrDefault<scalar>(variableName, -1); + convergenceDict_.getOrDefault<scalar>(variableName, -1); if (absTol > 0) { diff --git a/src/finiteVolume/cfdTools/general/solutionControl/pimpleControl/pimpleControl.C b/src/finiteVolume/cfdTools/general/solutionControl/pimpleControl/pimpleControl.C index a0595cf0d49..2559b9d67a1 100644 --- a/src/finiteVolume/cfdTools/general/solutionControl/pimpleControl/pimpleControl.C +++ b/src/finiteVolume/cfdTools/general/solutionControl/pimpleControl/pimpleControl.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2017 OpenFOAM Foundation - Copyright (C) 2017 OpenCFD Ltd. + Copyright (C) 2017-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -44,12 +44,12 @@ bool Foam::pimpleControl::read() const dictionary pimpleDict(dict()); - solveFlow_ = pimpleDict.lookupOrDefault("solveFlow", true); - nCorrPIMPLE_ = pimpleDict.lookupOrDefault<label>("nOuterCorrectors", 1); - nCorrPISO_ = pimpleDict.lookupOrDefault<label>("nCorrectors", 1); - SIMPLErho_ = pimpleDict.lookupOrDefault("SIMPLErho", false); + solveFlow_ = pimpleDict.getOrDefault("solveFlow", true); + nCorrPIMPLE_ = pimpleDict.getOrDefault<label>("nOuterCorrectors", 1); + nCorrPISO_ = pimpleDict.getOrDefault<label>("nCorrectors", 1); + SIMPLErho_ = pimpleDict.getOrDefault("SIMPLErho", false); turbOnFinalIterOnly_ = - pimpleDict.lookupOrDefault("turbOnFinalIterOnly", true); + pimpleDict.getOrDefault("turbOnFinalIterOnly", true); return true; } diff --git a/src/finiteVolume/cfdTools/general/solutionControl/solutionControl/solutionControl.C b/src/finiteVolume/cfdTools/general/solutionControl/solutionControl/solutionControl.C index 6f4ab452e3d..69d8234d923 100644 --- a/src/finiteVolume/cfdTools/general/solutionControl/solutionControl/solutionControl.C +++ b/src/finiteVolume/cfdTools/general/solutionControl/solutionControl/solutionControl.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. @@ -43,12 +44,12 @@ bool Foam::solutionControl::read(const bool absTolOnly) // Read solution controls nNonOrthCorr_ = - solutionDict.lookupOrDefault<label>("nNonOrthogonalCorrectors", 0); + solutionDict.getOrDefault<label>("nNonOrthogonalCorrectors", 0); momentumPredictor_ = - solutionDict.lookupOrDefault("momentumPredictor", true); - transonic_ = solutionDict.lookupOrDefault("transonic", false); - consistent_ = solutionDict.lookupOrDefault("consistent", false); - frozenFlow_ = solutionDict.lookupOrDefault("frozenFlow", false); + solutionDict.getOrDefault("momentumPredictor", true); + transonic_ = solutionDict.getOrDefault("transonic", false); + consistent_ = solutionDict.getOrDefault("consistent", false); + frozenFlow_ = solutionDict.getOrDefault("frozenFlow", false); // Read residual information const dictionary residualDict diff --git a/src/finiteVolume/expressions/base/fvExprDriver.C b/src/finiteVolume/expressions/base/fvExprDriver.C index 1e6055daddf..2cd6623292e 100644 --- a/src/finiteVolume/expressions/base/fvExprDriver.C +++ b/src/finiteVolume/expressions/base/fvExprDriver.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2010-2018 Bernhard Gschaider <bgschaid@hfd-research.com> - Copyright (C) 2019 OpenCFD Ltd. + Copyright (C) 2019-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -140,9 +140,9 @@ Foam::expressions::fvExprDriver::fvExprDriver : fvExprDriver ( - dict.lookupOrDefault("cacheReadFields", false), - dict.lookupOrDefault("searchInMemory", true), - dict.lookupOrDefault("searchFiles", false), + dict.getOrDefault("cacheReadFields", false), + dict.getOrDefault("searchInMemory", true), + dict.getOrDefault("searchFiles", false), dict ) { diff --git a/src/finiteVolume/expressions/fields/base/patchExprFieldBase.C b/src/finiteVolume/expressions/fields/base/patchExprFieldBase.C index ae817c86ff9..61504fc7b44 100644 --- a/src/finiteVolume/expressions/fields/base/patchExprFieldBase.C +++ b/src/finiteVolume/expressions/fields/base/patchExprFieldBase.C @@ -63,7 +63,7 @@ Foam::expressions::patchExprFieldBase::patchExprFieldBase : debug_(dict.getOrDefault("debug", false)), allowGradient_(allowGradient), - evalOnConstruct_(dict.getOrDefault<bool>("evalOnConstruct", false)), + evalOnConstruct_(dict.getOrDefault("evalOnConstruct", false)), valueExpr_(), gradExpr_(), fracExpr_() diff --git a/src/finiteVolume/fields/fvPatchFields/derived/activeBaffleVelocity/activeBaffleVelocityFvPatchVectorField.C b/src/finiteVolume/fields/fvPatchFields/derived/activeBaffleVelocity/activeBaffleVelocityFvPatchVectorField.C index 922e044b1f4..ade392b016d 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/activeBaffleVelocity/activeBaffleVelocityFvPatchVectorField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/activeBaffleVelocity/activeBaffleVelocityFvPatchVectorField.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. @@ -88,7 +89,7 @@ activeBaffleVelocityFvPatchVectorField ) : fixedValueFvPatchVectorField(p, iF, dict, false), - pName_(dict.lookupOrDefault<word>("p", "p")), + pName_(dict.getOrDefault<word>("p", "p")), cyclicPatchName_(dict.lookup("cyclicPatch")), cyclicPatchLabel_(p.patch().boundaryMesh().findPatchID(cyclicPatchName_)), orientation_(dict.get<label>("orientation")), diff --git a/src/finiteVolume/fields/fvPatchFields/derived/activePressureForceBaffleVelocity/activePressureForceBaffleVelocityFvPatchVectorField.C b/src/finiteVolume/fields/fvPatchFields/derived/activePressureForceBaffleVelocity/activePressureForceBaffleVelocityFvPatchVectorField.C index 8e1d0288c4a..2df16fccf5a 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/activePressureForceBaffleVelocity/activePressureForceBaffleVelocityFvPatchVectorField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/activePressureForceBaffleVelocity/activePressureForceBaffleVelocityFvPatchVectorField.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2016 OpenFOAM Foundation - Copyright (C) 2016 OpenCFD Ltd. + Copyright (C) 2016-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -95,7 +95,7 @@ activePressureForceBaffleVelocityFvPatchVectorField ) : fixedValueFvPatchVectorField(p, iF, dict, false), - pName_(dict.lookupOrDefault<word>("p", "p")), + pName_(dict.getOrDefault<word>("p", "p")), cyclicPatchName_(dict.lookup("cyclicPatch")), cyclicPatchLabel_(p.patch().boundaryMesh().findPatchID(cyclicPatchName_)), initWallSf_(0), diff --git a/src/finiteVolume/fields/fvPatchFields/derived/advective/advectiveFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/advective/advectiveFvPatchField.C index 21958e555de..4e40f829f70 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/advective/advectiveFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/advective/advectiveFvPatchField.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. @@ -82,8 +83,8 @@ Foam::advectiveFvPatchField<Type>::advectiveFvPatchField ) : mixedFvPatchField<Type>(p, iF), - phiName_(dict.lookupOrDefault<word>("phi", "phi")), - rhoName_(dict.lookupOrDefault<word>("rho", "rho")), + phiName_(dict.getOrDefault<word>("phi", "phi")), + rhoName_(dict.getOrDefault<word>("rho", "rho")), fieldInf_(Zero), lInf_(-GREAT) { diff --git a/src/finiteVolume/fields/fvPatchFields/derived/fan/fanFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/fan/fanFvPatchField.C index ea7b03b575e..58a98012952 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/fan/fanFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/fan/fanFvPatchField.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2015 OpenFOAM Foundation - Copyright (C) 2017-2019 OpenCFD Ltd. + Copyright (C) 2017-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -68,10 +68,10 @@ Foam::fanFvPatchField<Type>::fanFvPatchField ) : uniformJumpFvPatchField<Type>(p, iF, dict), - phiName_(dict.lookupOrDefault<word>("phi", "phi")), - rhoName_(dict.lookupOrDefault<word>("rho", "rho")), - uniformJump_(dict.lookupOrDefault("uniformJump", false)), - nonDimensional_(dict.lookupOrDefault("nonDimensional", false)), + phiName_(dict.getOrDefault<word>("phi", "phi")), + rhoName_(dict.getOrDefault<word>("rho", "rho")), + uniformJump_(dict.getOrDefault("uniformJump", false)), + nonDimensional_(dict.getOrDefault("nonDimensional", false)), rpm_(0), dm_(0) { diff --git a/src/finiteVolume/fields/fvPatchFields/derived/fan/fanFvPatchFields.C b/src/finiteVolume/fields/fvPatchFields/derived/fan/fanFvPatchFields.C index 5554cda41d3..7b260be5d6d 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/fan/fanFvPatchFields.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/fan/fanFvPatchFields.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2017 OpenFOAM Foundation - Copyright (C) 2017-2018 OpenCFD Ltd. + Copyright (C) 2017-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -97,10 +97,10 @@ Foam::fanFvPatchField<Foam::scalar>::fanFvPatchField ) : uniformJumpFvPatchField<scalar>(p, iF), - phiName_(dict.lookupOrDefault<word>("phi", "phi")), - rhoName_(dict.lookupOrDefault<word>("rho", "rho")), - uniformJump_(dict.lookupOrDefault("uniformJump", false)), - nonDimensional_(dict.lookupOrDefault("nonDimensional", false)), + phiName_(dict.getOrDefault<word>("phi", "phi")), + rhoName_(dict.getOrDefault<word>("rho", "rho")), + uniformJump_(dict.getOrDefault("uniformJump", false)), + nonDimensional_(dict.getOrDefault("nonDimensional", false)), rpm_(0), dm_(0) { diff --git a/src/finiteVolume/fields/fvPatchFields/derived/fanPressure/fanPressureFvPatchScalarField.C b/src/finiteVolume/fields/fvPatchFields/derived/fanPressure/fanPressureFvPatchScalarField.C index 42a1b1c6c2c..fff43cf5302 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/fanPressure/fanPressureFvPatchScalarField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/fanPressure/fanPressureFvPatchScalarField.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2016 OpenFOAM Foundation - Copyright (C) 2017 OpenCFD Ltd + Copyright (C) 2017-2020 OpenCFD Ltd ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -90,7 +90,7 @@ Foam::fanPressureFvPatchScalarField::fanPressureFvPatchScalarField direction_(fanFlowDirectionNames_.get("direction", dict)), rpm_(0), dm_(0), - nonDimensional_(dict.lookupOrDefault("nonDimensional", false)) + nonDimensional_(dict.getOrDefault("nonDimensional", false)) { if (nonDimensional_) { diff --git a/src/finiteVolume/fields/fvPatchFields/derived/fixedFluxPressure/fixedFluxPressureFvPatchScalarField.C b/src/finiteVolume/fields/fvPatchFields/derived/fixedFluxPressure/fixedFluxPressureFvPatchScalarField.C index e0c0290496c..3c5d62ab71c 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/fixedFluxPressure/fixedFluxPressureFvPatchScalarField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/fixedFluxPressure/fixedFluxPressureFvPatchScalarField.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2016 OpenFOAM Foundation - Copyright (C) 2015-2017 OpenCFD Ltd. + Copyright (C) 2015-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -55,7 +55,7 @@ Foam::fixedFluxPressureFvPatchScalarField::fixedFluxPressureFvPatchScalarField fixedGradientFvPatchScalarField(p, iF), curTimeIndex_(-1) { - patchType() = dict.lookupOrDefault<word>("patchType", word::null); + patchType() = dict.getOrDefault<word>("patchType", word::null); if (dict.found("value") && dict.found("gradient")) { fvPatchField<scalar>::operator= diff --git a/src/finiteVolume/fields/fvPatchFields/derived/fixedMean/fixedMeanFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/fixedMean/fixedMeanFvPatchField.C index 8cdb9035230..de7f85d1ea1 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/fixedMean/fixedMeanFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/fixedMean/fixedMeanFvPatchField.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2012-2016 OpenFOAM Foundation - Copyright (C) 2017 OpenCFD Ltd. + Copyright (C) 2017-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -54,7 +54,7 @@ Foam::fixedMeanFvPatchField<Type>::fixedMeanFvPatchField fixedValueFvPatchField<Type>(p, iF, dict), meanValue_(Function1<Type>::New("meanValue", dict)) { - this->patchType() = dict.lookupOrDefault<word>("patchType", word::null); + this->patchType() = dict.getOrDefault<word>("patchType", word::null); } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/fixedMeanOutletInlet/fixedMeanOutletInletFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/fixedMeanOutletInlet/fixedMeanOutletInletFvPatchField.C index b94d5e6b749..23ecab2d7c4 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/fixedMeanOutletInlet/fixedMeanOutletInletFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/fixedMeanOutletInlet/fixedMeanOutletInletFvPatchField.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2018 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -54,7 +55,7 @@ Foam::fixedMeanOutletInletFvPatchField<Type>::fixedMeanOutletInletFvPatchField outletInletFvPatchField<Type>(p, iF), meanValue_(Function1<Type>::New("meanValue", dict)) { - this->phiName_ = dict.lookupOrDefault<word>("phi", "phi"); + this->phiName_ = dict.getOrDefault<word>("phi", "phi"); fvPatchField<Type>::operator= ( diff --git a/src/finiteVolume/fields/fvPatchFields/derived/fixedNormalInletOutletVelocity/fixedNormalInletOutletVelocityFvPatchVectorField.C b/src/finiteVolume/fields/fvPatchFields/derived/fixedNormalInletOutletVelocity/fixedNormalInletOutletVelocityFvPatchVectorField.C index 0c241a6a91f..39f22627070 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/fixedNormalInletOutletVelocity/fixedNormalInletOutletVelocityFvPatchVectorField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/fixedNormalInletOutletVelocity/fixedNormalInletOutletVelocityFvPatchVectorField.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2014-2016 OpenFOAM Foundation - Copyright (C) 2017 OpenCFD Ltd. + Copyright (C) 2017-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -64,14 +64,14 @@ fixedNormalInletOutletVelocityFvPatchVectorField ) : directionMixedFvPatchVectorField(p, iF), - phiName_(dict.lookupOrDefault<word>("phi", "phi")), + phiName_(dict.getOrDefault<word>("phi", "phi")), fixTangentialInflow_(dict.lookup("fixTangentialInflow")), normalVelocity_ ( fvPatchVectorField::New(p, iF, dict.subDict("normalVelocity")) ) { - patchType() = dict.lookupOrDefault<word>("patchType", word::null); + patchType() = dict.getOrDefault<word>("patchType", word::null); fvPatchVectorField::operator=(vectorField("value", dict, p.size())); refValue() = normalVelocity(); refGrad() = Zero; diff --git a/src/finiteVolume/fields/fvPatchFields/derived/fixedNormalSlip/fixedNormalSlipFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/fixedNormalSlip/fixedNormalSlipFvPatchField.C index ccc06ad4f60..508e584948d 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/fixedNormalSlip/fixedNormalSlipFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/fixedNormalSlip/fixedNormalSlipFvPatchField.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2016 OpenFOAM Foundation - Copyright (C) 2017 OpenCFD Ltd. + Copyright (C) 2017-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -69,7 +69,7 @@ Foam::fixedNormalSlipFvPatchField<Type>::fixedNormalSlipFvPatchField transformFvPatchField<Type>(p, iF), fixedValue_("fixedValue", dict, p.size()) { - this->patchType() = dict.lookupOrDefault<word>("patchType", word::null); + this->patchType() = dict.getOrDefault<word>("patchType", word::null); evaluate(); } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/fixedPressureCompressibleDensity/fixedPressureCompressibleDensityFvPatchScalarField.C b/src/finiteVolume/fields/fvPatchFields/derived/fixedPressureCompressibleDensity/fixedPressureCompressibleDensityFvPatchScalarField.C index d2ae7f8ff3c..cc92df70213 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/fixedPressureCompressibleDensity/fixedPressureCompressibleDensityFvPatchScalarField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/fixedPressureCompressibleDensity/fixedPressureCompressibleDensityFvPatchScalarField.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011 OpenFOAM Foundation - Copyright (C) 2018 OpenCFD Ltd. + Copyright (C) 2018-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -69,7 +69,7 @@ fixedPressureCompressibleDensityFvPatchScalarField ) : fixedValueFvPatchField<scalar>(p, iF, dict), - pName_(dict.lookupOrDefault<word>("p", "p")) + pName_(dict.getOrDefault<word>("p", "p")) {} diff --git a/src/finiteVolume/fields/fvPatchFields/derived/flowRateInletVelocity/flowRateInletVelocityFvPatchVectorField.C b/src/finiteVolume/fields/fvPatchFields/derived/flowRateInletVelocity/flowRateInletVelocityFvPatchVectorField.C index e81c865828e..cfec36285c9 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/flowRateInletVelocity/flowRateInletVelocityFvPatchVectorField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/flowRateInletVelocity/flowRateInletVelocityFvPatchVectorField.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2017 OpenFOAM Foundation - Copyright (C) 2019 OpenCFD Ltd. + Copyright (C) 2019-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -59,11 +59,11 @@ flowRateInletVelocityFvPatchVectorField : fixedValueFvPatchField<vector>(p, iF, dict, false), rhoName_("rho"), - rhoInlet_(dict.lookupOrDefault<scalar>("rhoInlet", -VGREAT)), + rhoInlet_(dict.getOrDefault<scalar>("rhoInlet", -VGREAT)), volumetric_(false), extrapolateProfile_ ( - dict.lookupOrDefault<Switch>("extrapolateProfile", false) + dict.getOrDefault<Switch>("extrapolateProfile", false) ) { if (dict.found("volumetricFlowRate")) @@ -75,7 +75,7 @@ flowRateInletVelocityFvPatchVectorField { volumetric_ = false; flowRate_ = Function1<scalar>::New("massFlowRate", dict); - rhoName_ = dict.lookupOrDefault<word>("rho", "rho"); + rhoName_ = dict.getOrDefault<word>("rho", "rho"); } else { diff --git a/src/finiteVolume/fields/fvPatchFields/derived/flowRateOutletVelocity/flowRateOutletVelocityFvPatchVectorField.C b/src/finiteVolume/fields/fvPatchFields/derived/flowRateOutletVelocity/flowRateOutletVelocityFvPatchVectorField.C index b6d183bea94..8489ffd8137 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/flowRateOutletVelocity/flowRateOutletVelocityFvPatchVectorField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/flowRateOutletVelocity/flowRateOutletVelocityFvPatchVectorField.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2017 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -56,7 +57,7 @@ flowRateOutletVelocityFvPatchVectorField ) : fixedValueFvPatchField<vector>(p, iF, dict, false), - rhoOutlet_(dict.lookupOrDefault<scalar>("rhoOutlet", -VGREAT)) + rhoOutlet_(dict.getOrDefault<scalar>("rhoOutlet", -VGREAT)) { if (dict.found("volumetricFlowRate")) { @@ -68,7 +69,7 @@ flowRateOutletVelocityFvPatchVectorField { volumetric_ = false; flowRate_ = Function1<scalar>::New("massFlowRate", dict); - rhoName_ = dict.lookupOrDefault<word>("rho", "rho"); + rhoName_ = dict.getOrDefault<word>("rho", "rho"); } else { diff --git a/src/finiteVolume/fields/fvPatchFields/derived/fluxCorrectedVelocity/fluxCorrectedVelocityFvPatchVectorField.C b/src/finiteVolume/fields/fvPatchFields/derived/fluxCorrectedVelocity/fluxCorrectedVelocityFvPatchVectorField.C index 9294265d3f6..333b0da3849 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/fluxCorrectedVelocity/fluxCorrectedVelocityFvPatchVectorField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/fluxCorrectedVelocity/fluxCorrectedVelocityFvPatchVectorField.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2016 OpenFOAM Foundation - Copyright (C) 2017 OpenCFD Ltd. + Copyright (C) 2017-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -71,10 +71,10 @@ fluxCorrectedVelocityFvPatchVectorField ) : zeroGradientFvPatchVectorField(p, iF), - phiName_(dict.lookupOrDefault<word>("phi", "phi")), - rhoName_(dict.lookupOrDefault<word>("rho", "rho")) + phiName_(dict.getOrDefault<word>("phi", "phi")), + rhoName_(dict.getOrDefault<word>("rho", "rho")) { - patchType() = dict.lookupOrDefault<word>("patchType", word::null); + patchType() = dict.getOrDefault<word>("patchType", word::null); fvPatchVectorField::operator=(patchInternalField()); } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/freestream/freestreamFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/freestream/freestreamFvPatchField.C index 174ea146234..1cfd48f0dfe 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/freestream/freestreamFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/freestream/freestreamFvPatchField.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2015 OpenFOAM Foundation - Copyright (C) 2017-2018 OpenCFD Ltd. + Copyright (C) 2017-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -53,9 +53,9 @@ Foam::freestreamFvPatchField<Type>::freestreamFvPatchField inletOutletFvPatchField<Type>(p, iF), freestreamBCPtr_() { - this->patchType() = dict.lookupOrDefault<word>("patchType", word::null); + this->patchType() = dict.getOrDefault<word>("patchType", word::null); - this->phiName_ = dict.lookupOrDefault<word>("phi","phi"); + this->phiName_ = dict.getOrDefault<word>("phi", "phi"); if (dict.found("freestreamValue")) { diff --git a/src/finiteVolume/fields/fvPatchFields/derived/freestreamPressure/freestreamPressureFvPatchScalarField.C b/src/finiteVolume/fields/fvPatchFields/derived/freestreamPressure/freestreamPressureFvPatchScalarField.C index 4b916340c58..d42bdee7519 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/freestreamPressure/freestreamPressureFvPatchScalarField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/freestreamPressure/freestreamPressureFvPatchScalarField.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2018 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -52,7 +53,7 @@ freestreamPressureFvPatchScalarField ) : mixedFvPatchScalarField(p, iF), - UName_(dict.lookupOrDefault<word>("U", "U")) + UName_(dict.getOrDefault<word>("U", "U")) { freestreamValue() = scalarField("freestreamValue", dict, p.size()); diff --git a/src/finiteVolume/fields/fvPatchFields/derived/inletOutlet/inletOutletFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/inletOutlet/inletOutletFvPatchField.C index 8fb0e2194ab..db493dd1ceb 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/inletOutlet/inletOutletFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/inletOutlet/inletOutletFvPatchField.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2017 OpenFOAM Foundation - Copyright (C) 2017 OpenCFD Ltd. + Copyright (C) 2017-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -69,9 +69,9 @@ Foam::inletOutletFvPatchField<Type>::inletOutletFvPatchField ) : mixedFvPatchField<Type>(p, iF), - phiName_(dict.lookupOrDefault<word>("phi", "phi")) + phiName_(dict.getOrDefault<word>("phi", "phi")) { - this->patchType() = dict.lookupOrDefault<word>("patchType", word::null); + this->patchType() = dict.getOrDefault<word>("patchType", word::null); this->refValue() = Field<Type>("inletValue", dict, p.size()); diff --git a/src/finiteVolume/fields/fvPatchFields/derived/inletOutletTotalTemperature/inletOutletTotalTemperatureFvPatchScalarField.C b/src/finiteVolume/fields/fvPatchFields/derived/inletOutletTotalTemperature/inletOutletTotalTemperatureFvPatchScalarField.C index 6f7469f83f3..e3191f8c43e 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/inletOutletTotalTemperature/inletOutletTotalTemperatureFvPatchScalarField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/inletOutletTotalTemperature/inletOutletTotalTemperatureFvPatchScalarField.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2017 OpenFOAM Foundation - Copyright (C) 2017 OpenCFD Ltd. + Copyright (C) 2017-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -79,14 +79,14 @@ inletOutletTotalTemperatureFvPatchScalarField ) : inletOutletFvPatchScalarField(p, iF), - UName_(dict.lookupOrDefault<word>("U", "U")), - psiName_(dict.lookupOrDefault<word>("psi", "thermo:psi")), + UName_(dict.getOrDefault<word>("U", "U")), + psiName_(dict.getOrDefault<word>("psi", "thermo:psi")), gamma_(dict.get<scalar>("gamma")), T0_("T0", dict, p.size()) { - this->patchType() = dict.lookupOrDefault<word>("patchType", word::null); + this->patchType() = dict.getOrDefault<word>("patchType", word::null); - this->phiName_ = dict.lookupOrDefault<word>("phi", "phi"); + this->phiName_ = dict.getOrDefault<word>("phi", "phi"); this->refValue() = Zero; if (dict.found("value")) diff --git a/src/finiteVolume/fields/fvPatchFields/derived/interstitialInletVelocity/interstitialInletVelocityFvPatchVectorField.C b/src/finiteVolume/fields/fvPatchFields/derived/interstitialInletVelocity/interstitialInletVelocityFvPatchVectorField.C index e9466d21ee9..e9a77fa0ad1 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/interstitialInletVelocity/interstitialInletVelocityFvPatchVectorField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/interstitialInletVelocity/interstitialInletVelocityFvPatchVectorField.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2013-2016 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -71,7 +72,7 @@ interstitialInletVelocityFvPatchVectorField : fixedValueFvPatchVectorField(p, iF, dict), inletVelocity_("inletVelocity", dict, p.size()), - alphaName_(dict.lookupOrDefault<word>("alpha", "alpha")) + alphaName_(dict.getOrDefault<word>("alpha", "alpha")) {} diff --git a/src/finiteVolume/fields/fvPatchFields/derived/mappedField/Sampled/Sampled.C b/src/finiteVolume/fields/fvPatchFields/derived/mappedField/Sampled/Sampled.C index 33f7c3141e5..341636606a9 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/mappedField/Sampled/Sampled.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/mappedField/Sampled/Sampled.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. @@ -62,7 +62,7 @@ Foam::PatchFunction1Types::Sampled<Type>::Sampled PatchFunction1<Type>(pp, entryName, dict, faceValues), mappedPatchBase(pp, dict), fieldName_(dict.get<word>("field")), - setAverage_(dict.lookupOrDefault("setAverage", false)), + setAverage_(dict.getOrDefault("setAverage", false)), average_(getAverage(dict, setAverage_)), interpolationScheme_(interpolationCell<Type>::typeName) { diff --git a/src/finiteVolume/fields/fvPatchFields/derived/mappedField/mappedPatchFieldBase.C b/src/finiteVolume/fields/fvPatchFields/derived/mappedField/mappedPatchFieldBase.C index c76a884dc35..6cd627dc7b2 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/mappedField/mappedPatchFieldBase.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/mappedField/mappedPatchFieldBase.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2013-2016 OpenFOAM Foundation - Copyright (C) 2018 OpenCFD Ltd. + Copyright (C) 2018-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -82,13 +82,13 @@ Foam::mappedPatchFieldBase<Type>::mappedPatchFieldBase patchField_(patchField), fieldName_ ( - dict.template lookupOrDefault<word> + dict.template getOrDefault<word> ( "field", patchField_.internalField().name() ) ), - setAverage_(dict.lookupOrDefault("setAverage", false)), + setAverage_(dict.getOrDefault("setAverage", false)), average_(getAverage(dict, setAverage_)), interpolationScheme_(interpolationCell<Type>::typeName) { diff --git a/src/finiteVolume/fields/fvPatchFields/derived/mappedFlowRate/mappedFlowRateFvPatchVectorField.C b/src/finiteVolume/fields/fvPatchFields/derived/mappedFlowRate/mappedFlowRateFvPatchVectorField.C index cd18ee2c5e1..5bdeefc9801 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/mappedFlowRate/mappedFlowRateFvPatchVectorField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/mappedFlowRate/mappedFlowRateFvPatchVectorField.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. @@ -70,9 +71,9 @@ Foam::mappedFlowRateFvPatchVectorField::mappedFlowRateFvPatchVectorField ) : fixedValueFvPatchField<vector>(p, iF, dict), - nbrPhiName_(dict.lookupOrDefault<word>("nbrPhi", "phi")), - phiName_(dict.lookupOrDefault<word>("phi", "phi")), - rhoName_(dict.lookupOrDefault<word>("rho", "rho")) + nbrPhiName_(dict.getOrDefault<word>("nbrPhi", "phi")), + phiName_(dict.getOrDefault<word>("phi", "phi")), + rhoName_(dict.getOrDefault<word>("rho", "rho")) {} diff --git a/src/finiteVolume/fields/fvPatchFields/derived/mappedVelocityFluxFixedValue/mappedVelocityFluxFixedValueFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/mappedVelocityFluxFixedValue/mappedVelocityFluxFixedValueFvPatchField.C index 49240663a47..f0643e915b5 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/mappedVelocityFluxFixedValue/mappedVelocityFluxFixedValueFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/mappedVelocityFluxFixedValue/mappedVelocityFluxFixedValueFvPatchField.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. @@ -81,7 +82,7 @@ mappedVelocityFluxFixedValueFvPatchField ) : fixedValueFvPatchVectorField(p, iF, dict), - phiName_(dict.lookupOrDefault<word>("phi", "phi")) + phiName_(dict.getOrDefault<word>("phi", "phi")) { if (!isA<mappedPatchBase>(this->patch().patch())) { diff --git a/src/finiteVolume/fields/fvPatchFields/derived/matchedFlowRateOutletVelocity/matchedFlowRateOutletVelocityFvPatchVectorField.C b/src/finiteVolume/fields/fvPatchFields/derived/matchedFlowRateOutletVelocity/matchedFlowRateOutletVelocityFvPatchVectorField.C index c35e26e5ff1..ffb87ebbd57 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/matchedFlowRateOutletVelocity/matchedFlowRateOutletVelocityFvPatchVectorField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/matchedFlowRateOutletVelocity/matchedFlowRateOutletVelocityFvPatchVectorField.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2017 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -56,7 +57,7 @@ matchedFlowRateOutletVelocityFvPatchVectorField : fixedValueFvPatchField<vector>(p, iF, dict, false), inletPatchName_(dict.lookup("inletPatch")), - volumetric_(dict.lookupOrDefault("volumetric", true)) + volumetric_(dict.getOrDefault("volumetric", true)) { if (volumetric_) { @@ -64,7 +65,7 @@ matchedFlowRateOutletVelocityFvPatchVectorField } else { - rhoName_ = dict.lookupOrDefault<word>("rho", "rho"); + rhoName_ = dict.getOrDefault<word>("rho", "rho"); } // Value field require if mass based diff --git a/src/finiteVolume/fields/fvPatchFields/derived/noSlip/noSlipFvPatchVectorField.C b/src/finiteVolume/fields/fvPatchFields/derived/noSlip/noSlipFvPatchVectorField.C index 4ebf5860e2e..2802f3256c7 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/noSlip/noSlipFvPatchVectorField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/noSlip/noSlipFvPatchVectorField.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2016 OpenFOAM Foundation - Copyright (C) 2017 OpenCFD Ltd. + Copyright (C) 2017-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -50,7 +50,7 @@ Foam::noSlipFvPatchVectorField::noSlipFvPatchVectorField : fixedValueFvPatchVectorField(p, iF, Zero) { - patchType() = dict.lookupOrDefault<word>("patchType", word::null); + patchType() = dict.getOrDefault<word>("patchType", word::null); } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/outletInlet/outletInletFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/outletInlet/outletInletFvPatchField.C index e56f920cc9f..9c79092891a 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/outletInlet/outletInletFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/outletInlet/outletInletFvPatchField.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2017 OpenFOAM Foundation - Copyright (C) 2017 OpenCFD Ltd. + Copyright (C) 2017-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -69,9 +69,9 @@ Foam::outletInletFvPatchField<Type>::outletInletFvPatchField ) : mixedFvPatchField<Type>(p, iF), - phiName_(dict.lookupOrDefault<word>("phi", "phi")) + phiName_(dict.getOrDefault<word>("phi", "phi")) { - this->patchType() = dict.lookupOrDefault<word>("patchType", word::null); + this->patchType() = dict.getOrDefault<word>("patchType", word::null); this->refValue() = Field<Type>("outletValue", dict, p.size()); diff --git a/src/finiteVolume/fields/fvPatchFields/derived/outletMappedUniformInlet/outletMappedUniformInletFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/outletMappedUniformInlet/outletMappedUniformInletFvPatchField.C index 202e5db0a78..86323db7ed9 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/outletMappedUniformInlet/outletMappedUniformInletFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/outletMappedUniformInlet/outletMappedUniformInletFvPatchField.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. @@ -56,7 +57,7 @@ outletMappedUniformInletFvPatchField : fixedValueFvPatchField<Type>(p, iF, dict), outletPatchName_(dict.lookup("outletPatch")), - phiName_(dict.lookupOrDefault<word>("phi", "phi")) + phiName_(dict.getOrDefault<word>("phi", "phi")) {} diff --git a/src/finiteVolume/fields/fvPatchFields/derived/outletPhaseMeanVelocity/outletPhaseMeanVelocityFvPatchVectorField.C b/src/finiteVolume/fields/fvPatchFields/derived/outletPhaseMeanVelocity/outletPhaseMeanVelocityFvPatchVectorField.C index 647cfd99c4b..9bf92ef7771 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/outletPhaseMeanVelocity/outletPhaseMeanVelocityFvPatchVectorField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/outletPhaseMeanVelocity/outletPhaseMeanVelocityFvPatchVectorField.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2013-2016 OpenFOAM Foundation - Copyright (C) 2017 OpenCFD Ltd. + Copyright (C) 2017-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -78,7 +78,7 @@ Foam::outletPhaseMeanVelocityFvPatchVectorField Umean_(dict.get<scalar>("Umean")), alphaName_(dict.lookup("alpha")) { - patchType() = dict.lookupOrDefault<word>("patchType", word::null); + patchType() = dict.getOrDefault<word>("patchType", word::null); refValue() = Zero; refGrad() = Zero; diff --git a/src/finiteVolume/fields/fvPatchFields/derived/partialSlip/partialSlipFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/partialSlip/partialSlipFvPatchField.C index fee35927fdd..50e24b1f635 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/partialSlip/partialSlipFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/partialSlip/partialSlipFvPatchField.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2016 OpenFOAM Foundation - Copyright (C) 2017 OpenCFD Ltd. + Copyright (C) 2017-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -71,7 +71,7 @@ Foam::partialSlipFvPatchField<Type>::partialSlipFvPatchField refValue_(p.size(), Zero), valueFraction_("valueFraction", dict, p.size()) { - this->patchType() = dict.lookupOrDefault<word>("patchType", word::null); + this->patchType() = dict.getOrDefault<word>("patchType", word::null); // Backwards compatibility - leave refValue as zero unless specified if (dict.found("refValue")) diff --git a/src/finiteVolume/fields/fvPatchFields/derived/phaseHydrostaticPressure/phaseHydrostaticPressureFvPatchScalarField.C b/src/finiteVolume/fields/fvPatchFields/derived/phaseHydrostaticPressure/phaseHydrostaticPressureFvPatchScalarField.C index 28c03748cd2..c33756cbc97 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/phaseHydrostaticPressure/phaseHydrostaticPressureFvPatchScalarField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/phaseHydrostaticPressure/phaseHydrostaticPressureFvPatchScalarField.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2016 OpenFOAM Foundation - Copyright (C) 2017-2018 OpenCFD Ltd. + Copyright (C) 2017-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -63,12 +63,12 @@ phaseHydrostaticPressureFvPatchScalarField ) : mixedFvPatchScalarField(p, iF), - phaseFraction_(dict.lookupOrDefault<word>("phaseFraction", "alpha")), + phaseFraction_(dict.getOrDefault<word>("phaseFraction", "alpha")), rho_(dict.get<scalar>("rho")), pRefValue_(dict.get<scalar>("pRefValue")), pRefPoint_(dict.lookup("pRefPoint")) { - this->patchType() = dict.lookupOrDefault<word>("patchType", word::null); + this->patchType() = dict.getOrDefault<word>("patchType", word::null); this->refValue() = pRefValue_; diff --git a/src/finiteVolume/fields/fvPatchFields/derived/plenumPressure/plenumPressureFvPatchScalarField.C b/src/finiteVolume/fields/fvPatchFields/derived/plenumPressure/plenumPressureFvPatchScalarField.C index 45ec9da28a6..8497772215c 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/plenumPressure/plenumPressureFvPatchScalarField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/plenumPressure/plenumPressureFvPatchScalarField.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2016-2017 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -79,9 +80,9 @@ Foam::plenumPressureFvPatchScalarField::plenumPressureFvPatchScalarField hasRho_(false), inletAreaRatio_(dict.get<scalar>("inletAreaRatio")), inletDischargeCoefficient_(dict.get<scalar>("inletDischargeCoefficient")), - timeScale_(dict.lookupOrDefault<scalar>("timeScale", 0)), - phiName_(dict.lookupOrDefault<word>("phi", "phi")), - UName_(dict.lookupOrDefault<word>("U", "U")) + timeScale_(dict.getOrDefault<scalar>("timeScale", 0)), + phiName_(dict.getOrDefault<word>("phi", "phi")), + UName_(dict.getOrDefault<word>("U", "U")) { hasRho_ = dict.readIfPresent("rho", rho_); } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/pressureDirectedInletOutletVelocity/pressureDirectedInletOutletVelocityFvPatchVectorField.C b/src/finiteVolume/fields/fvPatchFields/derived/pressureDirectedInletOutletVelocity/pressureDirectedInletOutletVelocityFvPatchVectorField.C index 3b370ace31a..7f8c6b86980 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/pressureDirectedInletOutletVelocity/pressureDirectedInletOutletVelocityFvPatchVectorField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/pressureDirectedInletOutletVelocity/pressureDirectedInletOutletVelocityFvPatchVectorField.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2017 OpenFOAM Foundation - Copyright (C) 2017 OpenCFD Ltd. + Copyright (C) 2017-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -77,11 +77,11 @@ pressureDirectedInletOutletVelocityFvPatchVectorField ) : mixedFvPatchVectorField(p, iF), - phiName_(dict.lookupOrDefault<word>("phi", "phi")), - rhoName_(dict.lookupOrDefault<word>("rho", "rho")), + phiName_(dict.getOrDefault<word>("phi", "phi")), + rhoName_(dict.getOrDefault<word>("rho", "rho")), inletDir_("inletDirection", dict, p.size()) { - patchType() = dict.lookupOrDefault<word>("patchType", word::null); + patchType() = dict.getOrDefault<word>("patchType", word::null); fvPatchVectorField::operator=(vectorField("value", dict, p.size())); refValue() = *this; refGrad() = Zero; diff --git a/src/finiteVolume/fields/fvPatchFields/derived/pressureDirectedInletVelocity/pressureDirectedInletVelocityFvPatchVectorField.C b/src/finiteVolume/fields/fvPatchFields/derived/pressureDirectedInletVelocity/pressureDirectedInletVelocityFvPatchVectorField.C index 2ef9c9df522..dc7976ecb01 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/pressureDirectedInletVelocity/pressureDirectedInletVelocityFvPatchVectorField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/pressureDirectedInletVelocity/pressureDirectedInletVelocityFvPatchVectorField.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. @@ -73,8 +74,8 @@ pressureDirectedInletVelocityFvPatchVectorField ) : fixedValueFvPatchVectorField(p, iF, dict), - phiName_(dict.lookupOrDefault<word>("phi", "phi")), - rhoName_(dict.lookupOrDefault<word>("rho", "rho")), + phiName_(dict.getOrDefault<word>("phi", "phi")), + rhoName_(dict.getOrDefault<word>("rho", "rho")), inletDir_("inletDirection", dict, p.size()) {} diff --git a/src/finiteVolume/fields/fvPatchFields/derived/pressureInletOutletParSlipVelocity/pressureInletOutletParSlipVelocityFvPatchVectorField.C b/src/finiteVolume/fields/fvPatchFields/derived/pressureInletOutletParSlipVelocity/pressureInletOutletParSlipVelocityFvPatchVectorField.C index 3d08b7cc335..616bde73d71 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/pressureInletOutletParSlipVelocity/pressureInletOutletParSlipVelocityFvPatchVectorField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/pressureInletOutletParSlipVelocity/pressureInletOutletParSlipVelocityFvPatchVectorField.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2017 OpenFOAM Foundation - Copyright (C) 2017 OpenCFD Ltd. + Copyright (C) 2017-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -76,10 +76,10 @@ pressureInletOutletParSlipVelocityFvPatchVectorField ) : mixedFvPatchVectorField(p, iF), - phiName_(dict.lookupOrDefault<word>("phi", "phi")), - rhoName_(dict.lookupOrDefault<word>("rho", "rho")) + phiName_(dict.getOrDefault<word>("phi", "phi")), + rhoName_(dict.getOrDefault<word>("rho", "rho")) { - patchType() = dict.lookupOrDefault<word>("patchType", word::null); + patchType() = dict.getOrDefault<word>("patchType", word::null); fvPatchVectorField::operator=(vectorField("value", dict, p.size())); refValue() = *this; refGrad() = Zero; diff --git a/src/finiteVolume/fields/fvPatchFields/derived/pressureInletOutletVelocity/pressureInletOutletVelocityFvPatchVectorField.C b/src/finiteVolume/fields/fvPatchFields/derived/pressureInletOutletVelocity/pressureInletOutletVelocityFvPatchVectorField.C index d640943bcf0..84e7f55de3e 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/pressureInletOutletVelocity/pressureInletOutletVelocityFvPatchVectorField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/pressureInletOutletVelocity/pressureInletOutletVelocityFvPatchVectorField.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2016 OpenFOAM Foundation - Copyright (C) 2017 OpenCFD Ltd. + Copyright (C) 2017-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -78,9 +78,9 @@ pressureInletOutletVelocityFvPatchVectorField ) : directionMixedFvPatchVectorField(p, iF), - phiName_(dict.lookupOrDefault<word>("phi", "phi")) + phiName_(dict.getOrDefault<word>("phi", "phi")) { - patchType() = dict.lookupOrDefault<word>("patchType", word::null); + patchType() = dict.getOrDefault<word>("patchType", word::null); fvPatchVectorField::operator=(vectorField("value", dict, p.size())); if (dict.found("tangentialVelocity")) diff --git a/src/finiteVolume/fields/fvPatchFields/derived/pressureInletVelocity/pressureInletVelocityFvPatchVectorField.C b/src/finiteVolume/fields/fvPatchFields/derived/pressureInletVelocity/pressureInletVelocityFvPatchVectorField.C index 2310b2b7eda..e954a2cf799 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/pressureInletVelocity/pressureInletVelocityFvPatchVectorField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/pressureInletVelocity/pressureInletVelocityFvPatchVectorField.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. @@ -69,8 +70,8 @@ pressureInletVelocityFvPatchVectorField ) : fixedValueFvPatchVectorField(p, iF, dict), - phiName_(dict.lookupOrDefault<word>("phi", "phi")), - rhoName_(dict.lookupOrDefault<word>("rho", "rho")) + phiName_(dict.getOrDefault<word>("phi", "phi")), + rhoName_(dict.getOrDefault<word>("rho", "rho")) {} diff --git a/src/finiteVolume/fields/fvPatchFields/derived/pressureNormalInletOutletVelocity/pressureNormalInletOutletVelocityFvPatchVectorField.C b/src/finiteVolume/fields/fvPatchFields/derived/pressureNormalInletOutletVelocity/pressureNormalInletOutletVelocityFvPatchVectorField.C index 7f1e5139c44..3b36934e7a3 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/pressureNormalInletOutletVelocity/pressureNormalInletOutletVelocityFvPatchVectorField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/pressureNormalInletOutletVelocity/pressureNormalInletOutletVelocityFvPatchVectorField.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2017 OpenFOAM Foundation - Copyright (C) 2017 OpenCFD Ltd. + Copyright (C) 2017-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -76,10 +76,10 @@ pressureNormalInletOutletVelocityFvPatchVectorField ) : mixedFvPatchVectorField(p, iF), - phiName_(dict.lookupOrDefault<word>("phi", "phi")), - rhoName_(dict.lookupOrDefault<word>("rho", "rho")) + phiName_(dict.getOrDefault<word>("phi", "phi")), + rhoName_(dict.getOrDefault<word>("rho", "rho")) { - patchType() = dict.lookupOrDefault<word>("patchType", word::null); + patchType() = dict.getOrDefault<word>("patchType", word::null); fvPatchVectorField::operator=(vectorField("value", dict, p.size())); refValue() = *this; refGrad() = Zero; diff --git a/src/finiteVolume/fields/fvPatchFields/derived/pressurePIDControlInletVelocity/pressurePIDControlInletVelocityFvPatchVectorField.C b/src/finiteVolume/fields/fvPatchFields/derived/pressurePIDControlInletVelocity/pressurePIDControlInletVelocityFvPatchVectorField.C index 1f896e8828e..81aae86891c 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/pressurePIDControlInletVelocity/pressurePIDControlInletVelocityFvPatchVectorField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/pressurePIDControlInletVelocity/pressurePIDControlInletVelocityFvPatchVectorField.C @@ -5,7 +5,7 @@ \\ / A nd | www.openfoam.com \\/ M anipulation | ------------------------------------------------------------------------------- - Copyright (C) 2015 OpenCFD Ltd. + Copyright (C) 2015-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -134,16 +134,16 @@ pressurePIDControlInletVelocityFvPatchVectorField upstreamName_(dict.lookup("upstream")), downstreamName_(dict.lookup("downstream")), 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")), + shapeFactor_(dict.getOrDefault<scalar>("shapeFactor", 0)), + pName_(dict.getOrDefault<word>("p", "p")), + phiName_(dict.getOrDefault<word>("phi", "phi")), + rhoName_(dict.getOrDefault<word>("rho", "none")), 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)), + error_(dict.getOrDefault<scalar>("error", 0)), + errorIntegral_(dict.getOrDefault<scalar>("errorIntegral", 0)), oldQ_(0), oldError_(0), oldErrorIntegral_(0), diff --git a/src/finiteVolume/fields/fvPatchFields/derived/prghPressure/prghPressureFvPatchScalarField.C b/src/finiteVolume/fields/fvPatchFields/derived/prghPressure/prghPressureFvPatchScalarField.C index df33a1d6ecf..551a1402897 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/prghPressure/prghPressureFvPatchScalarField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/prghPressure/prghPressureFvPatchScalarField.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2013-2016 OpenFOAM Foundation - Copyright (C) 2018 OpenCFD Ltd. + Copyright (C) 2018-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -56,7 +56,7 @@ prghPressureFvPatchScalarField ) : fixedValueFvPatchScalarField(p, iF, dict, false), - rhoName_(dict.lookupOrDefault<word>("rho", "rho")), + rhoName_(dict.getOrDefault<word>("rho", "rho")), p_("p", dict, p.size()) { if (dict.found("value")) diff --git a/src/finiteVolume/fields/fvPatchFields/derived/prghTotalHydrostaticPressure/prghTotalHydrostaticPressureFvPatchScalarField.C b/src/finiteVolume/fields/fvPatchFields/derived/prghTotalHydrostaticPressure/prghTotalHydrostaticPressureFvPatchScalarField.C index 72ca95a7a50..10511de3434 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/prghTotalHydrostaticPressure/prghTotalHydrostaticPressureFvPatchScalarField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/prghTotalHydrostaticPressure/prghTotalHydrostaticPressureFvPatchScalarField.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2016-2017 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -58,10 +59,10 @@ prghTotalHydrostaticPressureFvPatchScalarField ) : fixedValueFvPatchScalarField(p, iF, dict), - UName_(dict.lookupOrDefault<word>("U", "U")), - phiName_(dict.lookupOrDefault<word>("phi", "phi")), - rhoName_(dict.lookupOrDefault<word>("rho", "rho")), - ph_rghName_(dict.lookupOrDefault<word>("ph_rgh", "ph_rgh")) + UName_(dict.getOrDefault<word>("U", "U")), + phiName_(dict.getOrDefault<word>("phi", "phi")), + rhoName_(dict.getOrDefault<word>("rho", "rho")), + ph_rghName_(dict.getOrDefault<word>("ph_rgh", "ph_rgh")) {} diff --git a/src/finiteVolume/fields/fvPatchFields/derived/prghTotalPressure/prghTotalPressureFvPatchScalarField.C b/src/finiteVolume/fields/fvPatchFields/derived/prghTotalPressure/prghTotalPressureFvPatchScalarField.C index 11e1fac1327..9d3d89590b0 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/prghTotalPressure/prghTotalPressureFvPatchScalarField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/prghTotalPressure/prghTotalPressureFvPatchScalarField.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2015-2017 OpenFOAM Foundation - Copyright (C) 2018 OpenCFD Ltd. + Copyright (C) 2018-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -57,9 +57,9 @@ Foam::prghTotalPressureFvPatchScalarField::prghTotalPressureFvPatchScalarField ) : fixedValueFvPatchScalarField(p, iF, dict, false), - UName_(dict.lookupOrDefault<word>("U", "U")), - phiName_(dict.lookupOrDefault<word>("phi", "phi")), - rhoName_(dict.lookupOrDefault<word>("rho", "rho")), + UName_(dict.getOrDefault<word>("U", "U")), + phiName_(dict.getOrDefault<word>("phi", "phi")), + rhoName_(dict.getOrDefault<word>("rho", "rho")), p0_("p0", dict, p.size()) { if (dict.found("value")) diff --git a/src/finiteVolume/fields/fvPatchFields/derived/rotatingPressureInletOutletVelocity/rotatingPressureInletOutletVelocityFvPatchVectorField.C b/src/finiteVolume/fields/fvPatchFields/derived/rotatingPressureInletOutletVelocity/rotatingPressureInletOutletVelocityFvPatchVectorField.C index 0614e8cff34..0148fa6b680 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/rotatingPressureInletOutletVelocity/rotatingPressureInletOutletVelocityFvPatchVectorField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/rotatingPressureInletOutletVelocity/rotatingPressureInletOutletVelocityFvPatchVectorField.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2016 OpenFOAM Foundation - Copyright (C) 2017 OpenCFD Ltd. + Copyright (C) 2017-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -91,7 +91,7 @@ rotatingPressureInletOutletVelocityFvPatchVectorField pressureInletOutletVelocityFvPatchVectorField(p, iF, dict), omega_(Function1<vector>::New("omega", dict)) { - patchType() = dict.lookupOrDefault<word>("patchType", word::null); + patchType() = dict.getOrDefault<word>("patchType", word::null); calcTangentialVelocity(); } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/supersonicFreestream/supersonicFreestreamFvPatchVectorField.C b/src/finiteVolume/fields/fvPatchFields/derived/supersonicFreestream/supersonicFreestreamFvPatchVectorField.C index 77619989d6a..b74d4045d13 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/supersonicFreestream/supersonicFreestreamFvPatchVectorField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/supersonicFreestream/supersonicFreestreamFvPatchVectorField.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2016 OpenFOAM Foundation - Copyright (C) 2017 OpenCFD Ltd. + Copyright (C) 2017-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -64,15 +64,15 @@ supersonicFreestreamFvPatchVectorField ) : mixedFvPatchVectorField(p, iF), - TName_(dict.lookupOrDefault<word>("T", "T")), - pName_(dict.lookupOrDefault<word>("p", "p")), - psiName_(dict.lookupOrDefault<word>("psi", "thermo:psi")), + TName_(dict.getOrDefault<word>("T", "T")), + pName_(dict.getOrDefault<word>("p", "p")), + psiName_(dict.getOrDefault<word>("psi", "thermo:psi")), UInf_(dict.lookup("UInf")), pInf_(dict.get<scalar>("pInf")), TInf_(dict.get<scalar>("TInf")), gamma_(dict.get<scalar>("gamma")) { - patchType() = dict.lookupOrDefault<word>("patchType", word::null); + patchType() = dict.getOrDefault<word>("patchType", word::null); if (dict.found("value")) { diff --git a/src/finiteVolume/fields/fvPatchFields/derived/swirlFanVelocity/swirlFanVelocityFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/swirlFanVelocity/swirlFanVelocityFvPatchField.C index fb1e4c13690..a7bcfd3a20f 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/swirlFanVelocity/swirlFanVelocityFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/swirlFanVelocity/swirlFanVelocityFvPatchField.C @@ -5,7 +5,7 @@ \\ / A nd | www.openfoam.com \\/ M anipulation | ------------------------------------------------------------------------------- - Copyright (C) 2018-2019 OpenCFD Ltd. + Copyright (C) 2018-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -139,12 +139,12 @@ Foam::swirlFanVelocityFvPatchField::swirlFanVelocityFvPatchField ) : fixedJumpFvPatchField<vector>(p, iF, dict), - phiName_(dict.lookupOrDefault<word>("phi", "phi")), - pName_(dict.lookupOrDefault<word>("p", "p")), - rhoName_(dict.lookupOrDefault<word>("rho", "rho")), + phiName_(dict.getOrDefault<word>("phi", "phi")), + pName_(dict.getOrDefault<word>("p", "p")), + rhoName_(dict.getOrDefault<word>("rho", "rho")), origin_ ( - dict.lookupOrDefault + dict.getOrDefault ( "origin", returnReduce(patch().size(), maxOp<label>()) @@ -158,11 +158,11 @@ Foam::swirlFanVelocityFvPatchField::swirlFanVelocityFvPatchField ? Function1<scalar>::New("rpm", dict) : nullptr ), - rEff_(dict.lookupOrDefault<scalar>("rEff", 0)), - fanEff_(dict.lookupOrDefault<scalar>("fanEff", 1)), - rInner_(dict.lookupOrDefault<scalar>("rInner", 0)), - rOuter_(dict.lookupOrDefault<scalar>("rOuter", 0)), - useRealRadius_(dict.lookupOrDefault("useRealRadius", false)) + rEff_(dict.getOrDefault<scalar>("rEff", 0)), + fanEff_(dict.getOrDefault<scalar>("fanEff", 1)), + rInner_(dict.getOrDefault<scalar>("rInner", 0)), + rOuter_(dict.getOrDefault<scalar>("rOuter", 0)), + useRealRadius_(dict.getOrDefault("useRealRadius", false)) {} diff --git a/src/finiteVolume/fields/fvPatchFields/derived/swirlFlowRateInletVelocity/swirlFlowRateInletVelocityFvPatchVectorField.C b/src/finiteVolume/fields/fvPatchFields/derived/swirlFlowRateInletVelocity/swirlFlowRateInletVelocityFvPatchVectorField.C index 328116f4462..26dfa9976af 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/swirlFlowRateInletVelocity/swirlFlowRateInletVelocityFvPatchVectorField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/swirlFlowRateInletVelocity/swirlFlowRateInletVelocityFvPatchVectorField.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2017 OpenFOAM Foundation - Copyright (C) 2018 OpenCFD + Copyright (C) 2018-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -61,11 +61,11 @@ swirlFlowRateInletVelocityFvPatchVectorField ) : fixedValueFvPatchField<vector>(p, iF, dict), - phiName_(dict.lookupOrDefault<word>("phi", "phi")), - rhoName_(dict.lookupOrDefault<word>("rho", "rho")), + phiName_(dict.getOrDefault<word>("phi", "phi")), + rhoName_(dict.getOrDefault<word>("rho", "rho")), origin_ ( - dict.lookupOrDefault + dict.getOrDefault ( "origin", returnReduce(patch().size(), maxOp<label>()) @@ -75,7 +75,7 @@ swirlFlowRateInletVelocityFvPatchVectorField ), axis_ ( - dict.lookupOrDefault + dict.getOrDefault ( "axis", returnReduce(patch().size(), maxOp<label>()) diff --git a/src/finiteVolume/fields/fvPatchFields/derived/syringePressure/syringePressureFvPatchScalarField.C b/src/finiteVolume/fields/fvPatchFields/derived/syringePressure/syringePressureFvPatchScalarField.C index a00ee6a7816..137350c7031 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/syringePressure/syringePressureFvPatchScalarField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/syringePressure/syringePressureFvPatchScalarField.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. @@ -64,7 +65,7 @@ Foam::syringePressureFvPatchScalarField::syringePressureFvPatchScalarField psi_(dict.get<scalar>("psi")), ams_(dict.get<scalar>("ams")), ams0_(ams_), - phiName_(dict.lookupOrDefault<word>("phi", "phi")), + phiName_(dict.getOrDefault<word>("phi", "phi")), curTimeIndex_(-1) { scalar ps = (psI_*VsI_ + ams_/psi_)/Vs(db().time().value()); diff --git a/src/finiteVolume/fields/fvPatchFields/derived/totalPressure/totalPressureFvPatchScalarField.C b/src/finiteVolume/fields/fvPatchFields/derived/totalPressure/totalPressureFvPatchScalarField.C index 93a357884cf..5fab5879ee6 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/totalPressure/totalPressureFvPatchScalarField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/totalPressure/totalPressureFvPatchScalarField.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. @@ -58,10 +59,10 @@ Foam::totalPressureFvPatchScalarField::totalPressureFvPatchScalarField ) : fixedValueFvPatchScalarField(p, iF, dict, false), - UName_(dict.lookupOrDefault<word>("U", "U")), - phiName_(dict.lookupOrDefault<word>("phi", "phi")), - rhoName_(dict.lookupOrDefault<word>("rho", "rho")), - psiName_(dict.lookupOrDefault<word>("psi", "none")), + UName_(dict.getOrDefault<word>("U", "U")), + phiName_(dict.getOrDefault<word>("phi", "phi")), + rhoName_(dict.getOrDefault<word>("rho", "rho")), + psiName_(dict.getOrDefault<word>("psi", "none")), gamma_(psiName_ != "none" ? dict.get<scalar>("gamma") : 1), p0_("p0", dict, p.size()) { diff --git a/src/finiteVolume/fields/fvPatchFields/derived/totalTemperature/totalTemperatureFvPatchScalarField.C b/src/finiteVolume/fields/fvPatchFields/derived/totalTemperature/totalTemperatureFvPatchScalarField.C index 6a97d62519d..081dbd516e9 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/totalTemperature/totalTemperatureFvPatchScalarField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/totalTemperature/totalTemperatureFvPatchScalarField.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. @@ -73,9 +74,9 @@ Foam::totalTemperatureFvPatchScalarField::totalTemperatureFvPatchScalarField ) : fixedValueFvPatchScalarField(p, iF, dict, false), - UName_(dict.lookupOrDefault<word>("U", "U")), - phiName_(dict.lookupOrDefault<word>("phi", "phi")), - psiName_(dict.lookupOrDefault<word>("psi", "thermo:psi")), + UName_(dict.getOrDefault<word>("U", "U")), + phiName_(dict.getOrDefault<word>("phi", "phi")), + psiName_(dict.getOrDefault<word>("psi", "thermo:psi")), gamma_(dict.get<scalar>("gamma")), T0_("T0", dict, p.size()) { diff --git a/src/finiteVolume/fields/fvPatchFields/derived/turbulentDFSEMInlet/turbulentDFSEMInletFvPatchVectorField.C b/src/finiteVolume/fields/fvPatchFields/derived/turbulentDFSEMInlet/turbulentDFSEMInletFvPatchVectorField.C index d2b174ef6c3..af6ebcc5130 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/turbulentDFSEMInlet/turbulentDFSEMInletFvPatchVectorField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/turbulentDFSEMInlet/turbulentDFSEMInletFvPatchVectorField.C @@ -819,15 +819,15 @@ turbulentDFSEMInletFvPatchVectorField : fixedValueFvPatchField<vector>(p, iF, dict), delta_(dict.get<scalar>("delta")), - d_(dict.getOrDefault<scalar>("d", 1.0)), + d_(dict.getOrDefault<scalar>("d", 1)), kappa_(dict.getOrDefault<scalar>("kappa", 0.41)), perturb_(dict.getOrDefault<scalar>("perturb", 1e-5)), mapMethod_(dict.getOrDefault<word>("mapMethod", "nearestCell")), mapperPtr_(nullptr), - interpolateR_(dict.getOrDefault<bool>("interpolateR", false)), - interpolateL_(dict.getOrDefault<bool>("interpolateL", false)), - interpolateU_(dict.getOrDefault<bool>("interpolateU", false)), + interpolateR_(dict.getOrDefault("interpolateR", false)), + interpolateL_(dict.getOrDefault("interpolateL", false)), + interpolateU_(dict.getOrDefault("interpolateU", false)), R_(interpolateOrRead<symmTensor>("R", dict, interpolateR_)), L_(interpolateOrRead<scalar>("L", dict, interpolateL_)), U_(interpolateOrRead<vector>("U", dict, interpolateU_)), @@ -850,7 +850,7 @@ turbulentDFSEMInletFvPatchVectorField curTimeIndex_(-1), patchBounds_(boundBox::invertedBox), singleProc_(false), - writeEddies_(dict.getOrDefault<bool>("writeEddies", false)) + writeEddies_(dict.getOrDefault("writeEddies", false)) { eddy::debug = debug; diff --git a/src/finiteVolume/fields/fvPatchFields/derived/turbulentIntensityKineticEnergyInlet/turbulentIntensityKineticEnergyInletFvPatchScalarField.C b/src/finiteVolume/fields/fvPatchFields/derived/turbulentIntensityKineticEnergyInlet/turbulentIntensityKineticEnergyInletFvPatchScalarField.C index ccb71c94efc..86c7bcba8fa 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/turbulentIntensityKineticEnergyInlet/turbulentIntensityKineticEnergyInletFvPatchScalarField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/turbulentIntensityKineticEnergyInlet/turbulentIntensityKineticEnergyInletFvPatchScalarField.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2017 OpenFOAM Foundation - Copyright (C) 2017 OpenCFD Ltd. + Copyright (C) 2017-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -74,10 +74,10 @@ turbulentIntensityKineticEnergyInletFvPatchScalarField : inletOutletFvPatchScalarField(p, iF), intensity_(dict.get<scalar>("intensity")), - UName_(dict.lookupOrDefault<word>("U", "U")) + UName_(dict.getOrDefault<word>("U", "U")) { - this->patchType() = dict.lookupOrDefault<word>("patchType", word::null); - this->phiName_ = dict.lookupOrDefault<word>("phi", "phi"); + this->patchType() = dict.getOrDefault<word>("patchType", word::null); + this->phiName_ = dict.getOrDefault<word>("phi", "phi"); if (intensity_ < 0 || intensity_ > 1) { diff --git a/src/finiteVolume/fields/fvPatchFields/derived/uniformFixedGradient/uniformFixedGradientFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/uniformFixedGradient/uniformFixedGradientFvPatchField.C index c2d9fa96bc3..e82228b7aeb 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/uniformFixedGradient/uniformFixedGradientFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/uniformFixedGradient/uniformFixedGradientFvPatchField.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2013-2016 OpenFOAM Foundation - Copyright (C) 2017 OpenCFD Ltd. + Copyright (C) 2017-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -66,7 +66,7 @@ Foam::uniformFixedGradientFvPatchField<Type>::uniformFixedGradientFvPatchField fixedGradientFvPatchField<Type>(p, iF), uniformGradient_(Function1<Type>::New("uniformGradient", dict)) { - this->patchType() = dict.lookupOrDefault<word>("patchType", word::null); + this->patchType() = dict.getOrDefault<word>("patchType", word::null); this->evaluate(); } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/uniformInletOutlet/uniformInletOutletFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/uniformInletOutlet/uniformInletOutletFvPatchField.C index 58e8412ab5e..9ef14f817bb 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/uniformInletOutlet/uniformInletOutletFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/uniformInletOutlet/uniformInletOutletFvPatchField.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2013-2017 OpenFOAM Foundation - Copyright (C) 2015-2017 OpenCFD Ltd. + Copyright (C) 2015-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -55,10 +55,10 @@ Foam::uniformInletOutletFvPatchField<Type>::uniformInletOutletFvPatchField ) : mixedFvPatchField<Type>(p, iF), - phiName_(dict.lookupOrDefault<word>("phi", "phi")), + phiName_(dict.getOrDefault<word>("phi", "phi")), uniformInletValue_(Function1<Type>::New("uniformInletValue", dict)) { - this->patchType() = dict.lookupOrDefault<word>("patchType", word::null); + this->patchType() = dict.getOrDefault<word>("patchType", word::null); this->refValue() = uniformInletValue_->value(this->db().time().timeOutputValue()); diff --git a/src/finiteVolume/fields/fvPatchFields/derived/uniformTotalPressure/uniformTotalPressureFvPatchScalarField.C b/src/finiteVolume/fields/fvPatchFields/derived/uniformTotalPressure/uniformTotalPressureFvPatchScalarField.C index 4f073b10a71..93ceb35c005 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/uniformTotalPressure/uniformTotalPressureFvPatchScalarField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/uniformTotalPressure/uniformTotalPressureFvPatchScalarField.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. @@ -59,10 +60,10 @@ uniformTotalPressureFvPatchScalarField ) : fixedValueFvPatchScalarField(p, iF, dict, false), - UName_(dict.lookupOrDefault<word>("U", "U")), - phiName_(dict.lookupOrDefault<word>("phi", "phi")), - rhoName_(dict.lookupOrDefault<word>("rho", "rho")), - psiName_(dict.lookupOrDefault<word>("psi", "none")), + UName_(dict.getOrDefault<word>("U", "U")), + phiName_(dict.getOrDefault<word>("phi", "phi")), + rhoName_(dict.getOrDefault<word>("rho", "rho")), + psiName_(dict.getOrDefault<word>("psi", "none")), gamma_(psiName_ != "none" ? dict.get<scalar>("gamma") : 1), p0_(Function1<scalar>::New("p0", dict)) { diff --git a/src/finiteVolume/fields/fvPatchFields/derived/variableHeightFlowRate/variableHeightFlowRateFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/variableHeightFlowRate/variableHeightFlowRateFvPatchField.C index 1fe20f84f79..bd97ac1c688 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/variableHeightFlowRate/variableHeightFlowRateFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/variableHeightFlowRate/variableHeightFlowRateFvPatchField.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2012 OpenFOAM Foundation - Copyright (C) 2017 OpenCFD Ltd. + Copyright (C) 2017-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -77,11 +77,11 @@ Foam::variableHeightFlowRateFvPatchScalarField ) : mixedFvPatchScalarField(p, iF), - phiName_(dict.lookupOrDefault<word>("phi", "phi")), + phiName_(dict.getOrDefault<word>("phi", "phi")), lowerBound_(dict.get<scalar>("lowerBound")), upperBound_(dict.get<scalar>("upperBound")) { - patchType() = dict.lookupOrDefault<word>("patchType", word::null); + patchType() = dict.getOrDefault<word>("patchType", word::null); this->refValue() = 0.0; if (dict.found("value")) diff --git a/src/finiteVolume/fields/fvPatchFields/derived/waveSurfacePressure/waveSurfacePressureFvPatchScalarField.C b/src/finiteVolume/fields/fvPatchFields/derived/waveSurfacePressure/waveSurfacePressureFvPatchScalarField.C index 042adc4714c..fca845562e8 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/waveSurfacePressure/waveSurfacePressureFvPatchScalarField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/waveSurfacePressure/waveSurfacePressureFvPatchScalarField.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. @@ -84,9 +84,9 @@ waveSurfacePressureFvPatchScalarField ) : fixedValueFvPatchScalarField(p, iF, dict), - phiName_(dict.lookupOrDefault<word>("phi", "phi")), - zetaName_(dict.lookupOrDefault<word>("zeta", "zeta")), - rhoName_(dict.lookupOrDefault<word>("rho", "rho")) + phiName_(dict.getOrDefault<word>("phi", "phi")), + zetaName_(dict.getOrDefault<word>("zeta", "zeta")), + rhoName_(dict.getOrDefault<word>("rho", "rho")) {} diff --git a/src/finiteVolume/fields/fvPatchFields/derived/waveTransmissive/waveTransmissiveFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/waveTransmissive/waveTransmissiveFvPatchField.C index 8eb61ad2f1c..530e84ffbd4 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/waveTransmissive/waveTransmissiveFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/waveTransmissive/waveTransmissiveFvPatchField.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2012 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -72,7 +73,7 @@ Foam::waveTransmissiveFvPatchField<Type>::waveTransmissiveFvPatchField ) : advectiveFvPatchField<Type>(p, iF, dict), - psiName_(dict.lookupOrDefault<word>("psi", "thermo:psi")), + psiName_(dict.getOrDefault<word>("psi", "thermo:psi")), gamma_(dict.get<scalar>("gamma")) {} diff --git a/src/finiteVolume/fields/fvPatchFields/fvPatchField/fvPatchField.C b/src/finiteVolume/fields/fvPatchFields/fvPatchField/fvPatchField.C index c45b738ed3e..d967a8ad9cc 100644 --- a/src/finiteVolume/fields/fvPatchFields/fvPatchField/fvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/fvPatchField/fvPatchField.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2016 OpenFOAM Foundation - Copyright (C) 2015 OpenCFD Ltd. + Copyright (C) 2015-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -115,7 +115,7 @@ Foam::fvPatchField<Type>::fvPatchField internalField_(iF), updated_(false), manipulatedMatrix_(false), - patchType_(dict.lookupOrDefault<word>("patchType", word::null)) + patchType_(dict.getOrDefault<word>("patchType", word::null)) { if (valueRequired) { diff --git a/src/finiteVolume/functionObjects/volRegion/volRegion.C b/src/finiteVolume/functionObjects/volRegion/volRegion.C index 6fbe11ff216..8cb833a98c9 100644 --- a/src/finiteVolume/functionObjects/volRegion/volRegion.C +++ b/src/finiteVolume/functionObjects/volRegion/volRegion.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2016 OpenFOAM Foundation - Copyright (C) 2016-2019 OpenCFD Ltd. + Copyright (C) 2016-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -148,7 +148,7 @@ Foam::functionObjects::volRegion::volRegion V_(Zero), regionType_ ( - regionTypeNames_.lookupOrDefault + regionTypeNames_.getOrDefault ( "regionType", dict, diff --git a/src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.C b/src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.C index 5c8cc99d5a7..5bf8b7bef56 100644 --- a/src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.C +++ b/src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.C @@ -709,7 +709,7 @@ void Foam::fvMatrix<Type>::relax() { word name = psi_.select ( - psi_.mesh().data::template lookupOrDefault<bool> + psi_.mesh().data::template getOrDefault<bool> ("finalIteration", false) ); @@ -1000,7 +1000,7 @@ const Foam::dictionary& Foam::fvMatrix<Type>::solverDict() const ( psi_.select ( - psi_.mesh().data::template lookupOrDefault<bool> + psi_.mesh().data::template getOrDefault<bool> ("finalIteration", false) ) ); diff --git a/src/finiteVolume/fvMatrices/fvMatrix/fvMatrixSolve.C b/src/finiteVolume/fvMatrices/fvMatrix/fvMatrixSolve.C index 4a39d4f41fd..1bd117b28d9 100644 --- a/src/finiteVolume/fvMatrices/fvMatrix/fvMatrixSolve.C +++ b/src/finiteVolume/fvMatrices/fvMatrix/fvMatrixSolve.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2016 OpenFOAM Foundation - Copyright (C) 2016-2019 OpenCFD Ltd. + Copyright (C) 2016-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -88,7 +88,7 @@ Foam::SolverPerformance<Type> Foam::fvMatrix<Type>::solveSegregatedOrCoupled } } - word type(solverControls.lookupOrDefault<word>("type", "segregated")); + word type(solverControls.getOrDefault<word>("type", "segregated")); if (type == "segregated") { diff --git a/src/finiteVolume/fvMatrices/solvers/MULES/CMULESTemplates.C b/src/finiteVolume/fvMatrices/solvers/MULES/CMULESTemplates.C index 64688e7ec15..5daaddf683f 100644 --- a/src/finiteVolume/fvMatrices/solvers/MULES/CMULESTemplates.C +++ b/src/finiteVolume/fvMatrices/solvers/MULES/CMULESTemplates.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2013-2017 OpenFOAM Foundation - Copyright (C) 2019 OpenCFD Ltd. + Copyright (C) 2019-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -228,17 +228,17 @@ void Foam::MULES::limiterCorr const scalar smoothLimiter ( - MULEScontrols.lookupOrDefault<scalar>("smoothLimiter", 0) + MULEScontrols.getOrDefault<scalar>("smoothLimiter", 0) ); const scalar extremaCoeff ( - MULEScontrols.lookupOrDefault<scalar>("extremaCoeff", 0) + MULEScontrols.getOrDefault<scalar>("extremaCoeff", 0) ); const scalar boundaryExtremaCoeff ( - MULEScontrols.lookupOrDefault<scalar> + MULEScontrols.getOrDefault<scalar> ( "boundaryExtremaCoeff", extremaCoeff diff --git a/src/finiteVolume/fvMatrices/solvers/MULES/MULESTemplates.C b/src/finiteVolume/fvMatrices/solvers/MULES/MULESTemplates.C index 398977ae91b..388e0a4a435 100644 --- a/src/finiteVolume/fvMatrices/solvers/MULES/MULESTemplates.C +++ b/src/finiteVolume/fvMatrices/solvers/MULES/MULESTemplates.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. @@ -213,22 +214,22 @@ void Foam::MULES::limiter const label nLimiterIter ( - MULEScontrols.lookupOrDefault<label>("nLimiterIter", 3) + MULEScontrols.getOrDefault<label>("nLimiterIter", 3) ); const scalar smoothLimiter ( - MULEScontrols.lookupOrDefault<scalar>("smoothLimiter", 0) + MULEScontrols.getOrDefault<scalar>("smoothLimiter", 0) ); const scalar extremaCoeff ( - MULEScontrols.lookupOrDefault<scalar>("extremaCoeff", 0) + MULEScontrols.getOrDefault<scalar>("extremaCoeff", 0) ); const scalar boundaryExtremaCoeff ( - MULEScontrols.lookupOrDefault<scalar> + MULEScontrols.getOrDefault<scalar> ( "boundaryExtremaCoeff", extremaCoeff diff --git a/src/finiteVolume/fvMatrices/solvers/isoAdvection/isoAdvection/isoAdvection.C b/src/finiteVolume/fvMatrices/solvers/isoAdvection/isoAdvection/isoAdvection.C index 6dd3f946f65..5a57e54a17f 100644 --- a/src/finiteVolume/fvMatrices/solvers/isoAdvection/isoAdvection/isoAdvection.C +++ b/src/finiteVolume/fvMatrices/solvers/isoAdvection/isoAdvection/isoAdvection.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2016-2017 DHI - Copyright (C) 2016-2017 OpenCFD Ltd. + Copyright (C) 2016-2020 OpenCFD Ltd. Copyright (C) 2019 Johan Roenby ------------------------------------------------------------------------------- License @@ -80,11 +80,11 @@ Foam::isoAdvection::isoAdvection ap_(mesh_.nPoints()), // Tolerances and solution controls - nAlphaBounds_(dict_.lookupOrDefault<label>("nAlphaBounds", 3)), - isoFaceTol_(dict_.lookupOrDefault<scalar>("isoFaceTol", 1e-8)), - surfCellTol_(dict_.lookupOrDefault<scalar>("surfCellTol", 1e-8)), - gradAlphaBasedNormal_(dict_.lookupOrDefault("gradAlphaNormal", false)), - writeIsoFacesToFile_(dict_.lookupOrDefault("writeIsoFaces", false)), + nAlphaBounds_(dict_.getOrDefault<label>("nAlphaBounds", 3)), + isoFaceTol_(dict_.getOrDefault<scalar>("isoFaceTol", 1e-8)), + surfCellTol_(dict_.getOrDefault<scalar>("surfCellTol", 1e-8)), + gradAlphaBasedNormal_(dict_.getOrDefault("gradAlphaNormal", false)), + writeIsoFacesToFile_(dict_.getOrDefault("writeIsoFaces", false)), // Cell cutting data surfCells_(label(0.2*mesh_.nCells())), @@ -889,7 +889,7 @@ void Foam::isoAdvection::applyBruteForceBounding() { bool alpha1Changed = false; - scalar snapAlphaTol = dict_.lookupOrDefault<scalar>("snapTol", 0); + scalar snapAlphaTol = dict_.getOrDefault<scalar>("snapTol", 0); if (snapAlphaTol > 0) { alpha1_ = @@ -901,7 +901,7 @@ void Foam::isoAdvection::applyBruteForceBounding() alpha1Changed = true; } - if (dict_.lookupOrDefault("clip", true)) + if (dict_.getOrDefault("clip", true)) { alpha1_ = min(scalar(1), max(scalar(0), alpha1_)); alpha1Changed = true; @@ -918,7 +918,7 @@ void Foam::isoAdvection::writeSurfaceCells() const { if (!mesh_.time().writeTime()) return; - if (dict_.lookupOrDefault("writeSurfCells", false)) + if (dict_.getOrDefault("writeSurfCells", false)) { cellSet cSet ( @@ -942,7 +942,7 @@ void Foam::isoAdvection::writeBoundedCells() const { if (!mesh_.time().writeTime()) return; - if (dict_.lookupOrDefault("writeBoundedCells", false)) + if (dict_.getOrDefault("writeBoundedCells", false)) { cellSet cSet ( diff --git a/src/finiteVolume/fvMesh/wallDist/patchDistMethods/advectionDiffusion/advectionDiffusionPatchDistMethod.C b/src/finiteVolume/fvMesh/wallDist/patchDistMethods/advectionDiffusion/advectionDiffusionPatchDistMethod.C index e9644b4ecbb..be028a323c6 100644 --- a/src/finiteVolume/fvMesh/wallDist/patchDistMethods/advectionDiffusion/advectionDiffusionPatchDistMethod.C +++ b/src/finiteVolume/fvMesh/wallDist/patchDistMethods/advectionDiffusion/advectionDiffusionPatchDistMethod.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2015-2017 OpenFOAM Foundation - Copyright (C) 2016-2019 OpenCFD Ltd. + Copyright (C) 2016-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -72,9 +72,9 @@ Foam::patchDistMethods::advectionDiffusion::advectionDiffusion patchIDs ) ), - epsilon_(coeffs_.lookupOrDefault<scalar>("epsilon", 0.1)), - tolerance_(coeffs_.lookupOrDefault<scalar>("tolerance", 1e-3)), - maxIter_(coeffs_.lookupOrDefault<int>("maxIter", 10)), + epsilon_(coeffs_.getOrDefault<scalar>("epsilon", 0.1)), + tolerance_(coeffs_.getOrDefault<scalar>("tolerance", 1e-3)), + maxIter_(coeffs_.getOrDefault<int>("maxIter", 10)), predicted_(false) {} diff --git a/src/finiteVolume/fvMesh/wallDist/patchDistMethods/meshWave/meshWavePatchDistMethod.C b/src/finiteVolume/fvMesh/wallDist/patchDistMethods/meshWave/meshWavePatchDistMethod.C index 6d071202b33..c3a13cf6338 100644 --- a/src/finiteVolume/fvMesh/wallDist/patchDistMethods/meshWave/meshWavePatchDistMethod.C +++ b/src/finiteVolume/fvMesh/wallDist/patchDistMethods/meshWave/meshWavePatchDistMethod.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. @@ -55,7 +56,7 @@ Foam::patchDistMethods::meshWave::meshWave ) : patchDistMethod(mesh, patchIDs), - correctWalls_(dict.lookupOrDefault("correctWalls", true)), + correctWalls_(dict.getOrDefault("correctWalls", true)), nUnset_(0) {} diff --git a/src/finiteVolume/fvMesh/wallDist/wallDist/wallDist.C b/src/finiteVolume/fvMesh/wallDist/wallDist/wallDist.C index f887c2082f1..76799e2d50a 100644 --- a/src/finiteVolume/fvMesh/wallDist/wallDist/wallDist.C +++ b/src/finiteVolume/fvMesh/wallDist/wallDist/wallDist.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2015-2016 OpenFOAM Foundation - Copyright (C) 2016-2019 OpenCFD Ltd. + Copyright (C) 2016-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -108,9 +108,9 @@ Foam::wallDist::wallDist dimensionedScalar("y" & patchTypeName_, dimLength, SMALL), patchDistMethod::patchTypes<scalar>(mesh, patchIDs_) ), - nRequired_(dict_.lookupOrDefault("nRequired", false)), + nRequired_(dict_.getOrDefault("nRequired", false)), n_(volVectorField::null()), - updateInterval_(dict_.lookupOrDefault<label>("updateInterval", 1)), + updateInterval_(dict_.getOrDefault<label>("updateInterval", 1)), requireUpdate_(true) { if (nRequired_) @@ -162,9 +162,9 @@ Foam::wallDist::wallDist dimensionedScalar("y" & patchTypeName_, dimLength, SMALL), patchDistMethod::patchTypes<scalar>(mesh, patchIDs_) ), - nRequired_(dict_.lookupOrDefault("nRequired", false)), + nRequired_(dict_.getOrDefault("nRequired", false)), n_(volVectorField::null()), - updateInterval_(dict_.lookupOrDefault<label>("updateInterval", 1)), + updateInterval_(dict_.getOrDefault<label>("updateInterval", 1)), requireUpdate_(true) { if (nRequired_) diff --git a/src/functionObjects/field/CourantNo/CourantNo.C b/src/functionObjects/field/CourantNo/CourantNo.C index a34fcc00716..fcdd6d16f93 100644 --- a/src/functionObjects/field/CourantNo/CourantNo.C +++ b/src/functionObjects/field/CourantNo/CourantNo.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2013-2016 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -148,7 +149,7 @@ bool Foam::functionObjects::CourantNo::read(const dictionary& dict) { fieldExpression::read(dict); - rhoName_ = dict.lookupOrDefault<word>("rho", "rho"); + rhoName_ = dict.getOrDefault<word>("rho", "rho"); return true; } diff --git a/src/functionObjects/field/PecletNo/PecletNo.C b/src/functionObjects/field/PecletNo/PecletNo.C index 33fb13bffcd..6ce51e4be86 100644 --- a/src/functionObjects/field/PecletNo/PecletNo.C +++ b/src/functionObjects/field/PecletNo/PecletNo.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2013-2016 OpenFOAM Foundation - Copyright (C) 2015-2019 OpenCFD Ltd. + Copyright (C) 2015-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -152,7 +152,7 @@ Foam::functionObjects::PecletNo::~PecletNo() bool Foam::functionObjects::PecletNo::read(const dictionary& dict) { - rhoName_ = dict.lookupOrDefault<word>("rho", "rho"); + rhoName_ = dict.getOrDefault<word>("rho", "rho"); return true; } diff --git a/src/functionObjects/field/blendingFactor/blendingFactor.C b/src/functionObjects/field/blendingFactor/blendingFactor.C index f1e656a046b..c2b077746e3 100644 --- a/src/functionObjects/field/blendingFactor/blendingFactor.C +++ b/src/functionObjects/field/blendingFactor/blendingFactor.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2013-2016 OpenFOAM Foundation - Copyright (C) 2015-2019 OpenCFD Ltd. + Copyright (C) 2015-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -115,7 +115,7 @@ bool Foam::functionObjects::blendingFactor::read(const dictionary& dict) { if (fieldExpression::read(dict) && writeFile::read(dict)) { - phiName_ = dict.lookupOrDefault<word>("phi", "phi"); + phiName_ = dict.getOrDefault<word>("phi", "phi"); tolerance_ = 0.001; if diff --git a/src/functionObjects/field/ddt2/ddt2.C b/src/functionObjects/field/ddt2/ddt2.C index 6e858cfd262..f5965f6df35 100644 --- a/src/functionObjects/field/ddt2/ddt2.C +++ b/src/functionObjects/field/ddt2/ddt2.C @@ -5,7 +5,7 @@ \\ / A nd | www.openfoam.com \\/ M anipulation | ------------------------------------------------------------------------------- - Copyright (C) 2016 OpenCFD Ltd. + Copyright (C) 2016-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -116,7 +116,7 @@ Foam::functionObjects::ddt2::ddt2 resultName_(word::null), blacklist_(), results_(), - mag_(dict.lookupOrDefault("mag", false)) + mag_(dict.getOrDefault("mag", false)) { read(dict); } @@ -141,7 +141,7 @@ bool Foam::functionObjects::ddt2::read(const dictionary& dict) Info<< type() << " fields: " << selectFields_ << nl; - resultName_ = dict.lookupOrDefault<word> + resultName_ = dict.getOrDefault<word> ( "result", ( mag_ ? "mag(ddt(@@))" : "magSqr(ddt(@@))" ) diff --git a/src/functionObjects/field/derivedFields/derivedFields.C b/src/functionObjects/field/derivedFields/derivedFields.C index 8deb6feae1b..4af8618311f 100644 --- a/src/functionObjects/field/derivedFields/derivedFields.C +++ b/src/functionObjects/field/derivedFields/derivedFields.C @@ -5,7 +5,7 @@ \\ / A nd | www.openfoam.com \\/ M anipulation | ------------------------------------------------------------------------------- - Copyright (C) 2019 OpenCFD Ltd. + Copyright (C) 2019-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -199,7 +199,7 @@ bool Foam::functionObjects::derivedFields::read(const dictionary& dict) { fvMeshFunctionObject::read(dict), - rhoRef_ = dict.lookupOrDefault<scalar>("rhoRef", 1); + rhoRef_ = dict.getOrDefault<scalar>("rhoRef", 1); wordList derivedNames(dict.get<wordList>("derived")); diff --git a/src/functionObjects/field/externalCoupled/externalCoupled.C b/src/functionObjects/field/externalCoupled/externalCoupled.C index 83ee1f03b05..40b1f287963 100644 --- a/src/functionObjects/field/externalCoupled/externalCoupled.C +++ b/src/functionObjects/field/externalCoupled/externalCoupled.C @@ -5,7 +5,7 @@ \\ / A nd | www.openfoam.com \\/ M anipulation | ------------------------------------------------------------------------------- - Copyright (C) 2015-2019 OpenCFD Ltd. + Copyright (C) 2015-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -568,7 +568,7 @@ bool Foam::functionObjects::externalCoupled::read(const dictionary& dict) timeFunctionObject::read(dict); externalFileCoupler::readDict(dict); - calcFrequency_ = dict.lookupOrDefault("calcFrequency", 1); + calcFrequency_ = dict.getOrDefault("calcFrequency", 1); // Leave trigger intact diff --git a/src/functionObjects/field/externalCoupled/externalCoupledTemperatureMixed/externalCoupledTemperatureMixedFvPatchScalarField.C b/src/functionObjects/field/externalCoupled/externalCoupledTemperatureMixed/externalCoupledTemperatureMixedFvPatchScalarField.C index f2069215234..dda73211ce1 100644 --- a/src/functionObjects/field/externalCoupled/externalCoupledTemperatureMixed/externalCoupledTemperatureMixedFvPatchScalarField.C +++ b/src/functionObjects/field/externalCoupled/externalCoupledTemperatureMixed/externalCoupledTemperatureMixedFvPatchScalarField.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2013-2016 OpenFOAM Foundation - Copyright (C) 2017-2019 OpenCFD Ltd. + Copyright (C) 2017-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -122,7 +122,7 @@ externalCoupledTemperatureMixedFvPatchScalarField outTempType_(outputTemperatureType::WALL), refTempType_ ( - refTemperatureNames.lookupOrDefault + refTemperatureNames.getOrDefault ( "htcRefTemperature", dict, diff --git a/src/functionObjects/field/fieldAverage/fieldAverageItem/fieldAverageItemIO.C b/src/functionObjects/field/fieldAverage/fieldAverageItem/fieldAverageItemIO.C index 9ab144e998c..f05d854b94c 100644 --- a/src/functionObjects/field/fieldAverage/fieldAverageItem/fieldAverageItemIO.C +++ b/src/functionObjects/field/fieldAverage/fieldAverageItem/fieldAverageItemIO.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2016 OpenFOAM Foundation - Copyright (C) 2016-2017 OpenCFD Ltd. + Copyright (C) 2016-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -73,7 +73,7 @@ Foam::Istream& Foam::functionObjects::operator>> faItem.mean_ = dict.get<bool>("mean"); faItem.prime2Mean_ = dict.get<bool>("prime2Mean"); faItem.base_ = faItem.baseTypeNames_.get("base", dict); - faItem.window_ = dict.lookupOrDefault<scalar>("window", -1.0); + faItem.window_ = dict.getOrDefault<scalar>("window", -1); if (faItem.window_ > 0) { @@ -93,7 +93,7 @@ Foam::Istream& Foam::functionObjects::operator>> << exit(FatalIOError); } - faItem.windowName_ = dict.lookupOrDefault<word>("windowName", ""); + faItem.windowName_ = dict.getOrDefault<word>("windowName", ""); if (faItem.windowType_ == fieldAverageItem::windowType::EXACT) { diff --git a/src/functionObjects/field/fieldMinMax/fieldMinMax.C b/src/functionObjects/field/fieldMinMax/fieldMinMax.C index 8ea69b49d24..35a25f1f5e6 100644 --- a/src/functionObjects/field/fieldMinMax/fieldMinMax.C +++ b/src/functionObjects/field/fieldMinMax/fieldMinMax.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2016 OpenFOAM Foundation - Copyright (C) 2015-2017 OpenCFD Ltd. + Copyright (C) 2015-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -132,9 +132,9 @@ bool Foam::functionObjects::fieldMinMax::read(const dictionary& dict) fvMeshFunctionObject::read(dict); writeFile::read(dict); - location_ = dict.lookupOrDefault("location", true); + location_ = dict.getOrDefault("location", true); - mode_ = modeTypeNames_.lookupOrDefault("mode", dict, modeType::mdMag); + mode_ = modeTypeNames_.getOrDefault("mode", dict, modeType::mdMag); fieldSet_.read(dict); diff --git a/src/functionObjects/field/fieldValues/fieldValue/fieldValue.C b/src/functionObjects/field/fieldValues/fieldValue/fieldValue.C index b713b8e9dfd..4ba4234b26c 100644 --- a/src/functionObjects/field/fieldValues/fieldValue/fieldValue.C +++ b/src/functionObjects/field/fieldValues/fieldValue/fieldValue.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2016 OpenFOAM Foundation - Copyright (C) 2015-2016 OpenCFD Ltd. + Copyright (C) 2015-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -104,7 +104,7 @@ bool Foam::functionObjects::fieldValue::read(const dictionary& dict) dict.readEntry("fields", fields_); dict.readEntry("writeFields", writeFields_); - scaleFactor_ = dict.lookupOrDefault<scalar>("scaleFactor", 1.0); + scaleFactor_ = dict.getOrDefault<scalar>("scaleFactor", 1); return true; } diff --git a/src/functionObjects/field/fieldValues/surfaceFieldValue/surfaceFieldValue.C b/src/functionObjects/field/fieldValues/surfaceFieldValue/surfaceFieldValue.C index 2035fd66c3c..59f9a8dd9b4 100644 --- a/src/functionObjects/field/fieldValues/surfaceFieldValue/surfaceFieldValue.C +++ b/src/functionObjects/field/fieldValues/surfaceFieldValue/surfaceFieldValue.C @@ -876,7 +876,7 @@ bool Foam::functionObjects::fieldValues::surfaceFieldValue::read weightFieldName_ = "none"; needsUpdate_ = true; - writeArea_ = dict.lookupOrDefault("writeArea", false); + writeArea_ = dict.getOrDefault("writeArea", false); totalArea_ = 0; nFaces_ = 0; faceId_.clear(); diff --git a/src/functionObjects/field/flux/flux.C b/src/functionObjects/field/flux/flux.C index deac6fdf2c0..93fe1435ab0 100644 --- a/src/functionObjects/field/flux/flux.C +++ b/src/functionObjects/field/flux/flux.C @@ -5,7 +5,7 @@ \\ / A nd | www.openfoam.com \\/ M anipulation | ------------------------------------------------------------------------------- - Copyright (C) 2016 OpenCFD Ltd. + Copyright (C) 2016-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -81,7 +81,7 @@ Foam::functionObjects::flux::flux ) : fieldExpression(name, runTime, dict), - rhoName_(dict.lookupOrDefault<word>("rho", "none")) + rhoName_(dict.getOrDefault<word>("rho", "none")) {} diff --git a/src/functionObjects/field/fluxSummary/fluxSummary.C b/src/functionObjects/field/fluxSummary/fluxSummary.C index ccc52003e94..6b3f4a7b144 100644 --- a/src/functionObjects/field/fluxSummary/fluxSummary.C +++ b/src/functionObjects/field/fluxSummary/fluxSummary.C @@ -974,9 +974,9 @@ bool Foam::functionObjects::fluxSummary::read(const dictionary& dict) needsUpdate_ = true; mode_ = modeTypeNames_.get("mode", dict); - phiName_ = dict.lookupOrDefault<word>("phi", "phi"); - scaleFactor_ = dict.lookupOrDefault<scalar>("scaleFactor", 1.0); - tolerance_ = dict.lookupOrDefault<scalar>("tolerance", 0.8); + phiName_ = dict.getOrDefault<word>("phi", "phi"); + scaleFactor_ = dict.getOrDefault<scalar>("scaleFactor", 1); + tolerance_ = dict.getOrDefault<scalar>("tolerance", 0.8); zoneNames_.clear(); zoneDirections_.clear(); diff --git a/src/functionObjects/field/histogram/histogram.C b/src/functionObjects/field/histogram/histogram.C index a2842299d52..06b7bf9b76f 100644 --- a/src/functionObjects/field/histogram/histogram.C +++ b/src/functionObjects/field/histogram/histogram.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2016 OpenFOAM Foundation - Copyright (C) 2016-2017 OpenCFD Ltd. + Copyright (C) 2016-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -110,8 +110,8 @@ bool Foam::functionObjects::histogram::read(const dictionary& dict) dict.readEntry("field", fieldName_); - max_ = dict.lookupOrDefault<scalar>("max", -GREAT); - min_ = dict.lookupOrDefault<scalar>("min", GREAT); + max_ = dict.getOrDefault<scalar>("max", -GREAT); + min_ = dict.getOrDefault<scalar>("min", GREAT); dict.readEntry("nBins", nBins_); const word format(dict.get<word>("setFormat")); diff --git a/src/functionObjects/field/momentum/momentum.C b/src/functionObjects/field/momentum/momentum.C index 11950677f95..2223f9ca4cd 100644 --- a/src/functionObjects/field/momentum/momentum.C +++ b/src/functionObjects/field/momentum/momentum.C @@ -5,7 +5,7 @@ \\ / A nd | www.openfoam.com \\/ M anipulation | ------------------------------------------------------------------------------- - Copyright (C) 2018-2019 OpenCFD Ltd. + Copyright (C) 2018-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -427,20 +427,20 @@ bool Foam::functionObjects::momentum::read(const dictionary& dict) Info<< type() << " " << name() << ":" << nl; // Optional entries U and p - UName_ = dict.lookupOrDefault<word>("U", "U"); - pName_ = dict.lookupOrDefault<word>("p", "p"); - rhoName_ = dict.lookupOrDefault<word>("rho", "rho"); - rhoRef_ = dict.lookupOrDefault<scalar>("rhoRef", 1.0); - hasCsys_ = dict.lookupOrDefault("cylindrical", false); + UName_ = dict.getOrDefault<word>("U", "U"); + pName_ = dict.getOrDefault<word>("p", "p"); + rhoName_ = dict.getOrDefault<word>("rho", "rho"); + rhoRef_ = dict.getOrDefault<scalar>("rhoRef", 1); + hasCsys_ = dict.getOrDefault("cylindrical", false); if (hasCsys_) { csys_ = coordSystem::cylindrical(dict); } - writeMomentum_ = dict.lookupOrDefault("writeMomentum", false); - writeVelocity_ = dict.lookupOrDefault("writeVelocity", false); - writePosition_ = dict.lookupOrDefault("writePosition", false); + writeMomentum_ = dict.getOrDefault("writeMomentum", false); + writeVelocity_ = dict.getOrDefault("writeVelocity", false); + writePosition_ = dict.getOrDefault("writePosition", false); Info<<"Integrating for selection: " << regionTypeNames_[regionType_] diff --git a/src/functionObjects/field/pressure/pressure.C b/src/functionObjects/field/pressure/pressure.C index 3e6fad918e5..60dad199d3d 100644 --- a/src/functionObjects/field/pressure/pressure.C +++ b/src/functionObjects/field/pressure/pressure.C @@ -378,8 +378,8 @@ bool Foam::functionObjects::pressure::read(const dictionary& dict) fieldExpression::read(dict); - UName_ = dict.lookupOrDefault<word>("U", "U"); - rhoName_ = dict.lookupOrDefault<word>("rho", "rho"); + UName_ = dict.getOrDefault<word>("U", "U"); + rhoName_ = dict.getOrDefault<word>("rho", "rho"); if (rhoName_ == "rhoInf") { @@ -414,7 +414,7 @@ bool Foam::functionObjects::pressure::read(const dictionary& dict) Info<< " Operating mode: " << modeNames[mode_] << nl; - pRef_ = dict.lookupOrDefault<scalar>("pRef", 0); + pRef_ = dict.getOrDefault<scalar>("pRef", 0); if ( @@ -460,7 +460,7 @@ bool Foam::functionObjects::pressure::read(const dictionary& dict) rhoInfInitialised_ = true; } - resultName_ = dict.lookupOrDefault<word>("result", resultName()); + resultName_ = dict.getOrDefault<word>("result", resultName()); Info<< endl; diff --git a/src/functionObjects/field/reference/reference.C b/src/functionObjects/field/reference/reference.C index eaef3ca4a7b..d1c54e288b9 100644 --- a/src/functionObjects/field/reference/reference.C +++ b/src/functionObjects/field/reference/reference.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. @@ -127,7 +127,7 @@ bool Foam::functionObjects::reference::read(const dictionary& dict) } interpolationScheme_ = - dict.lookupOrDefault<word>("interpolationScheme", "cell"); + dict.getOrDefault<word>("interpolationScheme", "cell"); } Log << endl; diff --git a/src/functionObjects/field/regionSizeDistribution/regionSizeDistribution.C b/src/functionObjects/field/regionSizeDistribution/regionSizeDistribution.C index ff96d1f24f6..bb14c5e4eb9 100644 --- a/src/functionObjects/field/regionSizeDistribution/regionSizeDistribution.C +++ b/src/functionObjects/field/regionSizeDistribution/regionSizeDistribution.C @@ -322,7 +322,7 @@ Foam::functionObjects::regionSizeDistribution::regionSizeDistribution writeFile(obr_, name), alphaName_(dict.get<word>("field")), patchNames_(dict.get<wordRes>("patches")), - isoPlanes_(dict.lookupOrDefault("isoPlanes", false)) + isoPlanes_(dict.getOrDefault("isoPlanes", false)) { read(dict); } diff --git a/src/functionObjects/field/stabilityBlendingFactor/stabilityBlendingFactor.C b/src/functionObjects/field/stabilityBlendingFactor/stabilityBlendingFactor.C index 1767ab73141..0a0d5321f38 100644 --- a/src/functionObjects/field/stabilityBlendingFactor/stabilityBlendingFactor.C +++ b/src/functionObjects/field/stabilityBlendingFactor/stabilityBlendingFactor.C @@ -5,7 +5,7 @@ \\ / A nd | www.openfoam.com \\/ M anipulation | ------------------------------------------------------------------------------- - Copyright (C) 2018-2019 OpenCFD Ltd. + Copyright (C) 2018-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -445,50 +445,50 @@ Foam::functionObjects::stabilityBlendingFactor::stabilityBlendingFactor dimensionedScalar(dimless, Zero), zeroGradientFvPatchScalarField::typeName ), - nonOrthogonality_(dict.lookupOrDefault<Switch>("switchNonOrtho", false)), - gradCc_(dict.lookupOrDefault<Switch>("switchGradCc", false)), - residuals_(dict.lookupOrDefault<Switch>("switchResiduals", false)), - faceWeight_(dict.lookupOrDefault<Switch>("switchFaceWeight", false)), - skewness_(dict.lookupOrDefault<Switch>("switchSkewness", false)), - Co_(dict.lookupOrDefault<Switch>("switchCo", false)), + nonOrthogonality_(dict.getOrDefault<Switch>("switchNonOrtho", false)), + gradCc_(dict.getOrDefault<Switch>("switchGradCc", false)), + residuals_(dict.getOrDefault<Switch>("switchResiduals", false)), + faceWeight_(dict.getOrDefault<Switch>("switchFaceWeight", false)), + skewness_(dict.getOrDefault<Switch>("switchSkewness", false)), + Co_(dict.getOrDefault<Switch>("switchCo", false)), maxNonOrthogonality_ ( - dict.lookupOrDefault<scalar>("maxNonOrthogonality", 20.0) + dict.getOrDefault<scalar>("maxNonOrthogonality", 20) ), minNonOrthogonality_ ( - dict.lookupOrDefault<scalar>("minNonOrthogonality", 60.0) + dict.getOrDefault<scalar>("minNonOrthogonality", 60) ), - maxGradCc_(dict.lookupOrDefault<scalar>("maxGradCc", 3.0)), - minGradCc_(dict.lookupOrDefault<scalar>("minGradCc", 4.0)), - maxResidual_(dict.lookupOrDefault<scalar>("maxResidual", 10.0)), - minFaceWeight_(dict.lookupOrDefault<scalar>("minFaceWeight", 0.3)), - maxFaceWeight_(dict.lookupOrDefault<scalar>("maxFaceWeight", 0.2)), - maxSkewness_(dict.lookupOrDefault<scalar>("maxSkewness", 2.0)), - minSkewness_(dict.lookupOrDefault<scalar>("minSkewness", 3.0)), - Co1_(dict.lookupOrDefault<scalar>("Co1", 1.0)), - Co2_(dict.lookupOrDefault<scalar>("Co2", 10.0)), + maxGradCc_(dict.getOrDefault<scalar>("maxGradCc", 3)), + minGradCc_(dict.getOrDefault<scalar>("minGradCc", 4)), + maxResidual_(dict.getOrDefault<scalar>("maxResidual", 10)), + minFaceWeight_(dict.getOrDefault<scalar>("minFaceWeight", 0.3)), + maxFaceWeight_(dict.getOrDefault<scalar>("maxFaceWeight", 0.2)), + maxSkewness_(dict.getOrDefault<scalar>("maxSkewness", 2)), + minSkewness_(dict.getOrDefault<scalar>("minSkewness", 3)), + Co1_(dict.getOrDefault<scalar>("Co1", 1)), + Co2_(dict.getOrDefault<scalar>("Co2", 10)), nonOrthogonalityName_ ( - dict.lookupOrDefault<word>("nonOrthogonality", "nonOrthoAngle") + dict.getOrDefault<word>("nonOrthogonality", "nonOrthoAngle") ), faceWeightName_ ( - dict.lookupOrDefault<word>("faceWeight", "faceWeight") + dict.getOrDefault<word>("faceWeight", "faceWeight") ), skewnessName_ ( - dict.lookupOrDefault<word>("skewness", "skewness") + dict.getOrDefault<word>("skewness", "skewness") ), residualName_ ( - dict.lookupOrDefault<word>("residual", "initialResidual:p") + dict.getOrDefault<word>("residual", "initialResidual:p") ), UName_ ( - dict.lookupOrDefault<word>("U", "U") + dict.getOrDefault<word>("U", "U") ), tolerance_(0.001), @@ -496,9 +496,9 @@ Foam::functionObjects::stabilityBlendingFactor::stabilityBlendingFactor errorIntegral_(mesh_.nCells(), Zero), oldError_(mesh_.nCells(), Zero), oldErrorIntegral_(mesh_.nCells(), Zero), - P_(dict.lookupOrDefault<scalar>("P", 3)), - I_(dict.lookupOrDefault<scalar>("I", 0.0)), - D_(dict.lookupOrDefault<scalar>("D", 0.25)) + P_(dict.getOrDefault<scalar>("P", 3)), + I_(dict.getOrDefault<scalar>("I", 0)), + D_(dict.getOrDefault<scalar>("D", 0.25)) { read(dict); setResultName(typeName, ""); diff --git a/src/functionObjects/field/streamLine/streamLineBase.C b/src/functionObjects/field/streamLine/streamLineBase.C index e6f05f00058..4fb9e9e3c76 100644 --- a/src/functionObjects/field/streamLine/streamLineBase.C +++ b/src/functionObjects/field/streamLine/streamLineBase.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2015 OpenFOAM Foundation - Copyright (C) 2015-2019 OpenCFD Ltd. + Copyright (C) 2015-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -882,7 +882,7 @@ bool Foam::functionObjects::streamLineBase::read(const dictionary& dict) Info<< type() << " " << name() << ":" << nl; - UName_ = dict.lookupOrDefault<word>("U", "U"); + UName_ = dict.getOrDefault<word>("U", "U"); if (fields_.empty()) { @@ -944,7 +944,7 @@ bool Foam::functionObjects::streamLineBase::read(const dictionary& dict) } - interpolationScheme_ = dict.lookupOrDefault + interpolationScheme_ = dict.getOrDefault ( "interpolationScheme", interpolationCellPoint<scalar>::typeName @@ -952,7 +952,7 @@ bool Foam::functionObjects::streamLineBase::read(const dictionary& dict) //Info<< " using interpolation " << interpolationScheme_ << endl; - cloudName_ = dict.lookupOrDefault<word>("cloud", type()); + cloudName_ = dict.getOrDefault<word>("cloud", type()); sampledSetPtr_.clear(); sampledSetAxis_.clear(); diff --git a/src/functionObjects/field/surfaceDistance/surfaceDistance.C b/src/functionObjects/field/surfaceDistance/surfaceDistance.C index a4a0abf94a8..4fbd2dec399 100644 --- a/src/functionObjects/field/surfaceDistance/surfaceDistance.C +++ b/src/functionObjects/field/surfaceDistance/surfaceDistance.C @@ -5,7 +5,7 @@ \\ / A nd | www.openfoam.com \\/ M anipulation | ------------------------------------------------------------------------------- - Copyright (C) 2019 OpenCFD Ltd. + Copyright (C) 2019-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -95,7 +95,7 @@ bool Foam::functionObjects::surfaceDistance::read { fvMeshFunctionObject::read(dict); - doCells_ = dict.lookupOrDefault("calculateCells", true); + doCells_ = dict.getOrDefault("calculateCells", true); geomPtr_.clear(); geomPtr_.set diff --git a/src/functionObjects/field/zeroGradient/zeroGradient.C b/src/functionObjects/field/zeroGradient/zeroGradient.C index 3652aba1cbd..21bc3d18a2a 100644 --- a/src/functionObjects/field/zeroGradient/zeroGradient.C +++ b/src/functionObjects/field/zeroGradient/zeroGradient.C @@ -5,7 +5,7 @@ \\ / A nd | www.openfoam.com \\/ M anipulation | ------------------------------------------------------------------------------- - Copyright (C) 2016-2018 OpenCFD Ltd. + Copyright (C) 2016-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -119,7 +119,7 @@ bool Foam::functionObjects::zeroGradient::read(const dictionary& dict) Info<< type() << " fields: " << selectFields_ << nl; - resultName_ = dict.lookupOrDefault<word>("result", type() + "(@@)"); + resultName_ = dict.getOrDefault<word>("result", type() + "(@@)"); // Require '@@' token for result, unless a single (non-regex) source field return diff --git a/src/functionObjects/forces/forces/forces.C b/src/functionObjects/forces/forces/forces.C index ebbaafa28f2..b2e824f7816 100644 --- a/src/functionObjects/forces/forces/forces.C +++ b/src/functionObjects/forces/forces/forces.C @@ -811,7 +811,7 @@ bool Foam::functionObjects::forces::read(const dictionary& dict) Info<< type() << " " << name() << ":" << nl; - directForceDensity_ = dict.lookupOrDefault("directForceDensity", false); + directForceDensity_ = dict.getOrDefault("directForceDensity", false); patchSet_ = mesh_.boundaryMesh().patchSet @@ -905,7 +905,7 @@ bool Foam::functionObjects::forces::read(const dictionary& dict) } } - writeFields_ = dict.lookupOrDefault("writeFields", false); + writeFields_ = dict.getOrDefault("writeFields", false); if (writeFields_) { diff --git a/src/functionObjects/initialisation/hydrostaticPressure/hydrostaticPressure.C b/src/functionObjects/initialisation/hydrostaticPressure/hydrostaticPressure.C index 42bb44a49fd..2edb8e74a2d 100644 --- a/src/functionObjects/initialisation/hydrostaticPressure/hydrostaticPressure.C +++ b/src/functionObjects/initialisation/hydrostaticPressure/hydrostaticPressure.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. @@ -198,7 +198,7 @@ Foam::functionObjects::hydrostaticPressure::hydrostaticPressure mesh_.objectRegistry::store(ph_rghPtr); - bool reInitialise = dict.lookupOrDefault<bool>("reInitialise", false); + bool reInitialise = dict.getOrDefault("reInitialise", false); if (runTime.timeIndex() == 0 || reInitialise) { diff --git a/src/functionObjects/lagrangian/dataCloud/dataCloud.C b/src/functionObjects/lagrangian/dataCloud/dataCloud.C index 88937ca6657..1c91d52f3ae 100644 --- a/src/functionObjects/lagrangian/dataCloud/dataCloud.C +++ b/src/functionObjects/lagrangian/dataCloud/dataCloud.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. @@ -145,7 +145,7 @@ bool Foam::functionObjects::dataCloud::read(const dictionary& dict) { fvMeshFunctionObject::read(dict); - const int padWidth = dict.lookupOrDefault<int>("width", 8); + const int padWidth = dict.getOrDefault<int>("width", 8); // Appropriate printf format - Enforce min/max sanity limits if (padWidth < 1 || padWidth > 31) @@ -158,7 +158,7 @@ bool Foam::functionObjects::dataCloud::read(const dictionary& dict) } precision_ = - dict.lookupOrDefault("precision", IOstream::defaultPrecision()); + dict.getOrDefault("precision", IOstream::defaultPrecision()); selectClouds_.clear(); @@ -168,7 +168,7 @@ bool Foam::functionObjects::dataCloud::read(const dictionary& dict) { selectClouds_.resize(1); selectClouds_.first() = - dict.lookupOrDefault<word>("cloud", cloud::defaultName); + dict.getOrDefault<word>("cloud", cloud::defaultName); } dict.readEntry("field", fieldName_); diff --git a/src/functionObjects/lagrangian/icoUncoupledKinematicCloud/icoUncoupledKinematicCloud.C b/src/functionObjects/lagrangian/icoUncoupledKinematicCloud/icoUncoupledKinematicCloud.C index fd460fc34ca..b1d3cb78ac7 100644 --- a/src/functionObjects/lagrangian/icoUncoupledKinematicCloud/icoUncoupledKinematicCloud.C +++ b/src/functionObjects/lagrangian/icoUncoupledKinematicCloud/icoUncoupledKinematicCloud.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2016 OpenFOAM Foundation - Copyright (C) 2018 OpenCFD Ltd. + Copyright (C) 2018-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -83,11 +83,11 @@ Foam::functionObjects::icoUncoupledKinematicCloud::icoUncoupledKinematicCloud mu_("mu", rhoValue_*laminarTransport_.nu()), U_ ( - mesh_.lookupObject<volVectorField>(dict.lookupOrDefault<word>("U", "U")) + mesh_.lookupObject<volVectorField>(dict.getOrDefault<word>("U", "U")) ), kinematicCloudName_ ( - dict.lookupOrDefault<word>("kinematicCloud", "kinematicCloud") + dict.getOrDefault<word>("kinematicCloud", "kinematicCloud") ), kinematicCloud_ ( diff --git a/src/functionObjects/lagrangian/vtkCloud/vtkCloud.C b/src/functionObjects/lagrangian/vtkCloud/vtkCloud.C index dc67743c664..deba0c5e5fc 100644 --- a/src/functionObjects/lagrangian/vtkCloud/vtkCloud.C +++ b/src/functionObjects/lagrangian/vtkCloud/vtkCloud.C @@ -396,7 +396,7 @@ bool Foam::functionObjects::vtkCloud::read(const dictionary& dict) // Info<< type() << " " << name() << " output-format: " // << writeOpts_.description() << nl; - const int padWidth = dict.lookupOrDefault<int>("width", 8); + const int padWidth = dict.getOrDefault<int>("width", 8); // Appropriate printf format - Enforce min/max sanity limits if (padWidth < 1 || padWidth > 31) @@ -408,10 +408,10 @@ bool Foam::functionObjects::vtkCloud::read(const dictionary& dict) printf_ = "%0" + std::to_string(padWidth) + "d"; } - // useTimeName_ = dict.lookupOrDefault<bool>("useTimeName", false); + // useTimeName_ = dict.getOrDefault("useTimeName", false); - useVerts_ = dict.lookupOrDefault<bool>("cellData", false); - pruneEmpty_ = dict.lookupOrDefault<bool>("prune", false); + useVerts_ = dict.getOrDefault("cellData", false); + pruneEmpty_ = dict.getOrDefault("prune", false); selectClouds_.clear(); dict.readIfPresent("clouds", selectClouds_); @@ -420,7 +420,7 @@ bool Foam::functionObjects::vtkCloud::read(const dictionary& dict) { selectClouds_.resize(1); selectClouds_.first() = - dict.lookupOrDefault<word>("cloud", cloud::defaultName); + dict.getOrDefault<word>("cloud", cloud::defaultName); } selectFields_.clear(); diff --git a/src/functionObjects/solvers/energyTransport/energyTransport.C b/src/functionObjects/solvers/energyTransport/energyTransport.C index 422b74dd2d4..80a404c7bb6 100644 --- a/src/functionObjects/solvers/energyTransport/energyTransport.C +++ b/src/functionObjects/solvers/energyTransport/energyTransport.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. @@ -203,9 +203,9 @@ Foam::functionObjects::energyTransport::energyTransport ) : fvMeshFunctionObject(name, runTime, dict), - fieldName_(dict.lookupOrDefault<word>("field", "T")), - phiName_(dict.lookupOrDefault<word>("phi", "phi")), - rhoName_(dict.lookupOrDefault<word>("rho", "rho")), + fieldName_(dict.getOrDefault<word>("field", "T")), + phiName_(dict.getOrDefault<word>("phi", "phi")), + rhoName_(dict.getOrDefault<word>("rho", "rho")), nCorr_(0), schemesField_("unknown-schemesField"), fvOptions_(mesh_), @@ -332,7 +332,7 @@ bool Foam::functionObjects::energyTransport::read(const dictionary& dict) dict.readIfPresent("phi", phiName_); dict.readIfPresent("rho", rhoName_); - schemesField_ = dict.lookupOrDefault("schemesField", fieldName_); + schemesField_ = dict.getOrDefault("schemesField", fieldName_); dict.readIfPresent("nCorr", nCorr_); diff --git a/src/functionObjects/solvers/scalarTransport/scalarTransport.C b/src/functionObjects/solvers/scalarTransport/scalarTransport.C index 996e2ae06f4..0480ed60e92 100644 --- a/src/functionObjects/solvers/scalarTransport/scalarTransport.C +++ b/src/functionObjects/solvers/scalarTransport/scalarTransport.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2012-2017 OpenFOAM Foundation - Copyright (C) 2015-2016 OpenCFD Ltd. + Copyright (C) 2015-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -181,14 +181,14 @@ Foam::functionObjects::scalarTransport::scalarTransport ) : fvMeshFunctionObject(name, runTime, dict), - fieldName_(dict.lookupOrDefault<word>("field", "s")), - phiName_(dict.lookupOrDefault<word>("phi", "phi")), - rhoName_(dict.lookupOrDefault<word>("rho", "rho")), - nutName_(dict.lookupOrDefault<word>("nut", "none")), - phaseName_(dict.lookupOrDefault<word>("phase", "none")), + fieldName_(dict.getOrDefault<word>("field", "s")), + phiName_(dict.getOrDefault<word>("phi", "phi")), + rhoName_(dict.getOrDefault<word>("rho", "rho")), + nutName_(dict.getOrDefault<word>("nut", "none")), + phaseName_(dict.getOrDefault<word>("phase", "none")), phasePhiCompressedName_ ( - dict.lookupOrDefault<word>("phasePhiCompressed", "alphaPhiUn") + dict.getOrDefault<word>("phasePhiCompressed", "alphaPhiUn") ), D_(0), constantD_(false), @@ -196,7 +196,7 @@ Foam::functionObjects::scalarTransport::scalarTransport resetOnStartUp_(false), schemesField_("unknown-schemesField"), fvOptions_(mesh_), - bounded01_(dict.lookupOrDefault("bounded01", true)) + bounded01_(dict.getOrDefault("bounded01", true)) { read(dict); @@ -229,10 +229,10 @@ bool Foam::functionObjects::scalarTransport::read(const dictionary& dict) dict.readIfPresent("phase", phaseName_); dict.readIfPresent("bounded01", bounded01_); - schemesField_ = dict.lookupOrDefault("schemesField", fieldName_); + schemesField_ = dict.getOrDefault("schemesField", fieldName_); constantD_ = dict.readIfPresent("D", D_); - alphaD_ = dict.lookupOrDefault("alphaD", 1.0); - alphaDt_ = dict.lookupOrDefault("alphaDt", 1.0); + alphaD_ = dict.getOrDefault<scalar>("alphaD", 1); + alphaDt_ = dict.getOrDefault<scalar>("alphaDt", 1); dict.readIfPresent("nCorr", nCorr_); dict.readIfPresent("resetOnStartUp", resetOnStartUp_); diff --git a/src/functionObjects/utilities/abort/abort.C b/src/functionObjects/utilities/abort/abort.C index da5a7c38a2b..2e85147db58 100644 --- a/src/functionObjects/utilities/abort/abort.C +++ b/src/functionObjects/utilities/abort/abort.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2017 OpenFOAM Foundation - Copyright (C) 2016-2019 OpenCFD Ltd. + Copyright (C) 2016-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -184,7 +184,7 @@ bool Foam::functionObjects::abort::read(const dictionary& dict) triggered_ = false; - defaultAction_ = Time::stopAtControlNames.lookupOrDefault + defaultAction_ = Time::stopAtControlNames.getOrDefault ( "action", dict, diff --git a/src/functionObjects/utilities/areaWrite/areaWrite.C b/src/functionObjects/utilities/areaWrite/areaWrite.C index 7ac45b5a958..eb70b9c835b 100644 --- a/src/functionObjects/utilities/areaWrite/areaWrite.C +++ b/src/functionObjects/utilities/areaWrite/areaWrite.C @@ -5,7 +5,7 @@ \\ / A nd | www.openfoam.com \\/ M anipulation | ------------------------------------------------------------------------------- - Copyright (C) 2019 OpenCFD Ltd. + Copyright (C) 2019-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -139,7 +139,7 @@ bool Foam::areaWrite::read(const dictionary& dict) ) ); - verbose_ = dict.lookupOrDefault("verbose", false); + verbose_ = dict.getOrDefault("verbose", false); // All possible area meshes for the given fvMesh region meshes_ = obr().lookupClass<faMesh>(); diff --git a/src/functionObjects/utilities/ensightWrite/ensightWrite.C b/src/functionObjects/utilities/ensightWrite/ensightWrite.C index 1a52c721171..ebf3277e36f 100644 --- a/src/functionObjects/utilities/ensightWrite/ensightWrite.C +++ b/src/functionObjects/utilities/ensightWrite/ensightWrite.C @@ -116,17 +116,17 @@ bool Foam::functionObjects::ensightWrite::read(const dictionary& dict) // Writer options - consecutive_ = dict.lookupOrDefault("consecutive", false); + consecutive_ = dict.getOrDefault("consecutive", false); - writeOpts_.useBoundaryMesh(dict.lookupOrDefault("boundary", true)); - writeOpts_.useInternalMesh(dict.lookupOrDefault("internal", true)); + writeOpts_.useBoundaryMesh(dict.getOrDefault("boundary", true)); + writeOpts_.useInternalMesh(dict.getOrDefault("internal", true)); // Warn if noPatches keyword (1806) exists and contradicts our settings // Cannot readily use Compat since the boolean has the opposite value. if ( - dict.lookupOrDefault("noPatches", false) + dict.getOrDefault("noPatches", false) && writeOpts_.useBoundaryMesh() ) { @@ -151,9 +151,9 @@ bool Foam::functionObjects::ensightWrite::read(const dictionary& dict) // Case options - caseOpts_.nodeValues(dict.lookupOrDefault("nodeValues", false)); - caseOpts_.width(dict.lookupOrDefault<label>("width", 8)); - caseOpts_.overwrite(dict.lookupOrDefault("overwrite", false)); + caseOpts_.nodeValues(dict.getOrDefault("nodeValues", false)); + caseOpts_.width(dict.getOrDefault<label>("width", 8)); + caseOpts_.overwrite(dict.getOrDefault("overwrite", false)); // Output directory diff --git a/src/functionObjects/utilities/runTimeControl/runTimeCondition/averageCondition/averageCondition.C b/src/functionObjects/utilities/runTimeControl/runTimeCondition/averageCondition/averageCondition.C index 0a59b557a56..b03a9f83e72 100644 --- a/src/functionObjects/utilities/runTimeControl/runTimeCondition/averageCondition/averageCondition.C +++ b/src/functionObjects/utilities/runTimeControl/runTimeCondition/averageCondition/averageCondition.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2015 OpenFOAM Foundation - Copyright (C) 2015-2019 OpenCFD Ltd. + Copyright (C) 2015-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -70,7 +70,7 @@ Foam::functionObjects::runTimeControls::averageCondition::averageCondition functionObjectName_(dict.get<word>("functionObject")), fieldNames_(dict.get<wordList>("fields")), tolerance_(dict.get<scalar>("tolerance")), - window_(dict.lookupOrDefault<scalar>("window", -1)), + window_(dict.getOrDefault<scalar>("window", -1)), windowType_ ( window_ > 0 @@ -78,8 +78,8 @@ Foam::functionObjects::runTimeControls::averageCondition::averageCondition : windowType::NONE ), totalTime_(fieldNames_.size(), scalar(0)), - resetOnRestart_(dict.lookupOrDefault<bool>("resetOnRestart", false)), - nIterStartUp_(dict.lookupOrDefault<label>("nIterStartUp", 10)), + resetOnRestart_(dict.getOrDefault("resetOnRestart", false)), + nIterStartUp_(dict.getOrDefault<label>("nIterStartUp", 10)), iter_(-1) { dictionary& conditionDict = this->conditionDict(); diff --git a/src/functionObjects/utilities/runTimeControl/runTimeCondition/equationInitialResidualCondition/equationInitialResidualCondition.C b/src/functionObjects/utilities/runTimeControl/runTimeCondition/equationInitialResidualCondition/equationInitialResidualCondition.C index d5b399d7008..0018581a6d4 100644 --- a/src/functionObjects/utilities/runTimeControl/runTimeCondition/equationInitialResidualCondition/equationInitialResidualCondition.C +++ b/src/functionObjects/utilities/runTimeControl/runTimeCondition/equationInitialResidualCondition/equationInitialResidualCondition.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2015 OpenFOAM Foundation - Copyright (C) 2015-2019 OpenCFD Ltd. + Copyright (C) 2015-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -85,7 +85,7 @@ equationInitialResidualCondition::equationInitialResidualCondition runTimeCondition(name, obr, dict, state), fieldSelection_(obr, true), value_(dict.get<scalar>("value")), - timeStart_(dict.lookupOrDefault("timeStart", -GREAT)), + timeStart_(dict.getOrDefault("timeStart", -GREAT)), mode_(operatingModeNames.get("mode", dict)) { fieldSelection_.read(dict); diff --git a/src/functionObjects/utilities/runTimeControl/runTimeCondition/equationMaxIterCondition/equationMaxIterCondition.C b/src/functionObjects/utilities/runTimeControl/runTimeCondition/equationMaxIterCondition/equationMaxIterCondition.C index 619fc91da4a..98f365e65af 100644 --- a/src/functionObjects/utilities/runTimeControl/runTimeCondition/equationMaxIterCondition/equationMaxIterCondition.C +++ b/src/functionObjects/utilities/runTimeControl/runTimeCondition/equationMaxIterCondition/equationMaxIterCondition.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2015 OpenFOAM Foundation - Copyright (C) 2015-2016 OpenCFD Ltd. + Copyright (C) 2015-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -65,7 +65,7 @@ equationMaxIterCondition runTimeCondition(name, obr, dict, state), fieldNames_(dict.get<wordList>("fields")), threshold_(dict.get<label>("threshold")), - startIter_(dict.lookupOrDefault("startIter", 2)) + startIter_(dict.getOrDefault("startIter", 2)) { if (!fieldNames_.size()) { diff --git a/src/functionObjects/utilities/runTimeControl/runTimeCondition/maxDurationCondition/maxDurationCondition.C b/src/functionObjects/utilities/runTimeControl/runTimeCondition/maxDurationCondition/maxDurationCondition.C index e91eefb00e3..00b1528efbf 100644 --- a/src/functionObjects/utilities/runTimeControl/runTimeCondition/maxDurationCondition/maxDurationCondition.C +++ b/src/functionObjects/utilities/runTimeControl/runTimeCondition/maxDurationCondition/maxDurationCondition.C @@ -5,7 +5,7 @@ \\ / A nd | www.openfoam.com \\/ M anipulation | ------------------------------------------------------------------------------- - Copyright (C) 2018-2019 OpenCFD Ltd. + Copyright (C) 2018-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -64,7 +64,7 @@ maxDurationCondition duration_(dict.get<scalar>("duration")), startTime_(-1), initialised_(false), - resetOnRestart_(dict.lookupOrDefault("resetOnRestart", false)) + resetOnRestart_(dict.getOrDefault("resetOnRestart", false)) { if ( diff --git a/src/functionObjects/utilities/runTimeControl/runTimeCondition/runTimeCondition/runTimeCondition.C b/src/functionObjects/utilities/runTimeControl/runTimeCondition/runTimeCondition/runTimeCondition.C index bbe5439b3a0..7d185449c64 100644 --- a/src/functionObjects/utilities/runTimeControl/runTimeCondition/runTimeCondition/runTimeCondition.C +++ b/src/functionObjects/utilities/runTimeControl/runTimeCondition/runTimeCondition/runTimeCondition.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2015 OpenFOAM Foundation - Copyright (C) 2016 OpenCFD Ltd. + Copyright (C) 2016-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -85,10 +85,10 @@ Foam::functionObjects::runTimeControls::runTimeCondition::runTimeCondition name_(name), obr_(obr), state_(state), - active_(dict.lookupOrDefault("active", true)), + active_(dict.getOrDefault("active", true)), conditionDict_(setConditionDict()), - groupID_(dict.lookupOrDefault("groupID", -1)), - log(dict.lookupOrDefault("log", true)) + groupID_(dict.getOrDefault("groupID", -1)), + log(dict.getOrDefault("log", true)) {} diff --git a/src/functionObjects/utilities/runTimeControl/runTimeControl.C b/src/functionObjects/utilities/runTimeControl/runTimeControl.C index c23a11cb5a5..840ed4d9683 100644 --- a/src/functionObjects/utilities/runTimeControl/runTimeControl.C +++ b/src/functionObjects/utilities/runTimeControl/runTimeControl.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2015 OpenFOAM Foundation - Copyright (C) 2015-2018 OpenCFD Ltd. + Copyright (C) 2015-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -155,7 +155,7 @@ bool Foam::functionObjects::runTimeControls::runTimeControl::read // Set the action to perform when all conditions are satisfied // - set to end for backwards compatibility with v1806 satisfiedAction_ = - satisfiedActionNames.lookupOrDefault + satisfiedActionNames.getOrDefault ( "satisfiedAction", dict, diff --git a/src/functionObjects/utilities/setTimeStep/setTimeStepFunctionObject.C b/src/functionObjects/utilities/setTimeStep/setTimeStepFunctionObject.C index 89b528a632c..ecc5a471853 100644 --- a/src/functionObjects/utilities/setTimeStep/setTimeStepFunctionObject.C +++ b/src/functionObjects/utilities/setTimeStep/setTimeStepFunctionObject.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2013-2016 OpenFOAM Foundation - Copyright (C) 2016-2019 OpenCFD Ltd. + Copyright (C) 2016-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -95,7 +95,7 @@ bool Foam::functionObjects::setTimeStepFunctionObject::read timeStepPtr_ = Function1<scalar>::New("deltaT", dict); // Ensure that adjustTimeStep is active - if (!time_.controlDict().lookupOrDefault<bool>("adjustTimeStep", false)) + if (!time_.controlDict().getOrDefault("adjustTimeStep", false)) { FatalIOErrorInFunction(dict) << "Need to set 'adjustTimeStep' true to allow timestep control" diff --git a/src/functionObjects/utilities/solverInfo/solverInfo.C b/src/functionObjects/utilities/solverInfo/solverInfo.C index 07681805bd9..9132e4965fd 100644 --- a/src/functionObjects/utilities/solverInfo/solverInfo.C +++ b/src/functionObjects/utilities/solverInfo/solverInfo.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2015-2016 OpenFOAM Foundation - Copyright (C) 2015-2019 OpenCFD Ltd. + Copyright (C) 2015-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -148,7 +148,7 @@ bool Foam::functionObjects::solverInfo::read(const dictionary& dict) fieldSet_.read(dict); writeResidualFields_ = - dict.lookupOrDefault("writeResidualFields", false); + dict.getOrDefault("writeResidualFields", false); residualFieldNames_.clear(); diff --git a/src/functionObjects/utilities/systemCall/systemCall.C b/src/functionObjects/utilities/systemCall/systemCall.C index 85a79221a01..1538f38735d 100644 --- a/src/functionObjects/utilities/systemCall/systemCall.C +++ b/src/functionObjects/utilities/systemCall/systemCall.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. @@ -112,7 +112,7 @@ bool Foam::functionObjects::systemCall::read(const dictionary& dict) dict.readIfPresent("executeCalls", executeCalls_); dict.readIfPresent("writeCalls", writeCalls_); dict.readIfPresent("endCalls", endCalls_); - masterOnly_ = dict.lookupOrDefault("master", false); + masterOnly_ = dict.getOrDefault("master", false); if (executeCalls_.empty() && endCalls_.empty() && writeCalls_.empty()) { diff --git a/src/functionObjects/utilities/thermoCoupleProbes/thermoCoupleProbes.C b/src/functionObjects/utilities/thermoCoupleProbes/thermoCoupleProbes.C index 47d50eefd28..6169402a642 100644 --- a/src/functionObjects/utilities/thermoCoupleProbes/thermoCoupleProbes.C +++ b/src/functionObjects/utilities/thermoCoupleProbes/thermoCoupleProbes.C @@ -5,7 +5,7 @@ \\ / A nd | www.openfoam.com \\/ M anipulation | ------------------------------------------------------------------------------- - Copyright (C) 2016 OpenCFD Ltd. + Copyright (C) 2016-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -57,7 +57,7 @@ Foam::functionObjects::thermoCoupleProbes::thermoCoupleProbes : probes(name, runTime, dict, loadFromFiles, false), ODESystem(), - UName_(dict.lookupOrDefault<word>("U", "U")), + UName_(dict.getOrDefault<word>("U", "U")), radiationFieldName_(dict.get<word>("radiationField")), thermo_(mesh_.lookupObject<fluidThermo>(basicThermo::dictName)), odeSolver_(nullptr), diff --git a/src/functionObjects/utilities/timeInfo/timeInfo.C b/src/functionObjects/utilities/timeInfo/timeInfo.C index 0498acc9362..714acf7b0cb 100644 --- a/src/functionObjects/utilities/timeInfo/timeInfo.C +++ b/src/functionObjects/utilities/timeInfo/timeInfo.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2018 OpenFOAM Foundation - Copyright (C) 2019 OpenCFD Ltd. + Copyright (C) 2019-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -88,7 +88,7 @@ bool Foam::functionObjects::timeInfo::read(const dictionary& dict) timeFunctionObject::read(dict); writeFile::read(dict); - perTimeStep_ = dict.lookupOrDefault("perTimeStep", false); + perTimeStep_ = dict.getOrDefault("perTimeStep", false); return true; } diff --git a/src/functionObjects/utilities/vtkWrite/vtkWrite.C b/src/functionObjects/utilities/vtkWrite/vtkWrite.C index f32203fc6b9..fb18af2dacc 100644 --- a/src/functionObjects/utilities/vtkWrite/vtkWrite.C +++ b/src/functionObjects/utilities/vtkWrite/vtkWrite.C @@ -170,11 +170,11 @@ bool Foam::functionObjects::vtkWrite::read(const dictionary& dict) // We probably cannot trust old information after a reread series_.clear(); - // verbose_ = dict.lookupOrDefault<bool>("verbose", true); - doInternal_ = dict.lookupOrDefault<bool>("internal", true); - doBoundary_ = dict.lookupOrDefault<bool>("boundary", true); - oneBoundary_ = dict.lookupOrDefault<bool>("single", false); - interpolate_ = dict.lookupOrDefault<bool>("interpolate", false); + // verbose_ = dict.getOrDefault("verbose", true); + doInternal_ = dict.getOrDefault("internal", true); + doBoundary_ = dict.getOrDefault("boundary", true); + oneBoundary_ = dict.getOrDefault("single", false); + interpolate_ = dict.getOrDefault("interpolate", false); // // Writer options - default is xml base64 @@ -197,7 +197,7 @@ bool Foam::functionObjects::vtkWrite::read(const dictionary& dict) // Info<< type() << " " << name() << " output-format: " // << writeOpts_.description() << nl; - const int padWidth = dict.lookupOrDefault<int>("width", 8); + const int padWidth = dict.getOrDefault<int>("width", 8); // Appropriate printf format - Enforce min/max sanity limits if (padWidth < 1 || padWidth > 31) @@ -213,8 +213,8 @@ bool Foam::functionObjects::vtkWrite::read(const dictionary& dict) // Other options // - decompose_ = dict.lookupOrDefault("decompose", false); - writeIds_ = dict.lookupOrDefault("writeIds", false); + decompose_ = dict.getOrDefault("decompose", false); + writeIds_ = dict.getOrDefault("writeIds", false); // Output directory diff --git a/src/functionObjects/utilities/vtkWrite/vtkWriteUpdate.C b/src/functionObjects/utilities/vtkWrite/vtkWriteUpdate.C index 6cdf1a2f9b4..b627e692a73 100644 --- a/src/functionObjects/utilities/vtkWrite/vtkWriteUpdate.C +++ b/src/functionObjects/utilities/vtkWrite/vtkWriteUpdate.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. @@ -241,7 +241,7 @@ bool Foam::functionObjects::vtkWrite::readSelection(const dictionary& dict) { selectRegions_.resize(1); selectRegions_.first() = - dict.lookupOrDefault<word>("region", polyMesh::defaultRegion); + dict.getOrDefault<word>("region", polyMesh::defaultRegion); } // Restrict to specified meshes diff --git a/src/functionObjects/utilities/writeObjects/writeObjects.C b/src/functionObjects/utilities/writeObjects/writeObjects.C index 5ed47d5d49d..5f39a40b2fb 100644 --- a/src/functionObjects/utilities/writeObjects/writeObjects.C +++ b/src/functionObjects/utilities/writeObjects/writeObjects.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2016 OpenFOAM Foundation - Copyright (C) 2016-2019 OpenCFD Ltd. + Copyright (C) 2016-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -75,7 +75,7 @@ Foam::functionObjects::writeObjects::writeObjects ( runTime.lookupObject<objectRegistry> ( - dict.lookupOrDefault("region", polyMesh::defaultRegion) + dict.getOrDefault("region", polyMesh::defaultRegion) ) ), writeOption_(ANY_WRITE), @@ -105,7 +105,7 @@ bool Foam::functionObjects::writeObjects::read(const dictionary& dict) dict.readEntry("objects", objectNames_); } - writeOption_ = writeOptionNames_.lookupOrDefault + writeOption_ = writeOptionNames_.getOrDefault ( "writeOption", dict, diff --git a/src/fvAgglomerationMethods/pairPatchAgglomeration/pairPatchAgglomeration.C b/src/fvAgglomerationMethods/pairPatchAgglomeration/pairPatchAgglomeration.C index 1d948be554e..78ff09b9f5a 100644 --- a/src/fvAgglomerationMethods/pairPatchAgglomeration/pairPatchAgglomeration.C +++ b/src/fvAgglomerationMethods/pairPatchAgglomeration/pairPatchAgglomeration.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2016 OpenFOAM Foundation - Copyright (C) 2016 OpenCFD Ltd. + Copyright (C) 2016-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -206,7 +206,7 @@ Foam::pairPatchAgglomeration::pairPatchAgglomeration : mergeLevels_ ( - controlDict.lookupOrDefault<label>("mergeLevels", 2) + controlDict.getOrDefault<label>("mergeLevels", 2) ), maxLevels_(50), nFacesInCoarsestLevel_ @@ -219,7 +219,7 @@ Foam::pairPatchAgglomeration::pairPatchAgglomeration //), featureAngle_ ( - controlDict.lookupOrDefault<scalar>("featureAngle", 0) + controlDict.getOrDefault<scalar>("featureAngle", 0) ), nFaces_(maxLevels_), restrictAddressing_(maxLevels_), diff --git a/src/fvMotionSolver/fvMotionSolvers/componentDisplacement/componentLaplacian/displacementComponentLaplacianFvMotionSolver.C b/src/fvMotionSolver/fvMotionSolvers/componentDisplacement/componentLaplacian/displacementComponentLaplacianFvMotionSolver.C index 256a6f77154..5d14c7b9e44 100644 --- a/src/fvMotionSolver/fvMotionSolvers/componentDisplacement/componentLaplacian/displacementComponentLaplacianFvMotionSolver.C +++ b/src/fvMotionSolver/fvMotionSolvers/componentDisplacement/componentLaplacian/displacementComponentLaplacianFvMotionSolver.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2016 OpenFOAM Foundation - Copyright (C) 2016 OpenCFD Ltd. + Copyright (C) 2016-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -95,7 +95,7 @@ displacementComponentLaplacianFvMotionSolver : -1 ) { - if (coeffDict().lookupOrDefault("applyPointLocation", true)) + if (coeffDict().getOrDefault("applyPointLocation", true)) { pointLocation_.reset ( diff --git a/src/fvMotionSolver/fvMotionSolvers/displacement/surfaceAlignedSBRStress/surfaceAlignedSBRStressFvMotionSolver.C b/src/fvMotionSolver/fvMotionSolvers/displacement/surfaceAlignedSBRStress/surfaceAlignedSBRStressFvMotionSolver.C index 0445a112fa1..098f4fb7a4e 100644 --- a/src/fvMotionSolver/fvMotionSolvers/displacement/surfaceAlignedSBRStress/surfaceAlignedSBRStressFvMotionSolver.C +++ b/src/fvMotionSolver/fvMotionSolvers/displacement/surfaceAlignedSBRStress/surfaceAlignedSBRStressFvMotionSolver.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2015 OpenFOAM Foundation - Copyright (C) 2015-2016 OpenCFD Ltd. + Copyright (C) 2015-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -80,10 +80,10 @@ surfaceAlignedSBRStressFvMotionSolver fvMesh_, dimensionedVector(dimless, Zero) ), - maxAng_(coeffDict().lookupOrDefault<scalar>("maxAng", 80.0)), - minAng_(coeffDict().lookupOrDefault<scalar>("minAng", 20.0)), - accFactor_(coeffDict().lookupOrDefault<scalar>("accFactor", 1.0)), - smoothFactor_(coeffDict().lookupOrDefault<scalar>("smoothFactor", 0.9)), + maxAng_(coeffDict().getOrDefault<scalar>("maxAng", 80)), + minAng_(coeffDict().getOrDefault<scalar>("minAng", 20)), + accFactor_(coeffDict().getOrDefault<scalar>("accFactor", 1)), + smoothFactor_(coeffDict().getOrDefault<scalar>("smoothFactor", 0.9)), nNonOrthogonalCorr_(coeffDict().get<label>("nNonOrthogonalCorr")), pointDisplacement_(pointDisplacement()), sigmaD_ @@ -99,7 +99,7 @@ surfaceAlignedSBRStressFvMotionSolver fvMesh_, dimensionedSymmTensor(dimless, Zero) ), - minSigmaDiff_(coeffDict().lookupOrDefault<scalar>("minSigmaDiff", 1e-4)) + minSigmaDiff_(coeffDict().getOrDefault<scalar>("minSigmaDiff", 1e-4)) { forAll(surfaceNames_, i) { diff --git a/src/fvMotionSolver/fvMotionSolvers/velocity/laplacian/velocityLaplacianFvMotionSolver.C b/src/fvMotionSolver/fvMotionSolvers/velocity/laplacian/velocityLaplacianFvMotionSolver.C index c6f72e366c3..35ba1f3a5ec 100644 --- a/src/fvMotionSolver/fvMotionSolvers/velocity/laplacian/velocityLaplacianFvMotionSolver.C +++ b/src/fvMotionSolver/fvMotionSolvers/velocity/laplacian/velocityLaplacianFvMotionSolver.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2016 OpenFOAM Foundation - Copyright (C) 2016-2019 OpenCFD Ltd. + Copyright (C) 2016-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -127,7 +127,7 @@ void Foam::velocityLaplacianFvMotionSolver::solve() const label nNonOrthCorr ( - lookupOrDefault<label>("nNonOrthogonalCorrectors", 1) + getOrDefault<label>("nNonOrthogonalCorrectors", 1) ); for (label i=0; i<nNonOrthCorr; ++i) diff --git a/src/fvMotionSolver/pointPatchFields/derived/surfaceDisplacement/surfaceDisplacementPointPatchVectorField.C b/src/fvMotionSolver/pointPatchFields/derived/surfaceDisplacement/surfaceDisplacementPointPatchVectorField.C index 0985fa3a4a3..549499a1621 100644 --- a/src/fvMotionSolver/pointPatchFields/derived/surfaceDisplacement/surfaceDisplacementPointPatchVectorField.C +++ b/src/fvMotionSolver/pointPatchFields/derived/surfaceDisplacement/surfaceDisplacementPointPatchVectorField.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. @@ -322,8 +323,8 @@ surfaceDisplacementPointPatchVectorField surfacesDict_(dict.subDict("geometry")), projectMode_(projectModeNames_.get("projectMode", dict)), projectDir_(dict.get<vector>("projectDirection")), - wedgePlane_(dict.lookupOrDefault("wedgePlane", -1)), - frozenPointsZone_(dict.lookupOrDefault("frozenPointsZone", word::null)) + wedgePlane_(dict.getOrDefault("wedgePlane", -1)), + frozenPointsZone_(dict.getOrDefault("frozenPointsZone", word::null)) { if (velocity_.x() < 0 || velocity_.y() < 0 || velocity_.z() < 0) { diff --git a/src/fvMotionSolver/pointPatchFields/derived/surfaceSlipDisplacement/surfaceSlipDisplacementPointPatchVectorField.C b/src/fvMotionSolver/pointPatchFields/derived/surfaceSlipDisplacement/surfaceSlipDisplacementPointPatchVectorField.C index 4e889eb108d..06ae45244a3 100644 --- a/src/fvMotionSolver/pointPatchFields/derived/surfaceSlipDisplacement/surfaceSlipDisplacementPointPatchVectorField.C +++ b/src/fvMotionSolver/pointPatchFields/derived/surfaceSlipDisplacement/surfaceSlipDisplacementPointPatchVectorField.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. @@ -320,8 +321,8 @@ surfaceSlipDisplacementPointPatchVectorField surfacesDict_(dict.subDict("geometry")), projectMode_(projectModeNames_.get("projectMode", dict)), projectDir_(dict.get<vector>("projectDirection")), - wedgePlane_(dict.lookupOrDefault("wedgePlane", -1)), - frozenPointsZone_(dict.lookupOrDefault("frozenPointsZone", word::null)) + wedgePlane_(dict.getOrDefault("wedgePlane", -1)), + frozenPointsZone_(dict.getOrDefault("frozenPointsZone", word::null)) {} diff --git a/src/fvMotionSolver/pointPatchFields/derived/timeVaryingMappedFixedValue/timeVaryingMappedFixedValuePointPatchField.C b/src/fvMotionSolver/pointPatchFields/derived/timeVaryingMappedFixedValue/timeVaryingMappedFixedValuePointPatchField.C index cb8c2dd943b..3194dace8db 100644 --- a/src/fvMotionSolver/pointPatchFields/derived/timeVaryingMappedFixedValue/timeVaryingMappedFixedValuePointPatchField.C +++ b/src/fvMotionSolver/pointPatchFields/derived/timeVaryingMappedFixedValue/timeVaryingMappedFixedValuePointPatchField.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. @@ -67,11 +68,11 @@ timeVaryingMappedFixedValuePointPatchField : fixedValuePointPatchField<Type>(p, iF, dict, false), fieldTableName_(iF.name()), - setAverage_(dict.lookupOrDefault("setAverage", false)), - perturb_(dict.lookupOrDefault("perturb", 1e-5)), + setAverage_(dict.getOrDefault("setAverage", false)), + perturb_(dict.getOrDefault("perturb", 1e-5)), mapMethod_ ( - dict.lookupOrDefault<word> + dict.getOrDefault<word> ( "mapMethod", "planarInterpolation" diff --git a/src/fvMotionSolver/pointPatchFields/derived/waveDisplacement/waveDisplacementPointPatchVectorField.C b/src/fvMotionSolver/pointPatchFields/derived/waveDisplacement/waveDisplacementPointPatchVectorField.C index 7a36e8f4aba..bfdb5643ff2 100644 --- a/src/fvMotionSolver/pointPatchFields/derived/waveDisplacement/waveDisplacementPointPatchVectorField.C +++ b/src/fvMotionSolver/pointPatchFields/derived/waveDisplacement/waveDisplacementPointPatchVectorField.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. @@ -58,7 +59,7 @@ waveDisplacementPointPatchVectorField fixedValuePointPatchField<vector>(p, iF, dict), amplitude_(dict.lookup("amplitude")), omega_(dict.get<scalar>("omega")), - waveNumber_(dict.lookupOrDefault<vector>("waveNumber", Zero)) + waveNumber_(dict.getOrDefault<vector>("waveNumber", Zero)) { if (!dict.found("value")) { diff --git a/src/fvOptions/constraints/derived/fixedTemperatureConstraint/fixedTemperatureConstraint.C b/src/fvOptions/constraints/derived/fixedTemperatureConstraint/fixedTemperatureConstraint.C index 6018d50fec8..e0ac1ae06ce 100644 --- a/src/fvOptions/constraints/derived/fixedTemperatureConstraint/fixedTemperatureConstraint.C +++ b/src/fvOptions/constraints/derived/fixedTemperatureConstraint/fixedTemperatureConstraint.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. @@ -85,7 +86,7 @@ Foam::fv::fixedTemperatureConstraint::fixedTemperatureConstraint } case tmLookup: { - TName_ = coeffs_.lookupOrDefault<word>("T", "T"); + TName_ = coeffs_.getOrDefault<word>("T", "T"); break; } default: diff --git a/src/fvOptions/corrections/limitTemperature/limitTemperature.C b/src/fvOptions/corrections/limitTemperature/limitTemperature.C index 97e0057f3aa..a764423e0ac 100644 --- a/src/fvOptions/corrections/limitTemperature/limitTemperature.C +++ b/src/fvOptions/corrections/limitTemperature/limitTemperature.C @@ -61,7 +61,7 @@ Foam::fv::limitTemperature::limitTemperature cellSetOption(name, modelType, dict, mesh), Tmin_(coeffs_.get<scalar>("min")), Tmax_(coeffs_.get<scalar>("max")), - phase_(coeffs_.lookupOrDefault<word>("phase", word::null)) + phase_(coeffs_.getOrDefault<word>("phase", word::null)) { // Set the field name to that of the energy field from which the temperature // is obtained diff --git a/src/fvOptions/corrections/limitVelocity/limitVelocity.C b/src/fvOptions/corrections/limitVelocity/limitVelocity.C index 253a53f5585..97f3529f035 100644 --- a/src/fvOptions/corrections/limitVelocity/limitVelocity.C +++ b/src/fvOptions/corrections/limitVelocity/limitVelocity.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2016-2017 OpenFOAM Foundation - Copyright (C) 2018 OpenCFD Ltd. + Copyright (C) 2018-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -58,7 +58,7 @@ Foam::fv::limitVelocity::limitVelocity ) : cellSetOption(name, modelType, dict, mesh), - UName_(coeffs_.lookupOrDefault<word>("U", "U")), + UName_(coeffs_.getOrDefault<word>("U", "U")), max_(coeffs_.get<scalar>("max")) { fieldNames_.setSize(1, UName_); diff --git a/src/fvOptions/interRegionOption/interRegionOption.C b/src/fvOptions/interRegionOption/interRegionOption.C index a1cef5c6585..d510c1c30b2 100644 --- a/src/fvOptions/interRegionOption/interRegionOption.C +++ b/src/fvOptions/interRegionOption/interRegionOption.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2015 OpenFOAM Foundation - Copyright (C) 2018 OpenCFD Ltd. + Copyright (C) 2018-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -68,13 +68,13 @@ void Foam::fv::interRegionOption::setMapper() ( mesh_, nbrMesh, - meshToMesh::interpolationMethodNames_.lookupOrDefault + meshToMesh::interpolationMethodNames_.getOrDefault ( "interpolationMethod", coeffs_, meshToMesh::interpolationMethod::imCellVolumeWeight ), - meshToMesh::procMapMethodNames_.lookupOrDefault + meshToMesh::procMapMethodNames_.getOrDefault ( "procMapMethod", coeffs_, @@ -112,7 +112,7 @@ Foam::fv::interRegionOption::interRegionOption dict, mesh ), - master_(coeffs_.lookupOrDefault("master", true)), + master_(coeffs_.getOrDefault("master", true)), nbrRegionName_(coeffs_.get<word>("nbrRegion")), meshInterpPtr_() { diff --git a/src/fvOptions/sources/derived/acousticDampingSource/acousticDampingSource.C b/src/fvOptions/sources/derived/acousticDampingSource/acousticDampingSource.C index 011bf85448a..08c2bd5f48f 100644 --- a/src/fvOptions/sources/derived/acousticDampingSource/acousticDampingSource.C +++ b/src/fvOptions/sources/derived/acousticDampingSource/acousticDampingSource.C @@ -5,7 +5,7 @@ \\ / A nd | www.openfoam.com \\/ M anipulation | ------------------------------------------------------------------------------- - Copyright (C) 2016 OpenCFD Ltd. + Copyright (C) 2016-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -184,7 +184,7 @@ bool Foam::fv::acousticDampingSource::read(const dictionary& dict) if (!coeffs_.readIfPresent("UNames", fieldNames_)) { fieldNames_.resize(1); - fieldNames_.first() = coeffs_.lookupOrDefault<word>("U", "U"); + fieldNames_.first() = coeffs_.getOrDefault<word>("U", "U"); } applied_.setSize(fieldNames_.size(), false); diff --git a/src/fvOptions/sources/derived/buoyancyEnergy/buoyancyEnergy.C b/src/fvOptions/sources/derived/buoyancyEnergy/buoyancyEnergy.C index ffd4462c535..14c9516154d 100644 --- a/src/fvOptions/sources/derived/buoyancyEnergy/buoyancyEnergy.C +++ b/src/fvOptions/sources/derived/buoyancyEnergy/buoyancyEnergy.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2015-2016 OpenFOAM Foundation - Copyright (C) 2018 OpenCFD Ltd. + Copyright (C) 2018-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -60,7 +60,7 @@ Foam::fv::buoyancyEnergy::buoyancyEnergy ) : option(sourceName, modelType, dict, mesh), - UName_(coeffs_.lookupOrDefault<word>("U", "U")) + UName_(coeffs_.getOrDefault<word>("U", "U")) { coeffs_.readEntry("fields", fieldNames_); diff --git a/src/fvOptions/sources/derived/directionalPressureGradientExplicitSource/directionalPressureGradientExplicitSource.C b/src/fvOptions/sources/derived/directionalPressureGradientExplicitSource/directionalPressureGradientExplicitSource.C index 81c64d9f7ef..1b01f2f9951 100644 --- a/src/fvOptions/sources/derived/directionalPressureGradientExplicitSource/directionalPressureGradientExplicitSource.C +++ b/src/fvOptions/sources/derived/directionalPressureGradientExplicitSource/directionalPressureGradientExplicitSource.C @@ -5,7 +5,7 @@ \\ / A nd | www.openfoam.com \\/ M anipulation | ------------------------------------------------------------------------------- - Copyright (C) 2015-2018 OpenCFD Ltd. + Copyright (C) 2015-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -183,7 +183,7 @@ directionalPressureGradientExplicitSource zoneID_(mesh_.faceZones().findZoneID(faceZoneName_)), faceId_(), facePatchId_(), - relaxationFactor_(coeffs_.lookupOrDefault<scalar>("relaxationFactor",0.3)), + relaxationFactor_(coeffs_.getOrDefault<scalar>("relaxationFactor", 0.3)), cellFaceMap_(cells_.size(), -1) { coeffs_.readEntry("fields", fieldNames_); @@ -546,7 +546,7 @@ bool Foam::fv::directionalPressureGradientExplicitSource::read const dictionary coeffs(dict.subDict(typeName + "Coeffs")); relaxationFactor_ = - coeffs.lookupOrDefault<scalar>("relaxationFactor", 0.3); + coeffs.getOrDefault<scalar>("relaxationFactor", 0.3); coeffs.readEntry("flowDir", flowDir_); flowDir_.normalise(); diff --git a/src/fvOptions/sources/derived/effectivenessHeatExchangerSource/effectivenessHeatExchangerSource.C b/src/fvOptions/sources/derived/effectivenessHeatExchangerSource/effectivenessHeatExchangerSource.C index b659fff315a..e4a56ee0ae3 100644 --- a/src/fvOptions/sources/derived/effectivenessHeatExchangerSource/effectivenessHeatExchangerSource.C +++ b/src/fvOptions/sources/derived/effectivenessHeatExchangerSource/effectivenessHeatExchangerSource.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2013-2015 OpenFOAM Foundation - Copyright (C) 2016-2018 OpenCFD Ltd. + Copyright (C) 2016-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -316,9 +316,9 @@ bool Foam::fv::effectivenessHeatExchangerSource::read(const dictionary& dict) { if (cellSetOption::read(dict)) { - UName_ = coeffs_.lookupOrDefault<word>("U", "U"); - TName_ = coeffs_.lookupOrDefault<word>("T", "T"); - phiName_ = coeffs_.lookupOrDefault<word>("phi", "phi"); + UName_ = coeffs_.getOrDefault<word>("U", "U"); + TName_ = coeffs_.getOrDefault<word>("T", "T"); + phiName_ = coeffs_.getOrDefault<word>("phi", "phi"); coeffs_.readEntry("faceZone", faceZoneName_); coeffs_.readEntry("secondaryMassFlowRate", secondaryMassFlowRate_); diff --git a/src/fvOptions/sources/derived/explicitPorositySource/explicitPorositySource.C b/src/fvOptions/sources/derived/explicitPorositySource/explicitPorositySource.C index a2ef92f28b8..d3bc0ac2b1a 100644 --- a/src/fvOptions/sources/derived/explicitPorositySource/explicitPorositySource.C +++ b/src/fvOptions/sources/derived/explicitPorositySource/explicitPorositySource.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2012-2018 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -124,7 +125,7 @@ bool Foam::fv::explicitPorositySource::read(const dictionary& dict) if (!coeffs_.readIfPresent("UNames", fieldNames_)) { fieldNames_.resize(1); - fieldNames_.first() = coeffs_.lookupOrDefault<word>("U", "U"); + fieldNames_.first() = coeffs_.getOrDefault<word>("U", "U"); } applied_.setSize(fieldNames_.size(), false); diff --git a/src/fvOptions/sources/derived/meanVelocityForce/meanVelocityForce.C b/src/fvOptions/sources/derived/meanVelocityForce/meanVelocityForce.C index 0bd32ea5f0d..41ad35a514a 100644 --- a/src/fvOptions/sources/derived/meanVelocityForce/meanVelocityForce.C +++ b/src/fvOptions/sources/derived/meanVelocityForce/meanVelocityForce.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. @@ -93,7 +93,7 @@ Foam::fv::meanVelocityForce::meanVelocityForce gradP0_(0.0), dGradP_(0.0), flowDir_(Ubar_/mag(Ubar_)), - relaxation_(coeffs_.lookupOrDefault<scalar>("relaxation", 1.0)), + relaxation_(coeffs_.getOrDefault<scalar>("relaxation", 1)), rAPtr_(nullptr) { coeffs_.readEntry("fields", fieldNames_); diff --git a/src/fvOptions/sources/derived/multiphaseStabilizedTurbulence/multiphaseStabilizedTurbulence.C b/src/fvOptions/sources/derived/multiphaseStabilizedTurbulence/multiphaseStabilizedTurbulence.C index 890a7080a3c..3f652b0beb7 100644 --- a/src/fvOptions/sources/derived/multiphaseStabilizedTurbulence/multiphaseStabilizedTurbulence.C +++ b/src/fvOptions/sources/derived/multiphaseStabilizedTurbulence/multiphaseStabilizedTurbulence.C @@ -5,7 +5,7 @@ \\ / A nd | www.openfoam.com \\/ M anipulation | ------------------------------------------------------------------------------- - Copyright (C) 2019 OpenCFD Ltd. + Copyright (C) 2019-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -62,7 +62,7 @@ Foam::fv::multiphaseStabilizedTurbulence::multiphaseStabilizedTurbulence rhoName_(coeffs_.getOrDefault<word>("rho", "rho")), Cmu_ ( - dimensionedScalar::lookupOrAddToDict + dimensionedScalar::getOrAddToDict ( "Cmu", coeffs_, @@ -71,7 +71,7 @@ Foam::fv::multiphaseStabilizedTurbulence::multiphaseStabilizedTurbulence ), C_ ( - dimensionedScalar::lookupOrAddToDict + dimensionedScalar::getOrAddToDict ( "C", coeffs_, @@ -80,7 +80,7 @@ Foam::fv::multiphaseStabilizedTurbulence::multiphaseStabilizedTurbulence ), lambda2_ ( - dimensionedScalar::lookupOrAddToDict + dimensionedScalar::getOrAddToDict ( "lambda2", coeffs_, @@ -89,7 +89,7 @@ Foam::fv::multiphaseStabilizedTurbulence::multiphaseStabilizedTurbulence ), alpha_ ( - dimensionedScalar::lookupOrAddToDict + dimensionedScalar::getOrAddToDict ( "alpha", coeffs_, diff --git a/src/fvOptions/sources/derived/rotorDiskSource/profileModel/profileModel.C b/src/fvOptions/sources/derived/rotorDiskSource/profileModel/profileModel.C index f96069f9683..b47afe831f0 100644 --- a/src/fvOptions/sources/derived/rotorDiskSource/profileModel/profileModel.C +++ b/src/fvOptions/sources/derived/rotorDiskSource/profileModel/profileModel.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2017 OpenFOAM Foundation - Copyright (C) 2019 OpenCFD Ltd. + Copyright (C) 2019-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -52,7 +52,7 @@ Foam::profileModel::profileModel(const dictionary& dict, const word& name) : dict_(dict), name_(name), - fName_(dict.lookupOrDefault<fileName>("file", fileName::null)) + fName_(dict.getOrDefault<fileName>("file", fileName::null)) {} diff --git a/src/fvOptions/sources/derived/rotorDiskSource/trimModel/targetCoeff/targetCoeffTrim.C b/src/fvOptions/sources/derived/rotorDiskSource/trimModel/targetCoeff/targetCoeffTrim.C index d58ee4700bb..1b308f991d5 100644 --- a/src/fvOptions/sources/derived/rotorDiskSource/trimModel/targetCoeff/targetCoeffTrim.C +++ b/src/fvOptions/sources/derived/rotorDiskSource/trimModel/targetCoeff/targetCoeffTrim.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. @@ -220,7 +221,7 @@ void Foam::targetCoeffTrim::read(const dictionary& dict) trimModel::read(dict); const dictionary& targetDict(coeffs_.subDict("target")); - useCoeffs_ = targetDict.lookupOrDefault("useCoeffs", true); + useCoeffs_ = targetDict.getOrDefault("useCoeffs", true); word ext = ""; if (useCoeffs_) { diff --git a/src/fvOptions/sources/derived/solidificationMeltingSource/solidificationMeltingSource.C b/src/fvOptions/sources/derived/solidificationMeltingSource/solidificationMeltingSource.C index f6b3e97832d..102298b36cf 100644 --- a/src/fvOptions/sources/derived/solidificationMeltingSource/solidificationMeltingSource.C +++ b/src/fvOptions/sources/derived/solidificationMeltingSource/solidificationMeltingSource.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2014-2017 OpenFOAM Foundation - Copyright (C) 2018 OpenCFD Ltd. + Copyright (C) 2018-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -171,15 +171,15 @@ Foam::fv::solidificationMeltingSource::solidificationMeltingSource cellSetOption(sourceName, modelType, dict, mesh), Tmelt_(coeffs_.get<scalar>("Tmelt")), L_(coeffs_.get<scalar>("L")), - relax_(coeffs_.lookupOrDefault("relax", 0.9)), + relax_(coeffs_.getOrDefault<scalar>("relax", 0.9)), mode_(thermoModeTypeNames_.get("thermoMode", coeffs_)), rhoRef_(coeffs_.get<scalar>("rhoRef")), - TName_(coeffs_.lookupOrDefault<word>("T", "T")), - CpName_(coeffs_.lookupOrDefault<word>("Cp", "Cp")), - UName_(coeffs_.lookupOrDefault<word>("U", "U")), - phiName_(coeffs_.lookupOrDefault<word>("phi", "phi")), - Cu_(coeffs_.lookupOrDefault<scalar>("Cu", 100000)), - q_(coeffs_.lookupOrDefault("q", 0.001)), + TName_(coeffs_.getOrDefault<word>("T", "T")), + CpName_(coeffs_.getOrDefault<word>("Cp", "Cp")), + UName_(coeffs_.getOrDefault<word>("U", "U")), + phiName_(coeffs_.getOrDefault<word>("phi", "phi")), + Cu_(coeffs_.getOrDefault<scalar>("Cu", 100000)), + q_(coeffs_.getOrDefault<scalar>("q", 0.001)), beta_(coeffs_.get<scalar>("beta")), alpha1_ ( diff --git a/src/fvOptions/sources/derived/tabulatedAccelerationSource/tabulatedAccelerationSource.C b/src/fvOptions/sources/derived/tabulatedAccelerationSource/tabulatedAccelerationSource.C index fb389b64ed7..15b61e7799f 100644 --- a/src/fvOptions/sources/derived/tabulatedAccelerationSource/tabulatedAccelerationSource.C +++ b/src/fvOptions/sources/derived/tabulatedAccelerationSource/tabulatedAccelerationSource.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2015-2016 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -60,7 +61,7 @@ Foam::fv::tabulatedAccelerationSource::tabulatedAccelerationSource : option(name, modelType, dict, mesh), motion_(coeffs_, mesh.time()), - UName_(coeffs_.lookupOrDefault<word>("U", "U")), + UName_(coeffs_.getOrDefault<word>("U", "U")), g0_("g0", dimAcceleration, Zero) { fieldNames_.setSize(1, UName_); diff --git a/src/fvOptions/sources/derived/viscousDissipation/viscousDissipation.C b/src/fvOptions/sources/derived/viscousDissipation/viscousDissipation.C index eced789e50a..8cafcdb7a35 100644 --- a/src/fvOptions/sources/derived/viscousDissipation/viscousDissipation.C +++ b/src/fvOptions/sources/derived/viscousDissipation/viscousDissipation.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. @@ -96,11 +96,11 @@ Foam::fv::viscousDissipation::viscousDissipation ) : option(sourceName, modelType, dict, mesh), - UName_(coeffs_.lookupOrDefault<word>("U", "U")), - rhoName_(coeffs_.lookupOrDefault<word>("rho", "none")), + UName_(coeffs_.getOrDefault<word>("U", "U")), + rhoName_(coeffs_.getOrDefault<word>("rho", "none")), rho_ ( - coeffs_.lookupOrDefault + coeffs_.getOrDefault ( "rhoInf", dimensionedScalar("rho", dimDensity, 0) diff --git a/src/fvOptions/sources/interRegion/interRegionExplicitPorositySource/interRegionExplicitPorositySource.C b/src/fvOptions/sources/interRegion/interRegionExplicitPorositySource/interRegionExplicitPorositySource.C index fda4582ef48..8445e883ac0 100644 --- a/src/fvOptions/sources/interRegion/interRegionExplicitPorositySource/interRegionExplicitPorositySource.C +++ b/src/fvOptions/sources/interRegion/interRegionExplicitPorositySource/interRegionExplicitPorositySource.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. @@ -120,8 +121,8 @@ Foam::fv::interRegionExplicitPorositySource::interRegionExplicitPorositySource interRegionOption(name, modelType, dict, mesh), porosityPtr_(nullptr), firstIter_(true), - UName_(coeffs_.lookupOrDefault<word>("U", "U")), - muName_(coeffs_.lookupOrDefault<word>("mu", "thermo:mu")) + UName_(coeffs_.getOrDefault<word>("U", "U")), + muName_(coeffs_.getOrDefault<word>("mu", "thermo:mu")) { if (active_) { diff --git a/src/fvOptions/sources/interRegion/interRegionHeatTransfer/interRegionHeatTransferModel/interRegionHeatTransferModel.C b/src/fvOptions/sources/interRegion/interRegionHeatTransfer/interRegionHeatTransferModel/interRegionHeatTransferModel.C index 0058d7e50d7..72626fad2cb 100644 --- a/src/fvOptions/sources/interRegion/interRegionHeatTransfer/interRegionHeatTransferModel/interRegionHeatTransferModel.C +++ b/src/fvOptions/sources/interRegion/interRegionHeatTransfer/interRegionHeatTransferModel/interRegionHeatTransferModel.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. @@ -140,8 +141,8 @@ Foam::fv::interRegionHeatTransferModel::interRegionHeatTransferModel dimensionedScalar(dimEnergy/dimTime/dimTemperature/dimVolume, Zero), zeroGradientFvPatchScalarField::typeName ), - TName_(coeffs_.lookupOrDefault<word>("T", "T")), - TNbrName_(coeffs_.lookupOrDefault<word>("TNbr", "T")) + TName_(coeffs_.getOrDefault<word>("T", "T")), + TNbrName_(coeffs_.getOrDefault<word>("TNbr", "T")) { if (active()) { diff --git a/src/fvOptions/sources/interRegion/interRegionHeatTransfer/tabulatedHeatTransfer/tabulatedHeatTransfer.C b/src/fvOptions/sources/interRegion/interRegionHeatTransfer/tabulatedHeatTransfer/tabulatedHeatTransfer.C index 8f4dffb5c16..a613e44829c 100644 --- a/src/fvOptions/sources/interRegion/interRegionHeatTransfer/tabulatedHeatTransfer/tabulatedHeatTransfer.C +++ b/src/fvOptions/sources/interRegion/interRegionHeatTransfer/tabulatedHeatTransfer/tabulatedHeatTransfer.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. @@ -95,8 +96,8 @@ Foam::fv::tabulatedHeatTransfer::tabulatedHeatTransfer ) : interRegionHeatTransferModel(name, modelType, dict, mesh), - UName_(coeffs_.lookupOrDefault<word>("U", "U")), - UNbrName_(coeffs_.lookupOrDefault<word>("UNbr", "U")), + UName_(coeffs_.getOrDefault<word>("U", "U")), + UNbrName_(coeffs_.getOrDefault<word>("UNbr", "U")), hTable_(), AoV_(), startTimeName_(mesh.time().timeName()) diff --git a/src/fvOptions/sources/interRegion/interRegionHeatTransfer/tabulatedNTUHeatTransfer/tabulatedNTUHeatTransfer.C b/src/fvOptions/sources/interRegion/interRegionHeatTransfer/tabulatedNTUHeatTransfer/tabulatedNTUHeatTransfer.C index e3bf1b9bb84..eccd89663c0 100644 --- a/src/fvOptions/sources/interRegion/interRegionHeatTransfer/tabulatedNTUHeatTransfer/tabulatedNTUHeatTransfer.C +++ b/src/fvOptions/sources/interRegion/interRegionHeatTransfer/tabulatedNTUHeatTransfer/tabulatedNTUHeatTransfer.C @@ -5,7 +5,7 @@ \\ / A nd | www.openfoam.com \\/ M anipulation | ------------------------------------------------------------------------------- - Copyright (C) 2015-2018 OpenCFD Ltd. + Copyright (C) 2015-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -201,10 +201,10 @@ Foam::fv::tabulatedNTUHeatTransfer::tabulatedNTUHeatTransfer ) : interRegionHeatTransferModel(name, modelType, dict, mesh), - UName_(coeffs_.lookupOrDefault<word>("U", "U")), - UNbrName_(coeffs_.lookupOrDefault<word>("UNbr", "U")), - rhoName_(coeffs_.lookupOrDefault<word>("rho", "rho")), - rhoNbrName_(coeffs_.lookupOrDefault<word>("rhoNbr", "rho")), + UName_(coeffs_.getOrDefault<word>("U", "U")), + UNbrName_(coeffs_.getOrDefault<word>("UNbr", "U")), + rhoName_(coeffs_.getOrDefault<word>("rho", "rho")), + rhoNbrName_(coeffs_.getOrDefault<word>("rhoNbr", "rho")), ntuTable_(), geometryMode_(gmCalculated), Ain_(-1), diff --git a/src/fvOptions/sources/interRegion/interRegionHeatTransfer/variableHeatTransfer/variableHeatTransfer.C b/src/fvOptions/sources/interRegion/interRegionHeatTransfer/variableHeatTransfer/variableHeatTransfer.C index 22c4d8ec3e9..d75055e2dce 100644 --- a/src/fvOptions/sources/interRegion/interRegionHeatTransfer/variableHeatTransfer/variableHeatTransfer.C +++ b/src/fvOptions/sources/interRegion/interRegionHeatTransfer/variableHeatTransfer/variableHeatTransfer.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,7 +58,7 @@ Foam::fv::variableHeatTransfer::variableHeatTransfer ) : interRegionHeatTransferModel(name, modelType, dict, mesh), - UNbrName_(coeffs_.lookupOrDefault<word>("UNbr", "U")), + UNbrName_(coeffs_.getOrDefault<word>("UNbr", "U")), a_(0), b_(0), c_(0), diff --git a/src/lagrangian/basic/Cloud/CloudIO.C b/src/lagrangian/basic/Cloud/CloudIO.C index 160007fc4d6..6c375948470 100644 --- a/src/lagrangian/basic/Cloud/CloudIO.C +++ b/src/lagrangian/basic/Cloud/CloudIO.C @@ -60,7 +60,7 @@ void Foam::Cloud<ParticleType>::readCloudUniformProperties() // Fall back to positions mode if the entry is not present for // backwards compatibility geometryType_ = - cloud::geometryTypeNames.lookupOrDefault + cloud::geometryTypeNames.getOrDefault ( "geometry", uniformPropsDict, diff --git a/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationIntrinsicRate/COxidationIntrinsicRate.C b/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationIntrinsicRate/COxidationIntrinsicRate.C index a4bc9c30278..3eacd92e7aa 100644 --- a/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationIntrinsicRate/COxidationIntrinsicRate.C +++ b/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationIntrinsicRate/COxidationIntrinsicRate.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2014-2016 OpenFOAM Foundation - Copyright (C) 2019 OpenCFD Ltd. + Copyright (C) 2019-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -48,7 +48,7 @@ Foam::COxidationIntrinsicRate<CloudType>::COxidationIntrinsicRate Ai_(this->coeffDict().getScalar("Ai")), Ei_(this->coeffDict().getScalar("Ei")), Ag_(this->coeffDict().getScalar("Ag")), - tau_(this->coeffDict().lookupOrDefault("tau", sqrt(2.0))), + tau_(this->coeffDict().getOrDefault("tau", sqrt(2.0))), CsLocalId_(-1), O2GlobalId_(owner.composition().carrierId("O2")), CO2GlobalId_(owner.composition().carrierId("CO2")), diff --git a/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloud.C b/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloud.C index 8859f8b7399..63bb2eb7c2b 100644 --- a/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloud.C +++ b/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloud.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2017 OpenFOAM Foundation - Copyright (C) 2016-2019 OpenCFD Ltd. + Copyright (C) 2016-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -670,7 +670,7 @@ void Foam::KinematicCloud<CloudType>::preEvolve() updateCellOccupancy(); pAmbient_ = constProps_.dict().template - lookupOrDefault<scalar>("pAmbient", pAmbient_); + getOrDefault<scalar>("pAmbient", pAmbient_); functions_.preEvolve(); } diff --git a/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/cloudSolution/cloudSolution.C b/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/cloudSolution/cloudSolution.C index 42905b42235..55175b50d63 100644 --- a/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/cloudSolution/cloudSolution.C +++ b/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/cloudSolution/cloudSolution.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. @@ -123,7 +124,7 @@ Foam::cloudSolution::~cloudSolution() void Foam::cloudSolution::read() { // For transient runs the Lagrangian tracking may be transient or steady - transient_ = dict_.lookupOrDefault("transient", false); + transient_ = dict_.getOrDefault("transient", false); // For LTS and steady-state runs the Lagrangian tracking cannot be transient if (transient_) diff --git a/src/lagrangian/intermediate/submodels/CloudFunctionObjects/ParticleCollector/ParticleCollector.C b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/ParticleCollector/ParticleCollector.C index 862922af2f1..94b5b2a5064 100644 --- a/src/lagrangian/intermediate/submodels/CloudFunctionObjects/ParticleCollector/ParticleCollector.C +++ b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/ParticleCollector/ParticleCollector.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2012-2017 OpenFOAM Foundation - Copyright (C) 2015-2019 OpenCFD Ltd. + Copyright (C) 2015-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -527,7 +527,7 @@ Foam::ParticleCollector<CloudType>::ParticleCollector : CloudFunctionObject<CloudType>(dict, owner, modelName, typeName), mode_(mtUnknown), - parcelType_(this->coeffDict().lookupOrDefault("parcelType", -1)), + parcelType_(this->coeffDict().getOrDefault("parcelType", -1)), removeCollected_(this->coeffDict().getBool("removeCollected")), resetOnWrite_(this->coeffDict().getBool("resetOnWrite")), log_(this->coeffDict().getBool("log")), diff --git a/src/lagrangian/intermediate/submodels/CloudFunctionObjects/ParticleErosion/ParticleErosion.C b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/ParticleErosion/ParticleErosion.C index cfc2d6efede..289fc93fde5 100644 --- a/src/lagrangian/intermediate/submodels/CloudFunctionObjects/ParticleErosion/ParticleErosion.C +++ b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/ParticleErosion/ParticleErosion.C @@ -77,8 +77,8 @@ Foam::ParticleErosion<CloudType>::ParticleErosion QPtr_(nullptr), patchIDs_(), p_(this->coeffDict().getScalar("p")), - psi_(this->coeffDict().template lookupOrDefault<scalar>("psi", 2.0)), - K_(this->coeffDict().template lookupOrDefault<scalar>("K", 2.0)) + psi_(this->coeffDict().template getOrDefault<scalar>("psi", 2.0)), + K_(this->coeffDict().template getOrDefault<scalar>("K", 2.0)) { const wordList allPatchNames(owner.mesh().boundaryMesh().names()); const wordRes patchNames diff --git a/src/lagrangian/intermediate/submodels/CloudFunctionObjects/ParticleTrap/ParticleTrap.C b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/ParticleTrap/ParticleTrap.C index 73b3deab63b..e0c5c2e462d 100644 --- a/src/lagrangian/intermediate/submodels/CloudFunctionObjects/ParticleTrap/ParticleTrap.C +++ b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/ParticleTrap/ParticleTrap.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. @@ -41,7 +42,7 @@ Foam::ParticleTrap<CloudType>::ParticleTrap CloudFunctionObject<CloudType>(dict, owner, modelName, typeName), alphaName_ ( - this->coeffDict().template lookupOrDefault<word>("alpha", "alpha") + this->coeffDict().template getOrDefault<word>("alpha", "alpha") ), alphaPtr_(nullptr), gradAlphaPtr_(nullptr), diff --git a/src/lagrangian/intermediate/submodels/CloudFunctionObjects/PatchCollisionDensity/PatchCollisionDensity.C b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/PatchCollisionDensity/PatchCollisionDensity.C index b22c607f827..9b7665d7c17 100644 --- a/src/lagrangian/intermediate/submodels/CloudFunctionObjects/PatchCollisionDensity/PatchCollisionDensity.C +++ b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/PatchCollisionDensity/PatchCollisionDensity.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2018 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -85,7 +86,7 @@ Foam::PatchCollisionDensity<CloudType>::PatchCollisionDensity ) : CloudFunctionObject<CloudType>(dict, owner, modelName, typeName), - minSpeed_(dict.lookupOrDefault<scalar>("minSpeed", -1)), + minSpeed_(dict.getOrDefault<scalar>("minSpeed", -1)), collisionDensity_ ( this->owner().mesh().boundary(), diff --git a/src/lagrangian/intermediate/submodels/HeterogeneousReactingModel/HeterogeneousReactingModel/HeterogeneousReactingModel.C b/src/lagrangian/intermediate/submodels/HeterogeneousReactingModel/HeterogeneousReactingModel/HeterogeneousReactingModel.C index 31f421530e7..121ed5e2ef4 100644 --- a/src/lagrangian/intermediate/submodels/HeterogeneousReactingModel/HeterogeneousReactingModel/HeterogeneousReactingModel.C +++ b/src/lagrangian/intermediate/submodels/HeterogeneousReactingModel/HeterogeneousReactingModel/HeterogeneousReactingModel.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. @@ -51,7 +51,7 @@ Foam::HeterogeneousReactingModel<CloudType>::HeterogeneousReactingModel : CloudSubModelBase<CloudType>(owner, dict, typeName, type), dMass_(0.0), - nF_(this->coeffDict().template lookupOrDefault<label>("nF", 1)) + nF_(this->coeffDict().template getOrDefault<label>("nF", 1)) {} diff --git a/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/PairCollision/PairCollision.C b/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/PairCollision/PairCollision.C index a053a2ff3b5..a126b8d7931 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/PairCollision/PairCollision.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/PairCollision/PairCollision.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2017 OpenFOAM Foundation - Copyright (C) 2019 OpenCFD Ltd. + Copyright (C) 2019-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -547,12 +547,12 @@ Foam::PairCollision<CloudType>::PairCollision ( owner.mesh(), this->coeffDict().getScalar("maxInteractionDistance"), - this->coeffDict().lookupOrDefault + this->coeffDict().getOrDefault ( "writeReferredParticleCloud", false ), - this->coeffDict().lookupOrDefault("U", word("U")) + this->coeffDict().template getOrDefault<word>("U", "U") ) {} diff --git a/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/PairCollision/PairModel/PairModel/PairModel.C b/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/PairCollision/PairModel/PairModel/PairModel.C index ef40aca6b6a..62d0eb6c301 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/PairCollision/PairModel/PairModel/PairModel.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/PairCollision/PairModel/PairModel/PairModel.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011 OpenFOAM Foundation - Copyright (C) 2018 OpenCFD Ltd. + Copyright (C) 2018-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -43,7 +43,7 @@ Foam::PairModel<CloudType>::PairModel coeffDict_(dict.subDict(type + "Coeffs")), forceRampTime_ ( - this->coeffDict().template lookupOrDefault<scalar>("forceRampTime", -1) + this->coeffDict().template getOrDefault<scalar>("forceRampTime", -1) ) {} diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InflationInjection/InflationInjection.C b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InflationInjection/InflationInjection.C index e09c31b83d2..fa23c0c8eda 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InflationInjection/InflationInjection.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InflationInjection/InflationInjection.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2017 OpenFOAM Foundation - Copyright (C) 2015-2019 OpenCFD Ltd. + Copyright (C) 2015-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -71,7 +71,7 @@ Foam::InflationInjection<CloudType>::InflationInjection newParticles_(), volumeAccumulator_(0.0), fraction_(1.0), - selfSeed_(this->coeffDict().lookupOrDefault("selfSeed", false)), + selfSeed_(this->coeffDict().getOrDefault("selfSeed", false)), dSeed_(SMALL), sizeDistribution_ ( diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectedParticleDistributionInjection/InjectedParticleDistributionInjection.C b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectedParticleDistributionInjection/InjectedParticleDistributionInjection.C index 17f8907315b..5dadeb83e6b 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectedParticleDistributionInjection/InjectedParticleDistributionInjection.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectedParticleDistributionInjection/InjectedParticleDistributionInjection.C @@ -5,7 +5,7 @@ \\ / A nd | www.openfoam.com \\/ M anipulation | ------------------------------------------------------------------------------- - Copyright (C) 2015-2019 OpenCFD Ltd. + Copyright (C) 2015-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -259,7 +259,7 @@ InjectedParticleDistributionInjection ), resampleSize_ ( - this->coeffDict().lookupOrDefault("resampleSize", label(100)) + this->coeffDict().getOrDefault("resampleSize", label(100)) ), applyDistributionMassTotal_ ( @@ -267,7 +267,7 @@ InjectedParticleDistributionInjection ), ignoreOutOfBounds_ ( - this->coeffDict().lookupOrDefault("ignoreOutOfBounds", false) + this->coeffDict().getOrDefault("ignoreOutOfBounds", false) ), nParcelsInjected_(this->parcelsAddedTotal()), nParcelsInjected0_(0), diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectedParticleInjection/InjectedParticleInjection.C b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectedParticleInjection/InjectedParticleInjection.C index b878a4de004..38c0713a66d 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectedParticleInjection/InjectedParticleInjection.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectedParticleInjection/InjectedParticleInjection.C @@ -5,7 +5,7 @@ \\ / A nd | www.openfoam.com \\/ M anipulation | ------------------------------------------------------------------------------- - Copyright (C) 2015-2019 OpenCFD Ltd. + Copyright (C) 2015-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -161,7 +161,7 @@ Foam::InjectedParticleInjection<CloudType>::InjectedParticleInjection volume_(this->template getModelProperty<scalarList>("volume")), ignoreOutOfBounds_ ( - this->coeffDict().lookupOrDefault("ignoreOutOfBounds", false) + this->coeffDict().getOrDefault("ignoreOutOfBounds", false) ), currentParticlei_ ( diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModel.C b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModel.C index 99eb447e951..923af2c0023 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModel.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModel.C @@ -311,13 +311,13 @@ Foam::InjectionModel<CloudType>::InjectionModel timeStep0_(this->template getModelProperty<scalar>("timeStep0")), minParticlesPerParcel_ ( - this->coeffDict().lookupOrDefault("minParticlesPerParcel", scalar(1)) + this->coeffDict().getOrDefault("minParticlesPerParcel", scalar(1)) ), delayedVolume_(0.0), - injectorID_(this->coeffDict().lookupOrDefault("injectorID", -1)), + injectorID_(this->coeffDict().getOrDefault("injectorID", -1)), ignoreOutOfBounds_ ( - this->coeffDict().lookupOrDefault("ignoreOutOfBounds", false) + this->coeffDict().getOrDefault("ignoreOutOfBounds", false) ) { // Provide some info diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ManualInjection/ManualInjection.C b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ManualInjection/ManualInjection.C index 2f4c9d3ed0d..7d230ab7bfb 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ManualInjection/ManualInjection.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ManualInjection/ManualInjection.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2017 OpenFOAM Foundation - Copyright (C) 2015 OpenCFD Ltd. + Copyright (C) 2015-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -70,7 +70,7 @@ Foam::ManualInjection<CloudType>::ManualInjection ), ignoreOutOfBounds_ ( - this->coeffDict().lookupOrDefault("ignoreOutOfBounds", false) + this->coeffDict().getOrDefault("ignoreOutOfBounds", false) ) { updateMesh(); diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/PatchFlowRateInjection/PatchFlowRateInjection.C b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/PatchFlowRateInjection/PatchFlowRateInjection.C index 83e339bca66..fb55090cf42 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/PatchFlowRateInjection/PatchFlowRateInjection.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/PatchFlowRateInjection/PatchFlowRateInjection.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2017 OpenFOAM Foundation - Copyright (C) 2015-2019 OpenCFD Ltd. + Copyright (C) 2015-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -44,8 +44,8 @@ Foam::PatchFlowRateInjection<CloudType>::PatchFlowRateInjection : InjectionModel<CloudType>(dict, owner, modelName,typeName), patchInjectionBase(owner.mesh(), this->coeffDict().getWord("patch")), - phiName_(this->coeffDict().template lookupOrDefault<word>("phi", "phi")), - rhoName_(this->coeffDict().template lookupOrDefault<word>("rho", "rho")), + phiName_(this->coeffDict().template getOrDefault<word>("phi", "phi")), + rhoName_(this->coeffDict().template getOrDefault<word>("rho", "rho")), duration_(this->coeffDict().getScalar("duration")), concentration_ ( diff --git a/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/Lift/LiftForce/LiftForce.C b/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/Lift/LiftForce/LiftForce.C index 6c79bf6ce98..55b6478a79c 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/Lift/LiftForce/LiftForce.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/Lift/LiftForce/LiftForce.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. @@ -57,7 +58,7 @@ Foam::LiftForce<CloudType>::LiftForce ) : ParticleForce<CloudType>(owner, mesh, dict, forceType, true), - UName_(this->coeffs().template lookupOrDefault<word>("U", "U")), + UName_(this->coeffs().template getOrDefault<word>("U", "U")), curlUcInterpPtr_(nullptr) {} diff --git a/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/NonInertialFrame/NonInertialFrameForce.C b/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/NonInertialFrame/NonInertialFrameForce.C index 6417785b23d..050445ba6b4 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/NonInertialFrame/NonInertialFrameForce.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/NonInertialFrame/NonInertialFrameForce.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. @@ -41,7 +42,7 @@ Foam::NonInertialFrameForce<CloudType>::NonInertialFrameForce ParticleForce<CloudType>(owner, mesh, dict, typeName, true), WName_ ( - this->coeffs().template lookupOrDefault<word> + this->coeffs().template getOrDefault<word> ( "linearAcceleration", "linearAcceleration" @@ -50,7 +51,7 @@ Foam::NonInertialFrameForce<CloudType>::NonInertialFrameForce W_(Zero), omegaName_ ( - this->coeffs().template lookupOrDefault<word> + this->coeffs().template getOrDefault<word> ( "angularVelocity", "angularVelocity" @@ -59,7 +60,7 @@ Foam::NonInertialFrameForce<CloudType>::NonInertialFrameForce omega_(Zero), omegaDotName_ ( - this->coeffs().template lookupOrDefault<word> + this->coeffs().template getOrDefault<word> ( "angularAcceleration", "angularAcceleration" @@ -68,7 +69,7 @@ Foam::NonInertialFrameForce<CloudType>::NonInertialFrameForce omegaDot_(Zero), centreOfRotationName_ ( - this->coeffs().template lookupOrDefault<word> + this->coeffs().template getOrDefault<word> ( "centreOfRotation", "centreOfRotation" diff --git a/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/Paramagnetic/ParamagneticForce.C b/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/Paramagnetic/ParamagneticForce.C index 57dc40cce33..6a3c3727cc9 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/Paramagnetic/ParamagneticForce.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/Paramagnetic/ParamagneticForce.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. @@ -42,7 +43,7 @@ Foam::ParamagneticForce<CloudType>::ParamagneticForce ParticleForce<CloudType>(owner, mesh, dict, typeName, true), HdotGradHName_ ( - this->coeffs().template lookupOrDefault<word>("HdotGradH", "HdotGradH") + this->coeffs().template getOrDefault<word>("HdotGradH", "HdotGradH") ), HdotGradHInterpPtr_(nullptr), magneticSusceptibility_ diff --git a/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/PressureGradient/PressureGradientForce.C b/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/PressureGradient/PressureGradientForce.C index 4560da9ce9c..e0d0aa3bead 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/PressureGradient/PressureGradientForce.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/PressureGradient/PressureGradientForce.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. @@ -41,7 +42,7 @@ Foam::PressureGradientForce<CloudType>::PressureGradientForce ) : ParticleForce<CloudType>(owner, mesh, dict, forceType, true), - UName_(this->coeffs().template lookupOrDefault<word>("U", "U")), + UName_(this->coeffs().template getOrDefault<word>("U", "U")), DUcDtInterpPtr_(nullptr) {} diff --git a/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/LocalInteraction/LocalInteraction.C b/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/LocalInteraction/LocalInteraction.C index 948c1c4c49e..7b8b37f2b48 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/LocalInteraction/LocalInteraction.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/LocalInteraction/LocalInteraction.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2017 OpenFOAM Foundation - Copyright (C) 2015-2019 OpenCFD Ltd. + Copyright (C) 2015-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -64,13 +64,13 @@ Foam::LocalInteraction<CloudType>::LocalInteraction massEscape_(nEscape_.size()), nStick_(nEscape_.size()), massStick_(nEscape_.size()), - writeFields_(this->coeffDict().lookupOrDefault("writeFields", false)), + writeFields_(this->coeffDict().getOrDefault("writeFields", false)), injIdToIndex_(), massEscapePtr_(nullptr), massStickPtr_(nullptr) { const bool outputByInjectorId - = this->coeffDict().lookupOrDefault("outputByInjectorId", false); + = this->coeffDict().getOrDefault("outputByInjectorId", false); if (writeFields_) { diff --git a/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/LocalInteraction/patchInteractionData.C b/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/LocalInteraction/patchInteractionData.C index a31544e5297..a2f5686c78a 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/LocalInteraction/patchInteractionData.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/LocalInteraction/patchInteractionData.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -82,8 +83,8 @@ Foam::Istream& Foam::operator>> pid.patchName_ = dictEntry.keyword(); dict.readEntry("type", pid.interactionTypeName_); - pid.e_ = dict.lookupOrDefault<scalar>("e", 1.0); - pid.mu_ = dict.lookupOrDefault<scalar>("mu", 0.0); + pid.e_ = dict.getOrDefault<scalar>("e", 1); + pid.mu_ = dict.getOrDefault<scalar>("mu", 0); return is; } diff --git a/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/PatchInteractionModel/PatchInteractionModel.C b/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/PatchInteractionModel/PatchInteractionModel.C index 09925d58b06..42774cfee13 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/PatchInteractionModel/PatchInteractionModel.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/PatchInteractionModel/PatchInteractionModel.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2016 OpenFOAM Foundation - Copyright (C) 2016-2019 OpenCFD Ltd. + Copyright (C) 2016-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -158,7 +158,7 @@ Foam::PatchInteractionModel<CloudType>::PatchInteractionModel this->coeffDict(), false // Do not write by default ), - UName_(this->coeffDict().lookupOrDefault("U", word("U"))), + UName_(this->coeffDict().template getOrDefault<word>("U", "U")), escapedParcels_(0), escapedMass_(0.0) {} diff --git a/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/StandardWallInteraction/StandardWallInteraction.C b/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/StandardWallInteraction/StandardWallInteraction.C index 76163908dcd..a7cc6821f23 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/StandardWallInteraction/StandardWallInteraction.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/StandardWallInteraction/StandardWallInteraction.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2017 OpenFOAM Foundation - Copyright (C) 2015-2019 OpenCFD Ltd. + Copyright (C) 2015-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -75,7 +75,7 @@ Foam::StandardWallInteraction<CloudType>::StandardWallInteraction injIdToIndex_() { const bool outputByInjectorId = - this->coeffDict().lookupOrDefault("outputByInjectorId", false); + this->coeffDict().getOrDefault("outputByInjectorId", false); switch (interactionType_) { @@ -93,8 +93,8 @@ Foam::StandardWallInteraction<CloudType>::StandardWallInteraction } case PatchInteractionModel<CloudType>::itRebound: { - e_ = this->coeffDict().lookupOrDefault("e", 1.0); - mu_ = this->coeffDict().lookupOrDefault("mu", 0.0); + e_ = this->coeffDict().getOrDefault("e", 1.0); + mu_ = this->coeffDict().getOrDefault("mu", 0.0); break; } default: diff --git a/src/lagrangian/intermediate/submodels/Kinematic/SurfaceFilmModel/SurfaceFilmModel/SurfaceFilmModel.C b/src/lagrangian/intermediate/submodels/Kinematic/SurfaceFilmModel/SurfaceFilmModel/SurfaceFilmModel.C index 875d6b02108..5ef693076de 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/SurfaceFilmModel/SurfaceFilmModel/SurfaceFilmModel.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/SurfaceFilmModel/SurfaceFilmModel/SurfaceFilmModel.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. @@ -61,7 +62,7 @@ Foam::SurfaceFilmModel<CloudType>::SurfaceFilmModel g_(owner.g()), ejectedParcelType_ ( - this->coeffDict().lookupOrDefault("ejectedParcelType", -1) + this->coeffDict().getOrDefault("ejectedParcelType", -1) ), massParcelPatch_(0), diameterParcelPatch_(0), diff --git a/src/lagrangian/intermediate/submodels/ReactingMultiphase/StochasticCollision/SuppressionCollision/SuppressionCollision.C b/src/lagrangian/intermediate/submodels/ReactingMultiphase/StochasticCollision/SuppressionCollision/SuppressionCollision.C index d983f08537c..53d29080ea1 100644 --- a/src/lagrangian/intermediate/submodels/ReactingMultiphase/StochasticCollision/SuppressionCollision/SuppressionCollision.C +++ b/src/lagrangian/intermediate/submodels/ReactingMultiphase/StochasticCollision/SuppressionCollision/SuppressionCollision.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2013-2017 OpenFOAM Foundation - Copyright (C) 2019 OpenCFD Ltd. + Copyright (C) 2019-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -75,7 +75,7 @@ Foam::SuppressionCollision<CloudType>::SuppressionCollision suppressionCloud_(this->coeffDict().lookup("suppressionCloud")), suppressedParcelType_ ( - this->coeffDict().lookupOrDefault("suppressedParcelType", -1) + this->coeffDict().getOrDefault("suppressedParcelType", -1) ) {} diff --git a/src/lagrangian/intermediate/submodels/Thermodynamic/SurfaceFilmModel/ThermoSurfaceFilm/ThermoSurfaceFilm.C b/src/lagrangian/intermediate/submodels/Thermodynamic/SurfaceFilmModel/ThermoSurfaceFilm/ThermoSurfaceFilm.C index af99aae2a9a..d45be7e0427 100644 --- a/src/lagrangian/intermediate/submodels/Thermodynamic/SurfaceFilmModel/ThermoSurfaceFilm/ThermoSurfaceFilm.C +++ b/src/lagrangian/intermediate/submodels/Thermodynamic/SurfaceFilmModel/ThermoSurfaceFilm/ThermoSurfaceFilm.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2017 OpenFOAM Foundation - Copyright (C) 2019 OpenCFD Ltd. + Copyright (C) 2019-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -509,9 +509,9 @@ Foam::ThermoSurfaceFilm<CloudType>::ThermoSurfaceFilm { this->coeffDict().readEntry("deltaWet", deltaWet_); splashParcelType_ = - this->coeffDict().lookupOrDefault("splashParcelType", -1); + this->coeffDict().getOrDefault("splashParcelType", -1); parcelsPerSplash_ = - this->coeffDict().lookupOrDefault("parcelsPerSplash", 2); + this->coeffDict().getOrDefault("parcelsPerSplash", 2); this->coeffDict().readEntry("Adry", Adry_); this->coeffDict().readEntry("Awet", Awet_); this->coeffDict().readEntry("Cf", Cf_); diff --git a/src/lagrangian/spray/submodels/BreakupModel/BreakupModel/BreakupModel.C b/src/lagrangian/spray/submodels/BreakupModel/BreakupModel/BreakupModel.C index b4b47d05b56..027e1c6e778 100644 --- a/src/lagrangian/spray/submodels/BreakupModel/BreakupModel/BreakupModel.C +++ b/src/lagrangian/spray/submodels/BreakupModel/BreakupModel/BreakupModel.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2015 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -72,8 +73,8 @@ Foam::BreakupModel<CloudType>::BreakupModel : CloudSubModelBase<CloudType>(owner, dict, typeName, type), solveOscillationEq_(solveOscillationEq), - y0_(this->coeffDict().template lookupOrDefault<scalar>("y0", 0)), - yDot0_(this->coeffDict().template lookupOrDefault<scalar>("yDot0", 0)), + y0_(this->coeffDict().template getOrDefault<scalar>("y0", 0)), + yDot0_(this->coeffDict().template getOrDefault<scalar>("yDot0", 0)), TABComega_(8), TABCmu_(5), TABtwoWeCrit_(12) diff --git a/src/lumpedPointMotion/movement/lumpedPointMovement.C b/src/lumpedPointMotion/movement/lumpedPointMovement.C index 36ec3d2dabf..c5f485b9461 100644 --- a/src/lumpedPointMotion/movement/lumpedPointMovement.C +++ b/src/lumpedPointMotion/movement/lumpedPointMovement.C @@ -5,7 +5,7 @@ \\ / A nd | www.openfoam.com \\/ M anipulation | ------------------------------------------------------------------------------- - Copyright (C) 2016-2018 OpenCFD Ltd. + Copyright (C) 2016-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -202,7 +202,7 @@ Foam::lumpedPointMovement::lumpedPointMovement relax_(1), interpolationScheme_ ( - dict.lookupOrDefault<word> + dict.getOrDefault<word> ( "interpolationScheme", linearInterpolationWeights::typeName @@ -279,7 +279,7 @@ void Foam::lumpedPointMovement::readDict(const dictionary& dict) const dictionary& commDict = dict.subDict("communication"); coupler_.readDict(commDict); - // TODO: calcFrequency_ = dict.lookupOrDefault("calcFrequency", 1); + // TODO: calcFrequency_ = dict.getOrDefault("calcFrequency", 1); commDict.readEntry("inputName", inputName_); commDict.readEntry("outputName", outputName_); @@ -483,9 +483,9 @@ bool Foam::lumpedPointMovement::forcesAndMoments const polyBoundaryMesh& patches = pmesh.boundaryMesh(); - const word pName(forcesDict_.lookupOrDefault<word>("p", "p")); - scalar pRef = forcesDict_.lookupOrDefault<scalar>("pRef", 0.0); - scalar rhoRef = forcesDict_.lookupOrDefault<scalar>("rhoRef", 1.0); + const word pName(forcesDict_.getOrDefault<word>("p", "p")); + scalar pRef = forcesDict_.getOrDefault<scalar>("pRef", 0); + scalar rhoRef = forcesDict_.getOrDefault<scalar>("rhoRef", 1); // Calculated force per patch - cache diff --git a/src/lumpedPointMotion/state/lumpedPointState.C b/src/lumpedPointMotion/state/lumpedPointState.C index ad966bc61fe..2beb0630a7f 100644 --- a/src/lumpedPointMotion/state/lumpedPointState.C +++ b/src/lumpedPointMotion/state/lumpedPointState.C @@ -5,7 +5,7 @@ \\ / A nd | www.openfoam.com \\/ M anipulation | ------------------------------------------------------------------------------- - Copyright (C) 2016-2019 OpenCFD Ltd. + Copyright (C) 2016-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -94,7 +94,7 @@ void Foam::lumpedPointState::readDict(const dictionary& dict) dict, quaternion::eulerOrder::ZXZ ); - degrees_ = dict.lookupOrDefault("degrees", false); + degrees_ = dict.getOrDefault("degrees", false); deleteDemandDrivenData(rotationPtr_); } diff --git a/src/mesh/extrudeModel/extrudeModel/extrudeModel.C b/src/mesh/extrudeModel/extrudeModel/extrudeModel.C index d89633a9b85..bea9f252415 100644 --- a/src/mesh/extrudeModel/extrudeModel/extrudeModel.C +++ b/src/mesh/extrudeModel/extrudeModel/extrudeModel.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. @@ -43,8 +44,8 @@ Foam::extrudeModel::extrudeModel const dictionary& dict ) : - nLayers_(dict.lookupOrDefault<label>("nLayers", 1)), - expansionRatio_(dict.lookupOrDefault<scalar>("expansionRatio", 1)), + nLayers_(dict.getOrDefault<label>("nLayers", 1)), + expansionRatio_(dict.getOrDefault<scalar>("expansionRatio", 1)), coeffDict_(dict.optionalSubDict(modelType + "Coeffs")) { DebugInfo diff --git a/src/mesh/extrudeModel/linearNormal/linearNormal.C b/src/mesh/extrudeModel/linearNormal/linearNormal.C index 788a7225123..a2177674993 100644 --- a/src/mesh/extrudeModel/linearNormal/linearNormal.C +++ b/src/mesh/extrudeModel/linearNormal/linearNormal.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2015 OpenFOAM Foundation - Copyright (C) 2019 OpenCFD Ltd. + Copyright (C) 2019-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -51,7 +51,7 @@ linearNormal::linearNormal(const dictionary& dict) thickness_(coeffDict_.get<scalar>("thickness")), firstCellThickness_ ( - coeffDict_.lookupOrDefault<scalar>("firstCellThickness", 0) + coeffDict_.getOrDefault<scalar>("firstCellThickness", 0) ), layerPoints_(nLayers_) { diff --git a/src/mesh/extrudeModel/linearRadial/linearRadial.C b/src/mesh/extrudeModel/linearRadial/linearRadial.C index 9d37d0e672b..ae0defba123 100644 --- a/src/mesh/extrudeModel/linearRadial/linearRadial.C +++ b/src/mesh/extrudeModel/linearRadial/linearRadial.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -46,7 +47,7 @@ linearRadial::linearRadial(const dictionary& dict) : extrudeModel(typeName, dict), R_(coeffDict_.get<scalar>("R")), - Rsurface_(coeffDict_.lookupOrDefault<scalar>("Rsurface", -1)) + Rsurface_(coeffDict_.getOrDefault<scalar>("Rsurface", -1)) {} diff --git a/src/mesh/extrudeModel/offsetSurface/offsetSurface.C b/src/mesh/extrudeModel/offsetSurface/offsetSurface.C index 35521bf30da..1665ca8659d 100644 --- a/src/mesh/extrudeModel/offsetSurface/offsetSurface.C +++ b/src/mesh/extrudeModel/offsetSurface/offsetSurface.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2014 OpenFOAM Foundation - Copyright (C) 2015-2019 OpenCFD Ltd. + Copyright (C) 2015-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -51,7 +51,7 @@ addToRunTimeSelectionTable(extrudeModel, offsetSurface, dictionary); offsetSurface::offsetSurface(const dictionary& dict) : extrudeModel(typeName, dict), - project_(coeffDict_.lookupOrDefault("project", false)) + project_(coeffDict_.getOrDefault("project", false)) { // Read surface fileName baseName(coeffDict_.get<fileName>("baseSurface").expand()); diff --git a/src/mesh/snappyHexMesh/externalDisplacementMeshMover/medialAxisMeshMover.C b/src/mesh/snappyHexMesh/externalDisplacementMeshMover/medialAxisMeshMover.C index 07963d45a67..86d8d81f6fe 100644 --- a/src/mesh/snappyHexMesh/externalDisplacementMeshMover/medialAxisMeshMover.C +++ b/src/mesh/snappyHexMesh/externalDisplacementMeshMover/medialAxisMeshMover.C @@ -178,11 +178,9 @@ void Foam::medialAxisMeshMover::update(const dictionary& coeffDict) ); //- When to slip along wall - const scalar slipFeatureAngle = + const scalar slipFeatureAngle ( - coeffDict.found("slipFeatureAngle") - ? coeffDict.get<scalar>("slipFeatureAngle") - : 0.5*featureAngle + coeffDict.getOrDefault<scalar>("slipFeatureAngle", (0.5*featureAngle)) ); //- Smooth internal normals @@ -192,13 +190,13 @@ void Foam::medialAxisMeshMover::update(const dictionary& coeffDict) ); //- Number of edges walking out - const label nMedialAxisIter = coeffDict.lookupOrDefault<label> + const label nMedialAxisIter = coeffDict.getOrDefault<label> ( "nMedialAxisIter", mesh().globalData().nTotalPoints() ); - const bool disableWallEdges = coeffDict.lookupOrDefault<bool> + const bool disableWallEdges = coeffDict.getOrDefault<bool> ( "disableWallEdges", false @@ -1386,7 +1384,7 @@ void Foam::medialAxisMeshMover::calculateDisplacement //- (lambda-mu) smoothing of internal displacement const label nSmoothDisplacement = - coeffDict.lookupOrDefault("nSmoothDisplacement", 0); + coeffDict.getOrDefault("nSmoothDisplacement", 0); //- Layer thickness too big const scalar maxThicknessToMedialRatio = @@ -1396,7 +1394,7 @@ void Foam::medialAxisMeshMover::calculateDisplacement const scalar featureAngle = coeffDict.get<scalar>("featureAngle"); //- Stop layer growth where mesh wraps around sharp edge - scalar layerTerminationAngle = coeffDict.lookupOrDefault<scalar> + scalar layerTerminationAngle = coeffDict.getOrDefault<scalar> ( "layerTerminationAngle", 0.5*featureAngle @@ -1408,14 +1406,14 @@ void Foam::medialAxisMeshMover::calculateDisplacement coeffDict.get<label>("nSmoothThickness"); //- Number of edges walking out - const label nMedialAxisIter = coeffDict.lookupOrDefault<label> + const label nMedialAxisIter = coeffDict.getOrDefault<label> ( "nMedialAxisIter", mesh().globalData().nTotalPoints() ); //- Use strict extrusionIsland detection - const bool detectExtrusionIsland = coeffDict.lookupOrDefault + const bool detectExtrusionIsland = coeffDict.getOrDefault ( "detectExtrusionIsland", false diff --git a/src/mesh/snappyHexMesh/meshRefinement/meshRefinementProblemCells.C b/src/mesh/snappyHexMesh/meshRefinement/meshRefinementProblemCells.C index 459dc9a81d9..321e7009095 100644 --- a/src/mesh/snappyHexMesh/meshRefinement/meshRefinementProblemCells.C +++ b/src/mesh/snappyHexMesh/meshRefinement/meshRefinementProblemCells.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2015 OpenFOAM Foundation - Copyright (C) 2015-2019 OpenCFD Ltd. + Copyright (C) 2015-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -534,7 +534,7 @@ Foam::labelList Foam::meshRefinement::markFacesOnProblemCells // Collapse checking parameters const scalar volFraction = - motionDict.lookupOrDefault<scalar>("minVolCollapseRatio", -1); + motionDict.getOrDefault<scalar>("minVolCollapseRatio", -1); const bool checkCollapse = (volFraction > 0); scalar minArea = -1; diff --git a/src/mesh/snappyHexMesh/refinementSurfaces/refinementSurfaces.C b/src/mesh/snappyHexMesh/refinementSurfaces/refinementSurfaces.C index e8d81b3e5cc..44bbbbdb673 100644 --- a/src/mesh/snappyHexMesh/refinementSurfaces/refinementSurfaces.C +++ b/src/mesh/snappyHexMesh/refinementSurfaces/refinementSurfaces.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2015 OpenFOAM Foundation - Copyright (C) 2015-2019 OpenCFD Ltd. + Copyright (C) 2015-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -249,7 +249,7 @@ Foam::refinementSurfaces::refinementSurfaces globalMinLevel[surfI] = refLevel[0]; globalMaxLevel[surfI] = refLevel[1]; - globalLevelIncr[surfI] = dict.lookupOrDefault + globalLevelIncr[surfI] = dict.getOrDefault ( "gapLevelIncrement", gapLevelIncrement @@ -275,7 +275,7 @@ Foam::refinementSurfaces::refinementSurfaces // Optional gapLevel specification - globalGapLevel[surfI] = dict.lookupOrDefault + globalGapLevel[surfI] = dict.getOrDefault ( "gapLevel", nullGapLevel @@ -358,7 +358,7 @@ Foam::refinementSurfaces::refinementSurfaces regionMinLevel[surfI].insert(regionI, refLevel[0]); regionMaxLevel[surfI].insert(regionI, refLevel[1]); - label levelIncr = regionDict.lookupOrDefault + label levelIncr = regionDict.getOrDefault ( "gapLevelIncrement", gapLevelIncrement @@ -388,7 +388,7 @@ Foam::refinementSurfaces::refinementSurfaces FixedList<label, 3> gapSpec ( - regionDict.lookupOrDefault + regionDict.getOrDefault ( "gapLevel", nullGapLevel diff --git a/src/mesh/snappyHexMesh/shellSurfaces/shellSurfaces.C b/src/mesh/snappyHexMesh/shellSurfaces/shellSurfaces.C index 43d478df7e2..711071da652 100644 --- a/src/mesh/snappyHexMesh/shellSurfaces/shellSurfaces.C +++ b/src/mesh/snappyHexMesh/shellSurfaces/shellSurfaces.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2015 OpenFOAM Foundation - Copyright (C) 2015-2018 OpenCFD Ltd. + Copyright (C) 2015-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -692,7 +692,7 @@ Foam::shellSurfaces::shellSurfaces nSmoothExpansion_[shellI] = 0; nSmoothPosition_[shellI] = 0; smoothDirection_[shellI] = - dict.lookupOrDefault("smoothDirection", vector::zero); + dict.getOrDefault("smoothDirection", vector::zero); if (smoothDirection_[shellI] != vector::zero) { @@ -711,7 +711,7 @@ Foam::shellSurfaces::shellSurfaces FixedList<label, 3> gapSpec ( - dict.lookupOrDefault + dict.getOrDefault ( "gapLevel", nullGapLevel @@ -741,7 +741,7 @@ Foam::shellSurfaces::shellSurfaces ); FixedList<label, 3> gapSpec ( - regionDict.lookupOrDefault + regionDict.getOrDefault ( "gapLevel", nullGapLevel diff --git a/src/mesh/snappyHexMesh/snappyHexMeshDriver/layerParameters/layerParameters.C b/src/mesh/snappyHexMesh/snappyHexMeshDriver/layerParameters/layerParameters.C index b4953b9c54a..6459337f47a 100644 --- a/src/mesh/snappyHexMesh/snappyHexMeshDriver/layerParameters/layerParameters.C +++ b/src/mesh/snappyHexMesh/snappyHexMeshDriver/layerParameters/layerParameters.C @@ -121,7 +121,7 @@ Foam::layerParameters::layerParameters featureAngle_(meshRefinement::get<scalar>(dict, "featureAngle", dryRun)), mergePatchFacesAngle_ ( - dict.lookupOrDefault<scalar> + dict.getOrDefault<scalar> ( "mergePatchFacesAngle", featureAngle_ @@ -129,7 +129,7 @@ Foam::layerParameters::layerParameters ), concaveAngle_ ( - dict.lookupOrDefault("concaveAngle", defaultConcaveAngle) + dict.getOrDefault<scalar>("concaveAngle", defaultConcaveAngle) ), nGrow_(meshRefinement::get<label>(dict, "nGrow", dryRun)), maxFaceThicknessRatio_ @@ -144,7 +144,7 @@ Foam::layerParameters::layerParameters nRelaxedIter_(labelMax), meshShrinker_ ( - dict.lookupOrDefault + dict.getOrDefault ( "meshShrinker", medialAxisMeshMover::typeName diff --git a/src/mesh/snappyHexMesh/snappyHexMeshDriver/refinementParameters/refinementParameters.C b/src/mesh/snappyHexMesh/snappyHexMeshDriver/refinementParameters/refinementParameters.C index 276cb3f915a..47c2bae13ad 100644 --- a/src/mesh/snappyHexMesh/snappyHexMeshDriver/refinementParameters/refinementParameters.C +++ b/src/mesh/snappyHexMesh/snappyHexMeshDriver/refinementParameters/refinementParameters.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2015 OpenFOAM Foundation - Copyright (C) 2015-2019 OpenCFD Ltd. + Copyright (C) 2015-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -56,7 +56,7 @@ Foam::refinementParameters::refinementParameters ), planarAngle_ ( - dict.lookupOrDefault + dict.getOrDefault ( "planarAngle", dict.get<scalar>("resolveFeatureAngle") @@ -68,7 +68,7 @@ Foam::refinementParameters::refinementParameters ), locationsOutsideMesh_ ( - dict.lookupOrDefault + dict.getOrDefault ( "locationsOutsideMesh", pointField(0) @@ -81,19 +81,19 @@ Foam::refinementParameters::refinementParameters ), useTopologicalSnapDetection_ ( - dict.lookupOrDefault("useTopologicalSnapDetection", true) + dict.getOrDefault("useTopologicalSnapDetection", true) ), - maxLoadUnbalance_(dict.lookupOrDefault<scalar>("maxLoadUnbalance", 0)), + maxLoadUnbalance_(dict.getOrDefault<scalar>("maxLoadUnbalance", 0)), handleSnapProblems_ ( - dict.lookupOrDefault<Switch>("handleSnapProblems", true) + dict.getOrDefault<Switch>("handleSnapProblems", true) ), interfaceRefine_ ( - dict.lookupOrDefault<Switch>("interfaceRefine", true) + dict.getOrDefault<Switch>("interfaceRefine", true) ), - nErodeCellZone_(dict.lookupOrDefault<label>("nCellZoneErodeIter", 0)), - nFilterIter_(dict.lookupOrDefault<label>("nFilterIter", 2)), + nErodeCellZone_(dict.getOrDefault<label>("nCellZoneErodeIter", 0)), + nFilterIter_(dict.getOrDefault<label>("nFilterIter", 2)), dryRun_(dryRun) { point locationInMesh; diff --git a/src/mesh/snappyHexMesh/snappyHexMeshDriver/snapParameters/snapParameters.C b/src/mesh/snappyHexMesh/snappyHexMeshDriver/snapParameters/snapParameters.C index a4af98144f1..d5584be55e3 100644 --- a/src/mesh/snappyHexMesh/snappyHexMeshDriver/snapParameters/snapParameters.C +++ b/src/mesh/snappyHexMesh/snappyHexMeshDriver/snapParameters/snapParameters.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2015 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -37,7 +38,7 @@ Foam::snapParameters::snapParameters(const dictionary& dict, const bool dryRun) ( meshRefinement::get<label>(dict, "nSmoothPatch", dryRun) ), - nSmoothInternal_(dict.lookupOrDefault("nSmoothInternal", 0)), + nSmoothInternal_(dict.getOrDefault<label>("nSmoothInternal", 0)), snapTol_ ( meshRefinement::get<scalar>(dict, "tolerance", dryRun) @@ -50,32 +51,32 @@ Foam::snapParameters::snapParameters(const dictionary& dict, const bool dryRun) ( meshRefinement::get<label>(dict, "nRelaxIter", dryRun) ), - nFeatureSnap_(dict.lookupOrDefault("nFeatureSnapIter", -1)), - explicitFeatureSnap_(dict.lookupOrDefault("explicitFeatureSnap", true)), - implicitFeatureSnap_(dict.lookupOrDefault("implicitFeatureSnap", false)), + nFeatureSnap_(dict.getOrDefault("nFeatureSnapIter", -1)), + explicitFeatureSnap_(dict.getOrDefault("explicitFeatureSnap", true)), + implicitFeatureSnap_(dict.getOrDefault("implicitFeatureSnap", false)), multiRegionFeatureSnap_ ( - dict.lookupOrDefault("multiRegionFeatureSnap", false) + dict.getOrDefault("multiRegionFeatureSnap", false) ), detectNearSurfacesSnap_ ( - dict.lookupOrDefault("detectNearSurfacesSnap", true) + dict.getOrDefault("detectNearSurfacesSnap", true) ), strictRegionSnap_ ( - dict.lookupOrDefault("strictRegionSnap", false) + dict.getOrDefault("strictRegionSnap", false) ), - detectBaffles_(dict.lookupOrDefault("detectBaffles", true)), - baffleFeaturePoints_(dict.lookupOrDefault("baffleFeaturePoints", false)), - releasePoints_(dict.lookupOrDefault("releasePoints", false)), - stringFeatures_(dict.lookupOrDefault("stringFeatures", true)), - avoidDiagonal_(dict.lookupOrDefault("avoidDiagonal", false)), + detectBaffles_(dict.getOrDefault("detectBaffles", true)), + baffleFeaturePoints_(dict.getOrDefault("baffleFeaturePoints", false)), + releasePoints_(dict.getOrDefault("releasePoints", false)), + stringFeatures_(dict.getOrDefault("stringFeatures", true)), + avoidDiagonal_(dict.getOrDefault("avoidDiagonal", false)), nFaceSplitInterval_ ( - dict.lookupOrDefault("nFaceSplitInterval", labelMin) + dict.getOrDefault("nFaceSplitInterval", labelMin) ), - concaveAngle_(dict.lookupOrDefault("concaveAngle", 45)), - minAreaRatio_(dict.lookupOrDefault("minAreaRatio", 0.3)), + concaveAngle_(dict.getOrDefault<scalar>("concaveAngle", 45)), + minAreaRatio_(dict.getOrDefault<scalar>("minAreaRatio", 0.3)), dryRun_(dryRun) {} diff --git a/src/meshTools/AMIInterpolation/patches/cyclicAMI/cyclicAMIPolyPatch/cyclicAMIPolyPatch.C b/src/meshTools/AMIInterpolation/patches/cyclicAMI/cyclicAMIPolyPatch/cyclicAMIPolyPatch.C index 7180f7588a7..51f14ccb5ed 100644 --- a/src/meshTools/AMIInterpolation/patches/cyclicAMI/cyclicAMIPolyPatch/cyclicAMIPolyPatch.C +++ b/src/meshTools/AMIInterpolation/patches/cyclicAMI/cyclicAMIPolyPatch/cyclicAMIPolyPatch.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2016 OpenFOAM Foundation - Copyright (C) 2016-2018 OpenCFD Ltd. + Copyright (C) 2016-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -518,7 +518,7 @@ Foam::cyclicAMIPolyPatch::cyclicAMIPolyPatch ) : coupledPolyPatch(name, dict, index, bm, patchType), - nbrPatchName_(dict.lookupOrDefault<word>("neighbourPatch", "")), + nbrPatchName_(dict.getOrDefault<word>("neighbourPatch", "")), coupleGroup_(dict), nbrPatchID_(-1), rotationAxis_(Zero), @@ -531,7 +531,7 @@ Foam::cyclicAMIPolyPatch::cyclicAMIPolyPatch ( AMIPatchToPatchInterpolation::interpolationMethodNames_ [ - dict.lookupOrDefault + dict.getOrDefault ( "method", AMIPatchToPatchInterpolation::interpolationMethodNames_ @@ -541,9 +541,9 @@ Foam::cyclicAMIPolyPatch::cyclicAMIPolyPatch ) ] ), - AMIReverse_(dict.lookupOrDefault("flipNormals", false)), + AMIReverse_(dict.getOrDefault("flipNormals", false)), AMIRequireMatch_(true), - AMILowWeightCorrection_(dict.lookupOrDefault("lowWeightCorrection", -1.0)), + AMILowWeightCorrection_(dict.getOrDefault("lowWeightCorrection", -1.0)), surfPtr_(nullptr), surfDict_(dict.subOrEmptyDict("surface")) { @@ -764,11 +764,11 @@ const Foam::cyclicAMIPolyPatch& Foam::cyclicAMIPolyPatch::neighbPatch() const const Foam::autoPtr<Foam::searchableSurface>& Foam::cyclicAMIPolyPatch::surfPtr() const { - const word surfType(surfDict_.lookupOrDefault<word>("type", "none")); + const word surfType(surfDict_.getOrDefault<word>("type", "none")); if (!surfPtr_.valid() && owner() && surfType != "none") { - word surfName(surfDict_.lookupOrDefault("name", name())); + word surfName(surfDict_.getOrDefault("name", name())); const polyMesh& mesh = boundaryMesh().mesh(); diff --git a/src/meshTools/AMIInterpolation/patches/cyclicPeriodicAMI/cyclicPeriodicAMIPolyPatch/cyclicPeriodicAMIPolyPatch.C b/src/meshTools/AMIInterpolation/patches/cyclicPeriodicAMI/cyclicPeriodicAMIPolyPatch/cyclicPeriodicAMIPolyPatch.C index 2442caf86f3..28c6b98f6d4 100644 --- a/src/meshTools/AMIInterpolation/patches/cyclicPeriodicAMI/cyclicPeriodicAMIPolyPatch/cyclicPeriodicAMIPolyPatch.C +++ b/src/meshTools/AMIInterpolation/patches/cyclicPeriodicAMI/cyclicPeriodicAMIPolyPatch/cyclicPeriodicAMIPolyPatch.C @@ -598,9 +598,9 @@ Foam::cyclicPeriodicAMIPolyPatch::cyclicPeriodicAMIPolyPatch cyclicAMIPolyPatch(name, dict, index, bm, patchType), periodicPatchName_(dict.lookup("periodicPatch")), periodicPatchID_(-1), - nTransforms_(dict.lookupOrDefault<label>("nTransforms", 0)), - nSectors_(dict.lookupOrDefault<label>("nSectors", 0)), - maxIter_(dict.lookupOrDefault<label>("maxIter", 36)) + nTransforms_(dict.getOrDefault<label>("nTransforms", 0)), + nSectors_(dict.getOrDefault<label>("nSectors", 0)), + maxIter_(dict.getOrDefault<label>("maxIter", 36)) {} diff --git a/src/meshTools/PatchFunction1/MappedFile/MappedFile.C b/src/meshTools/PatchFunction1/MappedFile/MappedFile.C index afa2db529da..8187a295b56 100644 --- a/src/meshTools/PatchFunction1/MappedFile/MappedFile.C +++ b/src/meshTools/PatchFunction1/MappedFile/MappedFile.C @@ -44,12 +44,12 @@ Foam::PatchFunction1Types::MappedFile<Type>::MappedFile PatchFunction1<Type>(pp, entryName, dict, faceValues), dictConstructed_(true), fieldTableName_(entryName), - setAverage_(dict.lookupOrDefault("setAverage", false)), - perturb_(dict.lookupOrDefault<scalar>("perturb", 1e-5)), - pointsName_(dict.lookupOrDefault<word>("points", "points")), + setAverage_(dict.getOrDefault("setAverage", false)), + perturb_(dict.getOrDefault<scalar>("perturb", 1e-5)), + pointsName_(dict.getOrDefault<word>("points", "points")), mapMethod_ ( - dict.lookupOrDefault<word> + dict.getOrDefault<word> ( "mapMethod", "planarInterpolation" @@ -98,12 +98,12 @@ Foam::PatchFunction1Types::MappedFile<Type>::MappedFile PatchFunction1<Type>(pp, entryName, dict, faceValues), dictConstructed_(false), fieldTableName_(fieldTableName), - setAverage_(dict.lookupOrDefault("setAverage", false)), - perturb_(dict.lookupOrDefault<scalar>("perturb", 1e-5)), - pointsName_(dict.lookupOrDefault<word>("points", "points")), + setAverage_(dict.getOrDefault("setAverage", false)), + perturb_(dict.getOrDefault<scalar>("perturb", 1e-5)), + pointsName_(dict.getOrDefault<word>("points", "points")), mapMethod_ ( - dict.lookupOrDefault<word> + dict.getOrDefault<word> ( "mapMethod", "planarInterpolation" diff --git a/src/meshTools/coordinate/rotation/EulerCoordinateRotation.C b/src/meshTools/coordinate/rotation/EulerCoordinateRotation.C index d4167b3a43c..2750bde42bc 100644 --- a/src/meshTools/coordinate/rotation/EulerCoordinateRotation.C +++ b/src/meshTools/coordinate/rotation/EulerCoordinateRotation.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. @@ -297,10 +297,10 @@ Foam::coordinateRotations::euler::euler(const dictionary& dict) : coordinateRotation(), angles_(dict.getCompat<vector>("angles", {{"rotation", 1806}})), - degrees_(dict.lookupOrDefault("degrees", true)), + degrees_(dict.getOrDefault("degrees", true)), order_ ( - quaternion::eulerOrderNames.lookupOrDefault + quaternion::eulerOrderNames.getOrDefault ( "order", dict, diff --git a/src/meshTools/coordinate/rotation/STARCDCoordinateRotation.C b/src/meshTools/coordinate/rotation/STARCDCoordinateRotation.C index 4384d76e7ce..92c80fae65a 100644 --- a/src/meshTools/coordinate/rotation/STARCDCoordinateRotation.C +++ b/src/meshTools/coordinate/rotation/STARCDCoordinateRotation.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2016 OpenFOAM Foundation - Copyright (C) 2017-2018 OpenCFD Ltd. + Copyright (C) 2017-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -140,7 +140,7 @@ Foam::coordinateRotations::starcd::starcd(const dictionary& dict) : coordinateRotation(), angles_(dict.getCompat<vector>("angles", {{"rotation", 1806}})), - degrees_(dict.lookupOrDefault("degrees", true)) + degrees_(dict.getOrDefault("degrees", true)) {} diff --git a/src/meshTools/coordinate/rotation/axisAngleRotation.C b/src/meshTools/coordinate/rotation/axisAngleRotation.C index 76b20075cf1..94679483723 100644 --- a/src/meshTools/coordinate/rotation/axisAngleRotation.C +++ b/src/meshTools/coordinate/rotation/axisAngleRotation.C @@ -5,7 +5,7 @@ \\ / A nd | www.openfoam.com \\/ M anipulation | ------------------------------------------------------------------------------- - Copyright (C) 2018-2019 OpenCFD Ltd. + Copyright (C) 2018-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -148,7 +148,7 @@ Foam::coordinateRotations::axisAngle::axisAngle(const dictionary& dict) ( dict.get<vector>("axis"), dict.get<scalar>("angle"), - dict.lookupOrDefault("degrees", true) + dict.getOrDefault("degrees", true) ) {} diff --git a/src/meshTools/coordinate/systems/coordinateSystemNew.C b/src/meshTools/coordinate/systems/coordinateSystemNew.C index 8f4c0fb7a97..4db528d396e 100644 --- a/src/meshTools/coordinate/systems/coordinateSystemNew.C +++ b/src/meshTools/coordinate/systems/coordinateSystemNew.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2015 OpenFOAM Foundation - Copyright (C) 2018-2019 OpenCFD Ltd. + Copyright (C) 2018-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -163,7 +163,7 @@ Foam::autoPtr<Foam::coordinateSystem> Foam::coordinateSystem::New dictPtr = coordinateSystem::subDictCompat(dictPtr); } - word modelType = dictPtr->lookupOrDefault<word> + word modelType = dictPtr->getOrDefault<word> ( "type", coordSystem::cartesian::typeName_() @@ -191,7 +191,7 @@ Foam::autoPtr<Foam::coordinateSystem> Foam::coordinateSystem::New dictPtr = coordinateSystem::subDictCompat(dictPtr); } - const word modelType = dictPtr->lookupOrDefault<word> + const word modelType = dictPtr->getOrDefault<word> ( "type", coordSystem::cartesian::typeName_() diff --git a/src/meshTools/coordinate/systems/cylindricalCS.C b/src/meshTools/coordinate/systems/cylindricalCS.C index 3122d7df483..89a766bab2d 100644 --- a/src/meshTools/coordinate/systems/cylindricalCS.C +++ b/src/meshTools/coordinate/systems/cylindricalCS.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2016 OpenFOAM Foundation - Copyright (C) 2018-2019 OpenCFD Ltd. + Copyright (C) 2018-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -175,7 +175,7 @@ Foam::coordSystem::cylindrical::cylindrical : coordinateSystem(name, dict) { - if (dict.lookupOrDefault("degrees", false)) + if (dict.getOrDefault("degrees", false)) { warnCompatDegrees(dict); } @@ -186,7 +186,7 @@ Foam::coordSystem::cylindrical::cylindrical(const dictionary& dict) : coordinateSystem(dict) { - if (dict.lookupOrDefault("degrees", false)) + if (dict.getOrDefault("degrees", false)) { warnCompatDegrees(dict); } @@ -208,7 +208,7 @@ Foam::coordSystem::cylindrical::cylindrical : &(dict) ); - if (dictPtr->lookupOrDefault("degrees", false)) + if (dictPtr->getOrDefault("degrees", false)) { warnCompatDegrees(dict); } diff --git a/src/meshTools/mappedPatches/mappedPolyPatch/mappedPatchBase.C b/src/meshTools/mappedPatches/mappedPolyPatch/mappedPatchBase.C index f2875329363..8dac4e801c5 100644 --- a/src/meshTools/mappedPatches/mappedPolyPatch/mappedPatchBase.C +++ b/src/meshTools/mappedPatches/mappedPolyPatch/mappedPatchBase.C @@ -760,11 +760,11 @@ void Foam::mappedPatchBase::calcMapping() const const Foam::autoPtr<Foam::searchableSurface>& Foam::mappedPatchBase::surfPtr() const { - const word surfType(surfDict_.lookupOrDefault<word>("type", "none")); + const word surfType(surfDict_.getOrDefault<word>("type", "none")); if (!surfPtr_.valid() && surfType != "none") { - word surfName(surfDict_.lookupOrDefault("name", patch_.name())); + word surfName(surfDict_.getOrDefault("name", patch_.name())); const polyMesh& mesh = patch_.boundaryMesh().mesh(); @@ -959,9 +959,9 @@ Foam::mappedPatchBase::mappedPatchBase ) : patch_(pp), - sampleRegion_(dict.lookupOrDefault<word>("sampleRegion", "")), + sampleRegion_(dict.getOrDefault<word>("sampleRegion", "")), mode_(sampleModeNames_.get("sampleMode", dict)), - samplePatch_(dict.lookupOrDefault<word>("samplePatch", "")), + samplePatch_(dict.getOrDefault<word>("samplePatch", "")), coupleGroup_(dict), offsetMode_(UNIFORM), offset_(Zero), @@ -970,7 +970,7 @@ Foam::mappedPatchBase::mappedPatchBase sameRegion_(sampleRegion_ == patch_.boundaryMesh().mesh().name()), mapPtr_(nullptr), AMIPtr_(nullptr), - AMIReverse_(dict.lookupOrDefault("flipNormals", false)), + AMIReverse_(dict.getOrDefault("flipNormals", false)), surfPtr_(nullptr), surfDict_(dict.subOrEmptyDict("surface")) { @@ -1034,10 +1034,10 @@ Foam::mappedPatchBase::mappedPatchBase ) : patch_(pp), - sampleRegion_(dict.lookupOrDefault<word>("sampleRegion", "")), + sampleRegion_(dict.getOrDefault<word>("sampleRegion", "")), mode_(mode), - samplePatch_(dict.lookupOrDefault<word>("samplePatch", "")), - coupleGroup_(dict), //dict.lookupOrDefault<word>("coupleGroup", "")), + samplePatch_(dict.getOrDefault<word>("samplePatch", "")), + coupleGroup_(dict), //dict.getOrDefault<word>("coupleGroup", "")), offsetMode_(UNIFORM), offset_(Zero), offsets_(0), @@ -1045,7 +1045,7 @@ Foam::mappedPatchBase::mappedPatchBase sameRegion_(sampleRegion_ == patch_.boundaryMesh().mesh().name()), mapPtr_(nullptr), AMIPtr_(nullptr), - AMIReverse_(dict.lookupOrDefault("flipNormals", false)), + AMIReverse_(dict.getOrDefault("flipNormals", false)), surfPtr_(nullptr), surfDict_(dict.subOrEmptyDict("surface")) { diff --git a/src/meshTools/searchableSurfaces/searchableCone/searchableCone.C b/src/meshTools/searchableSurfaces/searchableCone/searchableCone.C index 07e8728ebb6..e342b470db9 100644 --- a/src/meshTools/searchableSurfaces/searchableCone/searchableCone.C +++ b/src/meshTools/searchableSurfaces/searchableCone/searchableCone.C @@ -5,7 +5,7 @@ \\ / A nd | www.openfoam.com \\/ M anipulation | ------------------------------------------------------------------------------- - Copyright (C) 2015-2018 OpenCFD Ltd. + Copyright (C) 2015-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -739,10 +739,10 @@ Foam::searchableCone::searchableCone searchableSurface(io), point1_(dict.get<point>("point1")), radius1_(dict.get<scalar>("radius1")), - innerRadius1_(dict.lookupOrDefault<scalar>("innerRadius1", 0)), + innerRadius1_(dict.getOrDefault<scalar>("innerRadius1", 0)), point2_(dict.get<point>("point2")), radius2_(dict.get<scalar>("radius2")), - innerRadius2_(dict.lookupOrDefault<scalar>("innerRadius2", 0)), + innerRadius2_(dict.getOrDefault<scalar>("innerRadius2", 0)), magDir_(mag(point2_-point1_)), unitDir_((point2_-point1_)/magDir_) { diff --git a/src/meshTools/searchableSurfaces/searchableSurfaces/searchableSurfaces.C b/src/meshTools/searchableSurfaces/searchableSurfaces/searchableSurfaces.C index dbe99ffdc27..a74ab1a59da 100644 --- a/src/meshTools/searchableSurfaces/searchableSurfaces/searchableSurfaces.C +++ b/src/meshTools/searchableSurfaces/searchableSurfaces/searchableSurfaces.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2017 OpenFOAM Foundation - Copyright (C) 2015-2019 OpenCFD Ltd. + Copyright (C) 2015-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -220,7 +220,7 @@ Foam::searchableSurfaces::searchableSurfaces const word& key = dEntry.keyword(); const dictionary& dict = topDict.subDict(key); - names_[surfI] = dict.lookupOrDefault<word>("name", key); + names_[surfI] = dict.getOrDefault<word>("name", key); // Make IOobject with correct name autoPtr<IOobject> namedIO(io.clone()); diff --git a/src/meshTools/sets/cellSources/cylinderToCell/cylinderToCell.C b/src/meshTools/sets/cellSources/cylinderToCell/cylinderToCell.C index 4eb578f524a..3114d74cf04 100644 --- a/src/meshTools/sets/cellSources/cylinderToCell/cylinderToCell.C +++ b/src/meshTools/sets/cellSources/cylinderToCell/cylinderToCell.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2017 OpenFOAM Foundation - Copyright (C) 2018 OpenCFD Ltd. + Copyright (C) 2018-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -125,7 +125,7 @@ Foam::cylinderToCell::cylinderToCell dict.get<point>("p1"), dict.get<point>("p2"), dict.get<scalar>("radius"), - dict.lookupOrDefault<scalar>("innerRadius", 0) + dict.getOrDefault<scalar>("innerRadius", 0) ) {} diff --git a/src/meshTools/sets/cellSources/regionToCell/regionToCell.C b/src/meshTools/sets/cellSources/regionToCell/regionToCell.C index 83b5b6776a4..d6c83eb0cca 100644 --- a/src/meshTools/sets/cellSources/regionToCell/regionToCell.C +++ b/src/meshTools/sets/cellSources/regionToCell/regionToCell.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. @@ -405,12 +405,12 @@ Foam::regionToCell::regionToCell ) : topoSetCellSource(mesh), - setName_(dict.lookupOrDefault<word>("set", "none")), + setName_(dict.getOrDefault<word>("set", "none")), insidePoints_ ( dict.getCompat<pointField>("insidePoints", {{ "insidePoint", 0 }}) ), - nErode_(dict.lookupOrDefault<label>("nErode", 0)) + nErode_(dict.getOrDefault<label>("nErode", 0)) {} diff --git a/src/meshTools/sets/cellSources/searchableSurfaceToCell/searchableSurfaceToCell.C b/src/meshTools/sets/cellSources/searchableSurfaceToCell/searchableSurfaceToCell.C index dab763b924e..36609af753b 100644 --- a/src/meshTools/sets/cellSources/searchableSurfaceToCell/searchableSurfaceToCell.C +++ b/src/meshTools/sets/cellSources/searchableSurfaceToCell/searchableSurfaceToCell.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. @@ -81,7 +81,7 @@ Foam::word Foam::searchableSurfaceToCell::getSurfaceName // mySurf.stl { .. } // The dictName() method will only return the "stl" ending. - return dict.lookupOrDefault<word>("surfaceName", defaultName); + return dict.getOrDefault<word>("surfaceName", defaultName); } diff --git a/src/meshTools/sets/cellSources/sphereToCell/sphereToCell.C b/src/meshTools/sets/cellSources/sphereToCell/sphereToCell.C index 4a3d7412d65..918576c7fbb 100644 --- a/src/meshTools/sets/cellSources/sphereToCell/sphereToCell.C +++ b/src/meshTools/sets/cellSources/sphereToCell/sphereToCell.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2017 OpenFOAM Foundation - Copyright (C) 2018 OpenCFD Ltd. + Copyright (C) 2018-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -115,7 +115,7 @@ Foam::sphereToCell::sphereToCell mesh, dict.getCompat<vector>("origin", {{"centre", -1806}}), dict.get<scalar>("radius"), - dict.lookupOrDefault<scalar>("innerRadius", 0) + dict.getOrDefault<scalar>("innerRadius", 0) ) {} diff --git a/src/meshTools/sets/cellSources/surfaceToCell/surfaceToCell.C b/src/meshTools/sets/cellSources/surfaceToCell/surfaceToCell.C index 5f5ac8939e4..37611e55f47 100644 --- a/src/meshTools/sets/cellSources/surfaceToCell/surfaceToCell.C +++ b/src/meshTools/sets/cellSources/surfaceToCell/surfaceToCell.C @@ -441,7 +441,7 @@ Foam::surfaceToCell::surfaceToCell includeOutside_(dict.get<bool>("includeOutside")), useSurfaceOrientation_ ( - dict.lookupOrDefault("useSurfaceOrientation", false) + dict.getOrDefault("useSurfaceOrientation", false) ), nearDist_(dict.get<scalar>("nearDistance")), curvature_(dict.get<scalar>("curvature")), @@ -451,7 +451,7 @@ Foam::surfaceToCell::surfaceToCell ( surfName_, dict.getOrDefault<word>("fileType", word::null), - dict.lookupOrDefault<scalar>("scale", -1) + dict.getOrDefault<scalar>("scale", -1) ) ), querySurfPtr_(new triSurfaceSearch(*surfPtr_)), diff --git a/src/meshTools/sets/cellSources/targetVolumeToCell/targetVolumeToCell.C b/src/meshTools/sets/cellSources/targetVolumeToCell/targetVolumeToCell.C index 4d66f65e8f4..e3611b8e450 100644 --- a/src/meshTools/sets/cellSources/targetVolumeToCell/targetVolumeToCell.C +++ b/src/meshTools/sets/cellSources/targetVolumeToCell/targetVolumeToCell.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2012-2017 OpenFOAM Foundation - Copyright (C) 2018-2019 OpenCFD Ltd. + Copyright (C) 2018-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -306,7 +306,7 @@ Foam::targetVolumeToCell::targetVolumeToCell mesh, dict.get<scalar>("volume"), dict.get<vector>("normal"), - dict.lookupOrDefault<word>("set", "") + dict.getOrDefault<word>("set", "") ) {} diff --git a/src/meshTools/sets/faceSources/cylinderToFace/cylinderToFace.C b/src/meshTools/sets/faceSources/cylinderToFace/cylinderToFace.C index 3690a603d68..c36418ca458 100644 --- a/src/meshTools/sets/faceSources/cylinderToFace/cylinderToFace.C +++ b/src/meshTools/sets/faceSources/cylinderToFace/cylinderToFace.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. @@ -125,7 +125,7 @@ Foam::cylinderToFace::cylinderToFace dict.get<point>("p1"), dict.get<point>("p2"), dict.get<scalar>("radius"), - dict.lookupOrDefault<scalar>("innerRadius", 0) + dict.getOrDefault<scalar>("innerRadius", 0) ) {} diff --git a/src/meshTools/sets/faceSources/searchableSurfaceToFace/searchableSurfaceToFace.C b/src/meshTools/sets/faceSources/searchableSurfaceToFace/searchableSurfaceToFace.C index f5222003b7a..c4f0c8214d7 100644 --- a/src/meshTools/sets/faceSources/searchableSurfaceToFace/searchableSurfaceToFace.C +++ b/src/meshTools/sets/faceSources/searchableSurfaceToFace/searchableSurfaceToFace.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. @@ -81,7 +81,7 @@ Foam::word Foam::searchableSurfaceToFace::getSurfaceName // mySurf.stl { .. } // The dictName() method will only return the "stl" ending. - return dict.lookupOrDefault<word>("surfaceName", defaultName); + return dict.getOrDefault<word>("surfaceName", defaultName); } diff --git a/src/meshTools/sets/faceSources/sphereToFace/sphereToFace.C b/src/meshTools/sets/faceSources/sphereToFace/sphereToFace.C index c56445a32e4..bd51664665c 100644 --- a/src/meshTools/sets/faceSources/sphereToFace/sphereToFace.C +++ b/src/meshTools/sets/faceSources/sphereToFace/sphereToFace.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. @@ -114,7 +114,7 @@ Foam::sphereToFace::sphereToFace mesh, dict.getCompat<vector>("origin", {{"centre", -1806}}), dict.get<scalar>("radius"), - dict.lookupOrDefault<scalar>("innerRadius", 0) + dict.getOrDefault<scalar>("innerRadius", 0) ) {} diff --git a/src/meshTools/sets/faceZoneSources/searchableSurfaceToFaceZone/searchableSurfaceToFaceZone.C b/src/meshTools/sets/faceZoneSources/searchableSurfaceToFaceZone/searchableSurfaceToFaceZone.C index d7174d26b5d..854a6b655bc 100644 --- a/src/meshTools/sets/faceZoneSources/searchableSurfaceToFaceZone/searchableSurfaceToFaceZone.C +++ b/src/meshTools/sets/faceZoneSources/searchableSurfaceToFaceZone/searchableSurfaceToFaceZone.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2012-2017 OpenFOAM Foundation - Copyright (C) 2018 OpenCFD Ltd. + Copyright (C) 2018-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -74,7 +74,7 @@ Foam::word Foam::searchableSurfaceToFaceZone::getSurfaceName return - dict.lookupOrDefaultCompat<word> + dict.getOrDefaultCompat<word> ( "surfaceName", {{"name", 1806}}, diff --git a/src/meshTools/sets/faceZoneSources/setsToFaceZone/setsToFaceZone.C b/src/meshTools/sets/faceZoneSources/setsToFaceZone/setsToFaceZone.C index efbce62ee48..451a8f61cae 100644 --- a/src/meshTools/sets/faceZoneSources/setsToFaceZone/setsToFaceZone.C +++ b/src/meshTools/sets/faceZoneSources/setsToFaceZone/setsToFaceZone.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2017 OpenFOAM Foundation - Copyright (C) 2018-2019 OpenCFD Ltd. + Copyright (C) 2018-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -77,7 +77,7 @@ Foam::setsToFaceZone::setsToFaceZone topoSetSource(mesh), faceSetName_(dict.get<word>("faceSet")), cellSetName_(dict.get<word>("cellSet")), - flip_(dict.lookupOrDefault("flip", false)) + flip_(dict.getOrDefault("flip", false)) {} diff --git a/src/meshTools/sets/pointSources/cylinderToPoint/cylinderToPoint.C b/src/meshTools/sets/pointSources/cylinderToPoint/cylinderToPoint.C index 8117e8f5d02..12886bebf58 100644 --- a/src/meshTools/sets/pointSources/cylinderToPoint/cylinderToPoint.C +++ b/src/meshTools/sets/pointSources/cylinderToPoint/cylinderToPoint.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. @@ -125,7 +125,7 @@ Foam::cylinderToPoint::cylinderToPoint dict.get<point>("p1"), dict.get<point>("p2"), dict.get<scalar>("radius"), - dict.lookupOrDefault<scalar>("innerRadius", 0) + dict.getOrDefault<scalar>("innerRadius", 0) ) {} diff --git a/src/meshTools/sets/pointSources/searchableSurfaceToPoint/searchableSurfaceToPoint.C b/src/meshTools/sets/pointSources/searchableSurfaceToPoint/searchableSurfaceToPoint.C index e61728ce417..0ed94865651 100644 --- a/src/meshTools/sets/pointSources/searchableSurfaceToPoint/searchableSurfaceToPoint.C +++ b/src/meshTools/sets/pointSources/searchableSurfaceToPoint/searchableSurfaceToPoint.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. @@ -81,7 +81,7 @@ Foam::word Foam::searchableSurfaceToPoint::getSurfaceName // mySurf.stl { .. } // The dictName() method will only return the "stl" ending. - return dict.lookupOrDefault<word>("surfaceName", defaultName); + return dict.getOrDefault<word>("surfaceName", defaultName); } diff --git a/src/meshTools/sets/pointSources/sphereToPoint/sphereToPoint.C b/src/meshTools/sets/pointSources/sphereToPoint/sphereToPoint.C index 26b072485b8..80067c43ab1 100644 --- a/src/meshTools/sets/pointSources/sphereToPoint/sphereToPoint.C +++ b/src/meshTools/sets/pointSources/sphereToPoint/sphereToPoint.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. @@ -114,7 +114,7 @@ Foam::sphereToPoint::sphereToPoint mesh, dict.getCompat<vector>("origin", {{"centre", -1806}}), dict.get<scalar>("radius"), - dict.lookupOrDefault<scalar>("innerRadius", 0) + dict.getOrDefault<scalar>("innerRadius", 0) ) {} diff --git a/src/meshTools/sets/pointSources/surfaceToPoint/surfaceToPoint.C b/src/meshTools/sets/pointSources/surfaceToPoint/surfaceToPoint.C index 418d2ea96de..9175aff4b9b 100644 --- a/src/meshTools/sets/pointSources/surfaceToPoint/surfaceToPoint.C +++ b/src/meshTools/sets/pointSources/surfaceToPoint/surfaceToPoint.C @@ -156,7 +156,7 @@ Foam::surfaceToPoint::surfaceToPoint topoSetPointSource(mesh), surfName_(dict.get<fileName>("file").expand()), surfType_(dict.getOrDefault<word>("fileType", word::null)), - scale_(dict.lookupOrDefault<scalar>("scale", -1)), + scale_(dict.getOrDefault<scalar>("scale", -1)), nearDist_(dict.get<scalar>("nearDistance")), includeInside_(dict.get<bool>("includeInside")), includeOutside_(dict.get<bool>("includeOutside")) diff --git a/src/meshTools/triSurface/booleanOps/surfaceIntersection/surfaceIntersection.C b/src/meshTools/triSurface/booleanOps/surfaceIntersection/surfaceIntersection.C index 4ee2b302ee8..9816d150c2e 100644 --- a/src/meshTools/triSurface/booleanOps/surfaceIntersection/surfaceIntersection.C +++ b/src/meshTools/triSurface/booleanOps/surfaceIntersection/surfaceIntersection.C @@ -1199,7 +1199,7 @@ Foam::surfaceIntersection::surfaceIntersection { setOptions(dict); - const intersectionType cutFrom = selfIntersectionNames.lookupOrDefault + const intersectionType cutFrom = selfIntersectionNames.getOrDefault ( "intersectionMethod", dict, diff --git a/src/optimisation/adjointOptimisation/adjoint/ATCModel/ATCModel/ATCModel.C b/src/optimisation/adjointOptimisation/adjoint/ATCModel/ATCModel/ATCModel.C index f5b0e7a03f2..99c574434ee 100644 --- a/src/optimisation/adjointOptimisation/adjoint/ATCModel/ATCModel/ATCModel.C +++ b/src/optimisation/adjointOptimisation/adjoint/ATCModel/ATCModel/ATCModel.C @@ -7,7 +7,7 @@ ------------------------------------------------------------------------------- Copyright (C) 2007-2019 PCOpt/NTUA Copyright (C) 2013-2019 FOSS GP - Copyright (C) 2019 OpenCFD Ltd. + Copyright (C) 2019-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -81,12 +81,12 @@ ATCModel::ATCModel primalVars_(primalVars), adjointVars_(adjointVars), dict_(dict), - extraConvection_(dict_.lookupOrDefault<scalar>("extraConvection", Zero)), - extraDiffusion_(dict_.lookupOrDefault<scalar>("extraDiffusion", Zero)), - nSmooth_(dict_.lookupOrDefault<label>("nSmooth", 0)), + extraConvection_(dict_.getOrDefault<scalar>("extraConvection", Zero)), + extraDiffusion_(dict_.getOrDefault<scalar>("extraDiffusion", Zero)), + nSmooth_(dict_.getOrDefault<label>("nSmooth", 0)), reconstructGradients_ ( - dict_.lookupOrDefault<bool>("reconstructGradients", false) + dict_.getOrDefault("reconstructGradients", false) ), adjointSolverName_(adjointVars.solverName()), zeroATCcells_(zeroATCcells::New(mesh, dict_)), @@ -225,7 +225,7 @@ tmp<volScalarField> ATCModel::createLimiter { autoPtr<zeroATCcells> zeroType(zeroATCcells::New(mesh, dict)); const labelList& zeroCells = zeroType->getZeroATCcells(); - const label nSmooth = dict.lookupOrDefault<label>("nSmooth", 0); + const label nSmooth = dict.getOrDefault<label>("nSmooth", 0); tmp<volScalarField> tlimiter ( diff --git a/src/optimisation/adjointOptimisation/adjoint/adjointBoundaryConditions/adjointWallVelocity/adjointWallVelocityFvPatchVectorField.C b/src/optimisation/adjointOptimisation/adjoint/adjointBoundaryConditions/adjointWallVelocity/adjointWallVelocityFvPatchVectorField.C index 56c1f270267..00db8159e80 100644 --- a/src/optimisation/adjointOptimisation/adjoint/adjointBoundaryConditions/adjointWallVelocity/adjointWallVelocityFvPatchVectorField.C +++ b/src/optimisation/adjointOptimisation/adjoint/adjointBoundaryConditions/adjointWallVelocity/adjointWallVelocityFvPatchVectorField.C @@ -7,7 +7,7 @@ ------------------------------------------------------------------------------- Copyright (C) 2007-2019 PCOpt/NTUA Copyright (C) 2013-2019 FOSS GP - Copyright (C) 2019 OpenCFD Ltd. + Copyright (C) 2019-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -74,8 +74,8 @@ adjointWallVelocityFvPatchVectorField : fixedValueFvPatchVectorField(p, iF), adjointBoundaryCondition(p, iF, dict.get<word>("solverName")), - kappa_(dict.lookupOrDefault<scalar>("kappa", 0.41)), - E_(dict.lookupOrDefault<scalar>("E", 9.8)) + kappa_(dict.getOrDefault<scalar>("kappa", 0.41)), + E_(dict.getOrDefault<scalar>("E", 9.8)) { fvPatchField<vector>::operator= ( diff --git a/src/optimisation/adjointOptimisation/adjoint/displacementMethod/displacementMethoddisplacementLaplacian/displacementMethoddisplacementLaplacian.C b/src/optimisation/adjointOptimisation/adjoint/displacementMethod/displacementMethoddisplacementLaplacian/displacementMethoddisplacementLaplacian.C index 4dacfff039d..0a933356e89 100644 --- a/src/optimisation/adjointOptimisation/adjoint/displacementMethod/displacementMethoddisplacementLaplacian/displacementMethoddisplacementLaplacian.C +++ b/src/optimisation/adjointOptimisation/adjoint/displacementMethod/displacementMethoddisplacementLaplacian/displacementMethoddisplacementLaplacian.C @@ -7,7 +7,7 @@ ------------------------------------------------------------------------------- Copyright (C) 2007-2019 PCOpt/NTUA Copyright (C) 2013-2019 FOSS GP - Copyright (C) 2019 OpenCFD Ltd. + Copyright (C) 2019-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -99,7 +99,7 @@ displacementMethoddisplacementLaplacian::displacementMethoddisplacementLaplacian IOobject::AUTO_WRITE, false ) - ).subDict("displacementLaplacianCoeffs").lookupOrDefault<bool> + ).subDict("displacementLaplacianCoeffs").getOrDefault<bool> ( "resetFields", true diff --git a/src/optimisation/adjointOptimisation/adjoint/displacementMethod/displacementMethodelasticityMotionSolver/displacementMethodelasticityMotionSolver.C b/src/optimisation/adjointOptimisation/adjoint/displacementMethod/displacementMethodelasticityMotionSolver/displacementMethodelasticityMotionSolver.C index 8c9f4fe6d87..d69e6d1a019 100644 --- a/src/optimisation/adjointOptimisation/adjoint/displacementMethod/displacementMethodelasticityMotionSolver/displacementMethodelasticityMotionSolver.C +++ b/src/optimisation/adjointOptimisation/adjoint/displacementMethod/displacementMethodelasticityMotionSolver/displacementMethodelasticityMotionSolver.C @@ -7,7 +7,7 @@ ------------------------------------------------------------------------------- Copyright (C) 2007-2019 PCOpt/NTUA Copyright (C) 2013-2019 FOSS GP - Copyright (C) 2019 OpenCFD Ltd. + Copyright (C) 2019-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -88,7 +88,7 @@ displacementMethodelasticityMotionSolver IOobject::AUTO_WRITE, false ) - ).subDict("elasticityMotionSolverCoeffs").lookupOrDefault<bool> + ).subDict("elasticityMotionSolverCoeffs").getOrDefault<bool> ( "resetFields", true diff --git a/src/optimisation/adjointOptimisation/adjoint/displacementMethod/displacementMethodlaplacianMotionSolver/displacementMethodlaplacianMotionSolver.C b/src/optimisation/adjointOptimisation/adjoint/displacementMethod/displacementMethodlaplacianMotionSolver/displacementMethodlaplacianMotionSolver.C index 964e10b60ab..01f566e3ab7 100644 --- a/src/optimisation/adjointOptimisation/adjoint/displacementMethod/displacementMethodlaplacianMotionSolver/displacementMethodlaplacianMotionSolver.C +++ b/src/optimisation/adjointOptimisation/adjoint/displacementMethod/displacementMethodlaplacianMotionSolver/displacementMethodlaplacianMotionSolver.C @@ -7,7 +7,7 @@ ------------------------------------------------------------------------------- Copyright (C) 2007-2019 PCOpt/NTUA Copyright (C) 2013-2019 FOSS GP - Copyright (C) 2019 OpenCFD Ltd. + Copyright (C) 2019-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -87,7 +87,7 @@ displacementMethodlaplacianMotionSolver::displacementMethodlaplacianMotionSolver IOobject::AUTO_WRITE, false ) - ).subDict("laplacianMotionSolverCoeffs").lookupOrDefault<bool> + ).subDict("laplacianMotionSolverCoeffs").getOrDefault<bool> ( "resetFields", true diff --git a/src/optimisation/adjointOptimisation/adjoint/displacementMethod/displacementMethodvelocityLaplacian/displacementMethodvelocityLaplacian.C b/src/optimisation/adjointOptimisation/adjoint/displacementMethod/displacementMethodvelocityLaplacian/displacementMethodvelocityLaplacian.C index 8fdb7e932fc..96600ed7412 100644 --- a/src/optimisation/adjointOptimisation/adjoint/displacementMethod/displacementMethodvelocityLaplacian/displacementMethodvelocityLaplacian.C +++ b/src/optimisation/adjointOptimisation/adjoint/displacementMethod/displacementMethodvelocityLaplacian/displacementMethodvelocityLaplacian.C @@ -7,7 +7,7 @@ ------------------------------------------------------------------------------- Copyright (C) 2007-2019 PCOpt/NTUA Copyright (C) 2013-2019 FOSS GP - Copyright (C) 2019 OpenCFD Ltd. + Copyright (C) 2019-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -94,7 +94,7 @@ displacementMethodvelocityLaplacian::displacementMethodvelocityLaplacian IOobject::AUTO_WRITE, false ) - ).subDict("velocityLaplacianCoeffs").lookupOrDefault<bool> + ).subDict("velocityLaplacianCoeffs").getOrDefault<bool> ( "resetFields", true diff --git a/src/optimisation/adjointOptimisation/adjoint/optimisation/adjointSensitivity/incompressible/FIBase/FIBaseIncompressible.C b/src/optimisation/adjointOptimisation/adjoint/optimisation/adjointSensitivity/incompressible/FIBase/FIBaseIncompressible.C index 9cab363ca05..ca4fc90810a 100644 --- a/src/optimisation/adjointOptimisation/adjoint/optimisation/adjointSensitivity/incompressible/FIBase/FIBaseIncompressible.C +++ b/src/optimisation/adjointOptimisation/adjoint/optimisation/adjointSensitivity/incompressible/FIBase/FIBaseIncompressible.C @@ -7,7 +7,7 @@ ------------------------------------------------------------------------------- Copyright (C) 2007-2019 PCOpt/NTUA Copyright (C) 2013-2019 FOSS GP - Copyright (C) 2019 OpenCFD Ltd. + Copyright (C) 2019-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -48,7 +48,7 @@ defineTypeNameAndDebug(FIBase, 0); void FIBase::read() { includeDistance_ = - dict_.lookupOrDefault<bool> + dict_.getOrDefault<bool> ( "includeDistance", adjointVars_.adjointTurbulence().ref().includeDistance() diff --git a/src/optimisation/adjointOptimisation/adjoint/optimisation/adjointSensitivity/incompressible/SIBase/SIBaseIncompressible.C b/src/optimisation/adjointOptimisation/adjoint/optimisation/adjointSensitivity/incompressible/SIBase/SIBaseIncompressible.C index 3b65ddf04ce..ed34fc5ccd7 100644 --- a/src/optimisation/adjointOptimisation/adjoint/optimisation/adjointSensitivity/incompressible/SIBase/SIBaseIncompressible.C +++ b/src/optimisation/adjointOptimisation/adjoint/optimisation/adjointSensitivity/incompressible/SIBase/SIBaseIncompressible.C @@ -7,7 +7,7 @@ ------------------------------------------------------------------------------- Copyright (C) 2007-2019 PCOpt/NTUA Copyright (C) 2013-2019 FOSS GP - Copyright (C) 2019 OpenCFD Ltd. + Copyright (C) 2019-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -49,7 +49,7 @@ void SIBase::read() { surfaceSensitivity_.read(); includeObjective_ = - dict().lookupOrDefault<bool>("includeObjectiveContribution", true); + dict().getOrDefault<bool>("includeObjectiveContribution", true); // If includeObjective is set to true both here and in the surface // sensitivities, set the one in the latter to false to avoid double diff --git a/src/optimisation/adjointOptimisation/adjoint/optimisation/adjointSensitivity/incompressible/adjointEikonalSolver/adjointEikonalSolverIncompressible.C b/src/optimisation/adjointOptimisation/adjoint/optimisation/adjointSensitivity/incompressible/adjointEikonalSolver/adjointEikonalSolverIncompressible.C index 48ff5ba0127..f8fdb60489b 100644 --- a/src/optimisation/adjointOptimisation/adjoint/optimisation/adjointSensitivity/incompressible/adjointEikonalSolver/adjointEikonalSolverIncompressible.C +++ b/src/optimisation/adjointOptimisation/adjoint/optimisation/adjointSensitivity/incompressible/adjointEikonalSolver/adjointEikonalSolverIncompressible.C @@ -7,7 +7,7 @@ ------------------------------------------------------------------------------- Copyright (C) 2007-2019 PCOpt/NTUA Copyright (C) 2013-2019 FOSS GP - Copyright (C) 2019 OpenCFD Ltd. + Copyright (C) 2019-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -64,9 +64,9 @@ wordList adjointEikonalSolver::patchTypes() const void adjointEikonalSolver::read() { - nEikonalIters_ = dict_.lookupOrDefault<label>("iters", 1000); - tolerance_ = dict_.lookupOrDefault<scalar>("tolerance", 1e-6); - epsilon_ = dict_.lookupOrDefault<scalar>("epsilon", 0.1); + nEikonalIters_ = dict_.getOrDefault<label>("iters", 1000); + tolerance_ = dict_.getOrDefault<scalar>("tolerance", 1e-6); + epsilon_ = dict_.getOrDefault<scalar>("epsilon", 0.1); } diff --git a/src/optimisation/adjointOptimisation/adjoint/optimisation/adjointSensitivity/incompressible/adjointMeshMovementSolver/adjointMeshMovementSolverIncompressible.C b/src/optimisation/adjointOptimisation/adjoint/optimisation/adjointSensitivity/incompressible/adjointMeshMovementSolver/adjointMeshMovementSolverIncompressible.C index 82860f4301a..a18a831131c 100644 --- a/src/optimisation/adjointOptimisation/adjoint/optimisation/adjointSensitivity/incompressible/adjointMeshMovementSolver/adjointMeshMovementSolverIncompressible.C +++ b/src/optimisation/adjointOptimisation/adjoint/optimisation/adjointSensitivity/incompressible/adjointMeshMovementSolver/adjointMeshMovementSolverIncompressible.C @@ -7,7 +7,7 @@ ------------------------------------------------------------------------------- Copyright (C) 2007-2019 PCOpt/NTUA Copyright (C) 2013-2019 FOSS GP - Copyright (C) 2019 OpenCFD Ltd. + Copyright (C) 2019-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -46,8 +46,8 @@ defineTypeNameAndDebug(adjointMeshMovementSolver, 0); void adjointMeshMovementSolver::read() { - nLaplaceIters_ = dict_.lookupOrDefault<label>("iters", 1000); - tolerance_ = dict_.lookupOrDefault<scalar>("tolerance", 1e-6); + nLaplaceIters_ = dict_.getOrDefault<label>("iters", 1000); + tolerance_ = dict_.getOrDefault<scalar>("tolerance", 1e-6); } diff --git a/src/optimisation/adjointOptimisation/adjoint/optimisation/adjointSensitivity/incompressible/sensitivityBezierFI/sensitivityBezierFIIncompressible.C b/src/optimisation/adjointOptimisation/adjoint/optimisation/adjointSensitivity/incompressible/sensitivityBezierFI/sensitivityBezierFIIncompressible.C index c25f94ebfa5..72b6f425869 100644 --- a/src/optimisation/adjointOptimisation/adjoint/optimisation/adjointSensitivity/incompressible/sensitivityBezierFI/sensitivityBezierFIIncompressible.C +++ b/src/optimisation/adjointOptimisation/adjoint/optimisation/adjointSensitivity/incompressible/sensitivityBezierFI/sensitivityBezierFIIncompressible.C @@ -7,7 +7,7 @@ ------------------------------------------------------------------------------- Copyright (C) 2007-2019 PCOpt/NTUA Copyright (C) 2013-2019 FOSS GP - Copyright (C) 2019 OpenCFD Ltd. + Copyright (C) 2019-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -54,9 +54,9 @@ void sensitivityBezierFI::read() { // Laplace solution controls const dictionary dxdbDict = dict_.subOrEmptyDict("dxdbSolver"); - meshMovementIters_ = dxdbDict.lookupOrDefault<label>("iters", 1000); + meshMovementIters_ = dxdbDict.getOrDefault<label>("iters", 1000); meshMovementResidualLimit_ = - dxdbDict.lookupOrDefault<scalar>("tolerance", 1.e-07); + dxdbDict.getOrDefault<scalar>("tolerance", 1.e-07); // Read variables related to the adjoint eikonal solver FIBase::read(); diff --git a/src/optimisation/adjointOptimisation/adjoint/optimisation/adjointSensitivity/incompressible/sensitivitySurface/sensitivitySurfaceIncompressible.C b/src/optimisation/adjointOptimisation/adjoint/optimisation/adjointSensitivity/incompressible/sensitivitySurface/sensitivitySurfaceIncompressible.C index b49a8c01863..3869c7dcf46 100644 --- a/src/optimisation/adjointOptimisation/adjoint/optimisation/adjointSensitivity/incompressible/sensitivitySurface/sensitivitySurfaceIncompressible.C +++ b/src/optimisation/adjointOptimisation/adjoint/optimisation/adjointSensitivity/incompressible/sensitivitySurface/sensitivitySurfaceIncompressible.C @@ -7,7 +7,7 @@ ------------------------------------------------------------------------------- Copyright (C) 2007-2019 PCOpt/NTUA Copyright (C) 2013-2019 FOSS GP - Copyright (C) 2019 OpenCFD Ltd. + Copyright (C) 2019-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -318,26 +318,26 @@ sensitivitySurface::sensitivitySurface void sensitivitySurface::read() { includeSurfaceArea_ = - dict().lookupOrDefault<bool>("includeSurfaceArea", true); + dict().getOrDefault<bool>("includeSurfaceArea", true); includePressureTerm_ = - dict().lookupOrDefault<bool>("includePressure", true); + dict().getOrDefault<bool>("includePressure", true); includeGradStressTerm_ = - dict().lookupOrDefault<bool>("includeGradStressTerm", true); + dict().getOrDefault<bool>("includeGradStressTerm", true); includeTransposeStresses_ = - dict().lookupOrDefault<bool>("includeTransposeStresses", true); - includeDivTerm_ = dict().lookupOrDefault<bool>("includeDivTerm", false); + dict().getOrDefault<bool>("includeTransposeStresses", true); + includeDivTerm_ = dict().getOrDefault<bool>("includeDivTerm", false); includeDistance_ = - dict().lookupOrDefault<bool> + dict().getOrDefault<bool> ( "includeDistance", adjointVars_.adjointTurbulence().ref().includeDistance() ); includeMeshMovement_ = - dict().lookupOrDefault<bool>("includeMeshMovement", true); + dict().getOrDefault<bool>("includeMeshMovement", true); includeObjective_ = - dict().lookupOrDefault<bool>("includeObjectiveContribution", true); + dict().getOrDefault<bool>("includeObjectiveContribution", true); writeGeometricInfo_ = - dict().lookupOrDefault<bool>("writeGeometricInfo", false); + dict().getOrDefault<bool>("writeGeometricInfo", false); // Allocate new solvers if necessary if (includeDistance_ && eikonalSolver_.empty()) diff --git a/src/optimisation/adjointOptimisation/adjoint/optimisation/adjointSensitivity/incompressible/sensitivitySurfacePoints/sensitivitySurfacePointsIncompressible.C b/src/optimisation/adjointOptimisation/adjoint/optimisation/adjointSensitivity/incompressible/sensitivitySurfacePoints/sensitivitySurfacePointsIncompressible.C index 92d1a1a040d..f856d240727 100644 --- a/src/optimisation/adjointOptimisation/adjoint/optimisation/adjointSensitivity/incompressible/sensitivitySurfacePoints/sensitivitySurfacePointsIncompressible.C +++ b/src/optimisation/adjointOptimisation/adjoint/optimisation/adjointSensitivity/incompressible/sensitivitySurfacePoints/sensitivitySurfacePointsIncompressible.C @@ -7,7 +7,7 @@ ------------------------------------------------------------------------------- Copyright (C) 2007-2019 PCOpt/NTUA Copyright (C) 2013-2019 FOSS GP - Copyright (C) 2019 OpenCFD Ltd. + Copyright (C) 2019-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -54,25 +54,25 @@ addToRunTimeSelectionTable void sensitivitySurfacePoints::read() { includeSurfaceArea_ = - dict().lookupOrDefault<bool>("includeSurfaceArea", false); + dict().getOrDefault<bool>("includeSurfaceArea", false); includePressureTerm_ = - dict().lookupOrDefault<bool>("includePressure", true); + dict().getOrDefault<bool>("includePressure", true); includeGradStressTerm_ = - dict().lookupOrDefault<bool>("includeGradStressTerm", true); + dict().getOrDefault<bool>("includeGradStressTerm", true); includeTransposeStresses_ = - dict().lookupOrDefault<bool>("includeTransposeStresses", true); + dict().getOrDefault<bool>("includeTransposeStresses", true); includeDivTerm_ = - dict().lookupOrDefault<bool>("includeDivTerm", false); + dict().getOrDefault<bool>("includeDivTerm", false); includeDistance_ = - dict().lookupOrDefault<bool> + dict().getOrDefault<bool> ( "includeDistance", adjointVars_.adjointTurbulence().ref().includeDistance() ); includeMeshMovement_ = - dict().lookupOrDefault<bool>("includeMeshMovement", true); + dict().getOrDefault<bool>("includeMeshMovement", true); includeObjective_ = - dict().lookupOrDefault<bool>("includeObjectiveContribution", true); + dict().getOrDefault<bool>("includeObjectiveContribution", true); // Allocate new solvers if necessary if (includeDistance_ && eikonalSolver_.empty()) diff --git a/src/optimisation/adjointOptimisation/adjoint/optimisation/adjointSensitivity/shapeSensitivitiesBase/shapeSensitivitiesBase.C b/src/optimisation/adjointOptimisation/adjoint/optimisation/adjointSensitivity/shapeSensitivitiesBase/shapeSensitivitiesBase.C index e2922f50fd2..df928a8c319 100644 --- a/src/optimisation/adjointOptimisation/adjoint/optimisation/adjointSensitivity/shapeSensitivitiesBase/shapeSensitivitiesBase.C +++ b/src/optimisation/adjointOptimisation/adjoint/optimisation/adjointSensitivity/shapeSensitivitiesBase/shapeSensitivitiesBase.C @@ -7,7 +7,7 @@ ------------------------------------------------------------------------------- Copyright (C) 2007-2019 PCOpt/NTUA Copyright (C) 2013-2019 FOSS GP - Copyright (C) 2019 OpenCFD Ltd. + Copyright (C) 2019-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -131,7 +131,7 @@ Foam::shapeSensitivitiesBase::shapeSensitivitiesBase surfaceFieldSuffix_(word::null), writeAllSurfaceFiles_ ( - dict.lookupOrDefault<bool> + dict.getOrDefault<bool> ( "writeAllSurfaceFiles", false diff --git a/src/optimisation/adjointOptimisation/adjoint/optimisation/lineSearch/ArmijoConditions/ArmijoConditions.C b/src/optimisation/adjointOptimisation/adjoint/optimisation/lineSearch/ArmijoConditions/ArmijoConditions.C index cbd48fd7c36..20f2efc38d0 100644 --- a/src/optimisation/adjointOptimisation/adjoint/optimisation/lineSearch/ArmijoConditions/ArmijoConditions.C +++ b/src/optimisation/adjointOptimisation/adjoint/optimisation/lineSearch/ArmijoConditions/ArmijoConditions.C @@ -7,7 +7,7 @@ ------------------------------------------------------------------------------- Copyright (C) 2007-2019 PCOpt/NTUA Copyright (C) 2013-2019 FOSS GP - Copyright (C) 2019 OpenCFD Ltd. + Copyright (C) 2019-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -53,7 +53,7 @@ Foam::ArmijoConditions::ArmijoConditions ) : lineSearch(dict, time), - c1_(coeffsDict().lookupOrDefault<scalar>("c1", 1.e-4)) + c1_(coeffsDict().getOrDefault<scalar>("c1", 1.e-4)) {} diff --git a/src/optimisation/adjointOptimisation/adjoint/optimisation/lineSearch/lineSearch/lineSearch.C b/src/optimisation/adjointOptimisation/adjoint/optimisation/lineSearch/lineSearch/lineSearch.C index b0f1095732a..7c88923ca0e 100644 --- a/src/optimisation/adjointOptimisation/adjoint/optimisation/lineSearch/lineSearch/lineSearch.C +++ b/src/optimisation/adjointOptimisation/adjoint/optimisation/lineSearch/lineSearch/lineSearch.C @@ -71,16 +71,16 @@ Foam::lineSearch::lineSearch(const dictionary& dict, const Time& time) newMeritValue_(Zero), prevMeritDeriv_ ( - lineSearchDict_.lookupOrDefault<scalar>("prevMeritDeriv", Zero) + lineSearchDict_.getOrDefault<scalar>("prevMeritDeriv", Zero) ), - initialStep_(dict.lookupOrDefault<scalar>("initialStep", 1.)), - minStep_(dict.lookupOrDefault<scalar>("minStep", 0.3)), + initialStep_(dict.getOrDefault<scalar>("initialStep", 1.)), + minStep_(dict.getOrDefault<scalar>("minStep", 0.3)), step_(Zero), - iter_(lineSearchDict_.lookupOrDefault<label>("iter", 0)), - maxIters_(dict.lookupOrDefault<label>("maxIters", 4)), + iter_(lineSearchDict_.getOrDefault<label>("iter", 0)), + maxIters_(dict.getOrDefault<label>("maxIters", 4)), extrapolateInitialStep_ ( - dict.lookupOrDefault<bool> + dict.getOrDefault<bool> ( "extrapolateInitialStep", false diff --git a/src/optimisation/adjointOptimisation/adjoint/optimisation/lineSearch/stepUpdate/bisection/bisection.C b/src/optimisation/adjointOptimisation/adjoint/optimisation/lineSearch/stepUpdate/bisection/bisection.C index 23aba76d176..3b2b53e7567 100644 --- a/src/optimisation/adjointOptimisation/adjoint/optimisation/lineSearch/stepUpdate/bisection/bisection.C +++ b/src/optimisation/adjointOptimisation/adjoint/optimisation/lineSearch/stepUpdate/bisection/bisection.C @@ -7,7 +7,7 @@ ------------------------------------------------------------------------------- Copyright (C) 2007-2019 PCOpt/NTUA Copyright (C) 2013-2019 FOSS GP - Copyright (C) 2019 OpenCFD Ltd. + Copyright (C) 2019-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -49,7 +49,7 @@ namespace Foam Foam::bisection::bisection(const dictionary& dict) : stepUpdate(dict), - ratio_(coeffsDict().lookupOrDefault<scalar>("ratio", 0.7)) + ratio_(coeffsDict().getOrDefault<scalar>("ratio", 0.7)) {} diff --git a/src/optimisation/adjointOptimisation/adjoint/optimisation/lineSearch/stepUpdate/quadratic/quadratic.C b/src/optimisation/adjointOptimisation/adjoint/optimisation/lineSearch/stepUpdate/quadratic/quadratic.C index 06cc041cab4..7a73727b557 100644 --- a/src/optimisation/adjointOptimisation/adjoint/optimisation/lineSearch/stepUpdate/quadratic/quadratic.C +++ b/src/optimisation/adjointOptimisation/adjoint/optimisation/lineSearch/stepUpdate/quadratic/quadratic.C @@ -7,7 +7,7 @@ ------------------------------------------------------------------------------- Copyright (C) 2007-2019 PCOpt/NTUA Copyright (C) 2013-2019 FOSS GP - Copyright (C) 2019 OpenCFD Ltd. + Copyright (C) 2019-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -49,7 +49,7 @@ namespace Foam Foam::quadratic::quadratic(const dictionary& dict) : stepUpdate(dict), - minRatio_(coeffsDict().lookupOrDefault<scalar>("minRatio", 0.1)), + minRatio_(coeffsDict().getOrDefault<scalar>("minRatio", 0.1)), firstMeritValue_(Zero), secondMeritValue_(Zero), meritDerivative_(Zero) diff --git a/src/optimisation/adjointOptimisation/adjoint/optimisation/lineSearch/stepUpdate/stepUpdate/stepUpdate.C b/src/optimisation/adjointOptimisation/adjoint/optimisation/lineSearch/stepUpdate/stepUpdate/stepUpdate.C index 62177d06878..f4b7c2c64d8 100644 --- a/src/optimisation/adjointOptimisation/adjoint/optimisation/lineSearch/stepUpdate/stepUpdate/stepUpdate.C +++ b/src/optimisation/adjointOptimisation/adjoint/optimisation/lineSearch/stepUpdate/stepUpdate/stepUpdate.C @@ -7,7 +7,7 @@ ------------------------------------------------------------------------------- Copyright (C) 2007-2019 PCOpt/NTUA Copyright (C) 2013-2019 FOSS GP - Copyright (C) 2019 OpenCFD Ltd. + Copyright (C) 2019-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -59,7 +59,7 @@ Foam::stepUpdate::stepUpdate(const dictionary& dict) Foam::autoPtr<Foam::stepUpdate> Foam::stepUpdate::New(const dictionary& dict) { const word type = - dict.lookupOrDefault<word>("stepUpdateType", "bisection"); + dict.getOrDefault<word>("stepUpdateType", "bisection"); Info<< "stepUpdate type : " << type << endl; diff --git a/src/optimisation/adjointOptimisation/adjoint/optimisation/optMeshMovement/optMeshMovement/optMeshMovement.C b/src/optimisation/adjointOptimisation/adjoint/optimisation/optMeshMovement/optMeshMovement/optMeshMovement.C index fbbb02b01b6..b26898be43b 100644 --- a/src/optimisation/adjointOptimisation/adjoint/optimisation/optMeshMovement/optMeshMovement/optMeshMovement.C +++ b/src/optimisation/adjointOptimisation/adjoint/optimisation/optMeshMovement/optMeshMovement/optMeshMovement.C @@ -7,7 +7,7 @@ ------------------------------------------------------------------------------- Copyright (C) 2007-2019 PCOpt/NTUA Copyright (C) 2013-2019 FOSS GP - Copyright (C) 2019 OpenCFD Ltd. + Copyright (C) 2019-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -73,7 +73,7 @@ Foam::optMeshMovement::optMeshMovement displMethodPtr_(displacementMethod::New(mesh_, patchIDs_)), writeMeshQualityMetrics_ ( - dict.lookupOrDefault("writeMeshQualityMetrics", false) + dict.getOrDefault("writeMeshQualityMetrics", false) ) { //- Set maxAllowedDisplacement if provided diff --git a/src/optimisation/adjointOptimisation/adjoint/optimisation/optimisationType/incompressible/shapeOptimisation/shapeOptimisationIncompressible.C b/src/optimisation/adjointOptimisation/adjoint/optimisation/optimisationType/incompressible/shapeOptimisation/shapeOptimisationIncompressible.C index ecbc1bc8a07..d183c40af4b 100644 --- a/src/optimisation/adjointOptimisation/adjoint/optimisation/optimisationType/incompressible/shapeOptimisation/shapeOptimisationIncompressible.C +++ b/src/optimisation/adjointOptimisation/adjoint/optimisation/optimisationType/incompressible/shapeOptimisation/shapeOptimisationIncompressible.C @@ -7,7 +7,7 @@ ------------------------------------------------------------------------------- Copyright (C) 2007-2019 PCOpt/NTUA Copyright (C) 2013-2019 FOSS GP - Copyright (C) 2019 OpenCFD Ltd. + Copyright (C) 2019-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -94,12 +94,12 @@ shapeOptimisation::shapeOptimisation writeEachMesh_ ( dict.subDict("optimisationType"). - lookupOrDefault<bool>("writeEachMesh", false) + getOrDefault<bool>("writeEachMesh", false) ), updateGeometry_ ( dict.subDict("optimisationType"). - lookupOrDefault<bool>("updateGeometry", true) + getOrDefault<bool>("updateGeometry", true) ) { // Note: to be updated diff --git a/src/optimisation/adjointOptimisation/adjoint/optimisation/updateMethod/BFGS/BFGS.C b/src/optimisation/adjointOptimisation/adjoint/optimisation/updateMethod/BFGS/BFGS.C index 9cd0671d9da..b451f6b6601 100644 --- a/src/optimisation/adjointOptimisation/adjoint/optimisation/updateMethod/BFGS/BFGS.C +++ b/src/optimisation/adjointOptimisation/adjoint/optimisation/updateMethod/BFGS/BFGS.C @@ -7,7 +7,7 @@ ------------------------------------------------------------------------------- Copyright (C) 2007-2019 PCOpt/NTUA Copyright (C) 2013-2019 FOSS GP - Copyright (C) 2019 OpenCFD Ltd. + Copyright (C) 2019-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -174,20 +174,20 @@ Foam::BFGS::BFGS updateMethod(mesh, dict), etaHessian_ ( - coeffsDict().lookupOrDefault<scalar>("etaHessian", 1) + coeffsDict().getOrDefault<scalar>("etaHessian", 1) ), nSteepestDescent_ ( - coeffsDict().lookupOrDefault<label>("nSteepestDescent", 1) + coeffsDict().getOrDefault<label>("nSteepestDescent", 1) ), activeDesignVars_(0), scaleFirstHessian_ ( - coeffsDict().lookupOrDefault<bool>("scaleFirstHessian", false) + coeffsDict().getOrDefault<bool>("scaleFirstHessian", false) ), curvatureThreshold_ ( - coeffsDict().lookupOrDefault<scalar>("curvatureThreshold", 1e-10) + coeffsDict().getOrDefault<scalar>("curvatureThreshold", 1e-10) ), // Construct null matrix since we dont know the dimension yet HessianInv_(), diff --git a/src/optimisation/adjointOptimisation/adjoint/optimisation/updateMethod/DBFGS/DBFGS.C b/src/optimisation/adjointOptimisation/adjoint/optimisation/updateMethod/DBFGS/DBFGS.C index fb38d03d126..6f38c121317 100644 --- a/src/optimisation/adjointOptimisation/adjoint/optimisation/updateMethod/DBFGS/DBFGS.C +++ b/src/optimisation/adjointOptimisation/adjoint/optimisation/updateMethod/DBFGS/DBFGS.C @@ -7,7 +7,7 @@ ------------------------------------------------------------------------------- Copyright (C) 2007-2019 PCOpt/NTUA Copyright (C) 2013-2019 FOSS GP - Copyright (C) 2019 OpenCFD Ltd. + Copyright (C) 2019-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -180,27 +180,27 @@ Foam::DBFGS::DBFGS // Construct null matrix since we dont know the dimension yet etaHessian_ ( - coeffsDict().lookupOrDefault<scalar>("etaHessian", 1) + coeffsDict().getOrDefault<scalar>("etaHessian", 1) ), nSteepestDescent_ ( - coeffsDict().lookupOrDefault<label>("nSteepestDescent", 1) + coeffsDict().getOrDefault<label>("nSteepestDescent", 1) ), activeDesignVars_(0), scaleFirstHessian_ ( - coeffsDict().lookupOrDefault<bool>("scaleFirstHessian", false) + coeffsDict().getOrDefault<bool>("scaleFirstHessian", false) ), curvatureThreshold_ ( - coeffsDict().lookupOrDefault<scalar>("curvatureThreshold", 1e-10) + coeffsDict().getOrDefault<scalar>("curvatureThreshold", 1e-10) ), Hessian_(), HessianOld_(), derivativesOld_(0), correctionOld_(0), counter_(0), - gamma_(coeffsDict().lookupOrDefault<scalar>("gamma", 0.2)) + gamma_(coeffsDict().getOrDefault<scalar>("gamma", 0.2)) { if diff --git a/src/optimisation/adjointOptimisation/adjoint/optimisation/updateMethod/LBFGS/LBFGS.C b/src/optimisation/adjointOptimisation/adjoint/optimisation/updateMethod/LBFGS/LBFGS.C index 5478281842a..b782371105d 100644 --- a/src/optimisation/adjointOptimisation/adjoint/optimisation/updateMethod/LBFGS/LBFGS.C +++ b/src/optimisation/adjointOptimisation/adjoint/optimisation/updateMethod/LBFGS/LBFGS.C @@ -7,7 +7,7 @@ ------------------------------------------------------------------------------- Copyright (C) 2007-2019 PCOpt/NTUA Copyright (C) 2013-2019 FOSS GP - Copyright (C) 2019 OpenCFD Ltd. + Copyright (C) 2019-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -202,16 +202,16 @@ Foam::LBFGS::LBFGS // Construct null matrix since we dont know the dimension yet etaHessian_ ( - coeffsDict().lookupOrDefault<scalar>("etaHessian", 1) + coeffsDict().getOrDefault<scalar>("etaHessian", 1) ), nSteepestDescent_ ( - coeffsDict().lookupOrDefault<label>("nSteepestDescent", 1) + coeffsDict().getOrDefault<label>("nSteepestDescent", 1) ), activeDesignVars_(0), nPrevSteps_ ( - coeffsDict().lookupOrDefault<label>("nPrevSteps", 10) + coeffsDict().getOrDefault<label>("nPrevSteps", 10) ), y_(nPrevSteps_), s_(nPrevSteps_), diff --git a/src/optimisation/adjointOptimisation/adjoint/optimisation/updateMethod/SQP/SQP.C b/src/optimisation/adjointOptimisation/adjoint/optimisation/updateMethod/SQP/SQP.C index 9d988abe83c..0563693e97e 100644 --- a/src/optimisation/adjointOptimisation/adjoint/optimisation/updateMethod/SQP/SQP.C +++ b/src/optimisation/adjointOptimisation/adjoint/optimisation/updateMethod/SQP/SQP.C @@ -7,7 +7,7 @@ ------------------------------------------------------------------------------- Copyright (C) 2007-2019 PCOpt/NTUA Copyright (C) 2013-2019 FOSS GP - Copyright (C) 2019 OpenCFD Ltd. + Copyright (C) 2019-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -282,16 +282,16 @@ Foam::SQP::SQP(const fvMesh& mesh, const dictionary& dict) etaHessian_ ( - coeffsDict().lookupOrDefault<scalar>("etaHessian", 1) + coeffsDict().getOrDefault<scalar>("etaHessian", 1) ), activeDesignVars_(0), scaleFirstHessian_ ( - coeffsDict().lookupOrDefault<bool>("scaleFirstHessian", false) + coeffsDict().getOrDefault<bool>("scaleFirstHessian", false) ), dumpingThreshold_ ( - coeffsDict().lookupOrDefault<scalar>("dumpingThreshold", 0.2) + coeffsDict().getOrDefault<scalar>("dumpingThreshold", 0.2) ), LagrangianDerivatives_(0), Hessian_(), // construct null matrix since we dont know the dimension yet @@ -310,7 +310,7 @@ Foam::SQP::SQP(const fvMesh& mesh, const dictionary& dict) mu_(Zero), delta_ ( - coeffsDict().lookupOrDefault<scalar>("delta", 0.1) + coeffsDict().getOrDefault<scalar>("delta", 0.1) ) { if diff --git a/src/optimisation/adjointOptimisation/adjoint/optimisation/updateMethod/SR1/SR1.C b/src/optimisation/adjointOptimisation/adjoint/optimisation/updateMethod/SR1/SR1.C index b582b57a249..6cba4953fe3 100644 --- a/src/optimisation/adjointOptimisation/adjoint/optimisation/updateMethod/SR1/SR1.C +++ b/src/optimisation/adjointOptimisation/adjoint/optimisation/updateMethod/SR1/SR1.C @@ -7,7 +7,7 @@ ------------------------------------------------------------------------------- Copyright (C) 2007-2019 PCOpt/NTUA Copyright (C) 2013-2019 FOSS GP - Copyright (C) 2019 OpenCFD Ltd. + Copyright (C) 2019-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -163,15 +163,15 @@ Foam::SR1::SR1(const fvMesh& mesh, const dictionary& dict) // Construct null matrix since we dont know the dimension yet etaHessian_ ( - coeffsDict().lookupOrDefault<scalar>("etaHessian", 1) + coeffsDict().getOrDefault<scalar>("etaHessian", 1) ), nSteepestDescent_ ( - coeffsDict().lookupOrDefault<label>("nSteepestDescent", 1) + coeffsDict().getOrDefault<label>("nSteepestDescent", 1) ), ratioThreshold_ ( - coeffsDict().lookupOrDefault<scalar>("ratioThreshold", 1e-08) + coeffsDict().getOrDefault<scalar>("ratioThreshold", 1e-08) ), activeDesignVars_(0), HessianInv_(), diff --git a/src/optimisation/adjointOptimisation/adjoint/optimisation/updateMethod/conjugateGradient/conjugateGradient.C b/src/optimisation/adjointOptimisation/adjoint/optimisation/updateMethod/conjugateGradient/conjugateGradient.C index 3e8ca3747ad..bba5598e5cc 100644 --- a/src/optimisation/adjointOptimisation/adjoint/optimisation/updateMethod/conjugateGradient/conjugateGradient.C +++ b/src/optimisation/adjointOptimisation/adjoint/optimisation/updateMethod/conjugateGradient/conjugateGradient.C @@ -7,7 +7,7 @@ ------------------------------------------------------------------------------- Copyright (C) 2007-2019 PCOpt/NTUA Copyright (C) 2013-2019 FOSS GP - Copyright (C) 2019 OpenCFD Ltd. + Copyright (C) 2019-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -96,7 +96,7 @@ Foam::conjugateGradient::conjugateGradient counter_(0), betaType_ ( - coeffsDict().lookupOrDefault<word>("betaType", "FletcherReeves") + coeffsDict().getOrDefault<word>("betaType", "FletcherReeves") ) { if diff --git a/src/optimisation/adjointOptimisation/adjoint/optimisation/updateMethod/constraintProjection/constraintProjection.C b/src/optimisation/adjointOptimisation/adjoint/optimisation/updateMethod/constraintProjection/constraintProjection.C index 86d5578276e..25cb7f27c7f 100644 --- a/src/optimisation/adjointOptimisation/adjoint/optimisation/updateMethod/constraintProjection/constraintProjection.C +++ b/src/optimisation/adjointOptimisation/adjoint/optimisation/updateMethod/constraintProjection/constraintProjection.C @@ -7,7 +7,7 @@ ------------------------------------------------------------------------------- Copyright (C) 2007-2019 PCOpt/NTUA Copyright (C) 2013-2019 FOSS GP - Copyright (C) 2019 OpenCFD Ltd. + Copyright (C) 2019-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -61,7 +61,7 @@ Foam::constraintProjection::constraintProjection constrainedOptimisationMethod(mesh, dict), useCorrection_ ( - coeffsDict().lookupOrDefault<bool>("useCorrection", true) + coeffsDict().getOrDefault<bool>("useCorrection", true) ) {} diff --git a/src/optimisation/adjointOptimisation/adjoint/optimisation/updateMethod/updateMethod/updateMethod.C b/src/optimisation/adjointOptimisation/adjoint/optimisation/updateMethod/updateMethod/updateMethod.C index ed8f9a426f5..1410824a72b 100644 --- a/src/optimisation/adjointOptimisation/adjoint/optimisation/updateMethod/updateMethod/updateMethod.C +++ b/src/optimisation/adjointOptimisation/adjoint/optimisation/updateMethod/updateMethod/updateMethod.C @@ -228,7 +228,7 @@ Foam::updateMethod::updateMethod correctionFolder_(mesh_.time().globalPath()/"optimisation"/"correction"), globalSum_ ( - dict.lookupOrDefault<bool>("globalSum", false) + dict.getOrDefault<bool>("globalSum", false) ) { // Create folder to store corrections diff --git a/src/optimisation/adjointOptimisation/adjoint/parameterization/NURBS/NURBS3DVolume/NURBS3DVolume/NURBS3DVolume.C b/src/optimisation/adjointOptimisation/adjoint/parameterization/NURBS/NURBS3DVolume/NURBS3DVolume/NURBS3DVolume.C index 4a4b1858a5f..c6346ac5592 100644 --- a/src/optimisation/adjointOptimisation/adjoint/parameterization/NURBS/NURBS3DVolume/NURBS3DVolume/NURBS3DVolume.C +++ b/src/optimisation/adjointOptimisation/adjoint/parameterization/NURBS/NURBS3DVolume/NURBS3DVolume/NURBS3DVolume.C @@ -649,49 +649,49 @@ Foam::NURBS3DVolume::NURBS3DVolume basisU_(dict.get<label>("nCPsU"), dict.get<label>("degreeU")), basisV_(dict.get<label>("nCPsV"), dict.get<label>("degreeV")), basisW_(dict.get<label>("nCPsW"), dict.get<label>("degreeW")), - maxIter_(dict.lookupOrDefault<label>("maxIterations", 10)), - tolerance_(dict.lookupOrDefault<scalar>("tolerance", 1.e-10)), - nMaxBound_(dict.lookupOrDefault<scalar>("nMaxBoundIterations", 4)), + maxIter_(dict.getOrDefault<label>("maxIterations", 10)), + tolerance_(dict.getOrDefault<scalar>("tolerance", 1.e-10)), + nMaxBound_(dict.getOrDefault<scalar>("nMaxBoundIterations", 4)), cps_(0), mapPtr_(nullptr), reverseMapPtr_(nullptr), parametricCoordinatesPtr_(nullptr), localSystemCoordinates_(mesh_.nPoints(), Zero), - confineX1movement_(dict.lookupOrDefault<bool>("confineX1movement", false)), - confineX2movement_(dict.lookupOrDefault<bool>("confineX2movement", false)), - confineX3movement_(dict.lookupOrDefault<bool>("confineX3movement", false)), + confineX1movement_(dict.getOrDefault<bool>("confineX1movement", false)), + confineX2movement_(dict.getOrDefault<bool>("confineX2movement", false)), + confineX3movement_(dict.getOrDefault<bool>("confineX3movement", false)), confineBoundaryControlPoints_ ( - dict.lookupOrDefault<bool>("confineBoundaryControlPoints", true) + dict.getOrDefault<bool>("confineBoundaryControlPoints", true) ), boundUMinCPs_ ( - dict.lookupOrDefault<boolListList3>("boundUMinCPs", boolListList3(0)) + dict.getOrDefault<boolListList3>("boundUMinCPs", boolListList3(0)) ), boundUMaxCPs_ ( - dict.lookupOrDefault<boolListList3>("boundUMaxCPs", boolListList3(0)) + dict.getOrDefault<boolListList3>("boundUMaxCPs", boolListList3(0)) ), boundVMinCPs_ ( - dict.lookupOrDefault<boolListList3>("boundVMinCPs", boolListList3(0)) + dict.getOrDefault<boolListList3>("boundVMinCPs", boolListList3(0)) ), boundVMaxCPs_ ( - dict.lookupOrDefault<boolListList3>("boundVMaxCPs", boolListList3(0)) + dict.getOrDefault<boolListList3>("boundVMaxCPs", boolListList3(0)) ), boundWMinCPs_ ( - dict.lookupOrDefault<boolListList3>("boundWMinCPs", boolListList3(0)) + dict.getOrDefault<boolListList3>("boundWMinCPs", boolListList3(0)) ), boundWMaxCPs_ ( - dict.lookupOrDefault<boolListList3>("boundWMaxCPs", boolListList3(0)) + dict.getOrDefault<boolListList3>("boundWMaxCPs", boolListList3(0)) ), activeControlPoints_(0), //zero here, execute sanity checks first activeDesignVariables_(0), //zero here, execute sanity checks first cpsFolder_("controlPoints"), - readStoredData_(dict.lookupOrDefault<bool>("readStoredData", true)) + readStoredData_(dict.getOrDefault<bool>("readStoredData", true)) { // Create folders makeFolders(); diff --git a/src/optimisation/adjointOptimisation/adjoint/solvers/adjointSolverManager/adjointSolverManager.C b/src/optimisation/adjointOptimisation/adjoint/solvers/adjointSolverManager/adjointSolverManager.C index e7c9fb78c5f..e4d8c3813d5 100644 --- a/src/optimisation/adjointOptimisation/adjoint/solvers/adjointSolverManager/adjointSolverManager.C +++ b/src/optimisation/adjointOptimisation/adjoint/solvers/adjointSolverManager/adjointSolverManager.C @@ -7,7 +7,7 @@ ------------------------------------------------------------------------------- Copyright (C) 2007-2019 PCOpt/NTUA Copyright (C) 2013-2019 FOSS GP - Copyright (C) 2019 OpenCFD Ltd. + Copyright (C) 2019-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -67,7 +67,7 @@ Foam::adjointSolverManager::adjointSolverManager constraintSolverIDs_(0), operatingPointWeight_ ( - dict.lookupOrDefault<scalar>("operatingPointWeight", 1) + dict.getOrDefault<scalar>("operatingPointWeight", 1) ) { const dictionary& adjointSolversDict = dict.subDict("adjointSolvers"); diff --git a/src/optimisation/adjointOptimisation/adjoint/solvers/adjointSolvers/adjointSolver/adjointSolver.C b/src/optimisation/adjointOptimisation/adjoint/solvers/adjointSolvers/adjointSolver/adjointSolver.C index 98f385c4085..c8abc35f60d 100644 --- a/src/optimisation/adjointOptimisation/adjoint/solvers/adjointSolvers/adjointSolver/adjointSolver.C +++ b/src/optimisation/adjointOptimisation/adjoint/solvers/adjointSolvers/adjointSolver/adjointSolver.C @@ -7,7 +7,7 @@ ------------------------------------------------------------------------------- Copyright (C) 2007-2019 PCOpt/NTUA Copyright (C) 2013-2019 FOSS GP - Copyright (C) 2019 OpenCFD Ltd. + Copyright (C) 2019-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -63,9 +63,9 @@ Foam::adjointSolver::adjointSolver sensitivities_(nullptr), computeSensitivities_ ( - dict.lookupOrDefault<bool>("computeSensitivities", true) + dict.getOrDefault<bool>("computeSensitivities", true) ), - isConstraint_(dict.lookupOrDefault<bool>("isConstraint", false)) + isConstraint_(dict.getOrDefault<bool>("isConstraint", false)) { // Update objective-related quantities to get correct derivatives // in case of continuation @@ -128,7 +128,7 @@ bool Foam::adjointSolver::readDict(const dictionary& dict) if (solver::readDict(dict)) { computeSensitivities_ = - dict.lookupOrDefault<bool>("computeSensitivities", true); + dict.getOrDefault<bool>("computeSensitivities", true); objectiveManagerPtr_->readDict(dict.subDict("objectives")); diff --git a/src/optimisation/adjointOptimisation/adjoint/solvers/primalSolvers/incompressible/incompressiblePrimalSolver/incompressiblePrimalSolver.C b/src/optimisation/adjointOptimisation/adjoint/solvers/primalSolvers/incompressible/incompressiblePrimalSolver/incompressiblePrimalSolver.C index c540c919ea3..bfc3a4bc11a 100644 --- a/src/optimisation/adjointOptimisation/adjoint/solvers/primalSolvers/incompressible/incompressiblePrimalSolver/incompressiblePrimalSolver.C +++ b/src/optimisation/adjointOptimisation/adjoint/solvers/primalSolvers/incompressible/incompressiblePrimalSolver/incompressiblePrimalSolver.C @@ -7,7 +7,7 @@ ------------------------------------------------------------------------------- Copyright (C) 2007-2019 PCOpt/NTUA Copyright (C) 2013-2019 FOSS GP - Copyright (C) 2019 OpenCFD Ltd. + Copyright (C) 2019-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -61,12 +61,12 @@ Foam::incompressiblePrimalSolver::incompressiblePrimalSolver phiReconstructionTol_ ( dict.subOrEmptyDict("fieldReconstruction"). - lookupOrDefault<scalar>("tolerance", scalar(5.e-5)) + getOrDefault<scalar>("tolerance", 5.e-5) ), phiReconstructionIters_ ( dict.subOrEmptyDict("fieldReconstruction"). - lookupOrDefault<label>("iters", label(10)) + getOrDefault<label>("iters", 10) ), fvOptions_(nullptr) {} diff --git a/src/optimisation/adjointOptimisation/adjoint/solvers/solver/solver.C b/src/optimisation/adjointOptimisation/adjoint/solvers/solver/solver.C index f35faa49f4c..4beb85bf0ca 100644 --- a/src/optimisation/adjointOptimisation/adjoint/solvers/solver/solver.C +++ b/src/optimisation/adjointOptimisation/adjoint/solvers/solver/solver.C @@ -7,7 +7,7 @@ ------------------------------------------------------------------------------- Copyright (C) 2007-2019 PCOpt/NTUA Copyright (C) 2013-2019 FOSS GP - Copyright (C) 2019 OpenCFD Ltd. + Copyright (C) 2019-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -63,7 +63,7 @@ Foam::solver::solver managerType_(managerType), dict_(dict), solverName_(dict.dictName()), - active_(dict.lookupOrDefault<bool>("active", true)), + active_(dict.getOrDefault("active", true)), optTypeSource_(nullptr), vars_(nullptr) {} @@ -87,7 +87,7 @@ bool Foam::solver::readDict(const dictionary& dict) // running. At the very least, this should trigger writing before stopping. // Additional problems if we have an adjontSolver corresponding to a // constraint. To be revisited - //active_ = dict.lookupOrDefault<bool>("active", true); + //active_ = dict.getOrDefault<bool>("active", true); return true; } diff --git a/src/optimisation/adjointOptimisation/adjoint/solvers/solverControl/SIMPLEControl/optimisation/SIMPLEControlOpt.C b/src/optimisation/adjointOptimisation/adjoint/solvers/solverControl/SIMPLEControl/optimisation/SIMPLEControlOpt.C index de5c9b9611d..3fe260bb6ec 100644 --- a/src/optimisation/adjointOptimisation/adjoint/solvers/solverControl/SIMPLEControl/optimisation/SIMPLEControlOpt.C +++ b/src/optimisation/adjointOptimisation/adjoint/solvers/solverControl/SIMPLEControl/optimisation/SIMPLEControlOpt.C @@ -7,7 +7,7 @@ ------------------------------------------------------------------------------- Copyright (C) 2007-2019 PCOpt/NTUA Copyright (C) 2013-2019 FOSS GP - Copyright (C) 2019 OpenCFD Ltd. + Copyright (C) 2019-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -43,7 +43,7 @@ namespace Foam bool Foam::SIMPLEControlOpt::read() { - nInitialIters_ = dict().lookupOrDefault<label>("nInitialIters", nIters_); + nInitialIters_ = dict().getOrDefault<label>("nInitialIters", nIters_); return SIMPLEControl::read(); } diff --git a/src/optimisation/adjointOptimisation/adjoint/solvers/solverControl/solverControl/solverControl.C b/src/optimisation/adjointOptimisation/adjoint/solvers/solverControl/solverControl/solverControl.C index 653340631d2..eb29690f57a 100644 --- a/src/optimisation/adjointOptimisation/adjoint/solvers/solverControl/solverControl/solverControl.C +++ b/src/optimisation/adjointOptimisation/adjoint/solvers/solverControl/solverControl/solverControl.C @@ -7,7 +7,7 @@ ------------------------------------------------------------------------------- Copyright (C) 2007-2019 PCOpt/NTUA Copyright (C) 2013-2019 FOSS GP - Copyright (C) 2019 OpenCFD Ltd. + Copyright (C) 2019-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -41,11 +41,11 @@ namespace Foam bool Foam::solverControl::read() { // Read basic entries - printMaxMags_ = solutionDict().lookupOrDefault<bool>("printMaxMags", false); + printMaxMags_ = solutionDict().getOrDefault<bool>("printMaxMags", false); // Manage averaging dictionary averagingDict = solutionDict().subOrEmptyDict("averaging"); - averageStartIter_ = averagingDict.lookupOrDefault<label>("startIter", -1); + averageStartIter_ = averagingDict.getOrDefault<label>("startIter", -1); return true; } @@ -58,17 +58,17 @@ Foam::solverControl::solverControl(const solver& solver) solver_(solver), printMaxMags_(true), iter_(0), - averageIter_(solver.lookupOrDefault<label>("averageIter", 0)), + averageIter_(solver.getOrDefault<label>("averageIter", 0)), averageStartIter_(-1), // Non run-time modifiable options read in the constructor only storeInitValues_ ( - solverDict().lookupOrDefault<bool>("storeInitValues", false) + solverDict().getOrDefault<bool>("storeInitValues", false) ), average_ ( solutionDict().subOrEmptyDict("averaging"). - lookupOrDefault<bool>("average", false) + getOrDefault<bool>("average", false) ) { read(); diff --git a/src/optimisation/adjointOptimisation/adjoint/solvers/variablesSet/incompressible/incompressibleVars.C b/src/optimisation/adjointOptimisation/adjoint/solvers/variablesSet/incompressible/incompressibleVars.C index a8b4716d0f1..45fb8baffe6 100644 --- a/src/optimisation/adjointOptimisation/adjoint/solvers/variablesSet/incompressible/incompressibleVars.C +++ b/src/optimisation/adjointOptimisation/adjoint/solvers/variablesSet/incompressible/incompressibleVars.C @@ -7,7 +7,7 @@ ------------------------------------------------------------------------------- Copyright (C) 2007-2019 PCOpt/NTUA Copyright (C) 2013-2019 FOSS GP - Copyright (C) 2019 OpenCFD Ltd. + Copyright (C) 2019-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -253,7 +253,7 @@ incompressibleVars::incompressibleVars correctBoundaryConditions_ ( SolverControl.solverDict().subOrEmptyDict("fieldReconstruction"). - lookupOrDefault<bool>("reconstruct", false) + getOrDefault<bool>("reconstruct", false) ) { setFields(); diff --git a/src/optimisation/adjointOptimisation/adjoint/solvers/variablesSet/variablesSet/variablesSet.C b/src/optimisation/adjointOptimisation/adjoint/solvers/variablesSet/variablesSet/variablesSet.C index 5348d501480..322d556a679 100644 --- a/src/optimisation/adjointOptimisation/adjoint/solvers/variablesSet/variablesSet/variablesSet.C +++ b/src/optimisation/adjointOptimisation/adjoint/solvers/variablesSet/variablesSet/variablesSet.C @@ -7,7 +7,7 @@ ------------------------------------------------------------------------------- Copyright (C) 2007-2019 PCOpt/NTUA Copyright (C) 2013-2019 FOSS GP - Copyright (C) 2019 OpenCFD Ltd. + Copyright (C) 2019-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -67,7 +67,7 @@ variablesSet::variablesSet solverName_(dict.dictName()), useSolverNameForFields_ ( - dict.lookupOrDefault<bool>("useSolverNameForFields", false) + dict.getOrDefault<bool>("useSolverNameForFields", false) ) {} diff --git a/src/optimisation/adjointOptimisation/adjoint/turbulenceModels/incompressibleAdjoint/adjointRAS/adjointRASModel/adjointRASModel.C b/src/optimisation/adjointOptimisation/adjoint/turbulenceModels/incompressibleAdjoint/adjointRAS/adjointRASModel/adjointRASModel.C index 2c3e88209a9..6e81abaa016 100644 --- a/src/optimisation/adjointOptimisation/adjoint/turbulenceModels/incompressibleAdjoint/adjointRAS/adjointRASModel/adjointRASModel.C +++ b/src/optimisation/adjointOptimisation/adjoint/turbulenceModels/incompressibleAdjoint/adjointRAS/adjointRASModel/adjointRASModel.C @@ -7,7 +7,7 @@ ------------------------------------------------------------------------------- Copyright (C) 2007-2019 PCOpt/NTUA Copyright (C) 2013-2019 FOSS GP - Copyright (C) 2019 OpenCFD Ltd. + Copyright (C) 2019-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -140,7 +140,7 @@ adjointRASModel::adjointRASModel objectiveManager_(objManager), adjointTurbulence_(get<word>("adjointTurbulence")), - printCoeffs_(lookupOrDefault<Switch>("printCoeffs", false)), + printCoeffs_(getOrDefault<Switch>("printCoeffs", false)), coeffDict_(subOrEmptyDict(type + "Coeffs")), y_(mesh_), diff --git a/src/optimisation/adjointOptimisation/adjoint/turbulenceModels/incompressibleAdjoint/adjointRAS/adjointSpalartAllmaras/adjointSpalartAllmaras.C b/src/optimisation/adjointOptimisation/adjoint/turbulenceModels/incompressibleAdjoint/adjointRAS/adjointSpalartAllmaras/adjointSpalartAllmaras.C index d194edc955c..073ea69ffde 100644 --- a/src/optimisation/adjointOptimisation/adjoint/turbulenceModels/incompressibleAdjoint/adjointRAS/adjointSpalartAllmaras/adjointSpalartAllmaras.C +++ b/src/optimisation/adjointOptimisation/adjoint/turbulenceModels/incompressibleAdjoint/adjointRAS/adjointSpalartAllmaras/adjointSpalartAllmaras.C @@ -7,7 +7,7 @@ ------------------------------------------------------------------------------- Copyright (C) 2007-2019 PCOpt/NTUA Copyright (C) 2013-2019 FOSS GP - Copyright (C) 2019 OpenCFD Ltd. + Copyright (C) 2019-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -491,7 +491,7 @@ adjointSpalartAllmaras::adjointSpalartAllmaras sigmaNut_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "sigmaNut", this->coeffDict_, @@ -500,7 +500,7 @@ adjointSpalartAllmaras::adjointSpalartAllmaras ), kappa_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "kappa", this->coeffDict_, @@ -510,7 +510,7 @@ adjointSpalartAllmaras::adjointSpalartAllmaras Cb1_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "Cb1", this->coeffDict_, @@ -519,7 +519,7 @@ adjointSpalartAllmaras::adjointSpalartAllmaras ), Cb2_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "Cb2", this->coeffDict_, @@ -529,7 +529,7 @@ adjointSpalartAllmaras::adjointSpalartAllmaras Cw1_(Cb1_/sqr(kappa_) + (1.0 + Cb2_)/sigmaNut_), Cw2_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "Cw2", this->coeffDict_, @@ -538,7 +538,7 @@ adjointSpalartAllmaras::adjointSpalartAllmaras ), Cw3_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "Cw3", this->coeffDict_, @@ -547,7 +547,7 @@ adjointSpalartAllmaras::adjointSpalartAllmaras ), Cv1_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "Cv1", this->coeffDict_, @@ -556,7 +556,7 @@ adjointSpalartAllmaras::adjointSpalartAllmaras ), Cs_ ( - dimensioned<scalar>::lookupOrAddToDict + dimensioned<scalar>::getOrAddToDict ( "Cs", this->coeffDict_, @@ -566,7 +566,7 @@ adjointSpalartAllmaras::adjointSpalartAllmaras limitAdjointProduction_ ( - coeffDict_.lookupOrDefault<bool>("limitAdjointProduction",true) + coeffDict_.getOrDefault("limitAdjointProduction", true) ), y_(primalVars_.RASModelVariables()().d()), diff --git a/src/overset/cellCellStencil/cellVolumeWeight/cellVolumeWeightCellCellStencil.C b/src/overset/cellCellStencil/cellVolumeWeight/cellVolumeWeightCellCellStencil.C index 6769ce901da..a2256388322 100644 --- a/src/overset/cellCellStencil/cellVolumeWeight/cellVolumeWeightCellCellStencil.C +++ b/src/overset/cellCellStencil/cellVolumeWeight/cellVolumeWeightCellCellStencil.C @@ -5,7 +5,7 @@ \\ / A nd | www.openfoam.com \\/ M anipulation | ------------------------------------------------------------------------------- - Copyright (C) 2014-2019 OpenCFD Ltd. + Copyright (C) 2014-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -746,7 +746,7 @@ Foam::cellCellStencils::cellVolumeWeight::~cellVolumeWeight() bool Foam::cellCellStencils::cellVolumeWeight::update() { - scalar layerRelax(dict_.lookupOrDefault("layerRelax", 1.0)); + scalar layerRelax(dict_.getOrDefault("layerRelax", 1.0)); const labelIOList& zoneID = this->zoneID(); label nZones = gMax(zoneID)+1; diff --git a/src/overset/cellCellStencil/inverseDistance/inverseDistanceCellCellStencil.C b/src/overset/cellCellStencil/inverseDistance/inverseDistanceCellCellStencil.C index 7742b716e76..616ecce3203 100644 --- a/src/overset/cellCellStencil/inverseDistance/inverseDistanceCellCellStencil.C +++ b/src/overset/cellCellStencil/inverseDistance/inverseDistanceCellCellStencil.C @@ -5,7 +5,7 @@ \\ / A nd | www.openfoam.com \\/ M anipulation | ------------------------------------------------------------------------------- - Copyright (C) 2017-2019 OpenCFD Ltd. + Copyright (C) 2017-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -1741,9 +1741,9 @@ Foam::cellCellStencils::inverseDistance::~inverseDistance() bool Foam::cellCellStencils::inverseDistance::update() { - scalar layerRelax(dict_.lookupOrDefault("layerRelax", 1.0)); + scalar layerRelax(dict_.getOrDefault("layerRelax", 1.0)); - scalar tol = dict_.lookupOrDefault("tolerance", 1e-10); + scalar tol = dict_.getOrDefault("tolerance", 1e-10); smallVec_ = mesh_.bounds().span()*tol; const labelIOList& zoneID = this->zoneID(); diff --git a/src/overset/cellCellStencil/trackingInverseDistance/trackingInverseDistanceCellCellStencil.C b/src/overset/cellCellStencil/trackingInverseDistance/trackingInverseDistanceCellCellStencil.C index 79ee61fe857..7f643ba29e2 100644 --- a/src/overset/cellCellStencil/trackingInverseDistance/trackingInverseDistanceCellCellStencil.C +++ b/src/overset/cellCellStencil/trackingInverseDistance/trackingInverseDistanceCellCellStencil.C @@ -5,7 +5,7 @@ \\ / A nd | www.openfoam.com \\/ M anipulation | ------------------------------------------------------------------------------- - Copyright (C) 2017-2019 OpenCFD Ltd. + Copyright (C) 2017-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -570,7 +570,7 @@ bool Foam::cellCellStencils::trackingInverseDistance::update() { DebugInfo<< FUNCTION_NAME << " : Start of analysis" << endl; - scalar layerRelax(dict_.lookupOrDefault("layerRelax", 1.0)); + scalar layerRelax(dict_.getOrDefault("layerRelax", 1.0)); const labelIOList& zoneID = this->zoneID(); label nZones = meshParts_.size(); diff --git a/src/overset/regionsToCell/regionsToCell.C b/src/overset/regionsToCell/regionsToCell.C index 56b48187181..b3e71e810f6 100644 --- a/src/overset/regionsToCell/regionsToCell.C +++ b/src/overset/regionsToCell/regionsToCell.C @@ -5,7 +5,7 @@ \\ / A nd | www.openfoam.com \\/ M anipulation | ------------------------------------------------------------------------------- - Copyright (C) 2016-2018 OpenCFD Ltd. + Copyright (C) 2016-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -433,14 +433,14 @@ Foam::regionsToCell::regionsToCell ) : topoSetCellSource(mesh), - setName_(dict.lookupOrDefault<word>("set", "none")), + setName_(dict.getOrDefault<word>("set", "none")), insidePoints_ ( dict.found("insidePoints") ? dict.lookup("insidePoints") : dict.lookup("insidePoint") ), - nErode_(dict.lookupOrDefault<label>("nErode", 0)) + nErode_(dict.getOrDefault<label>("nErode", 0)) {} diff --git a/src/parallel/decompose/decompositionMethods/decompositionConstraints/geometric/geometricConstraint.C b/src/parallel/decompose/decompositionMethods/decompositionConstraints/geometric/geometricConstraint.C index fe0f2402a92..b8af9bbd7a4 100644 --- a/src/parallel/decompose/decompositionMethods/decompositionConstraints/geometric/geometricConstraint.C +++ b/src/parallel/decompose/decompositionMethods/decompositionConstraints/geometric/geometricConstraint.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. @@ -60,7 +60,7 @@ Foam::decompositionConstraints::geometric::geometric decompositionConstraint(dict, typeName), sources_(), selection_(coeffDict_.subDict("selection")), - grow_(dict.lookupOrDefault<bool>("grow", false)) + grow_(dict.getOrDefault("grow", false)) { // Stored as dictionary, since we do not have the mesh at this stage diff --git a/src/parallel/decompose/decompositionMethods/decompositionMethod/decompositionMethod.C b/src/parallel/decompose/decompositionMethods/decompositionMethod/decompositionMethod.C index 4b00765aee3..c4e16cee91c 100644 --- a/src/parallel/decompose/decompositionMethods/decompositionMethod/decompositionMethod.C +++ b/src/parallel/decompose/decompositionMethods/decompositionMethod/decompositionMethod.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. @@ -173,7 +173,7 @@ void Foam::decompositionMethod::readConstraints() const dictionary& dict = dEntry.dict(); - if (dict.lookupOrDefault("enabled", true)) + if (dict.getOrDefault("enabled", true)) { constraints_.append(decompositionConstraint::New(dict)); } diff --git a/src/parallel/decompose/decompositionMethods/hierarchGeomDecomp/hierarchGeomDecomp.C b/src/parallel/decompose/decompositionMethods/hierarchGeomDecomp/hierarchGeomDecomp.C index 91a3892221e..74d6b55fe05 100644 --- a/src/parallel/decompose/decompositionMethods/hierarchGeomDecomp/hierarchGeomDecomp.C +++ b/src/parallel/decompose/decompositionMethods/hierarchGeomDecomp/hierarchGeomDecomp.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. @@ -57,7 +57,7 @@ namespace Foam void Foam::hierarchGeomDecomp::setOrder() { - const word order(coeffsDict_.lookupOrDefault<word>("order", "")); + const word order(coeffsDict_.getOrDefault<word>("order", "")); if (order.empty()) { diff --git a/src/parallel/decompose/ptscotchDecomp/ptscotchDecomp.C b/src/parallel/decompose/ptscotchDecomp/ptscotchDecomp.C index 046d97c57e1..d51804c3b92 100644 --- a/src/parallel/decompose/ptscotchDecomp/ptscotchDecomp.C +++ b/src/parallel/decompose/ptscotchDecomp/ptscotchDecomp.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2017 OpenFOAM Foundation - Copyright (C) 2015-2019 OpenCFD Ltd. + Copyright (C) 2015-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -325,7 +325,7 @@ Foam::label Foam::ptscotchDecomp::decompose } // Dump graph - if (coeffsDict_.lookupOrDefault("writeGraph", false)) + if (coeffsDict_.getOrDefault("writeGraph", false)) { OFstream str ( diff --git a/src/parallel/decompose/scotchDecomp/scotchDecomp.C b/src/parallel/decompose/scotchDecomp/scotchDecomp.C index b8990b8b858..735611e96d0 100644 --- a/src/parallel/decompose/scotchDecomp/scotchDecomp.C +++ b/src/parallel/decompose/scotchDecomp/scotchDecomp.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2017 OpenFOAM Foundation - Copyright (C) 2015-2019 OpenCFD Ltd. + Copyright (C) 2015-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -107,7 +107,7 @@ Foam::label Foam::scotchDecomp::decomposeSerial ) const { // Dump graph - if (coeffsDict_.lookupOrDefault("writeGraph", false)) + if (coeffsDict_.getOrDefault("writeGraph", false)) { OFstream str(graphPath_); diff --git a/src/phaseSystemModels/reactingEulerFoam/derivedFvPatchFields/alphatFixedDmdtWallBoilingWallFunction/alphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField.C b/src/phaseSystemModels/reactingEulerFoam/derivedFvPatchFields/alphatFixedDmdtWallBoilingWallFunction/alphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField.C index 11a571d7608..06f67fe9760 100644 --- a/src/phaseSystemModels/reactingEulerFoam/derivedFvPatchFields/alphatFixedDmdtWallBoilingWallFunction/alphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField.C +++ b/src/phaseSystemModels/reactingEulerFoam/derivedFvPatchFields/alphatFixedDmdtWallBoilingWallFunction/alphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2015-2019 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -65,9 +66,9 @@ alphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField : alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField(p, iF, dict), vaporPhaseName_(dict.lookup("vaporPhase")), - relax_(dict.lookupOrDefault<scalar>("relax", 1.0)), - fixedDmdt_(dict.lookupOrDefault<scalar>("fixedDmdt", 0.0)), - L_(dict.lookupOrDefault<scalar>("L", 0.0)) + relax_(dict.getOrDefault<scalar>("relax", 1)), + fixedDmdt_(dict.getOrDefault<scalar>("fixedDmdt", 0)), + L_(dict.getOrDefault<scalar>("L", 0)) {} diff --git a/src/phaseSystemModels/reactingEulerFoam/derivedFvPatchFields/alphatPhaseChangeJayatillekeWallFunction/alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField.C b/src/phaseSystemModels/reactingEulerFoam/derivedFvPatchFields/alphatPhaseChangeJayatillekeWallFunction/alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField.C index 8640e039345..b7f6c306993 100644 --- a/src/phaseSystemModels/reactingEulerFoam/derivedFvPatchFields/alphatPhaseChangeJayatillekeWallFunction/alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField.C +++ b/src/phaseSystemModels/reactingEulerFoam/derivedFvPatchFields/alphatPhaseChangeJayatillekeWallFunction/alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2015-2019 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -251,10 +252,10 @@ alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField ) : alphatPhaseChangeWallFunctionFvPatchScalarField(p, iF, dict), - Prt_(dict.lookupOrDefault<scalar>("Prt", 0.85)), - Cmu_(dict.lookupOrDefault<scalar>("Cmu", 0.09)), - kappa_(dict.lookupOrDefault<scalar>("kappa", 0.41)), - E_(dict.lookupOrDefault<scalar>("E", 9.8)) + Prt_(dict.getOrDefault<scalar>("Prt", 0.85)), + Cmu_(dict.getOrDefault<scalar>("Cmu", 0.09)), + kappa_(dict.getOrDefault<scalar>("kappa", 0.41)), + E_(dict.getOrDefault<scalar>("E", 9.8)) {} diff --git a/src/phaseSystemModels/reactingEulerFoam/derivedFvPatchFields/fixedMultiPhaseHeatFlux/fixedMultiPhaseHeatFluxFvPatchScalarField.C b/src/phaseSystemModels/reactingEulerFoam/derivedFvPatchFields/fixedMultiPhaseHeatFlux/fixedMultiPhaseHeatFluxFvPatchScalarField.C index fb4eebcd415..5ff761fbe42 100644 --- a/src/phaseSystemModels/reactingEulerFoam/derivedFvPatchFields/fixedMultiPhaseHeatFlux/fixedMultiPhaseHeatFluxFvPatchScalarField.C +++ b/src/phaseSystemModels/reactingEulerFoam/derivedFvPatchFields/fixedMultiPhaseHeatFlux/fixedMultiPhaseHeatFluxFvPatchScalarField.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2015-2019 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -45,8 +46,8 @@ fixedMultiPhaseHeatFluxFvPatchScalarField : fixedValueFvPatchScalarField(p, iF), q_(p.size(), Zero), - relax_(1.0), - Tmin_(0.0) + relax_(1), + Tmin_(273) {} @@ -60,8 +61,8 @@ fixedMultiPhaseHeatFluxFvPatchScalarField : fixedValueFvPatchScalarField(p, iF, dict), q_("q", dict, p.size()), - relax_(dict.lookupOrDefault<scalar>("relax", 1.0)), - Tmin_(dict.lookupOrDefault<scalar>("Tmin", 273)) + relax_(dict.getOrDefault<scalar>("relax", 1)), + Tmin_(dict.getOrDefault<scalar>("Tmin", 273)) {} @@ -120,9 +121,7 @@ void Foam::fixedMultiPhaseHeatFluxFvPatchScalarField::updateCoeffs() // Lookup the fluid model const phaseSystem& fluid = - ( - db().lookupObject<phaseSystem>("phaseProperties") - ); + db().lookupObject<phaseSystem>("phaseProperties"); const scalarField& Tp = *this; diff --git a/src/phaseSystemModels/reactingEulerFoam/derivedFvPatchFields/wallBoilingSubModels/CHFModels/Zuber/Zuber.C b/src/phaseSystemModels/reactingEulerFoam/derivedFvPatchFields/wallBoilingSubModels/CHFModels/Zuber/Zuber.C index 98495177823..75ad533c5e9 100644 --- a/src/phaseSystemModels/reactingEulerFoam/derivedFvPatchFields/wallBoilingSubModels/CHFModels/Zuber/Zuber.C +++ b/src/phaseSystemModels/reactingEulerFoam/derivedFvPatchFields/wallBoilingSubModels/CHFModels/Zuber/Zuber.C @@ -59,7 +59,7 @@ Foam::wallBoilingModels::CHFModels::Zuber::Zuber ) : CHFModel(), - Cn_(dict.lookupOrDefault<scalar>("Cn", 0.131)) + Cn_(dict.getOrDefault<scalar>("Cn", 0.131)) {} diff --git a/src/phaseSystemModels/reactingEulerFoam/derivedFvPatchFields/wallBoilingSubModels/CHFSubCoolModels/HuaXu/HuaXu.C b/src/phaseSystemModels/reactingEulerFoam/derivedFvPatchFields/wallBoilingSubModels/CHFSubCoolModels/HuaXu/HuaXu.C index f557cf93ee0..1532026dd1c 100644 --- a/src/phaseSystemModels/reactingEulerFoam/derivedFvPatchFields/wallBoilingSubModels/CHFSubCoolModels/HuaXu/HuaXu.C +++ b/src/phaseSystemModels/reactingEulerFoam/derivedFvPatchFields/wallBoilingSubModels/CHFSubCoolModels/HuaXu/HuaXu.C @@ -59,7 +59,7 @@ Foam::wallBoilingModels::CHFModels::HuaXu::HuaXu ) : CHFSubCoolModel(), - Kburn_(dict.lookupOrDefault<scalar>("Kburn", 1.5)) + Kburn_(dict.getOrDefault<scalar>("Kburn", 1.5)) {} diff --git a/src/phaseSystemModels/reactingEulerFoam/derivedFvPatchFields/wallBoilingSubModels/LeidenfrostModels/Spiegler/Spiegler.C b/src/phaseSystemModels/reactingEulerFoam/derivedFvPatchFields/wallBoilingSubModels/LeidenfrostModels/Spiegler/Spiegler.C index 81f89118d8f..28a17a1ebaa 100644 --- a/src/phaseSystemModels/reactingEulerFoam/derivedFvPatchFields/wallBoilingSubModels/LeidenfrostModels/Spiegler/Spiegler.C +++ b/src/phaseSystemModels/reactingEulerFoam/derivedFvPatchFields/wallBoilingSubModels/LeidenfrostModels/Spiegler/Spiegler.C @@ -57,7 +57,7 @@ Foam::wallBoilingModels::LeidenfrostModels::Spiegler::Spiegler ) : LeidenfrostModel(), - Tcrit_(dict.lookupOrDefault<scalar>("Tcrit", 374)) + Tcrit_(dict.getOrDefault<scalar>("Tcrit", 374)) {} diff --git a/src/phaseSystemModels/reactingEulerFoam/derivedFvPatchFields/wallBoilingSubModels/MHFModels/Jeschar/Jeschar.C b/src/phaseSystemModels/reactingEulerFoam/derivedFvPatchFields/wallBoilingSubModels/MHFModels/Jeschar/Jeschar.C index 72e7795a914..ae4141d6ee3 100644 --- a/src/phaseSystemModels/reactingEulerFoam/derivedFvPatchFields/wallBoilingSubModels/MHFModels/Jeschar/Jeschar.C +++ b/src/phaseSystemModels/reactingEulerFoam/derivedFvPatchFields/wallBoilingSubModels/MHFModels/Jeschar/Jeschar.C @@ -59,7 +59,7 @@ Foam::wallBoilingModels::CHFModels::Jeschar::Jeschar ) : MHFModel(), - Kmhf_(dict.lookupOrDefault<scalar>("Kmhf", 1)) + Kmhf_(dict.getOrDefault<scalar>("Kmhf", 1)) {} diff --git a/src/phaseSystemModels/reactingEulerFoam/derivedFvPatchFields/wallBoilingSubModels/TDNBModels/Schroeder/Schroeder.C b/src/phaseSystemModels/reactingEulerFoam/derivedFvPatchFields/wallBoilingSubModels/TDNBModels/Schroeder/Schroeder.C index 026ad1f5545..e6400f02187 100644 --- a/src/phaseSystemModels/reactingEulerFoam/derivedFvPatchFields/wallBoilingSubModels/TDNBModels/Schroeder/Schroeder.C +++ b/src/phaseSystemModels/reactingEulerFoam/derivedFvPatchFields/wallBoilingSubModels/TDNBModels/Schroeder/Schroeder.C @@ -60,7 +60,7 @@ Foam::wallBoilingModels::TDNBModels::Schroeder::Schroeder ) : TDNBModel(), - kg_(dict.lookupOrDefault<scalar>("kg", 1.666)) + kg_(dict.getOrDefault<scalar>("kg", 1.666)) {} diff --git a/src/phaseSystemModels/reactingEulerFoam/derivedFvPatchFields/wallBoilingSubModels/departureDiameterModels/TolubinskiKostanchuk/TolubinskiKostanchuk.C b/src/phaseSystemModels/reactingEulerFoam/derivedFvPatchFields/wallBoilingSubModels/departureDiameterModels/TolubinskiKostanchuk/TolubinskiKostanchuk.C index 1ca020df179..e07f809ed4f 100644 --- a/src/phaseSystemModels/reactingEulerFoam/derivedFvPatchFields/wallBoilingSubModels/departureDiameterModels/TolubinskiKostanchuk/TolubinskiKostanchuk.C +++ b/src/phaseSystemModels/reactingEulerFoam/derivedFvPatchFields/wallBoilingSubModels/departureDiameterModels/TolubinskiKostanchuk/TolubinskiKostanchuk.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2016-2019 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -57,9 +58,9 @@ TolubinskiKostanchuk::TolubinskiKostanchuk ) : departureDiameterModel(), - dRef_(dict.lookupOrDefault<scalar>("dRef", 6e-4)), - dMax_(dict.lookupOrDefault<scalar>("dMax", 0.0014)), - dMin_(dict.lookupOrDefault<scalar>("dMin", 1e-6)) + dRef_(dict.getOrDefault<scalar>("dRef", 6e-4)), + dMax_(dict.getOrDefault<scalar>("dMax", 0.0014)), + dMin_(dict.getOrDefault<scalar>("dMin", 1e-6)) {} diff --git a/src/phaseSystemModels/reactingEulerFoam/derivedFvPatchFields/wallBoilingSubModels/filmBoilingModels/Bromley/Bromley.C b/src/phaseSystemModels/reactingEulerFoam/derivedFvPatchFields/wallBoilingSubModels/filmBoilingModels/Bromley/Bromley.C index 6c479604f68..a3af1733ead 100644 --- a/src/phaseSystemModels/reactingEulerFoam/derivedFvPatchFields/wallBoilingSubModels/filmBoilingModels/Bromley/Bromley.C +++ b/src/phaseSystemModels/reactingEulerFoam/derivedFvPatchFields/wallBoilingSubModels/filmBoilingModels/Bromley/Bromley.C @@ -60,8 +60,8 @@ Foam::wallBoilingModels::filmBoilingModels::Bromley::Bromley ) : filmBoilingModel(), - Cn_(dict.lookupOrDefault<scalar>("Cn", 0.62)), - emissivity_(dict.lookupOrDefault<scalar>("emissivity", 1)), + Cn_(dict.getOrDefault<scalar>("Cn", 0.62)), + emissivity_(dict.getOrDefault<scalar>("emissivity", 1)), L_(dict.get<scalar>("L")) {} diff --git a/src/phaseSystemModels/reactingEulerFoam/derivedFvPatchFields/wallBoilingSubModels/nucleationSiteModels/LemmertChawla/LemmertChawla.C b/src/phaseSystemModels/reactingEulerFoam/derivedFvPatchFields/wallBoilingSubModels/nucleationSiteModels/LemmertChawla/LemmertChawla.C index 04c1537fcaa..83570a54329 100644 --- a/src/phaseSystemModels/reactingEulerFoam/derivedFvPatchFields/wallBoilingSubModels/nucleationSiteModels/LemmertChawla/LemmertChawla.C +++ b/src/phaseSystemModels/reactingEulerFoam/derivedFvPatchFields/wallBoilingSubModels/nucleationSiteModels/LemmertChawla/LemmertChawla.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2016-2018 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -56,7 +57,7 @@ Foam::wallBoilingModels::nucleationSiteModels::LemmertChawla::LemmertChawla ) : nucleationSiteModel(), - Cn_(dict.lookupOrDefault<scalar>("Cn", 1)) + Cn_(dict.getOrDefault<scalar>("Cn", 1)) {} diff --git a/src/phaseSystemModels/reactingEulerFoam/interfacialModels/heatTransferModels/heatTransferModel/heatTransferModel.C b/src/phaseSystemModels/reactingEulerFoam/interfacialModels/heatTransferModels/heatTransferModel/heatTransferModel.C index 122fa7bcc93..efe7a567f4b 100644 --- a/src/phaseSystemModels/reactingEulerFoam/interfacialModels/heatTransferModels/heatTransferModel/heatTransferModel.C +++ b/src/phaseSystemModels/reactingEulerFoam/interfacialModels/heatTransferModels/heatTransferModel/heatTransferModel.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2018 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -54,7 +55,7 @@ Foam::heatTransferModel::heatTransferModel ( "residualAlpha", dimless, - dict.lookupOrDefault<scalar> + dict.getOrDefault<scalar> ( "residualAlpha", pair_.ordered() diff --git a/src/phaseSystemModels/reactingEulerFoam/phaseSystems/PhaseSystems/InterfaceCompositionPhaseChangePhaseSystem/InterfaceCompositionPhaseChangePhaseSystem.C b/src/phaseSystemModels/reactingEulerFoam/phaseSystems/PhaseSystems/InterfaceCompositionPhaseChangePhaseSystem/InterfaceCompositionPhaseChangePhaseSystem.C index b8cc467d4e9..33deb560a79 100644 --- a/src/phaseSystemModels/reactingEulerFoam/phaseSystems/PhaseSystems/InterfaceCompositionPhaseChangePhaseSystem/InterfaceCompositionPhaseChangePhaseSystem.C +++ b/src/phaseSystemModels/reactingEulerFoam/phaseSystems/PhaseSystems/InterfaceCompositionPhaseChangePhaseSystem/InterfaceCompositionPhaseChangePhaseSystem.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2015-2018 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -99,7 +100,7 @@ InterfaceCompositionPhaseChangePhaseSystem BasePhaseSystem(mesh), nInterfaceCorrectors_ ( - this->template lookupOrDefault<label>("nInterfaceCorrectors", 1) + this->template getOrDefault<label>("nInterfaceCorrectors", 1) ) { this->generatePairsAndSubModels diff --git a/src/phaseSystemModels/reactingEulerFoam/phaseSystems/PhaseSystems/MomentumTransferPhaseSystem/MomentumTransferPhaseSystem.C b/src/phaseSystemModels/reactingEulerFoam/phaseSystems/PhaseSystems/MomentumTransferPhaseSystem/MomentumTransferPhaseSystem.C index 202ff32cbda..7623bd2d702 100644 --- a/src/phaseSystemModels/reactingEulerFoam/phaseSystems/PhaseSystems/MomentumTransferPhaseSystem/MomentumTransferPhaseSystem.C +++ b/src/phaseSystemModels/reactingEulerFoam/phaseSystems/PhaseSystems/MomentumTransferPhaseSystem/MomentumTransferPhaseSystem.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2015-2018 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -575,7 +576,7 @@ Foam::MomentumTransferPhaseSystem<BasePhaseSystem>::phiFs const bool implicitPhasePressure = this->mesh_.solverDict(phase.volScalarField::name()). - template lookupOrDefault<Switch> + template getOrDefault<Switch> ( "implicitPhasePressure", false @@ -738,7 +739,7 @@ Foam::MomentumTransferPhaseSystem<BasePhaseSystem>::phiFfs const bool implicitPhasePressure = this->mesh_.solverDict(phase.volScalarField::name()). - template lookupOrDefault<Switch> + template getOrDefault<Switch> ( "implicitPhasePressure", false diff --git a/src/phaseSystemModels/reactingEulerFoam/phaseSystems/PhaseSystems/ThermalPhaseChangePhaseSystem/ThermalPhaseChangePhaseSystem.C b/src/phaseSystemModels/reactingEulerFoam/phaseSystems/PhaseSystems/ThermalPhaseChangePhaseSystem/ThermalPhaseChangePhaseSystem.C index 59e7804a111..b91b656ae44 100644 --- a/src/phaseSystemModels/reactingEulerFoam/phaseSystems/PhaseSystems/ThermalPhaseChangePhaseSystem/ThermalPhaseChangePhaseSystem.C +++ b/src/phaseSystemModels/reactingEulerFoam/phaseSystems/PhaseSystems/ThermalPhaseChangePhaseSystem/ThermalPhaseChangePhaseSystem.C @@ -79,7 +79,7 @@ ThermalPhaseChangePhaseSystem ) : BasePhaseSystem(mesh), - volatile_(this->template lookupOrDefault<word>("volatile", "none")), + volatile_(this->template getOrDefault<word>("volatile", "none")), saturationModel_ ( saturationModel::New(this->subDict("saturationModel"), mesh) diff --git a/src/phaseSystemModels/reactingEulerFoam/phaseSystems/diameterModels/linearTsubDiameter/linearTsubDiameter.C b/src/phaseSystemModels/reactingEulerFoam/phaseSystems/diameterModels/linearTsubDiameter/linearTsubDiameter.C index c8ed2fbaab6..bfddaca6e33 100644 --- a/src/phaseSystemModels/reactingEulerFoam/phaseSystems/diameterModels/linearTsubDiameter/linearTsubDiameter.C +++ b/src/phaseSystemModels/reactingEulerFoam/phaseSystems/diameterModels/linearTsubDiameter/linearTsubDiameter.C @@ -59,24 +59,24 @@ Foam::diameterModels::linearTsub::linearTsub : diameterModel(diameterProperties, phase), liquidPhaseName_(diameterProperties.lookup("liquidPhase")), - d2_("d2", dimLength, diameterProperties.lookupOrDefault("d2", 0.0015)), + d2_("d2", dimLength, diameterProperties.getOrDefault("d2", 0.0015)), Tsub2_ ( "Tsub2", dimTemperature, - diameterProperties.lookupOrDefault("Tsub2", 0) + diameterProperties.getOrDefault("Tsub2", 0) ), d1_ ( "d1", dimLength, - diameterProperties.lookupOrDefault("d1", 0.00015) + diameterProperties.getOrDefault("d1", 0.00015) ), Tsub1_ ( "Tsub1", dimTemperature, - diameterProperties.lookupOrDefault("Tsub1", 13.5) + diameterProperties.getOrDefault("Tsub1", 13.5) ), d_ ( diff --git a/src/phaseSystemModels/reactingEulerFoam/phaseSystems/diameterModels/velocityGroup/velocityGroup.C b/src/phaseSystemModels/reactingEulerFoam/phaseSystems/diameterModels/velocityGroup/velocityGroup.C index 319755e6e65..15e50d8b8f1 100644 --- a/src/phaseSystemModels/reactingEulerFoam/phaseSystems/diameterModels/velocityGroup/velocityGroup.C +++ b/src/phaseSystemModels/reactingEulerFoam/phaseSystems/diameterModels/velocityGroup/velocityGroup.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2017-2019 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -221,13 +222,13 @@ Foam::diameterModels::velocityGroup::velocityGroup { if ( - phase_.mesh().solverDict(popBalName_).lookupOrDefault<Switch> + phase_.mesh().solverDict(popBalName_).getOrDefault<Switch> ( "renormalizeAtRestart", false ) || - phase_.mesh().solverDict(popBalName_).lookupOrDefault<Switch> + phase_.mesh().solverDict(popBalName_).getOrDefault<Switch> ( "renormalize", false @@ -306,7 +307,7 @@ void Foam::diameterModels::velocityGroup::postSolve() if ( - phase_.mesh().solverDict(popBalName_).lookupOrDefault<Switch> + phase_.mesh().solverDict(popBalName_).getOrDefault<Switch> ( "renormalize", false diff --git a/src/phaseSystemModels/reactingEulerFoam/phaseSystems/phaseModel/AnisothermalPhaseModel/AnisothermalPhaseModel.C b/src/phaseSystemModels/reactingEulerFoam/phaseSystems/phaseModel/AnisothermalPhaseModel/AnisothermalPhaseModel.C index 833d41ef573..886935b174b 100644 --- a/src/phaseSystemModels/reactingEulerFoam/phaseSystems/phaseModel/AnisothermalPhaseModel/AnisothermalPhaseModel.C +++ b/src/phaseSystemModels/reactingEulerFoam/phaseSystems/phaseModel/AnisothermalPhaseModel/AnisothermalPhaseModel.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2015-2018 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -40,7 +41,7 @@ Foam::AnisothermalPhaseModel<BasePhaseModel>::filterPressureWork const volScalarField& alpha = *this; scalar pressureWorkAlphaLimit = - this->thermo_->lookupOrDefault("pressureWorkAlphaLimit", 0.0); + this->thermo_->getOrDefault<scalar>("pressureWorkAlphaLimit", 0); if (pressureWorkAlphaLimit > 0) { diff --git a/src/phaseSystemModels/reactingEulerFoam/phaseSystems/phaseModel/MultiComponentPhaseModel/MultiComponentPhaseModel.C b/src/phaseSystemModels/reactingEulerFoam/phaseSystems/phaseModel/MultiComponentPhaseModel/MultiComponentPhaseModel.C index f5a9166571c..0aa500755cd 100644 --- a/src/phaseSystemModels/reactingEulerFoam/phaseSystems/phaseModel/MultiComponentPhaseModel/MultiComponentPhaseModel.C +++ b/src/phaseSystemModels/reactingEulerFoam/phaseSystems/phaseModel/MultiComponentPhaseModel/MultiComponentPhaseModel.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2015-2018 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -64,7 +65,7 @@ Foam::MultiComponentPhaseModel<BasePhaseModel>::MultiComponentPhaseModel { const word inertSpecie ( - this->thermo_->lookupOrDefault("inertSpecie", word::null) + this->thermo_->getOrDefault("inertSpecie", word::null) ); if (inertSpecie != word::null) diff --git a/src/phaseSystemModels/reactingEulerFoam/phaseSystems/phaseModel/phaseModel/phaseModel.C b/src/phaseSystemModels/reactingEulerFoam/phaseSystems/phaseModel/phaseModel/phaseModel.C index bdc7c142de3..976daab7a9e 100644 --- a/src/phaseSystemModels/reactingEulerFoam/phaseSystems/phaseModel/phaseModel/phaseModel.C +++ b/src/phaseSystemModels/reactingEulerFoam/phaseSystems/phaseModel/phaseModel/phaseModel.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2015-2019 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -70,7 +71,7 @@ Foam::phaseModel::phaseModel dimless, fluid.subDict(phaseName) ), - alphaMax_(fluid.subDict(phaseName).lookupOrDefault<scalar>("alphaMax", 1)) + alphaMax_(fluid.subDict(phaseName).getOrDefault<scalar>("alphaMax", 1)) { diameterModel_ = diameterModel::New(fluid.subDict(phaseName), *this); } diff --git a/src/phaseSystemModels/reactingEulerFoam/phaseSystems/populationBalanceModel/binaryBreakupModels/LuoSvendsen/LuoSvendsen.C b/src/phaseSystemModels/reactingEulerFoam/phaseSystems/populationBalanceModel/binaryBreakupModels/LuoSvendsen/LuoSvendsen.C index e12d466ea99..66e190345ba 100644 --- a/src/phaseSystemModels/reactingEulerFoam/phaseSystems/populationBalanceModel/binaryBreakupModels/LuoSvendsen/LuoSvendsen.C +++ b/src/phaseSystemModels/reactingEulerFoam/phaseSystems/populationBalanceModel/binaryBreakupModels/LuoSvendsen/LuoSvendsen.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2019 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -62,11 +63,11 @@ Foam::diameterModels::binaryBreakupModels::LuoSvendsen::LuoSvendsen gammaUpperReg2by11_(), gammaUpperReg5by11_(), gammaUpperReg8by11_(), - C4_(dimensionedScalar::lookupOrDefault("C4", dict, dimless, 0.923)), - beta_(dimensionedScalar::lookupOrDefault("beta", dict, dimless, 2.05)), + C4_(dimensionedScalar::getOrDefault("C4", dict, dimless, 0.923)), + beta_(dimensionedScalar::getOrDefault("beta", dict, dimless, 2.05)), minEddyRatio_ ( - dimensionedScalar::lookupOrDefault("minEddyRatio", dict, dimless, 11.4) + dimensionedScalar::getOrDefault("minEddyRatio", dict, dimless, 11.4) ), kolmogorovLengthScale_ ( diff --git a/src/phaseSystemModels/reactingEulerFoam/phaseSystems/populationBalanceModel/breakupModels/LaakkonenAlopaeusAittamaa/LaakkonenAlopaeusAittamaa.C b/src/phaseSystemModels/reactingEulerFoam/phaseSystems/populationBalanceModel/breakupModels/LaakkonenAlopaeusAittamaa/LaakkonenAlopaeusAittamaa.C index 9761a2fb6ef..66753fcc72c 100644 --- a/src/phaseSystemModels/reactingEulerFoam/phaseSystems/populationBalanceModel/breakupModels/LaakkonenAlopaeusAittamaa/LaakkonenAlopaeusAittamaa.C +++ b/src/phaseSystemModels/reactingEulerFoam/phaseSystems/populationBalanceModel/breakupModels/LaakkonenAlopaeusAittamaa/LaakkonenAlopaeusAittamaa.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2018-2019 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -61,7 +62,7 @@ LaakkonenAlopaeusAittamaa breakupModel(popBal, dict), C1_ ( - dimensionedScalar::lookupOrDefault + dimensionedScalar::getOrDefault ( "C1", dict, @@ -69,8 +70,8 @@ LaakkonenAlopaeusAittamaa 6.0 ) ), - C2_(dimensionedScalar::lookupOrDefault("C2", dict, dimless, 0.04)), - C3_(dimensionedScalar::lookupOrDefault("C3", dict, dimless, 0.01)) + C2_(dimensionedScalar::getOrDefault("C2", dict, dimless, 0.04)), + C3_(dimensionedScalar::getOrDefault("C3", dict, dimless, 0.01)) {} diff --git a/src/phaseSystemModels/reactingEulerFoam/phaseSystems/populationBalanceModel/coalescenceModels/CoulaloglouTavlaridesCoalescence/CoulaloglouTavlaridesCoalescence.C b/src/phaseSystemModels/reactingEulerFoam/phaseSystems/populationBalanceModel/coalescenceModels/CoulaloglouTavlaridesCoalescence/CoulaloglouTavlaridesCoalescence.C index acf32746b0e..80e028f0814 100644 --- a/src/phaseSystemModels/reactingEulerFoam/phaseSystems/populationBalanceModel/coalescenceModels/CoulaloglouTavlaridesCoalescence/CoulaloglouTavlaridesCoalescence.C +++ b/src/phaseSystemModels/reactingEulerFoam/phaseSystems/populationBalanceModel/coalescenceModels/CoulaloglouTavlaridesCoalescence/CoulaloglouTavlaridesCoalescence.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2018-2019 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -59,8 +60,8 @@ CoulaloglouTavlaridesCoalescence ) : coalescenceModel(popBal, dict), - C1_(dimensionedScalar::lookupOrDefault("C1", dict, dimless, 2.8)), - C2_(dimensionedScalar::lookupOrDefault("C2", dict, inv(dimArea), 1.83e9)) + C1_(dimensionedScalar::getOrDefault("C1", dict, dimless, 2.8)), + C2_(dimensionedScalar::getOrDefault("C2", dict, inv(dimArea), 1.83e9)) {} diff --git a/src/phaseSystemModels/reactingEulerFoam/phaseSystems/populationBalanceModel/coalescenceModels/LehrMilliesMewesCoalescence/LehrMilliesMewesCoalescence.C b/src/phaseSystemModels/reactingEulerFoam/phaseSystems/populationBalanceModel/coalescenceModels/LehrMilliesMewesCoalescence/LehrMilliesMewesCoalescence.C index bab07c6a87c..249a3d6ee19 100644 --- a/src/phaseSystemModels/reactingEulerFoam/phaseSystems/populationBalanceModel/coalescenceModels/LehrMilliesMewesCoalescence/LehrMilliesMewesCoalescence.C +++ b/src/phaseSystemModels/reactingEulerFoam/phaseSystems/populationBalanceModel/coalescenceModels/LehrMilliesMewesCoalescence/LehrMilliesMewesCoalescence.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2019 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -63,11 +64,11 @@ LehrMilliesMewesCoalescence coalescenceModel(popBal, dict), uCrit_ ( - dimensionedScalar::lookupOrDefault("uCrit", dict, dimVelocity, 0.08) + dimensionedScalar::getOrDefault("uCrit", dict, dimVelocity, 0.08) ), alphaMax_ ( - dimensionedScalar::lookupOrDefault("alphaMax", dict, dimless, 0.6) + dimensionedScalar::getOrDefault("alphaMax", dict, dimless, 0.6) ) {} diff --git a/src/phaseSystemModels/reactingEulerFoam/phaseSystems/populationBalanceModel/coalescenceModels/Luo/Luo.C b/src/phaseSystemModels/reactingEulerFoam/phaseSystems/populationBalanceModel/coalescenceModels/Luo/Luo.C index bcf41e64dd6..c77a0b3b580 100644 --- a/src/phaseSystemModels/reactingEulerFoam/phaseSystems/populationBalanceModel/coalescenceModels/Luo/Luo.C +++ b/src/phaseSystemModels/reactingEulerFoam/phaseSystems/populationBalanceModel/coalescenceModels/Luo/Luo.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2019 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -63,8 +64,8 @@ Luo ) : coalescenceModel(popBal, dict), - beta_(dimensionedScalar::lookupOrDefault("beta", dict, dimless, 2.05)), - C1_(dimensionedScalar::lookupOrDefault("C1", dict, dimless, 1.0)) + beta_(dimensionedScalar::getOrDefault("beta", dict, dimless, 2.05)), + C1_(dimensionedScalar::getOrDefault("C1", dict, dimless, 1.0)) {} diff --git a/src/phaseSystemModels/reactingEulerFoam/phaseSystems/populationBalanceModel/coalescenceModels/PrinceBlanch/PrinceBlanch.C b/src/phaseSystemModels/reactingEulerFoam/phaseSystems/populationBalanceModel/coalescenceModels/PrinceBlanch/PrinceBlanch.C index a2cd9a7a2bf..a5d37ce8110 100644 --- a/src/phaseSystemModels/reactingEulerFoam/phaseSystems/populationBalanceModel/coalescenceModels/PrinceBlanch/PrinceBlanch.C +++ b/src/phaseSystemModels/reactingEulerFoam/phaseSystems/populationBalanceModel/coalescenceModels/PrinceBlanch/PrinceBlanch.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2018-2019 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -61,10 +62,10 @@ PrinceBlanch ) : coalescenceModel(popBal, dict), - C1_(dimensionedScalar::lookupOrDefault("C1", dict, dimless, 0.356)), + C1_(dimensionedScalar::getOrDefault("C1", dict, dimless, 0.356)), h0_ ( - dimensionedScalar::lookupOrDefault + dimensionedScalar::getOrDefault ( "h0", dict, @@ -74,7 +75,7 @@ PrinceBlanch ), hf_ ( - dimensionedScalar::lookupOrDefault + dimensionedScalar::getOrDefault ( "hf", dict, diff --git a/src/phaseSystemModels/reactingEulerFoam/phaseSystems/populationBalanceModel/driftModels/phaseChange/phaseChange.C b/src/phaseSystemModels/reactingEulerFoam/phaseSystems/populationBalanceModel/driftModels/phaseChange/phaseChange.C index 10e90f31436..4ec234f0495 100644 --- a/src/phaseSystemModels/reactingEulerFoam/phaseSystems/populationBalanceModel/driftModels/phaseChange/phaseChange.C +++ b/src/phaseSystemModels/reactingEulerFoam/phaseSystems/populationBalanceModel/driftModels/phaseChange/phaseChange.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2018-2019 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -55,7 +56,7 @@ Foam::diameterModels::driftModels::phaseChange::phaseChange : driftModel(popBal, dict), pairKeys_(dict.lookup("pairs")), - numberWeighted_(dict.lookupOrDefault<Switch>("numberWeighted", false)), + numberWeighted_(dict.getOrDefault<Switch>("numberWeighted", false)), W_(pairKeys_.size()) { const phaseSystem& fluid = popBal_.fluid(); diff --git a/src/phaseSystemModels/reactingEulerFoam/phaseSystems/populationBalanceModel/populationBalanceModel/populationBalanceModelI.H b/src/phaseSystemModels/reactingEulerFoam/phaseSystems/populationBalanceModel/populationBalanceModel/populationBalanceModelI.H index ae5e49a60e6..95f85381de5 100644 --- a/src/phaseSystemModels/reactingEulerFoam/phaseSystems/populationBalanceModel/populationBalanceModel/populationBalanceModelI.H +++ b/src/phaseSystemModels/reactingEulerFoam/phaseSystems/populationBalanceModel/populationBalanceModel/populationBalanceModelI.H @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2017-2018 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -38,7 +39,7 @@ Foam::diameterModels::populationBalanceModel::sourceUpdateInterval() const { return mesh_.solverDict(name_) - .lookupOrDefault<label>("sourceUpdateInterval", 1); + .getOrDefault<label>("sourceUpdateInterval", 1); } diff --git a/src/randomProcesses/windowModels/Hanning/Hanning.C b/src/randomProcesses/windowModels/Hanning/Hanning.C index f847ff8444a..75b00f76572 100644 --- a/src/randomProcesses/windowModels/Hanning/Hanning.C +++ b/src/randomProcesses/windowModels/Hanning/Hanning.C @@ -5,7 +5,7 @@ \\ / A nd | www.openfoam.com \\/ M anipulation | ------------------------------------------------------------------------------- - Copyright (C) 2016 OpenCFD Ltd. + Copyright (C) 2016-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -49,7 +49,7 @@ Hanning::Hanning(const dictionary& dict, const label nSamples) windowModel(dict, nSamples), symmetric_(dict.get<bool>("symmetric")), extended_(dict.get<bool>("extended")), - alpha_(dict.lookupOrDefault("alpha", 0.5)) // Hamming = 0.54 + alpha_(dict.getOrDefault<scalar>("alpha", 0.5)) // Hamming = 0.54 { // Extend range if required const label offset = extended_ ? 1 : 0; diff --git a/src/randomProcesses/windowModels/windowModel/windowModel.C b/src/randomProcesses/windowModels/windowModel/windowModel.C index d2a2f9638b4..7febd9c7017 100644 --- a/src/randomProcesses/windowModels/windowModel/windowModel.C +++ b/src/randomProcesses/windowModels/windowModel/windowModel.C @@ -5,7 +5,7 @@ \\ / A nd | www.openfoam.com \\/ M anipulation | ------------------------------------------------------------------------------- - Copyright (C) 2015-2018 OpenCFD Ltd. + Copyright (C) 2015-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -42,7 +42,7 @@ Foam::windowModel::windowModel(const dictionary& dict, const label nSamples) : scalarField(nSamples), nOverlapSamples_(0), - nWindow_(dict.lookupOrDefault("nWindow", -1)) + nWindow_(dict.getOrDefault("nWindow", -1)) { nOverlapSamples_ = floor ( diff --git a/src/regionModels/pyrolysisModels/reactingOneDim/reactingOneDim.C b/src/regionModels/pyrolysisModels/reactingOneDim/reactingOneDim.C index e3a7dc0ff5d..28ca03214a0 100644 --- a/src/regionModels/pyrolysisModels/reactingOneDim/reactingOneDim.C +++ b/src/regionModels/pyrolysisModels/reactingOneDim/reactingOneDim.C @@ -58,10 +58,10 @@ void reactingOneDim::readReactingOneDimControls() solution.readEntry("nNonOrthCorr", nNonOrthCorr_); time().controlDict().readEntry("maxDi", maxDiff_); coeffs().readEntry("minimumDelta", minimumDelta_); - gasHSource_ = coeffs().lookupOrDefault("gasHSource", false); + gasHSource_ = coeffs().getOrDefault("gasHSource", false); coeffs().readEntry("qrHSource", qrHSource_); useChemistrySolvers_ = - coeffs().lookupOrDefault("useChemistrySolvers", true); + coeffs().getOrDefault("useChemistrySolvers", true); } diff --git a/src/regionModels/regionCoupling/derivedFvPatchFields/filmPyrolysisRadiativeCoupledMixed/filmPyrolysisRadiativeCoupledMixedFvPatchScalarField.C b/src/regionModels/regionCoupling/derivedFvPatchFields/filmPyrolysisRadiativeCoupledMixed/filmPyrolysisRadiativeCoupledMixedFvPatchScalarField.C index 0dd0e8b36ae..7b0d624c064 100644 --- a/src/regionModels/regionCoupling/derivedFvPatchFields/filmPyrolysisRadiativeCoupledMixed/filmPyrolysisRadiativeCoupledMixedFvPatchScalarField.C +++ b/src/regionModels/regionCoupling/derivedFvPatchFields/filmPyrolysisRadiativeCoupledMixed/filmPyrolysisRadiativeCoupledMixedFvPatchScalarField.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2013-2017 OpenFOAM Foundation - Copyright (C) 2019 OpenCFD Ltd. + Copyright (C) 2019-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -163,15 +163,15 @@ filmPyrolysisRadiativeCoupledMixedFvPatchScalarField temperatureCoupledBase(patch(), dict), filmRegionName_ ( - dict.lookupOrDefault<word>("filmRegion", "surfaceFilmProperties") + dict.getOrDefault<word>("filmRegion", "surfaceFilmProperties") ), pyrolysisRegionName_ ( - dict.lookupOrDefault<word>("pyrolysisRegion", "pyrolysisProperties") + dict.getOrDefault<word>("pyrolysisRegion", "pyrolysisProperties") ), TnbrName_(dict.lookup("Tnbr")), qrName_(dict.lookup("qr")), - convectiveScaling_(dict.lookupOrDefault<scalar>("convectiveScaling", 1.0)), + convectiveScaling_(dict.getOrDefault<scalar>("convectiveScaling", 1)), filmDeltaDry_(dict.get<scalar>("filmDeltaDry")), filmDeltaWet_(dict.get<scalar>("filmDeltaWet")) { diff --git a/src/regionModels/regionCoupling/derivedFvPatchFields/filmPyrolysisTemperatureCoupled/filmPyrolysisTemperatureCoupledFvPatchScalarField.C b/src/regionModels/regionCoupling/derivedFvPatchFields/filmPyrolysisTemperatureCoupled/filmPyrolysisTemperatureCoupledFvPatchScalarField.C index 0a81bc162b6..6c88b5302c6 100644 --- a/src/regionModels/regionCoupling/derivedFvPatchFields/filmPyrolysisTemperatureCoupled/filmPyrolysisTemperatureCoupledFvPatchScalarField.C +++ b/src/regionModels/regionCoupling/derivedFvPatchFields/filmPyrolysisTemperatureCoupled/filmPyrolysisTemperatureCoupledFvPatchScalarField.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. @@ -76,14 +77,14 @@ filmPyrolysisTemperatureCoupledFvPatchScalarField fixedValueFvPatchScalarField(p, iF, dict), filmRegionName_ ( - dict.lookupOrDefault<word>("filmRegion", "surfaceFilmProperties") + dict.getOrDefault<word>("filmRegion", "surfaceFilmProperties") ), pyrolysisRegionName_ ( - dict.lookupOrDefault<word>("pyrolysisRegion", "pyrolysisProperties") + dict.getOrDefault<word>("pyrolysisRegion", "pyrolysisProperties") ), - phiName_(dict.lookupOrDefault<word>("phi", "phi")), - rhoName_(dict.lookupOrDefault<word>("rho", "rho")) + phiName_(dict.getOrDefault<word>("phi", "phi")), + rhoName_(dict.getOrDefault<word>("rho", "rho")) {} diff --git a/src/regionModels/regionCoupling/derivedFvPatchFields/filmPyrolysisVelocityCoupled/filmPyrolysisVelocityCoupledFvPatchVectorField.C b/src/regionModels/regionCoupling/derivedFvPatchFields/filmPyrolysisVelocityCoupled/filmPyrolysisVelocityCoupledFvPatchVectorField.C index 3541bdfcf07..2e3e718946e 100644 --- a/src/regionModels/regionCoupling/derivedFvPatchFields/filmPyrolysisVelocityCoupled/filmPyrolysisVelocityCoupledFvPatchVectorField.C +++ b/src/regionModels/regionCoupling/derivedFvPatchFields/filmPyrolysisVelocityCoupled/filmPyrolysisVelocityCoupledFvPatchVectorField.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. @@ -76,14 +77,14 @@ filmPyrolysisVelocityCoupledFvPatchVectorField fixedValueFvPatchVectorField(p, iF, dict), filmRegionName_ ( - dict.lookupOrDefault<word>("filmRegion", "surfaceFilmProperties") + dict.getOrDefault<word>("filmRegion", "surfaceFilmProperties") ), pyrolysisRegionName_ ( - dict.lookupOrDefault<word>("pyrolysisRegion", "pyrolysisProperties") + dict.getOrDefault<word>("pyrolysisRegion", "pyrolysisProperties") ), - phiName_(dict.lookupOrDefault<word>("phi", "phi")), - rhoName_(dict.lookupOrDefault<word>("rho", "rho")) + phiName_(dict.getOrDefault<word>("phi", "phi")), + rhoName_(dict.getOrDefault<word>("rho", "rho")) {} diff --git a/src/regionModels/surfaceFilmModels/derivedFvPatchFields/filmHeightInletVelocity/filmHeightInletVelocityFvPatchVectorField.C b/src/regionModels/surfaceFilmModels/derivedFvPatchFields/filmHeightInletVelocity/filmHeightInletVelocityFvPatchVectorField.C index dfb7e0a1f06..a522f7f9854 100644 --- a/src/regionModels/surfaceFilmModels/derivedFvPatchFields/filmHeightInletVelocity/filmHeightInletVelocityFvPatchVectorField.C +++ b/src/regionModels/surfaceFilmModels/derivedFvPatchFields/filmHeightInletVelocity/filmHeightInletVelocityFvPatchVectorField.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. @@ -71,9 +72,9 @@ filmHeightInletVelocityFvPatchVectorField ) : fixedValueFvPatchVectorField(p, iF, dict), - phiName_(dict.lookupOrDefault<word>("phi", "phi")), - rhoName_(dict.lookupOrDefault<word>("rho", "rho")), - deltafName_(dict.lookupOrDefault<word>("deltaf", "deltaf")) + phiName_(dict.getOrDefault<word>("phi", "phi")), + rhoName_(dict.getOrDefault<word>("rho", "rho")), + deltafName_(dict.getOrDefault<word>("deltaf", "deltaf")) {} diff --git a/src/regionModels/surfaceFilmModels/derivedFvPatchFields/inclinedFilmNusseltHeight/inclinedFilmNusseltHeightFvPatchScalarField.C b/src/regionModels/surfaceFilmModels/derivedFvPatchFields/inclinedFilmNusseltHeight/inclinedFilmNusseltHeightFvPatchScalarField.C index 0d0cc6231b3..6215864b517 100644 --- a/src/regionModels/surfaceFilmModels/derivedFvPatchFields/inclinedFilmNusseltHeight/inclinedFilmNusseltHeightFvPatchScalarField.C +++ b/src/regionModels/surfaceFilmModels/derivedFvPatchFields/inclinedFilmNusseltHeight/inclinedFilmNusseltHeightFvPatchScalarField.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2012-2017 OpenFOAM Foundation - Copyright (C) 2016 OpenCFD Ltd. + Copyright (C) 2016-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -76,7 +76,7 @@ inclinedFilmNusseltHeightFvPatchScalarField fixedValueFvPatchScalarField(p, iF, dict), filmRegionName_ ( - dict.lookupOrDefault<word>("filmRegion", "surfaceFilmProperties") + dict.getOrDefault<word>("filmRegion", "surfaceFilmProperties") ), GammaMean_(Function1<scalar>::New("GammaMean", dict)), a_(Function1<scalar>::New("a", dict)), diff --git a/src/regionModels/surfaceFilmModels/derivedFvPatchFields/inclinedFilmNusseltInletVelocity/inclinedFilmNusseltInletVelocityFvPatchVectorField.C b/src/regionModels/surfaceFilmModels/derivedFvPatchFields/inclinedFilmNusseltInletVelocity/inclinedFilmNusseltInletVelocityFvPatchVectorField.C index 9f0f7f19c9e..252d4243e82 100644 --- a/src/regionModels/surfaceFilmModels/derivedFvPatchFields/inclinedFilmNusseltInletVelocity/inclinedFilmNusseltInletVelocityFvPatchVectorField.C +++ b/src/regionModels/surfaceFilmModels/derivedFvPatchFields/inclinedFilmNusseltInletVelocity/inclinedFilmNusseltInletVelocityFvPatchVectorField.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2012-2017 OpenFOAM Foundation - Copyright (C) 2016 OpenCFD Ltd. + Copyright (C) 2016-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -76,7 +76,7 @@ inclinedFilmNusseltInletVelocityFvPatchVectorField fixedValueFvPatchVectorField(p, iF, dict), filmRegionName_ ( - dict.lookupOrDefault<word>("filmRegion", "surfaceFilmProperties") + dict.getOrDefault<word>("filmRegion", "surfaceFilmProperties") ), GammaMean_(Function1<scalar>::New("GammaMean", dict)), a_(Function1<scalar>::New("a", dict)), diff --git a/src/regionModels/surfaceFilmModels/derivedFvPatchFields/wallFunctions/alphatFilmWallFunction/alphatFilmWallFunctionFvPatchScalarField.C b/src/regionModels/surfaceFilmModels/derivedFvPatchFields/wallFunctions/alphatFilmWallFunction/alphatFilmWallFunctionFvPatchScalarField.C index 189aff7c790..8f9c02dc187 100644 --- a/src/regionModels/surfaceFilmModels/derivedFvPatchFields/wallFunctions/alphatFilmWallFunction/alphatFilmWallFunctionFvPatchScalarField.C +++ b/src/regionModels/surfaceFilmModels/derivedFvPatchFields/wallFunctions/alphatFilmWallFunction/alphatFilmWallFunctionFvPatchScalarField.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. @@ -92,13 +93,13 @@ alphatFilmWallFunctionFvPatchScalarField fixedValueFvPatchScalarField(p, iF, dict), filmRegionName_ ( - dict.lookupOrDefault<word>("filmRegion", "surfaceFilmProperties") + dict.getOrDefault<word>("filmRegion", "surfaceFilmProperties") ), - B_(dict.lookupOrDefault("B", 5.5)), - yPlusCrit_(dict.lookupOrDefault("yPlusCrit", 11.05)), - Cmu_(dict.lookupOrDefault("Cmu", 0.09)), - kappa_(dict.lookupOrDefault("kappa", 0.41)), - Prt_(dict.lookupOrDefault("Prt", 0.85)) + B_(dict.getOrDefault("B", 5.5)), + yPlusCrit_(dict.getOrDefault("yPlusCrit", 11.05)), + Cmu_(dict.getOrDefault("Cmu", 0.09)), + kappa_(dict.getOrDefault("kappa", 0.41)), + Prt_(dict.getOrDefault("Prt", 0.85)) {} diff --git a/src/regionModels/surfaceFilmModels/derivedFvPatchFields/wallFunctions/nutkFilmWallFunction/nutkFilmWallFunctionFvPatchScalarField.C b/src/regionModels/surfaceFilmModels/derivedFvPatchFields/wallFunctions/nutkFilmWallFunction/nutkFilmWallFunctionFvPatchScalarField.C index 33c3713ea29..8d50c7eaa8e 100644 --- a/src/regionModels/surfaceFilmModels/derivedFvPatchFields/wallFunctions/nutkFilmWallFunction/nutkFilmWallFunctionFvPatchScalarField.C +++ b/src/regionModels/surfaceFilmModels/derivedFvPatchFields/wallFunctions/nutkFilmWallFunction/nutkFilmWallFunctionFvPatchScalarField.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. @@ -189,10 +190,10 @@ nutkFilmWallFunctionFvPatchScalarField::nutkFilmWallFunctionFvPatchScalarField nutkWallFunctionFvPatchScalarField(p, iF, dict), filmRegionName_ ( - dict.lookupOrDefault<word>("filmRegion", "surfaceFilmProperties") + dict.getOrDefault<word>("filmRegion", "surfaceFilmProperties") ), - B_(dict.lookupOrDefault("B", 5.5)), - yPlusCrit_(dict.lookupOrDefault("yPlusCrit", 11.05)) + B_(dict.getOrDefault("B", 5.5)), + yPlusCrit_(dict.getOrDefault("yPlusCrit", 11.05)) {} diff --git a/src/regionModels/surfaceFilmModels/kinematicSingleLayer/kinematicSingleLayer.C b/src/regionModels/surfaceFilmModels/kinematicSingleLayer/kinematicSingleLayer.C index 5aa7300b2de..2e98c357d53 100644 --- a/src/regionModels/surfaceFilmModels/kinematicSingleLayer/kinematicSingleLayer.C +++ b/src/regionModels/surfaceFilmModels/kinematicSingleLayer/kinematicSingleLayer.C @@ -444,7 +444,7 @@ kinematicSingleLayer::kinematicSingleLayer surfaceFilmRegionModel(modelType, mesh, g, regionType), momentumPredictor_(solution().subDict("PISO").lookup("momentumPredictor")), - nOuterCorr_(solution().subDict("PISO").lookupOrDefault("nOuterCorr", 1)), + nOuterCorr_(solution().subDict("PISO").getOrDefault("nOuterCorr", 1)), nCorr_(solution().subDict("PISO").get<label>("nCorr")), nNonOrthCorr_ ( @@ -454,7 +454,7 @@ kinematicSingleLayer::kinematicSingleLayer cumulativeContErr_(0.0), deltaSmall_("deltaSmall", dimLength, SMALL), - deltaCoLimit_(solution().lookupOrDefault("deltaCoLimit", 1e-4)), + deltaCoLimit_(solution().getOrDefault<scalar>("deltaCoLimit", 1e-4)), rho_ ( 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 1cee735c40f..3e81f8d3bba 100644 --- a/src/regionModels/surfaceFilmModels/submodels/kinematic/force/contactAngleForces/contactAngleForce/contactAngleForce.C +++ b/src/regionModels/surfaceFilmModels/submodels/kinematic/force/contactAngleForces/contactAngleForce/contactAngleForce.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2017 OpenFOAM Foundation - Copyright (C) 2018 OpenCFD Ltd. + Copyright (C) 2018-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -51,7 +51,7 @@ void contactAngleForce::initialise() { const wordRes zeroForcePatches ( - coeffDict_.lookupOrDefault<wordRes>("zeroForcePatches", wordRes()) + coeffDict_.getOrDefault<wordRes>("zeroForcePatches", wordRes()) ); if (zeroForcePatches.size()) diff --git a/src/regionModels/surfaceFilmModels/submodels/kinematic/injectionModel/BrunDrippingInjection/BrunDrippingInjection.C b/src/regionModels/surfaceFilmModels/submodels/kinematic/injectionModel/BrunDrippingInjection/BrunDrippingInjection.C index 3334bd9e655..b26473b5c47 100644 --- a/src/regionModels/surfaceFilmModels/submodels/kinematic/injectionModel/BrunDrippingInjection/BrunDrippingInjection.C +++ b/src/regionModels/surfaceFilmModels/submodels/kinematic/injectionModel/BrunDrippingInjection/BrunDrippingInjection.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2016-2017 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -52,9 +53,9 @@ BrunDrippingInjection::BrunDrippingInjection ) : injectionModel(type(), film, dict), - ubarStar_(coeffDict_.lookupOrDefault<scalar>("ubarStar", 1.62208)), - dCoeff_(coeffDict_.lookupOrDefault<scalar>("dCoeff", 3.3)), - deltaStable_(coeffDict_.lookupOrDefault<scalar>("deltaStable", 0)), + ubarStar_(coeffDict_.getOrDefault<scalar>("ubarStar", 1.62208)), + dCoeff_(coeffDict_.getOrDefault<scalar>("dCoeff", 3.3)), + deltaStable_(coeffDict_.getOrDefault<scalar>("deltaStable", 0)), diameter_(film.regionMesh().nCells(), -1.0) {} diff --git a/src/regionModels/surfaceFilmModels/submodels/kinematic/injectionModel/curvatureSeparation/curvatureSeparation.C b/src/regionModels/surfaceFilmModels/submodels/kinematic/injectionModel/curvatureSeparation/curvatureSeparation.C index af2dcb9fc81..d46e00a9f91 100644 --- a/src/regionModels/surfaceFilmModels/submodels/kinematic/injectionModel/curvatureSeparation/curvatureSeparation.C +++ b/src/regionModels/surfaceFilmModels/submodels/kinematic/injectionModel/curvatureSeparation/curvatureSeparation.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. @@ -228,7 +229,7 @@ curvatureSeparation::curvatureSeparation : injectionModel(type(), film, dict), gradNHat_(fvc::grad(film.nHat())), - deltaByR1Min_(coeffDict_.lookupOrDefault<scalar>("deltaByR1Min", 0)), + deltaByR1Min_(coeffDict_.getOrDefault<scalar>("deltaByR1Min", 0)), definedPatchRadii_(), magG_(mag(film.g().value())), gHat_(Zero) diff --git a/src/regionModels/surfaceFilmModels/submodels/kinematic/injectionModel/patchInjection/patchInjection.C b/src/regionModels/surfaceFilmModels/submodels/kinematic/injectionModel/patchInjection/patchInjection.C index 5cc28a37846..ea0fbb347d8 100644 --- a/src/regionModels/surfaceFilmModels/submodels/kinematic/injectionModel/patchInjection/patchInjection.C +++ b/src/regionModels/surfaceFilmModels/submodels/kinematic/injectionModel/patchInjection/patchInjection.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2015-2017 OpenFOAM Foundation - Copyright (C) 2018 OpenCFD Ltd. + Copyright (C) 2018-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -52,7 +52,7 @@ patchInjection::patchInjection ) : injectionModel(type(), film, dict), - deltaStable_(coeffDict_.lookupOrDefault<scalar>("deltaStable", 0)) + deltaStable_(coeffDict_.getOrDefault<scalar>("deltaStable", 0)) { const polyBoundaryMesh& pbm = film.regionMesh().boundaryMesh(); patchIDs_.setSize diff --git a/src/regionModels/surfaceFilmModels/submodels/kinematic/transferModels/transferModelList/transferModelList.C b/src/regionModels/surfaceFilmModels/submodels/kinematic/transferModels/transferModelList/transferModelList.C index 38a29b5eb2a..65a8bd61a64 100644 --- a/src/regionModels/surfaceFilmModels/submodels/kinematic/transferModels/transferModelList/transferModelList.C +++ b/src/regionModels/surfaceFilmModels/submodels/kinematic/transferModels/transferModelList/transferModelList.C @@ -65,7 +65,7 @@ transferModelList::transferModelList { const wordList activeModels ( - dict.lookupOrDefault<wordList>("transferModels", wordList()) + dict.getOrDefault<wordList>("transferModels", wordList()) ); wordHashSet models(activeModels); diff --git a/src/regionModels/surfaceFilmModels/submodels/thermo/phaseChangeModel/solidification/solidification.C b/src/regionModels/surfaceFilmModels/submodels/thermo/phaseChangeModel/solidification/solidification.C index f32640f411f..f27a2ec32df 100644 --- a/src/regionModels/surfaceFilmModels/submodels/thermo/phaseChangeModel/solidification/solidification.C +++ b/src/regionModels/surfaceFilmModels/submodels/thermo/phaseChangeModel/solidification/solidification.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2013-2017 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -61,7 +62,7 @@ solidification::solidification T0_(coeffDict_.get<scalar>("T0")), maxSolidificationFrac_ ( - coeffDict_.lookupOrDefault("maxSolidificationFrac", 0.2) + coeffDict_.getOrDefault<scalar>("maxSolidificationFrac", 0.2) ), maxSolidificationRate_ ( diff --git a/src/regionModels/surfaceFilmModels/submodels/thermo/phaseChangeModel/standardPhaseChange/standardPhaseChange.C b/src/regionModels/surfaceFilmModels/submodels/thermo/phaseChangeModel/standardPhaseChange/standardPhaseChange.C index 93384747972..c9f03a7bd2f 100644 --- a/src/regionModels/surfaceFilmModels/submodels/thermo/phaseChangeModel/standardPhaseChange/standardPhaseChange.C +++ b/src/regionModels/surfaceFilmModels/submodels/thermo/phaseChangeModel/standardPhaseChange/standardPhaseChange.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2018 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -80,8 +81,8 @@ standardPhaseChange::standardPhaseChange phaseChangeModel(typeName, film, dict), deltaMin_(coeffDict_.get<scalar>("deltaMin")), L_(coeffDict_.get<scalar>("L")), - TbFactor_(coeffDict_.lookupOrDefault<scalar>("TbFactor", 1.1)), - YInfZero_(coeffDict_.lookupOrDefault<Switch>("YInfZero", false)) + TbFactor_(coeffDict_.getOrDefault<scalar>("TbFactor", 1.1)), + YInfZero_(coeffDict_.getOrDefault<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 6f486222948..642c56d170f 100644 --- a/src/regionModels/surfaceFilmModels/submodels/thermo/phaseChangeModel/waxSolventEvaporation/waxSolventEvaporation.C +++ b/src/regionModels/surfaceFilmModels/submodels/thermo/phaseChangeModel/waxSolventEvaporation/waxSolventEvaporation.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2017 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -128,8 +129,8 @@ waxSolventEvaporation::waxSolventEvaporation ), deltaMin_(coeffDict_.get<scalar>("deltaMin")), L_(coeffDict_.get<scalar>("L")), - TbFactor_(coeffDict_.lookupOrDefault<scalar>("TbFactor", 1.1)), - YInfZero_(coeffDict_.lookupOrDefault("YInfZero", false)), + TbFactor_(coeffDict_.getOrDefault<scalar>("TbFactor", 1.1)), + YInfZero_(coeffDict_.getOrDefault("YInfZero", false)), activityCoeff_ ( Function1<scalar>::New("activityCoeff", coeffDict_) diff --git a/src/regionModels/thermalBaffleModels/thermalBaffleModel/thermalBaffleModel.C b/src/regionModels/thermalBaffleModels/thermalBaffleModel/thermalBaffleModel.C index 6e17bbd61b9..77da201d243 100644 --- a/src/regionModels/thermalBaffleModels/thermalBaffleModel/thermalBaffleModel.C +++ b/src/regionModels/thermalBaffleModels/thermalBaffleModel/thermalBaffleModel.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. @@ -203,7 +204,7 @@ thermalBaffleModel::thermalBaffleModel thickness_(), delta_("delta", dimLength, Zero), oneD_(false), - constantThickness_(dict.lookupOrDefault("constantThickness", true)) + constantThickness_(dict.getOrDefault("constantThickness", true)) { init(); } @@ -219,7 +220,7 @@ thermalBaffleModel::thermalBaffleModel thickness_(), delta_("delta", dimLength, Zero), oneD_(false), - constantThickness_(lookupOrDefault("constantThickness", true)) + constantThickness_(getOrDefault("constantThickness", true)) { init(); } diff --git a/src/renumber/SloanRenumber/SloanRenumber.C b/src/renumber/SloanRenumber/SloanRenumber.C index 450cc2a6df3..c7a01e6bb6b 100644 --- a/src/renumber/SloanRenumber/SloanRenumber.C +++ b/src/renumber/SloanRenumber/SloanRenumber.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. @@ -97,7 +98,7 @@ Foam::SloanRenumber::SloanRenumber(const dictionary& renumberDict) renumberDict.optionalSubDict ( typeName + "Coeffs" - ).lookupOrDefault("reverse", false) + ).getOrDefault("reverse", false) ) {} diff --git a/src/renumber/renumberMethods/CuthillMcKeeRenumber/CuthillMcKeeRenumber.C b/src/renumber/renumberMethods/CuthillMcKeeRenumber/CuthillMcKeeRenumber.C index 071e7003389..394b4ec8a70 100644 --- a/src/renumber/renumberMethods/CuthillMcKeeRenumber/CuthillMcKeeRenumber.C +++ b/src/renumber/renumberMethods/CuthillMcKeeRenumber/CuthillMcKeeRenumber.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. @@ -55,7 +56,7 @@ Foam::CuthillMcKeeRenumber::CuthillMcKeeRenumber(const dictionary& renumberDict) renumberDict.optionalSubDict ( typeName + "Coeffs" - ).lookupOrDefault("reverse", false) + ).getOrDefault("reverse", false) ) {} diff --git a/src/rigidBodyDynamics/restraints/linearAxialAngularSpring/linearAxialAngularSpring.C b/src/rigidBodyDynamics/restraints/linearAxialAngularSpring/linearAxialAngularSpring.C index 17ba120d359..3caed55fbf3 100644 --- a/src/rigidBodyDynamics/restraints/linearAxialAngularSpring/linearAxialAngularSpring.C +++ b/src/rigidBodyDynamics/restraints/linearAxialAngularSpring/linearAxialAngularSpring.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2016-2017 OpenFOAM Foundation - Copyright (C) 2018 OpenCFD Ltd. + Copyright (C) 2018-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -148,7 +148,7 @@ bool Foam::RBD::restraints::linearAxialAngularSpring::read { restraint::read(dict); - refQ_ = coeffs_.lookupOrDefault<tensor>("referenceOrientation", I); + refQ_ = coeffs_.getOrDefault<tensor>("referenceOrientation", I); if (mag(mag(refQ_) - sqrt(3.0)) > ROOTSMALL) { diff --git a/src/rigidBodyDynamics/restraints/prescribedRotation/prescribedRotation.C b/src/rigidBodyDynamics/restraints/prescribedRotation/prescribedRotation.C index 4275e7a7221..87ba49ca392 100644 --- a/src/rigidBodyDynamics/restraints/prescribedRotation/prescribedRotation.C +++ b/src/rigidBodyDynamics/restraints/prescribedRotation/prescribedRotation.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. @@ -165,7 +165,7 @@ bool Foam::RBD::restraints::prescribedRotation::read { restraint::read(dict); - refQ_ = coeffs_.lookupOrDefault<tensor>("referenceOrientation", I); + refQ_ = coeffs_.getOrDefault<tensor>("referenceOrientation", I); if (mag(mag(refQ_) - sqrt(3.0)) > ROOTSMALL) { diff --git a/src/rigidBodyDynamics/rigidBodyModelState/rigidBodyModelState.C b/src/rigidBodyDynamics/rigidBodyModelState/rigidBodyModelState.C index 39108d7bbc9..6233228c5a7 100644 --- a/src/rigidBodyDynamics/rigidBodyModelState/rigidBodyModelState.C +++ b/src/rigidBodyDynamics/rigidBodyModelState/rigidBodyModelState.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2016-2017 OpenFOAM Foundation - Copyright (C) 2018 OpenCFD Ltd. + Copyright (C) 2018-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -49,11 +49,11 @@ Foam::RBD::rigidBodyModelState::rigidBodyModelState const dictionary& dict ) : - q_(dict.lookupOrDefault("q", scalarField(model.nDoF(), Zero))), - qDot_(dict.lookupOrDefault("qDot", scalarField(model.nDoF(), Zero))), - qDdot_(dict.lookupOrDefault("qDdot", scalarField(model.nDoF(), Zero))), - t_(dict.lookupOrDefault<scalar>("t", -1)), - deltaT_(dict.lookupOrDefault<scalar>("deltaT", 0)) + q_(dict.getOrDefault("q", scalarField(model.nDoF(), Zero))), + qDot_(dict.getOrDefault("qDot", scalarField(model.nDoF(), Zero))), + qDdot_(dict.getOrDefault("qDdot", scalarField(model.nDoF(), Zero))), + t_(dict.getOrDefault<scalar>("t", -1)), + deltaT_(dict.getOrDefault<scalar>("deltaT", 0)) { if ( diff --git a/src/rigidBodyDynamics/rigidBodyMotion/rigidBodyMotion.C b/src/rigidBodyDynamics/rigidBodyMotion/rigidBodyMotion.C index bbca33225ea..fe05c117b0f 100644 --- a/src/rigidBodyDynamics/rigidBodyMotion/rigidBodyMotion.C +++ b/src/rigidBodyDynamics/rigidBodyMotion/rigidBodyMotion.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2016-2017 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -65,9 +66,9 @@ Foam::RBD::rigidBodyMotion::rigidBodyMotion motionState_(*this, dict), motionState0_(motionState_), X00_(X0_.size()), - aRelax_(dict.lookupOrDefault<scalar>("accelerationRelaxation", 1.0)), - aDamp_(dict.lookupOrDefault<scalar>("accelerationDamping", 1.0)), - report_(dict.lookupOrDefault<Switch>("report", false)), + aRelax_(dict.getOrDefault<scalar>("accelerationRelaxation", 1)), + aDamp_(dict.getOrDefault<scalar>("accelerationDamping", 1)), + report_(dict.getOrDefault<Switch>("report", false)), solver_(rigidBodySolver::New(*this, dict.subDict("solver"))) { if (dict.found("g")) @@ -90,9 +91,9 @@ Foam::RBD::rigidBodyMotion::rigidBodyMotion motionState_(*this, stateDict), motionState0_(motionState_), X00_(X0_.size()), - aRelax_(dict.lookupOrDefault<scalar>("accelerationRelaxation", 1.0)), - aDamp_(dict.lookupOrDefault<scalar>("accelerationDamping", 1.0)), - report_(dict.lookupOrDefault<Switch>("report", false)), + aRelax_(dict.getOrDefault<scalar>("accelerationRelaxation", 1)), + aDamp_(dict.getOrDefault<scalar>("accelerationDamping", 1)), + report_(dict.getOrDefault<Switch>("report", false)), solver_(rigidBodySolver::New(*this, dict.subDict("solver"))) { if (dict.found("g")) diff --git a/src/rigidBodyDynamics/rigidBodyMotion/rigidBodyMotionIO.C b/src/rigidBodyDynamics/rigidBodyMotion/rigidBodyMotionIO.C index 38101348e2b..95da0ad66fa 100644 --- a/src/rigidBodyDynamics/rigidBodyMotion/rigidBodyMotionIO.C +++ b/src/rigidBodyDynamics/rigidBodyMotion/rigidBodyMotionIO.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2016 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -34,9 +35,9 @@ bool Foam::RBD::rigidBodyMotion::read(const dictionary& dict) { rigidBodyModel::read(dict); - aRelax_ = dict.lookupOrDefault<scalar>("accelerationRelaxation", 1.0); - aDamp_ = dict.lookupOrDefault<scalar>("accelerationDamping", 1.0); - report_ = dict.lookupOrDefault<Switch>("report", false); + aRelax_ = dict.getOrDefault<scalar>("accelerationRelaxation", 1); + aDamp_ = dict.getOrDefault<scalar>("accelerationDamping", 1); + report_ = dict.getOrDefault<Switch>("report", false); return true; } diff --git a/src/rigidBodyDynamics/rigidBodySolvers/CrankNicolson/CrankNicolson.C b/src/rigidBodyDynamics/rigidBodySolvers/CrankNicolson/CrankNicolson.C index 1a0f0f8f572..0f7476d41fd 100644 --- a/src/rigidBodyDynamics/rigidBodySolvers/CrankNicolson/CrankNicolson.C +++ b/src/rigidBodyDynamics/rigidBodySolvers/CrankNicolson/CrankNicolson.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2016 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -52,8 +53,8 @@ Foam::RBD::rigidBodySolvers::CrankNicolson::CrankNicolson ) : rigidBodySolver(body), - aoc_(dict.lookupOrDefault<scalar>("aoc", 0.5)), - voc_(dict.lookupOrDefault<scalar>("voc", 0.5)) + aoc_(dict.getOrDefault<scalar>("aoc", 0.5)), + voc_(dict.getOrDefault<scalar>("voc", 0.5)) {} diff --git a/src/rigidBodyDynamics/rigidBodySolvers/Newmark/Newmark.C b/src/rigidBodyDynamics/rigidBodySolvers/Newmark/Newmark.C index ff7a3c26ddd..61d441f419a 100644 --- a/src/rigidBodyDynamics/rigidBodySolvers/Newmark/Newmark.C +++ b/src/rigidBodyDynamics/rigidBodySolvers/Newmark/Newmark.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2016 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -52,13 +53,13 @@ Foam::RBD::rigidBodySolvers::Newmark::Newmark ) : rigidBodySolver(body), - gamma_(dict.lookupOrDefault<scalar>("gamma", 0.5)), + gamma_(dict.getOrDefault<scalar>("gamma", 0.5)), beta_ ( max ( 0.25*sqr(gamma_ + 0.5), - dict.lookupOrDefault<scalar>("beta", 0.25) + dict.getOrDefault<scalar>("beta", 0.25) ) ) {} diff --git a/src/rigidBodyMeshMotion/rigidBodyMeshMotion/rigidBodyMeshMotion.C b/src/rigidBodyMeshMotion/rigidBodyMeshMotion/rigidBodyMeshMotion.C index fcbbf6d77e1..5c71f9dc533 100644 --- a/src/rigidBodyMeshMotion/rigidBodyMeshMotion/rigidBodyMeshMotion.C +++ b/src/rigidBodyMeshMotion/rigidBodyMeshMotion/rigidBodyMeshMotion.C @@ -117,9 +117,9 @@ Foam::rigidBodyMeshMotion::rigidBodyMeshMotion ) : coeffDict() ), - test_(coeffDict().lookupOrDefault("test", false)), + test_(coeffDict().getOrDefault("test", false)), rhoInf_(1.0), - rhoName_(coeffDict().lookupOrDefault<word>("rho", "rho")), + rhoName_(coeffDict().getOrDefault<word>("rho", "rho")), ramp_(nullptr), curTimeIndex_(-1) { @@ -267,7 +267,7 @@ void Foam::rigidBodyMeshMotion::solve() } else { - const label nIter(coeffDict().lookupOrDefault("nIter", 1)); + const label nIter(coeffDict().getOrDefault<label>("nIter", 1)); for (label i=0; i<nIter; i++) { diff --git a/src/rigidBodyMeshMotion/rigidBodyMeshMotionSolver/rigidBodyMeshMotionSolver.C b/src/rigidBodyMeshMotion/rigidBodyMeshMotionSolver/rigidBodyMeshMotionSolver.C index 56e3f711011..aebf1f763ad 100644 --- a/src/rigidBodyMeshMotion/rigidBodyMeshMotionSolver/rigidBodyMeshMotionSolver.C +++ b/src/rigidBodyMeshMotion/rigidBodyMeshMotionSolver/rigidBodyMeshMotionSolver.C @@ -100,9 +100,9 @@ Foam::rigidBodyMeshMotionSolver::rigidBodyMeshMotionSolver ) : coeffDict() ), - test_(coeffDict().lookupOrDefault("test", false)), + test_(coeffDict().getOrDefault("test", false)), rhoInf_(1.0), - rhoName_(coeffDict().lookupOrDefault<word>("rho", "rho")), + rhoName_(coeffDict().getOrDefault<word>("rho", "rho")), curTimeIndex_(-1), meshSolverPtr_ ( diff --git a/src/sampling/probes/probes.C b/src/sampling/probes/probes.C index 39a57ac60a9..bce791da89a 100644 --- a/src/sampling/probes/probes.C +++ b/src/sampling/probes/probes.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2017 OpenFOAM Foundation - Copyright (C) 2015-2018 OpenCFD Ltd. + Copyright (C) 2015-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -295,7 +295,7 @@ Foam::probes::probes ( runTime.lookupObject<objectRegistry> ( - dict.lookupOrDefault("region", polyMesh::defaultRegion) + dict.getOrDefault("region", polyMesh::defaultRegion) ) ) ), diff --git a/src/sampling/sampledSet/cellCentre/cellCentreSet.C b/src/sampling/sampledSet/cellCentre/cellCentreSet.C index b5870aca55b..2f523ef323f 100644 --- a/src/sampling/sampledSet/cellCentre/cellCentreSet.C +++ b/src/sampling/sampledSet/cellCentre/cellCentreSet.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. @@ -131,9 +131,9 @@ Foam::cellCentreSet::cellCentreSet name, mesh, searchEngine, - dict.lookupOrDefault<word>("axis", "xyz") + dict.getOrDefault<word>("axis", "xyz") ), - bounds_(dict.lookupOrDefault("bounds", boundBox::invertedBox)) + bounds_(dict.getOrDefault("bounds", boundBox::invertedBox)) { genSamples(); } diff --git a/src/sampling/sampledSet/patchEdge/patchEdgeSet.C b/src/sampling/sampledSet/patchEdge/patchEdgeSet.C index f7298b9b226..3475a030492 100644 --- a/src/sampling/sampledSet/patchEdge/patchEdgeSet.C +++ b/src/sampling/sampledSet/patchEdge/patchEdgeSet.C @@ -5,7 +5,7 @@ \\ / A nd | www.openfoam.com \\/ M anipulation | ------------------------------------------------------------------------------- - Copyright (C) 2019 OpenCFD Ltd. + Copyright (C) 2019-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -207,7 +207,7 @@ Foam::patchEdgeSet::patchEdgeSet dict.get<word>("surfaceType"), IOobject ( - dict.lookupOrDefault("surfaceName", name), + dict.getOrDefault("surfaceName", name), mesh.time().constant(), // directory "triSurface", // instance mesh.time(), // registry diff --git a/src/sampling/sampledSet/patchSeed/patchSeedSet.C b/src/sampling/sampledSet/patchSeed/patchSeedSet.C index 517bd5b254c..65a2fdfa369 100644 --- a/src/sampling/sampledSet/patchSeed/patchSeedSet.C +++ b/src/sampling/sampledSet/patchSeed/patchSeedSet.C @@ -348,7 +348,7 @@ Foam::patchSeedSet::patchSeedSet maxPoints_(dict.get<label>("maxPoints")), selectedLocations_ ( - dict.lookupOrDefault<pointField> + dict.getOrDefault<pointField> ( "points", pointField(0) diff --git a/src/sampling/sampledSet/shortestPath/shortestPathSet.C b/src/sampling/sampledSet/shortestPath/shortestPathSet.C index ac0fd414ae6..2fcbdd0ed4c 100644 --- a/src/sampling/sampledSet/shortestPath/shortestPathSet.C +++ b/src/sampling/sampledSet/shortestPath/shortestPathSet.C @@ -1416,8 +1416,8 @@ Foam::shortestPathSet::shortestPathSet insidePoints_(dict.get<pointField>("insidePoints")), outsidePoints_(dict.get<pointField>("outsidePoints")) { - const label maxIter(dict.lookupOrDefault<label>("maxIter", 50)); - const bool markLeakPath(dict.lookupOrDefault<bool>("markLeakPath", true)); + const label maxIter(dict.getOrDefault<label>("maxIter", 50)); + const bool markLeakPath(dict.getOrDefault("markLeakPath", true)); const polyBoundaryMesh& pbm = mesh.boundaryMesh(); diff --git a/src/sampling/sampledSurface/distanceSurface/sampledDistanceSurface.C b/src/sampling/sampledSurface/distanceSurface/sampledDistanceSurface.C index dc0db81c5ed..c7656ae6a68 100644 --- a/src/sampling/sampledSurface/distanceSurface/sampledDistanceSurface.C +++ b/src/sampling/sampledSurface/distanceSurface/sampledDistanceSurface.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. @@ -59,7 +59,7 @@ Foam::sampledDistanceSurface::sampledDistanceSurface : sampledSurface(name, mesh, dict), distanceSurface(name, mesh, dict), - average_(dict.lookupOrDefault("average", false)), + average_(dict.getOrDefault("average", false)), needsUpdate_(true) {} diff --git a/src/sampling/sampledSurface/sampledCuttingSurface/sampledCuttingSurface.C b/src/sampling/sampledSurface/sampledCuttingSurface/sampledCuttingSurface.C index eb039ee9ec3..35ad3b99357 100644 --- a/src/sampling/sampledSurface/sampledCuttingSurface/sampledCuttingSurface.C +++ b/src/sampling/sampledSurface/sampledCuttingSurface/sampledCuttingSurface.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. @@ -94,8 +94,8 @@ Foam::sampledCuttingSurface::sampledCuttingSurface sampledSurface(defaultSurfaceName, mesh, dict), cuttingSurface(defaultSurfaceName, mesh, dict), zoneNames_(), - bounds_(dict.lookupOrDefault("bounds", boundBox::invertedBox)), - triangulate_(dict.lookupOrDefault("triangulate", true)), + bounds_(dict.getOrDefault("bounds", boundBox::invertedBox)), + triangulate_(dict.getOrDefault("triangulate", true)), needsUpdate_(true) { if (!dict.readIfPresent("zones", zoneNames_) && dict.found("zone")) diff --git a/src/sampling/sampledSurface/sampledPatch/sampledPatch.C b/src/sampling/sampledSurface/sampledPatch/sampledPatch.C index 601793139c9..eb176bf654b 100644 --- a/src/sampling/sampledSurface/sampledPatch/sampledPatch.C +++ b/src/sampling/sampledSurface/sampledPatch/sampledPatch.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2016 OpenFOAM Foundation - Copyright (C) 2018-2019 OpenCFD Ltd. + Copyright (C) 2018-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -70,7 +70,7 @@ Foam::sampledPatch::sampledPatch : sampledSurface(name, mesh, dict), patchNames_(dict.get<wordRes>("patches")), - triangulate_(dict.lookupOrDefault("triangulate", false)), + triangulate_(dict.getOrDefault("triangulate", false)), needsUpdate_(true) {} diff --git a/src/sampling/sampledSurface/sampledPatchInternalField/sampledPatchInternalField.C b/src/sampling/sampledSurface/sampledPatchInternalField/sampledPatchInternalField.C index aa59f402d5e..c3f6893f7a5 100644 --- a/src/sampling/sampledSurface/sampledPatchInternalField/sampledPatchInternalField.C +++ b/src/sampling/sampledSurface/sampledPatchInternalField/sampledPatchInternalField.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2013 OpenFOAM Foundation - Copyright (C) 2018 OpenCFD Ltd. + Copyright (C) 2018-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -62,7 +62,7 @@ Foam::sampledPatchInternalField::sampledPatchInternalField mappers_(patchIDs().size()) { mappedPatchBase::offsetMode mode = - mappedPatchBase::offsetModeNames_.lookupOrDefault + mappedPatchBase::offsetModeNames_.getOrDefault ( "offsetMode", dict, mappedPatchBase::NORMAL ); diff --git a/src/sampling/sampledSurface/sampledPlane/sampledPlane.C b/src/sampling/sampledSurface/sampledPlane/sampledPlane.C index 3c03d966433..94a36ec6ce6 100644 --- a/src/sampling/sampledSurface/sampledPlane/sampledPlane.C +++ b/src/sampling/sampledSurface/sampledPlane/sampledPlane.C @@ -107,8 +107,8 @@ Foam::sampledPlane::sampledPlane sampledSurface(name, mesh, dict), cuttingPlane(plane(dict)), zoneNames_(), - bounds_(dict.lookupOrDefault("bounds", boundBox::invertedBox)), - triangulate_(dict.lookupOrDefault("triangulate", true)), + bounds_(dict.getOrDefault("bounds", boundBox::invertedBox)), + triangulate_(dict.getOrDefault("triangulate", true)), needsUpdate_(true) { if (!dict.readIfPresent("zones", zoneNames_) && dict.found("zone")) diff --git a/src/sampling/sampledSurface/sampledSurface/sampledSurface.C b/src/sampling/sampledSurface/sampledSurface/sampledSurface.C index c75bfc25528..4546b00bb1c 100644 --- a/src/sampling/sampledSurface/sampledSurface/sampledSurface.C +++ b/src/sampling/sampledSurface/sampledSurface/sampledSurface.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2016 OpenFOAM Foundation - Copyright (C) 2018-2019 OpenCFD Ltd. + Copyright (C) 2018-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -125,11 +125,11 @@ Foam::sampledSurface::sampledSurface const dictionary& dict ) : - name_(dict.lookupOrDefault<word>("name", name)), + name_(dict.getOrDefault<word>("name", name)), mesh_(mesh), - enabled_(dict.lookupOrDefault("enabled", true)), - invariant_(dict.lookupOrDefault("invariant", false)), - interpolate_(dict.lookupOrDefault("interpolate", false)), + enabled_(dict.getOrDefault("enabled", true)), + invariant_(dict.getOrDefault("invariant", false)), + interpolate_(dict.getOrDefault("interpolate", false)), area_(-1) {} diff --git a/src/sampling/sampledSurface/sampledSurfaces/sampledSurfaces.C b/src/sampling/sampledSurface/sampledSurfaces/sampledSurfaces.C index a87a22d4801..6211ad7d6e3 100644 --- a/src/sampling/sampledSurface/sampledSurfaces/sampledSurfaces.C +++ b/src/sampling/sampledSurface/sampledSurfaces/sampledSurfaces.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2017 OpenFOAM Foundation - Copyright (C) 2016-2019 OpenCFD Ltd. + Copyright (C) 2016-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -279,14 +279,14 @@ bool Foam::sampledSurfaces::read(const dictionary& dict) nFaces_.clear(); fieldSelection_.clear(); - verbose_ = dict.lookupOrDefault("verbose", false); - onExecute_ = dict.lookupOrDefault("sampleOnExecute", false); + verbose_ = dict.getOrDefault("verbose", false); + onExecute_ = dict.getOrDefault("sampleOnExecute", false); sampleFaceScheme_ = - dict.lookupOrDefault<word>("sampleScheme", "cell"); + dict.getOrDefault<word>("sampleScheme", "cell"); sampleNodeScheme_ = - dict.lookupOrDefault<word>("interpolationScheme", "cellPoint"); + dict.getOrDefault<word>("interpolationScheme", "cellPoint"); const entry* eptr = dict.findEntry("surfaces"); @@ -297,7 +297,7 @@ bool Foam::sampledSurfaces::read(const dictionary& dict) const dictionary formatOptions(dict.subOrEmptyDict("formatOptions")); // Store on registry? - const bool dfltStore = dict.lookupOrDefault("store", false); + const bool dfltStore = dict.getOrDefault("store", false); if (eptr && eptr->isDict()) { @@ -335,11 +335,11 @@ bool Foam::sampledSurfaces::read(const dictionary& dict) surfs.set(surfi, surf); // Define additional action(s) - if (surfDict.lookupOrDefault("store", dfltStore)) + if (surfDict.getOrDefault("store", dfltStore)) { actions_[surfi] |= ACTION_STORE; } - if (surfDict.lookupOrDefault("surfMeshStore", false)) + if (surfDict.getOrDefault("surfMeshStore", false)) { actions_[surfi] |= ACTION_SURF_MESH; } @@ -401,11 +401,11 @@ bool Foam::sampledSurfaces::read(const dictionary& dict) surfs.set(surfi, surf); // Define additional action(s) - if (surfDict.lookupOrDefault("store", dfltStore)) + if (surfDict.getOrDefault("store", dfltStore)) { actions_[surfi] |= ACTION_STORE; } - if (surfDict.lookupOrDefault("surfMeshStore", false)) + if (surfDict.getOrDefault("surfMeshStore", false)) { actions_[surfi] |= ACTION_SURF_MESH; } diff --git a/src/sampling/sampledSurface/thresholdCellFaces/sampledThresholdCellFaces.C b/src/sampling/sampledSurface/thresholdCellFaces/sampledThresholdCellFaces.C index 45e22d706a0..719286664f0 100644 --- a/src/sampling/sampledSurface/thresholdCellFaces/sampledThresholdCellFaces.C +++ b/src/sampling/sampledSurface/thresholdCellFaces/sampledThresholdCellFaces.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. @@ -151,9 +151,9 @@ Foam::sampledThresholdCellFaces::sampledThresholdCellFaces : sampledSurface(name, mesh, dict), fieldName_(dict.get<word>("field")), - lowerThreshold_(dict.lookupOrDefault<scalar>("lowerLimit", -VGREAT)), - upperThreshold_(dict.lookupOrDefault<scalar>("upperLimit", VGREAT)), - triangulate_(dict.lookupOrDefault("triangulate", false)), + lowerThreshold_(dict.getOrDefault<scalar>("lowerLimit", -VGREAT)), + upperThreshold_(dict.getOrDefault<scalar>("upperLimit", VGREAT)), + triangulate_(dict.getOrDefault("triangulate", false)), prevTimeIndex_(-1), meshCells_() { diff --git a/src/sampling/surface/cutting/cuttingSurface.C b/src/sampling/surface/cutting/cuttingSurface.C index ba48e616e2a..80dba908c75 100644 --- a/src/sampling/surface/cutting/cuttingSurface.C +++ b/src/sampling/surface/cutting/cuttingSurface.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. @@ -74,7 +74,7 @@ Foam::cuttingSurface::cuttingSurface dict.get<word>("surfaceType"), IOobject ( - dict.lookupOrDefault("surfaceName", defaultSurfaceName), + dict.getOrDefault("surfaceName", defaultSurfaceName), mesh.time().constant(), // directory "triSurface", // instance mesh.time(), // registry diff --git a/src/semiPermeableBaffle/derivedFvPatchFields/semiPermeableBaffleMassFraction/semiPermeableBaffleMassFractionFvPatchScalarField.C b/src/semiPermeableBaffle/derivedFvPatchFields/semiPermeableBaffleMassFraction/semiPermeableBaffleMassFractionFvPatchScalarField.C index eee143b9810..3290afab04f 100644 --- a/src/semiPermeableBaffle/derivedFvPatchFields/semiPermeableBaffleMassFraction/semiPermeableBaffleMassFractionFvPatchScalarField.C +++ b/src/semiPermeableBaffle/derivedFvPatchFields/semiPermeableBaffleMassFraction/semiPermeableBaffleMassFractionFvPatchScalarField.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2017 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -62,8 +63,8 @@ semiPermeableBaffleMassFractionFvPatchScalarField : mappedPatchBase(p.patch(), NEARESTPATCHFACE, dict), mixedFvPatchScalarField(p, iF), - c_(dict.lookupOrDefault<scalar>("c", 0)), - phiName_(dict.lookupOrDefault<word>("phi", "phi")) + c_(dict.getOrDefault<scalar>("c", 0)), + phiName_(dict.getOrDefault<word>("phi", "phi")) { fvPatchScalarField::operator=(scalarField("value", dict, p.size())); diff --git a/src/semiPermeableBaffle/derivedFvPatchFields/semiPermeableBaffleVelocity/semiPermeableBaffleVelocityFvPatchVectorField.C b/src/semiPermeableBaffle/derivedFvPatchFields/semiPermeableBaffleVelocity/semiPermeableBaffleVelocityFvPatchVectorField.C index b5d080bb60c..d587414463b 100644 --- a/src/semiPermeableBaffle/derivedFvPatchFields/semiPermeableBaffleVelocity/semiPermeableBaffleVelocityFvPatchVectorField.C +++ b/src/semiPermeableBaffle/derivedFvPatchFields/semiPermeableBaffleVelocity/semiPermeableBaffleVelocityFvPatchVectorField.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2017 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -83,7 +84,7 @@ semiPermeableBaffleVelocityFvPatchVectorField ) : fixedValueFvPatchVectorField(p, iF), - rhoName_(dict.lookupOrDefault<word>("rho", "rho")) + rhoName_(dict.getOrDefault<word>("rho", "rho")) { fvPatchVectorField::operator==(vectorField("value", dict, p.size())); } diff --git a/src/sixDoFRigidBodyMotion/pointPatchFields/derived/sixDoFRigidBodyDisplacement/sixDoFRigidBodyDisplacementPointPatchVectorField.C b/src/sixDoFRigidBodyMotion/pointPatchFields/derived/sixDoFRigidBodyDisplacement/sixDoFRigidBodyDisplacementPointPatchVectorField.C index 832c357fbe4..f56b85a7469 100644 --- a/src/sixDoFRigidBodyMotion/pointPatchFields/derived/sixDoFRigidBodyDisplacement/sixDoFRigidBodyDisplacementPointPatchVectorField.C +++ b/src/sixDoFRigidBodyMotion/pointPatchFields/derived/sixDoFRigidBodyDisplacement/sixDoFRigidBodyDisplacementPointPatchVectorField.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. @@ -70,7 +71,7 @@ sixDoFRigidBodyDisplacementPointPatchVectorField fixedValuePointPatchField<vector>(p, iF, dict), motion_(dict, dict, db().time()), rhoInf_(1.0), - rhoName_(dict.lookupOrDefault<word>("rho", "rho")), + rhoName_(dict.getOrDefault<word>("rho", "rho")), lookupGravity_(-1), g_(Zero), curTimeIndex_(-1) diff --git a/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/constraints/line/sixDoFRigidBodyMotionLineConstraint.C b/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/constraints/line/sixDoFRigidBodyMotionLineConstraint.C index 74a0ce7cd40..6fd8155dffc 100644 --- a/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/constraints/line/sixDoFRigidBodyMotionLineConstraint.C +++ b/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/constraints/line/sixDoFRigidBodyMotionLineConstraint.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2015 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -102,7 +103,7 @@ bool Foam::sixDoFRigidBodyMotionConstraints::line::read { sixDoFRigidBodyMotionConstraint::read(sDoFRBMCDict); - centreOfRotation_ = sDoFRBMCCoeffs_.lookupOrDefault + centreOfRotation_ = sDoFRBMCCoeffs_.getOrDefault ( "centreOfRotation", motion_.initialCentreOfMass() diff --git a/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/constraints/plane/sixDoFRigidBodyMotionPlaneConstraint.C b/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/constraints/plane/sixDoFRigidBodyMotionPlaneConstraint.C index f1fb44793d8..0d4a7ad5cfa 100644 --- a/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/constraints/plane/sixDoFRigidBodyMotionPlaneConstraint.C +++ b/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/constraints/plane/sixDoFRigidBodyMotionPlaneConstraint.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2015 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -102,7 +103,7 @@ bool Foam::sixDoFRigidBodyMotionConstraints::plane::read { sixDoFRigidBodyMotionConstraint::read(sDoFRBMCDict); - centreOfRotation_ = sDoFRBMCCoeffs_.lookupOrDefault + centreOfRotation_ = sDoFRBMCCoeffs_.getOrDefault ( "centreOfRotation", motion_.initialCentreOfMass() diff --git a/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/constraints/point/sixDoFRigidBodyMotionPointConstraint.C b/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/constraints/point/sixDoFRigidBodyMotionPointConstraint.C index d2405efe0b6..0aeebd2c637 100644 --- a/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/constraints/point/sixDoFRigidBodyMotionPointConstraint.C +++ b/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/constraints/point/sixDoFRigidBodyMotionPointConstraint.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. @@ -103,7 +104,7 @@ bool Foam::sixDoFRigidBodyMotionConstraints::point::read { sixDoFRigidBodyMotionConstraint::read(sDoFRBMCDict); - centreOfRotation_ = sDoFRBMCCoeffs_.lookupOrDefault + centreOfRotation_ = sDoFRBMCCoeffs_.getOrDefault ( "centreOfRotation", motion_.initialCentreOfMass() diff --git a/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/restraints/linearAxialAngularSpring/linearAxialAngularSpring.C b/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/restraints/linearAxialAngularSpring/linearAxialAngularSpring.C index ae4bdf09a76..96a0320665e 100644 --- a/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/restraints/linearAxialAngularSpring/linearAxialAngularSpring.C +++ b/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/restraints/linearAxialAngularSpring/linearAxialAngularSpring.C @@ -151,7 +151,7 @@ bool Foam::sixDoFRigidBodyMotionRestraints::linearAxialAngularSpring::read { sixDoFRigidBodyMotionRestraint::read(sDoFRBMRDict); - refQ_ = sDoFRBMRCoeffs_.lookupOrDefault<tensor>("referenceOrientation", I); + refQ_ = sDoFRBMRCoeffs_.getOrDefault<tensor>("referenceOrientation", I); if (mag(mag(refQ_) - sqrt(3.0)) > ROOTSMALL) { diff --git a/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/restraints/linearSpringDamper/linearSpringDamper.C b/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/restraints/linearSpringDamper/linearSpringDamper.C index c790e7e863f..0e33400d026 100644 --- a/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/restraints/linearSpringDamper/linearSpringDamper.C +++ b/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/restraints/linearSpringDamper/linearSpringDamper.C @@ -5,7 +5,7 @@ \\ / A nd | www.openfoam.com \\/ M anipulation | ------------------------------------------------------------------------------- - Copyright (C) 2019 OpenCFD Ltd. + Copyright (C) 2019-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -163,11 +163,11 @@ bool Foam::sixDoFRigidBodyMotionRestraints::linearSpringDamper::read sixDoFRigidBodyMotionRestraint::read(sDoFRBMRDict); sDoFRBMRCoeffs_.readEntry("refAttachmentPt", refAttachmentPt_); - psi_ = sDoFRBMRCoeffs_.lookupOrDefault<scalar>("psi", 1.0); + psi_ = sDoFRBMRCoeffs_.getOrDefault<scalar>("psi", 1); sDoFRBMRCoeffs_.readEntry("wn", wn_); sDoFRBMRCoeffs_.readEntry("restLength", restLength_); sDoFRBMRCoeffs_.readEntry("numberOfChains", numberOfChains_); - frelax_ = sDoFRBMRCoeffs_.lookupOrDefault<scalar>("frelax", 0.8); + frelax_ = sDoFRBMRCoeffs_.getOrDefault<scalar>("frelax", 0.8); return true; } @@ -183,7 +183,7 @@ void Foam::sixDoFRigidBodyMotionRestraints::linearSpringDamper::write os.writeEntry("wn", wn_); os.writeEntry("restLength", restLength_); os.writeEntry("numberOfChains", numberOfChains_); - os.writeEntryIfDifferent<scalar>("psi", 1.0, psi_); + os.writeEntryIfDifferent<scalar>("psi", 1, psi_); os.writeEntryIfDifferent<scalar>("frelax", 0.8, frelax_); } diff --git a/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/restraints/sphericalAngularSpring/sphericalAngularSpring.C b/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/restraints/sphericalAngularSpring/sphericalAngularSpring.C index aa2af7c7755..3a81c41c3fc 100644 --- a/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/restraints/sphericalAngularSpring/sphericalAngularSpring.C +++ b/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/restraints/sphericalAngularSpring/sphericalAngularSpring.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. @@ -125,7 +125,7 @@ bool Foam::sixDoFRigidBodyMotionRestraints::sphericalAngularSpring::read { sixDoFRigidBodyMotionRestraint::read(sDoFRBMRDict); - refQ_ = sDoFRBMRCoeffs_.lookupOrDefault<tensor>("referenceOrientation", I); + refQ_ = sDoFRBMRCoeffs_.getOrDefault<tensor>("referenceOrientation", I); if (mag(mag(refQ_) - sqrt(3.0)) > ROOTSMALL) { diff --git a/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/restraints/tabulatedAxialAngularSpring/tabulatedAxialAngularSpring.C b/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/restraints/tabulatedAxialAngularSpring/tabulatedAxialAngularSpring.C index 49f8b01679c..dd9d4dd32f0 100644 --- a/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/restraints/tabulatedAxialAngularSpring/tabulatedAxialAngularSpring.C +++ b/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/restraints/tabulatedAxialAngularSpring/tabulatedAxialAngularSpring.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. @@ -152,7 +152,7 @@ bool Foam::sixDoFRigidBodyMotionRestraints::tabulatedAxialAngularSpring::read { sixDoFRigidBodyMotionRestraint::read(sDoFRBMRDict); - refQ_ = sDoFRBMRCoeffs_.lookupOrDefault<tensor>("referenceOrientation", I); + refQ_ = sDoFRBMRCoeffs_.getOrDefault<tensor>("referenceOrientation", I); if (mag(mag(refQ_) - sqrt(3.0)) > ROOTSMALL) { diff --git a/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion.C b/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion.C index 9b2138635c6..6e3d91d315e 100644 --- a/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion.C +++ b/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion.C @@ -110,7 +110,7 @@ Foam::sixDoFRigidBodyMotion::sixDoFRigidBodyMotion rConstraints_(tensor::I), initialCentreOfMass_ ( - dict.lookupOrDefault + dict.getOrDefault ( "initialCentreOfMass", dict.get<vector>("centreOfMass") @@ -119,17 +119,17 @@ Foam::sixDoFRigidBodyMotion::sixDoFRigidBodyMotion initialCentreOfRotation_(initialCentreOfMass_), initialQ_ ( - dict.lookupOrDefault + dict.getOrDefault ( "initialOrientation", - dict.lookupOrDefault("orientation", tensor::I) + dict.getOrDefault("orientation", tensor::I) ) ), mass_(dict.get<scalar>("mass")), momentOfInertia_(dict.get<diagTensor>("momentOfInertia")), - aRelax_(dict.lookupOrDefault<scalar>("accelerationRelaxation", 1.0)), - aDamp_(dict.lookupOrDefault<scalar>("accelerationDamping", 1.0)), - report_(dict.lookupOrDefault("report", false)), + aRelax_(dict.getOrDefault<scalar>("accelerationRelaxation", 1)), + aDamp_(dict.getOrDefault<scalar>("accelerationDamping", 1)), + report_(dict.getOrDefault("report", false)), solver_(sixDoFSolver::New(dict.subDict("solver"), *this)) { addRestraints(dict); diff --git a/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionIO.C b/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionIO.C index b273e061401..e60b01a0cf3 100644 --- a/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionIO.C +++ b/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionIO.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2014 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -35,9 +36,9 @@ bool Foam::sixDoFRigidBodyMotion::read(const dictionary& dict) { dict.readEntry("mass", mass_); dict.readEntry("momentOfInertia", momentOfInertia_); - aRelax_ = dict.lookupOrDefault<scalar>("accelerationRelaxation", 1.0); - aDamp_ = dict.lookupOrDefault<scalar>("accelerationDamping", 1.0); - report_ = dict.lookupOrDefault<Switch>("report", false); + aRelax_ = dict.getOrDefault<scalar>("accelerationRelaxation", 1); + aDamp_ = dict.getOrDefault<scalar>("accelerationDamping", 1); + report_ = dict.getOrDefault<Switch>("report", false); restraints_.clear(); addRestraints(dict); diff --git a/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionState.C b/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionState.C index a4d1d6e966c..4023d9ccb67 100644 --- a/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionState.C +++ b/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionState.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. @@ -47,17 +48,17 @@ Foam::sixDoFRigidBodyMotionState::sixDoFRigidBodyMotionState : centreOfRotation_ ( - dict.lookupOrDefault + dict.getOrDefault ( "centreOfRotation", - dict.lookupOrDefault("centreOfMass", vector::zero) + dict.getOrDefault("centreOfMass", vector::zero) ) ), - Q_(dict.lookupOrDefault("orientation", tensor::I)), - v_(dict.lookupOrDefault("velocity", vector::zero)), - a_(dict.lookupOrDefault("acceleration", vector::zero)), - pi_(dict.lookupOrDefault("angularMomentum", vector::zero)), - tau_(dict.lookupOrDefault("torque", vector::zero)) + Q_(dict.getOrDefault("orientation", tensor::I)), + v_(dict.getOrDefault("velocity", vector::zero)), + a_(dict.getOrDefault("acceleration", vector::zero)), + pi_(dict.getOrDefault("angularMomentum", vector::zero)), + tau_(dict.getOrDefault("torque", vector::zero)) {} diff --git a/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionSolver/sixDoFRigidBodyMotionSolver.C b/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionSolver/sixDoFRigidBodyMotionSolver.C index 0ed82be6a2b..e11617dad8d 100644 --- a/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionSolver/sixDoFRigidBodyMotionSolver.C +++ b/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionSolver/sixDoFRigidBodyMotionSolver.C @@ -89,9 +89,9 @@ Foam::sixDoFRigidBodyMotionSolver::sixDoFRigidBodyMotionSolver patchSet_(mesh.boundaryMesh().patchSet(patches_)), di_(coeffDict().get<scalar>("innerDistance")), do_(coeffDict().get<scalar>("outerDistance")), - test_(coeffDict().lookupOrDefault("test", false)), + test_(coeffDict().getOrDefault("test", false)), rhoInf_(1.0), - rhoName_(coeffDict().lookupOrDefault<word>("rho", "rho")), + rhoName_(coeffDict().getOrDefault<word>("rho", "rho")), scale_ ( IOobject @@ -107,7 +107,7 @@ Foam::sixDoFRigidBodyMotionSolver::sixDoFRigidBodyMotionSolver dimensionedScalar(dimless, Zero) ), curTimeIndex_(-1), - CofGvelocity_(coeffDict().lookupOrDefault<word>("CofGvelocity", "none")) + CofGvelocity_(coeffDict().getOrDefault<word>("CofGvelocity", "none")) { if (rhoName_ == "rhoInf") { diff --git a/src/sixDoFRigidBodyMotion/sixDoFSolvers/CrankNicolson/CrankNicolson.C b/src/sixDoFRigidBodyMotion/sixDoFSolvers/CrankNicolson/CrankNicolson.C index e2a1dd24ac2..7d446dd6ee6 100644 --- a/src/sixDoFRigidBodyMotion/sixDoFSolvers/CrankNicolson/CrankNicolson.C +++ b/src/sixDoFRigidBodyMotion/sixDoFSolvers/CrankNicolson/CrankNicolson.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2015 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -49,8 +50,8 @@ Foam::sixDoFSolvers::CrankNicolson::CrankNicolson ) : sixDoFSolver(dict, body), - aoc_(dict.lookupOrDefault<scalar>("aoc", 0.5)), - voc_(dict.lookupOrDefault<scalar>("voc", 0.5)) + aoc_(dict.getOrDefault<scalar>("aoc", 0.5)), + voc_(dict.getOrDefault<scalar>("voc", 0.5)) {} diff --git a/src/sixDoFRigidBodyMotion/sixDoFSolvers/Newmark/Newmark.C b/src/sixDoFRigidBodyMotion/sixDoFSolvers/Newmark/Newmark.C index f7e8d8248c3..35e506a8714 100644 --- a/src/sixDoFRigidBodyMotion/sixDoFSolvers/Newmark/Newmark.C +++ b/src/sixDoFRigidBodyMotion/sixDoFSolvers/Newmark/Newmark.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2015-2016 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -49,13 +50,13 @@ Foam::sixDoFSolvers::Newmark::Newmark ) : sixDoFSolver(dict, body), - gamma_(dict.lookupOrDefault<scalar>("gamma", 0.5)), + gamma_(dict.getOrDefault<scalar>("gamma", 0.5)), beta_ ( max ( 0.25*sqr(gamma_ + 0.5), - dict.lookupOrDefault<scalar>("beta", 0.25) + dict.getOrDefault<scalar>("beta", 0.25) ) ) {} diff --git a/src/sixDoFRigidBodyState/sixDoFRigidBodyState.C b/src/sixDoFRigidBodyState/sixDoFRigidBodyState.C index f225aa90a5f..7255a7b5922 100644 --- a/src/sixDoFRigidBodyState/sixDoFRigidBodyState.C +++ b/src/sixDoFRigidBodyState/sixDoFRigidBodyState.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. @@ -102,7 +102,7 @@ bool Foam::functionObjects::sixDoFRigidBodyState::read(const dictionary& dict) if (fvMeshFunctionObject::read(dict)) { angleFormat_ = - angleTypeNames_.lookupOrDefault + angleTypeNames_.getOrDefault ( "angleFormat", dict, diff --git a/src/surfMesh/writers/nastran/nastranSurfaceWriter.C b/src/surfMesh/writers/nastran/nastranSurfaceWriter.C index c59436fb1ff..c5c4dfbb2d2 100644 --- a/src/surfMesh/writers/nastran/nastranSurfaceWriter.C +++ b/src/surfMesh/writers/nastran/nastranSurfaceWriter.C @@ -371,7 +371,7 @@ Foam::surfaceWriters::nastranWriter::nastranWriter surfaceWriter(options), writeFormat_ ( - fileFormats::NASCore::fieldFormatNames.lookupOrDefault + fileFormats::NASCore::fieldFormatNames.getOrDefault ( "format", options, diff --git a/src/thermophysicalModels/basic/basicThermo/basicThermo.C b/src/thermophysicalModels/basic/basicThermo/basicThermo.C index 3a76c30a734..bbcd02bf93b 100644 --- a/src/thermophysicalModels/basic/basicThermo/basicThermo.C +++ b/src/thermophysicalModels/basic/basicThermo/basicThermo.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. @@ -180,7 +180,7 @@ Foam::basicThermo::basicThermo p_(lookupOrConstruct(mesh, "p", pOwner_)), T_(lookupOrConstruct(mesh, phasePropertyName("T"), TOwner_)), - TOwner_(lookupOrDefault<Switch>("updateT", TOwner_)), + TOwner_(getOrDefault<Switch>("updateT", TOwner_)), alpha_ ( @@ -196,7 +196,7 @@ Foam::basicThermo::basicThermo dimensionedScalar(dimensionSet(1, -1, -1, 0, 0), Zero) ), - dpdt_(lookupOrDefault<Switch>("dpdt", true)) + dpdt_(getOrDefault<Switch>("dpdt", true)) {} @@ -225,7 +225,7 @@ Foam::basicThermo::basicThermo p_(lookupOrConstruct(mesh, "p", pOwner_)), T_(lookupOrConstruct(mesh, phasePropertyName("T"), TOwner_)), - TOwner_(lookupOrDefault<Switch>("updateT", TOwner_)), + TOwner_(getOrDefault<Switch>("updateT", TOwner_)), alpha_ ( @@ -241,7 +241,7 @@ Foam::basicThermo::basicThermo dimensionedScalar(dimensionSet(1, -1, -1, 0, 0), Zero) ), - dpdt_(lookupOrDefault<Switch>("dpdt", true)) + dpdt_(getOrDefault<Switch>("dpdt", true)) {} @@ -269,7 +269,7 @@ Foam::basicThermo::basicThermo p_(lookupOrConstruct(mesh, "p", pOwner_)), T_(lookupOrConstruct(mesh, "T", TOwner_)), - TOwner_(lookupOrDefault<Switch>("updateT", TOwner_)), + TOwner_(getOrDefault<Switch>("updateT", TOwner_)), alpha_ ( @@ -285,7 +285,7 @@ Foam::basicThermo::basicThermo dimensionedScalar(dimensionSet(1, -1, -1, 0, 0), Zero) ), - dpdt_(lookupOrDefault<Switch>("dpdt", true)) + dpdt_(getOrDefault<Switch>("dpdt", true)) { if (debug) { diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/StandardChemistryModel/StandardChemistryModel.C b/src/thermophysicalModels/chemistryModel/chemistryModel/StandardChemistryModel/StandardChemistryModel.C index 7b7cf6adc4f..7f8fcd5eb9a 100644 --- a/src/thermophysicalModels/chemistryModel/chemistryModel/StandardChemistryModel/StandardChemistryModel.C +++ b/src/thermophysicalModels/chemistryModel/chemistryModel/StandardChemistryModel/StandardChemistryModel.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. @@ -55,7 +56,7 @@ Foam::StandardChemistryModel<ReactionThermo, ThermoType>::StandardChemistryModel nReaction_(reactions_.size()), Treact_ ( - BasicChemistryModel<ReactionThermo>::template lookupOrDefault<scalar> + BasicChemistryModel<ReactionThermo>::template getOrDefault<scalar> ( "Treact", 0.0 diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/TDACChemistryModel.C b/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/TDACChemistryModel.C index fb3fe222df4..187e3009324 100644 --- a/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/TDACChemistryModel.C +++ b/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/TDACChemistryModel.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2016-2017 OpenFOAM Foundation - Copyright (C) 2016 OpenCFD Ltd. + Copyright (C) 2016-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -42,7 +42,7 @@ Foam::TDACChemistryModel<ReactionThermo, ThermoType>::TDACChemistryModel StandardChemistryModel<ReactionThermo, ThermoType>(thermo), variableTimeStep_ ( - this->mesh().time().controlDict().lookupOrDefault + this->mesh().time().controlDict().getOrDefault ( "adjustTimeStep", false diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/reduction/DAC/DAC.C b/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/reduction/DAC/DAC.C index b91d08532f5..94db68c7415 100644 --- a/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/reduction/DAC/DAC.C +++ b/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/reduction/DAC/DAC.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2016-2017 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -39,7 +40,7 @@ Foam::chemistryReductionMethods::DAC<CompType, ThermoType>::DAC chemistryReductionMethod<CompType, ThermoType>(dict, chemistry), searchInitSet_(this->coeffsDict_.subDict("initialSet").size()), zprime_(0), - nbCLarge_(this->coeffsDict_.template lookupOrDefault<label>("nbCLarge", 3)), + nbCLarge_(this->coeffsDict_.template getOrDefault<label>("nbCLarge", 3)), sC_(this->nSpecie_, 0), sH_(this->nSpecie_, 0), sO_(this->nSpecie_, 0), @@ -51,7 +52,7 @@ Foam::chemistryReductionMethods::DAC<CompType, ThermoType>::DAC NOId_(-1), automaticSIS_ ( - this->coeffsDict_.template lookupOrDefault<Switch> + this->coeffsDict_.template getOrDefault<Switch> ( "automaticSIS", true @@ -59,27 +60,27 @@ Foam::chemistryReductionMethods::DAC<CompType, ThermoType>::DAC ), phiTol_ ( - this->coeffsDict_.template lookupOrDefault<scalar> + this->coeffsDict_.template getOrDefault<scalar> ( "phiTol", this->tolerance() ) ), NOxThreshold_ ( - this->coeffsDict_.template lookupOrDefault<scalar> + this->coeffsDict_.template getOrDefault<scalar> ( "NOxThreshold", 1800 ) ), - CO2Name_(this->coeffsDict_.template lookupOrDefault<word>("CO2", "CO2")), - COName_(this->coeffsDict_.template lookupOrDefault<word>("CO", "CO")), - HO2Name_(this->coeffsDict_.template lookupOrDefault<word>("HO2", "HO2")), - H2OName_(this->coeffsDict_.template lookupOrDefault<word>("H2O", "H2O")), - NOName_(this->coeffsDict_.template lookupOrDefault<word>("NO", "NO")), + CO2Name_(this->coeffsDict_.template getOrDefault<word>("CO2", "CO2")), + COName_(this->coeffsDict_.template getOrDefault<word>("CO", "CO")), + HO2Name_(this->coeffsDict_.template getOrDefault<word>("HO2", "HO2")), + H2OName_(this->coeffsDict_.template getOrDefault<word>("H2O", "H2O")), + NOName_(this->coeffsDict_.template getOrDefault<word>("NO", "NO")), forceFuelInclusion_ ( - this->coeffsDict_.template lookupOrDefault<Switch> + this->coeffsDict_.template getOrDefault<Switch> ( "forceFuelInclusion", false diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/reduction/chemistryReductionMethod/chemistryReductionMethod.C b/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/reduction/chemistryReductionMethod/chemistryReductionMethod.C index b69c447bd83..f4c17a047e3 100644 --- a/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/reduction/chemistryReductionMethod/chemistryReductionMethod.C +++ b/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/reduction/chemistryReductionMethod/chemistryReductionMethod.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2016 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -39,13 +40,13 @@ Foam::chemistryReductionMethod<CompType, ThermoType>::chemistryReductionMethod : dict_(dict), coeffsDict_(dict.subDict("reduction")), - active_(coeffsDict_.lookupOrDefault<Switch>("active", false)), - log_(coeffsDict_.lookupOrDefault<Switch>("log", false)), + active_(coeffsDict_.getOrDefault<Switch>("active", false)), + log_(coeffsDict_.getOrDefault<Switch>("log", false)), chemistry_(chemistry), activeSpecies_(chemistry.nSpecie(), false), NsSimp_(chemistry.nSpecie()), nSpecie_(chemistry.nSpecie()), - tolerance_(coeffsDict_.lookupOrDefault<scalar>("tolerance", 1e-4)) + tolerance_(coeffsDict_.getOrDefault<scalar>("tolerance", 1e-4)) {} diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/tabulation/ISAT/ISAT.C b/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/tabulation/ISAT/ISAT.C index 4164a3cab15..ad31b18493c 100644 --- a/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/tabulation/ISAT/ISAT.C +++ b/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/tabulation/ISAT/ISAT.C @@ -49,16 +49,16 @@ Foam::chemistryTabulationMethods::ISAT<CompType, ThermoType>::ISAT runTime_(chemistry.time()), chPMaxLifeTime_ ( - this->coeffsDict_.lookupOrDefault("chPMaxLifeTime", INT_MAX) + this->coeffsDict_.getOrDefault("chPMaxLifeTime", INT_MAX) ), - maxGrowth_(this->coeffsDict_.lookupOrDefault("maxGrowth", INT_MAX)), + maxGrowth_(this->coeffsDict_.getOrDefault("maxGrowth", INT_MAX)), checkEntireTreeInterval_ ( - this->coeffsDict_.lookupOrDefault("checkEntireTreeInterval", INT_MAX) + this->coeffsDict_.getOrDefault("checkEntireTreeInterval", INT_MAX) ), maxDepthFactor_ ( - this->coeffsDict_.lookupOrDefault + this->coeffsDict_.getOrDefault ( "maxDepthFactor", (chemisTree_.maxNLeafs() - 1) @@ -67,15 +67,15 @@ Foam::chemistryTabulationMethods::ISAT<CompType, ThermoType>::ISAT ), minBalanceThreshold_ ( - this->coeffsDict_.lookupOrDefault + this->coeffsDict_.getOrDefault ( "minBalanceThreshold",0.1*chemisTree_.maxNLeafs() ) ), - MRURetrieve_(this->coeffsDict_.lookupOrDefault("MRURetrieve", false)), - maxMRUSize_(this->coeffsDict_.lookupOrDefault("maxMRUSize", 0)), + MRURetrieve_(this->coeffsDict_.getOrDefault("MRURetrieve", false)), + maxMRUSize_(this->coeffsDict_.getOrDefault("maxMRUSize", 0)), lastSearch_(nullptr), - growPoints_(this->coeffsDict_.lookupOrDefault("growPoints", true)), + growPoints_(this->coeffsDict_.getOrDefault("growPoints", true)), nRetrieved_(0), nGrowth_(0), nAdd_(0), 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 3455b296062..cb3900e10cf 100644 --- a/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/tabulation/ISAT/binaryTree/binaryTree.C +++ b/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/tabulation/ISAT/binaryTree/binaryTree.C @@ -351,7 +351,7 @@ Foam::binaryTree<CompType, ThermoType>::binaryTree maxNLeafs_(coeffsDict.get<label>("maxNLeafs")), size_(0), n2ndSearch_(0), - max2ndSearch_(coeffsDict.lookupOrDefault("max2ndSearch",0)), + max2ndSearch_(coeffsDict.getOrDefault("max2ndSearch", 0)), coeffsDict_(coeffsDict) {} diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/tabulation/ISAT/chemPointISAT/chemPointISAT.C b/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/tabulation/ISAT/chemPointISAT/chemPointISAT.C index d122c7a54bc..cce81ed541d 100644 --- a/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/tabulation/ISAT/chemPointISAT/chemPointISAT.C +++ b/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/tabulation/ISAT/chemPointISAT/chemPointISAT.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. @@ -228,8 +228,8 @@ Foam::chemPointISAT<CompType, ThermoType>::chemPointISAT timeTag_(chemistry_.timeSteps()), lastTimeUsed_(chemistry_.timeSteps()), toRemove_(false), - maxNumNewDim_(coeffsDict.lookupOrDefault("maxNumNewDim", 0)), - printProportion_(coeffsDict.lookupOrDefault("printProportion", false)), + maxNumNewDim_(coeffsDict.getOrDefault("maxNumNewDim", 0)), + printProportion_(coeffsDict.getOrDefault("printProportion", false)), numRetrieve_(0), nLifeTime_(0), completeToSimplifiedIndex_ diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/tabulation/chemistryTabulationMethod/chemistryTabulationMethod.C b/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/tabulation/chemistryTabulationMethod/chemistryTabulationMethod.C index b4b19e31c21..468049ddbf8 100644 --- a/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/tabulation/chemistryTabulationMethod/chemistryTabulationMethod.C +++ b/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/tabulation/chemistryTabulationMethod/chemistryTabulationMethod.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2016-2017 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -39,10 +40,10 @@ Foam::chemistryTabulationMethod<CompType, ThermoType>::chemistryTabulationMethod : dict_(dict), coeffsDict_(dict.subDict("tabulation")), - active_(coeffsDict_.lookupOrDefault<Switch>("active", false)), - log_(coeffsDict_.lookupOrDefault<Switch>("log", false)), + active_(coeffsDict_.getOrDefault<Switch>("active", false)), + log_(coeffsDict_.getOrDefault<Switch>("log", false)), chemistry_(chemistry), - tolerance_(coeffsDict_.lookupOrDefault<scalar>("tolerance", 1e-4)) + tolerance_(coeffsDict_.getOrDefault<scalar>("tolerance", 1e-4)) {} diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/basicChemistryModel/basicChemistryModelTemplates.C b/src/thermophysicalModels/chemistryModel/chemistryModel/basicChemistryModel/basicChemistryModelTemplates.C index 4c12ecc6909..d642dbc8801 100644 --- a/src/thermophysicalModels/chemistryModel/chemistryModel/basicChemistryModel/basicChemistryModelTemplates.C +++ b/src/thermophysicalModels/chemistryModel/chemistryModel/basicChemistryModel/basicChemistryModelTemplates.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2012-2017 OpenFOAM Foundation - Copyright (C) 2019 OpenCFD Ltd. + Copyright (C) 2019-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -78,10 +78,10 @@ Foam::autoPtr<ChemistryModel> Foam::basicChemistryModel::New const word methodName ( - chemistryTypeDict.lookupOrDefault<word> + chemistryTypeDict.getOrDefault<word> ( "method", - chemistryTypeDict.lookupOrDefault<bool>("TDAC", false) + chemistryTypeDict.getOrDefault<bool>("TDAC", false) ? "TDAC" : "standard" ) diff --git a/src/thermophysicalModels/radiation/derivedFvPatchFields/MarshakRadiation/MarshakRadiationFvPatchScalarField.C b/src/thermophysicalModels/radiation/derivedFvPatchFields/MarshakRadiation/MarshakRadiationFvPatchScalarField.C index f9a089f69a2..2179217ff1a 100644 --- a/src/thermophysicalModels/radiation/derivedFvPatchFields/MarshakRadiation/MarshakRadiationFvPatchScalarField.C +++ b/src/thermophysicalModels/radiation/derivedFvPatchFields/MarshakRadiation/MarshakRadiationFvPatchScalarField.C @@ -75,7 +75,7 @@ MarshakRadiationFvPatchScalarField ) : mixedFvPatchScalarField(p, iF), - TName_(dict.lookupOrDefault<word>("T", "T")) + TName_(dict.getOrDefault<word>("T", "T")) { if (dict.found("value")) { diff --git a/src/thermophysicalModels/radiation/derivedFvPatchFields/greyDiffusiveRadiation/greyDiffusiveRadiationMixedFvPatchScalarField.C b/src/thermophysicalModels/radiation/derivedFvPatchFields/greyDiffusiveRadiation/greyDiffusiveRadiationMixedFvPatchScalarField.C index a019a17a832..e658fd2fc4e 100644 --- a/src/thermophysicalModels/radiation/derivedFvPatchFields/greyDiffusiveRadiation/greyDiffusiveRadiationMixedFvPatchScalarField.C +++ b/src/thermophysicalModels/radiation/derivedFvPatchFields/greyDiffusiveRadiation/greyDiffusiveRadiationMixedFvPatchScalarField.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2018 OpenFOAM Foundation - Copyright (C) 2016-2019 OpenCFD Ltd. + Copyright (C) 2016-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -80,7 +80,7 @@ greyDiffusiveRadiationMixedFvPatchScalarField ) : mixedFvPatchScalarField(p, iF), - TName_(dict.lookupOrDefault<word>("T", "T")) + TName_(dict.getOrDefault<word>("T", "T")) { if (dict.found("refValue")) { diff --git a/src/thermophysicalModels/radiation/radiationModels/fvDOM/fvDOM/fvDOM.C b/src/thermophysicalModels/radiation/radiationModels/fvDOM/fvDOM/fvDOM.C index 5ab8423d05b..3736ee2f269 100644 --- a/src/thermophysicalModels/radiation/radiationModels/fvDOM/fvDOM/fvDOM.C +++ b/src/thermophysicalModels/radiation/radiationModels/fvDOM/fvDOM/fvDOM.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2018 OpenFOAM Foundation - Copyright (C) 2019 OpenCFD Ltd. + Copyright (C) 2019-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -411,15 +411,20 @@ Foam::radiation::fvDOM::fvDOM(const volScalarField& T) IRay_(0), tolerance_ ( - coeffs_.lookupOrDefaultCompat("tolerance", {{"convergence", 1712}}, 0.0) + coeffs_.getOrDefaultCompat<scalar> + ( + "tolerance", + {{"convergence", 1712}}, + 0 + ) ), - maxIter_(coeffs_.lookupOrDefault<label>("maxIter", 50)), + maxIter_(coeffs_.getOrDefault<label>("maxIter", 50)), omegaMax_(0), useSolarLoad_(false), solarLoad_(), meshOrientation_ ( - coeffs_.lookupOrDefault<vector>("meshOrientation", Zero) + coeffs_.getOrDefault<vector>("meshOrientation", Zero) ), useExternalBeam_(false), spectralDistribution_(), @@ -511,15 +516,20 @@ Foam::radiation::fvDOM::fvDOM IRay_(0), tolerance_ ( - coeffs_.lookupOrDefaultCompat("tolerance", {{"convergence", 1712}}, 0.0) + coeffs_.getOrDefaultCompat<scalar> + ( + "tolerance", + {{"convergence", 1712}}, + 0 + ) ), - maxIter_(coeffs_.lookupOrDefault<label>("maxIter", 50)), + maxIter_(coeffs_.getOrDefault<label>("maxIter", 50)), omegaMax_(0), useSolarLoad_(false), solarLoad_(), meshOrientation_ ( - coeffs_.lookupOrDefault<vector>("meshOrientation", Zero) + coeffs_.getOrDefault<vector>("meshOrientation", Zero) ), useExternalBeam_(false), spectralDistribution_(), diff --git a/src/thermophysicalModels/radiation/radiationModels/radiationModel/radiationModel.C b/src/thermophysicalModels/radiation/radiationModels/radiationModel/radiationModel.C index a8b83a48478..d526f35f211 100644 --- a/src/thermophysicalModels/radiation/radiationModels/radiationModel/radiationModel.C +++ b/src/thermophysicalModels/radiation/radiationModels/radiationModel/radiationModel.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2017 OpenFOAM Foundation - Copyright (C) 2016-2017 OpenCFD Ltd. + Copyright (C) 2016-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -87,7 +87,7 @@ void Foam::radiation::radiationModel::initialise() { if (radiation_) { - solverFreq_ = max(1, lookupOrDefault<label>("solverFreq", 1)); + solverFreq_ = max(1, getOrDefault<label>("solverFreq", 1)); if (this->found("absorptionEmissionModel")) { @@ -148,7 +148,7 @@ Foam::radiation::radiationModel::radiationModel mesh_(T.mesh()), time_(T.time()), T_(T), - radiation_(lookupOrDefault("radiation", true)), + radiation_(getOrDefault("radiation", true)), coeffs_(subOrEmptyDict(type + "Coeffs")), solverFreq_(1), firstIter_(true), @@ -187,7 +187,7 @@ Foam::radiation::radiationModel::radiationModel mesh_(T.mesh()), time_(T.time()), T_(T), - radiation_(lookupOrDefault("radiation", true)), + radiation_(getOrDefault("radiation", true)), coeffs_(subOrEmptyDict(type + "Coeffs")), solverFreq_(1), firstIter_(true), @@ -214,7 +214,7 @@ bool Foam::radiation::radiationModel::read() readEntry("radiation", radiation_); coeffs_ = subOrEmptyDict(type() + "Coeffs"); - solverFreq_ = lookupOrDefault<label>("solverFreq", 1); + solverFreq_ = getOrDefault<label>("solverFreq", 1); solverFreq_ = max(1, solverFreq_); return true; diff --git a/src/thermophysicalModels/radiation/radiationModels/solarLoad/faceReflecting/faceReflecting.C b/src/thermophysicalModels/radiation/radiationModels/solarLoad/faceReflecting/faceReflecting.C index 849c3d1fef6..b301f660418 100644 --- a/src/thermophysicalModels/radiation/radiationModels/solarLoad/faceReflecting/faceReflecting.C +++ b/src/thermophysicalModels/radiation/radiationModels/solarLoad/faceReflecting/faceReflecting.C @@ -5,7 +5,7 @@ \\ / A nd | www.openfoam.com \\/ M anipulation | ------------------------------------------------------------------------------- - Copyright (C) 2018-2019 OpenCFD Ltd. + Copyright (C) 2018-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -549,8 +549,8 @@ Foam::faceReflecting::faceReflecting ) : mesh_(mesh), - nTheta_(dict.subDict("reflecting").lookupOrDefault<label>("nTheta", 10)), - nPhi_(dict.subDict("reflecting").lookupOrDefault<label>("nPhi", 10)), + nTheta_(dict.subDict("reflecting").getOrDefault<label>("nTheta", 10)), + nPhi_(dict.subDict("reflecting").getOrDefault<label>("nPhi", 10)), nRay_(0), refDiscAngles_(0), spectralDistribution_(spectralDistribution), diff --git a/src/thermophysicalModels/radiation/radiationModels/viewFactor/viewFactor.C b/src/thermophysicalModels/radiation/radiationModels/viewFactor/viewFactor.C index 835733612e6..f48f1081bf4 100644 --- a/src/thermophysicalModels/radiation/radiationModels/viewFactor/viewFactor.C +++ b/src/thermophysicalModels/radiation/radiationModels/viewFactor/viewFactor.C @@ -258,7 +258,7 @@ Foam::radiation::viewFactor::viewFactor(const volScalarField& T) pivotIndices_(0), useSolarLoad_(false), solarLoad_(), - nBands_(coeffs_.lookupOrDefault<label>("nBands", 1)) + nBands_(coeffs_.getOrDefault<label>("nBands", 1)) { initialise(); } @@ -320,7 +320,7 @@ Foam::radiation::viewFactor::viewFactor pivotIndices_(0), useSolarLoad_(false), solarLoad_(), - nBands_(coeffs_.lookupOrDefault<label>("nBands", 1)) + nBands_(coeffs_.getOrDefault<label>("nBands", 1)) { initialise(); } diff --git a/src/thermophysicalModels/radiation/submodels/sootModel/mixtureFractionSoot/mixtureFractionSoot.C b/src/thermophysicalModels/radiation/submodels/sootModel/mixtureFractionSoot/mixtureFractionSoot.C index f9e90af45ef..7f348a2b0c7 100644 --- a/src/thermophysicalModels/radiation/submodels/sootModel/mixtureFractionSoot/mixtureFractionSoot.C +++ b/src/thermophysicalModels/radiation/submodels/sootModel/mixtureFractionSoot/mixtureFractionSoot.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2013-2016 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -90,7 +91,7 @@ Foam::radiation::mixtureFractionSoot<ThermoType>::mixtureFractionSoot sootMax_(-1), mappingFieldName_ ( - coeffsDict_.lookupOrDefault<word>("mappingField", "none") + coeffsDict_.getOrDefault<word>("mappingField", "none") ), mapFieldMax_(1), thermo_(mesh.lookupObject<fluidThermo>(basicThermo::dictName)), diff --git a/src/thermophysicalModels/reactionThermo/chemistryReaders/chemistryReader/chemistryReader.C b/src/thermophysicalModels/reactionThermo/chemistryReaders/chemistryReader/chemistryReader.C index 18646752b1b..efaa88021be 100644 --- a/src/thermophysicalModels/reactionThermo/chemistryReaders/chemistryReader/chemistryReader.C +++ b/src/thermophysicalModels/reactionThermo/chemistryReaders/chemistryReader/chemistryReader.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. @@ -41,7 +41,7 @@ Foam::chemistryReader<ThermoType>::New // Use specified reader or default to CHEMKIN for backward compatibility const word readerName ( - thermoDict.lookupOrDefault<word>("chemistryReader", "chemkinReader") + thermoDict.getOrDefault<word>("chemistryReader", "chemkinReader") ); Info<< "Selecting chemistryReader " << readerName << endl; diff --git a/src/thermophysicalModels/reactionThermo/chemistryReaders/chemkinReader/chemkinReader.C b/src/thermophysicalModels/reactionThermo/chemistryReaders/chemkinReader/chemkinReader.C index 8ce80d2db5c..df310b37cd3 100644 --- a/src/thermophysicalModels/reactionThermo/chemistryReaders/chemkinReader/chemkinReader.C +++ b/src/thermophysicalModels/reactionThermo/chemistryReaders/chemkinReader/chemkinReader.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. @@ -859,8 +860,8 @@ Foam::chemkinReader::chemkinReader specieNames_(10), speciesTable_(species), reactions_(speciesTable_, speciesThermo_), - newFormat_(thermoDict.lookupOrDefault("newFormat", false)), - imbalanceTol_(thermoDict.lookupOrDefault("imbalanceTolerance", ROOTSMALL)) + newFormat_(thermoDict.getOrDefault("newFormat", false)), + imbalanceTol_(thermoDict.getOrDefault("imbalanceTolerance", ROOTSMALL)) { if (newFormat_) { diff --git a/src/thermophysicalModels/reactionThermo/chemistryReaders/foamChemistryReader/foamChemistryReader.C b/src/thermophysicalModels/reactionThermo/chemistryReaders/foamChemistryReader/foamChemistryReader.C index afc9cb9124d..95163ebe4a6 100644 --- a/src/thermophysicalModels/reactionThermo/chemistryReaders/foamChemistryReader/foamChemistryReader.C +++ b/src/thermophysicalModels/reactionThermo/chemistryReaders/foamChemistryReader/foamChemistryReader.C @@ -95,7 +95,7 @@ void Foam::foamChemistryReader<ThermoType>::readSpeciesComposition() currentComposition[eni].name() = elemNames[eni]; currentComposition[eni].nAtoms() = - elemsDict->lookupOrDefault<label> + elemsDict->getOrDefault<label> ( elemNames[eni], 0 diff --git a/src/thermophysicalModels/specie/specie/specie.C b/src/thermophysicalModels/specie/specie/specie.C index b51db266620..d39c8c5a2a9 100644 --- a/src/thermophysicalModels/specie/specie/specie.C +++ b/src/thermophysicalModels/specie/specie/specie.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. @@ -41,7 +42,7 @@ namespace Foam Foam::specie::specie(const dictionary& dict) : name_(dict.dictName()), - Y_(dict.subDict("specie").lookupOrDefault<scalar>("massFraction", 1)), + Y_(dict.subDict("specie").getOrDefault<scalar>("massFraction", 1)), molWeight_(dict.subDict("specie").get<scalar>("molWeight")) {} diff --git a/src/thermophysicalModels/thermophysicalPropertiesFvPatchFields/liquidProperties/humidityTemperatureCoupledMixed/humidityTemperatureCoupledMixedFvPatchScalarField.C b/src/thermophysicalModels/thermophysicalPropertiesFvPatchFields/liquidProperties/humidityTemperatureCoupledMixed/humidityTemperatureCoupledMixedFvPatchScalarField.C index db439e20a0f..0c96555aa58 100644 --- a/src/thermophysicalModels/thermophysicalPropertiesFvPatchFields/liquidProperties/humidityTemperatureCoupledMixed/humidityTemperatureCoupledMixedFvPatchScalarField.C +++ b/src/thermophysicalModels/thermophysicalPropertiesFvPatchFields/liquidProperties/humidityTemperatureCoupledMixed/humidityTemperatureCoupledMixedFvPatchScalarField.C @@ -5,7 +5,7 @@ \\ / A nd | www.openfoam.com \\/ M anipulation | ------------------------------------------------------------------------------- - Copyright (C) 2015-2019 OpenCFD Ltd. + Copyright (C) 2015-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -214,14 +214,14 @@ humidityTemperatureCoupledMixedFvPatchScalarField mixedFvPatchScalarField(p, iF), temperatureCoupledBase(patch(), dict), mode_(mtCondensationAndEvaporation), - pName_(dict.lookupOrDefault<word>("p", "p")), - UName_(dict.lookupOrDefault<word>("U", "U")), - rhoName_(dict.lookupOrDefault<word>("rho", "rho")), - muName_(dict.lookupOrDefault<word>("mu", "thermo:mu")), - TnbrName_(dict.lookupOrDefault<word>("Tnbr", "T")), - qrNbrName_(dict.lookupOrDefault<word>("qrNbr", "none")), - qrName_(dict.lookupOrDefault<word>("qr", "none")), - specieName_(dict.lookupOrDefault<word>("specie", "none")), + pName_(dict.getOrDefault<word>("p", "p")), + UName_(dict.getOrDefault<word>("U", "U")), + rhoName_(dict.getOrDefault<word>("rho", "rho")), + muName_(dict.getOrDefault<word>("mu", "thermo:mu")), + TnbrName_(dict.getOrDefault<word>("Tnbr", "T")), + qrNbrName_(dict.getOrDefault<word>("qrNbr", "none")), + qrName_(dict.getOrDefault<word>("qr", "none")), + specieName_(dict.getOrDefault<word>("specie", "none")), liquid_(nullptr), liquidDict_(), mass_(patch().size(), Zero), diff --git a/src/transportModels/incompressible/viscosityModels/Arrhenius/Arrhenius.C b/src/transportModels/incompressible/viscosityModels/Arrhenius/Arrhenius.C index 2be7ca0db2e..0eb3a2ac12c 100644 --- a/src/transportModels/incompressible/viscosityModels/Arrhenius/Arrhenius.C +++ b/src/transportModels/incompressible/viscosityModels/Arrhenius/Arrhenius.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. @@ -59,7 +59,7 @@ Foam::viscosityModels::Arrhenius<ViscousModel>::Arrhenius ), alpha_("alpha", inv(dimTemperature), ArrheniusCoeffs_), Talpha_("Talpha", dimTemperature, ArrheniusCoeffs_), - fieldName_(ArrheniusCoeffs_.lookupOrDefault<word>("field","T")), + fieldName_(ArrheniusCoeffs_.getOrDefault<word>("field", "T")), mesh_(U.mesh()) { const auto* fldPtr = mesh_.findObject<volScalarField>(fieldName_); diff --git a/src/transportModels/incompressible/viscosityModels/BirdCarreau/BirdCarreau.C b/src/transportModels/incompressible/viscosityModels/BirdCarreau/BirdCarreau.C index fd882d995a5..67d3c36f783 100644 --- a/src/transportModels/incompressible/viscosityModels/BirdCarreau/BirdCarreau.C +++ b/src/transportModels/incompressible/viscosityModels/BirdCarreau/BirdCarreau.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2017 OpenFOAM Foundation - Copyright (C) 2017 OpenCFD Ltd. + Copyright (C) 2017-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -80,7 +80,7 @@ Foam::viscosityModels::BirdCarreau::BirdCarreau n_("n", dimless, BirdCarreauCoeffs_), a_ ( - BirdCarreauCoeffs_.lookupOrDefault + BirdCarreauCoeffs_.getOrDefault ( "a", dimensionedScalar("a", dimless, 2) @@ -117,7 +117,7 @@ bool Foam::viscosityModels::BirdCarreau::read BirdCarreauCoeffs_.readEntry("nuInf", nuInf_); BirdCarreauCoeffs_.readEntry("k", k_); BirdCarreauCoeffs_.readEntry("n", n_); - a_ = BirdCarreauCoeffs_.lookupOrDefault + a_ = BirdCarreauCoeffs_.getOrDefault ( "a", dimensionedScalar("a", dimless, 2) diff --git a/src/transportModels/interfaceProperties/surfaceTensionModels/temperatureDependent/temperatureDependentSurfaceTension.C b/src/transportModels/interfaceProperties/surfaceTensionModels/temperatureDependent/temperatureDependentSurfaceTension.C index 0f53fd304a0..38774b96a79 100644 --- a/src/transportModels/interfaceProperties/surfaceTensionModels/temperatureDependent/temperatureDependentSurfaceTension.C +++ b/src/transportModels/interfaceProperties/surfaceTensionModels/temperatureDependent/temperatureDependentSurfaceTension.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2017 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -55,7 +56,7 @@ Foam::surfaceTensionModels::temperatureDependent::temperatureDependent ) : surfaceTensionModel(mesh), - TName_(dict.lookupOrDefault<word>("T", "T")), + TName_(dict.getOrDefault<word>("T", "T")), sigma_(Function1<scalar>::New("sigma", dict)) {} @@ -110,7 +111,7 @@ bool Foam::surfaceTensionModels::temperatureDependent::readDict { const dictionary& sigmaDict = surfaceTensionModel::sigmaDict(dict); - TName_ = sigmaDict.lookupOrDefault<word>("T", "T"); + TName_ = sigmaDict.getOrDefault<word>("T", "T"); sigma_ = Function1<scalar>::New("sigma", sigmaDict); return true; diff --git a/src/transportModels/twoPhaseProperties/alphaContactAngle/temperatureDependentAlphaContactAngle/temperatureDependentAlphaContactAngleFvPatchScalarField.C b/src/transportModels/twoPhaseProperties/alphaContactAngle/temperatureDependentAlphaContactAngle/temperatureDependentAlphaContactAngleFvPatchScalarField.C index 7354dc4a9d2..820fdfd9065 100644 --- a/src/transportModels/twoPhaseProperties/alphaContactAngle/temperatureDependentAlphaContactAngle/temperatureDependentAlphaContactAngleFvPatchScalarField.C +++ b/src/transportModels/twoPhaseProperties/alphaContactAngle/temperatureDependentAlphaContactAngle/temperatureDependentAlphaContactAngleFvPatchScalarField.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2015-2016 OpenFOAM Foundation - Copyright (C) 2019 OpenCFD Ltd. + Copyright (C) 2019-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -55,7 +55,7 @@ temperatureDependentAlphaContactAngleFvPatchScalarField ) : alphaContactAngleTwoPhaseFvPatchScalarField(p, iF, dict), - TName_(dict.lookupOrDefault<word>("T", "T")), + TName_(dict.getOrDefault<word>("T", "T")), theta0_(Function1<scalar>::New("theta0", dict)) { evaluate(); diff --git a/src/waveModels/derivedFvPatchFields/waveAlpha/waveAlphaFvPatchScalarField.C b/src/waveModels/derivedFvPatchFields/waveAlpha/waveAlphaFvPatchScalarField.C index 7cd0d6a4211..257ad4f8522 100644 --- a/src/waveModels/derivedFvPatchFields/waveAlpha/waveAlphaFvPatchScalarField.C +++ b/src/waveModels/derivedFvPatchFields/waveAlpha/waveAlphaFvPatchScalarField.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2015 IH-Cantabria - Copyright (C) 2016 OpenCFD Ltd. + Copyright (C) 2016-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -65,7 +65,7 @@ Foam::waveAlphaFvPatchScalarField::waveAlphaFvPatchScalarField ) : fixedValueFvPatchField<scalar>(p, iF, dict), - waveDictName_(dict.lookupOrDefault<word>("waveDict", waveModel::dictName)) + waveDictName_(dict.getOrDefault<word>("waveDict", waveModel::dictName)) {} diff --git a/src/waveModels/derivedFvPatchFields/waveVelocity/waveVelocityFvPatchVectorField.C b/src/waveModels/derivedFvPatchFields/waveVelocity/waveVelocityFvPatchVectorField.C index 5551860596a..66b6b9d6a03 100644 --- a/src/waveModels/derivedFvPatchFields/waveVelocity/waveVelocityFvPatchVectorField.C +++ b/src/waveModels/derivedFvPatchFields/waveVelocity/waveVelocityFvPatchVectorField.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2015 IH-Cantabria - Copyright (C) 2016 OpenCFD Ltd. + Copyright (C) 2016-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -65,7 +65,7 @@ Foam::waveVelocityFvPatchVectorField::waveVelocityFvPatchVectorField ) : fixedValueFvPatchField<vector>(p, iF, dict), - waveDictName_(dict.lookupOrDefault<word>("waveDict", waveModel::dictName)) + waveDictName_(dict.getOrDefault<word>("waveDict", waveModel::dictName)) {} diff --git a/src/waveModels/fvOptions/multiphaseMangrovesSource/multiphaseMangrovesSource.C b/src/waveModels/fvOptions/multiphaseMangrovesSource/multiphaseMangrovesSource.C index 388710d48f5..c7cb5844d5f 100644 --- a/src/waveModels/fvOptions/multiphaseMangrovesSource/multiphaseMangrovesSource.C +++ b/src/waveModels/fvOptions/multiphaseMangrovesSource/multiphaseMangrovesSource.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2017 IH-Cantabria - Copyright (C) 2017-2018 OpenCFD Ltd. + Copyright (C) 2017-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -211,7 +211,7 @@ bool Foam::fv::multiphaseMangrovesSource::read(const dictionary& dict) if (!coeffs_.readIfPresent("UNames", fieldNames_)) { fieldNames_.resize(1); - fieldNames_.first() = coeffs_.lookupOrDefault<word>("U", "U"); + fieldNames_.first() = coeffs_.getOrDefault<word>("U", "U"); } applied_.setSize(fieldNames_.size(), false); -- GitLab