From abc126d49a961ba5d77b59c6ce1ea6e033debac7 Mon Sep 17 00:00:00 2001 From: Mark Olesen <Mark.Olesen@esi-group.com> Date: Mon, 3 Jul 2017 10:36:03 +0200 Subject: [PATCH] STYLE: use auto and cfind to simplify selector usage (issue #512) --- .../dragModels/PDRDragModel/PDRDragModelNew.C | 5 +- .../XiEqModels/XiEqModel/XiEqModelNew.C | 5 +- .../XiModels/XiGModels/XiGModel/XiGModelNew.C | 5 +- .../PDRFoam/XiModels/XiModel/XiModelNew.C | 5 +- .../mixtureViscosityModelNew.C | 5 +- .../relativeVelocityModel.C | 15 +++--- ...newtemperaturePhaseChangeTwoPhaseMixture.C | 13 ++--- .../newPhaseChangeTwoPhaseMixture.C | 13 ++--- .../dragModels/dragModel/newDragModel.C | 13 +++-- .../heatTransferModel/newHeatTransferModel.C | 13 +++-- .../diameterModel/newDiameterModel.C | 18 +++---- .../newInterfaceCompositionModel.C | 13 +++-- .../massTransferModel/newMassTransferModel.C | 13 +++-- .../saturationModel/newSaturationModel.C | 14 +++--- .../newSurfaceTensionModel.C | 13 +++-- .../aspectRatioModel/newAspectRatioModel.C | 13 +++-- .../dragModels/dragModel/newDragModel.C | 13 +++-- .../heatTransferModel/newHeatTransferModel.C | 13 +++-- .../liftModels/liftModel/newLiftModel.C | 13 +++-- .../swarmCorrection/newSwarmCorrection.C | 13 +++-- .../newTurbulentDispersionModel.C | 13 +++-- .../virtualMassModel/newVirtualMassModel.C | 13 +++-- .../wallDampingModel/newWallDampingModel.C | 13 +++-- .../newWallLubricationModel.C | 13 +++-- .../blendingMethod/newBlendingMethod.C | 13 +++-- .../diameterModel/newDiameterModel.C | 18 +++---- .../phaseModel/phaseModel/newPhaseModel.C | 13 +++-- .../multiphaseSystem/newMultiphaseSystem.C | 14 +++--- .../newDepartureDiameterModel.C | 14 +++--- .../newDepartureFrequencyModel.C | 14 +++--- .../newNucleationSiteModel.C | 14 +++--- .../partitioningModel/newPartitioningModel.C | 14 +++--- .../conductivityModel/newConductivityModel.C | 21 ++++---- .../newFrictionalStressModel.C | 22 ++++----- .../newGranularPressureModel.C | 22 ++++----- .../radialModel/radialModel/newRadialModel.C | 22 ++++----- .../viscosityModel/newViscosityModel.C | 21 ++++---- .../IATE/IATEsources/IATEsource/IATEsource.C | 5 +- .../twoPhaseSystem/newTwoPhaseSystem.C | 14 +++--- .../aspectRatioModel/newAspectRatioModel.C | 13 +++-- .../dragModels/dragModel/newDragModel.C | 13 +++-- .../heatTransferModel/newHeatTransferModel.C | 13 +++-- .../liftModels/liftModel/newLiftModel.C | 13 +++-- .../swarmCorrection/newSwarmCorrection.C | 13 +++-- .../newTurbulentDispersionModel.C | 13 +++-- .../virtualMassModel/newVirtualMassModel.C | 13 +++-- .../newWallLubricationModel.C | 13 +++-- .../conductivityModel/newConductivityModel.C | 21 ++++---- .../newFrictionalStressModel.C | 22 ++++----- .../newGranularPressureModel.C | 22 ++++----- .../radialModel/radialModel/newRadialModel.C | 22 ++++----- .../viscosityModel/newViscosityModel.C | 21 ++++---- .../blendingMethod/newBlendingMethod.C | 13 +++-- .../IATE/IATEsources/IATEsource/IATEsource.C | 5 +- .../diameterModel/newDiameterModel.C | 18 +++---- .../cellSizeAndAlignmentControl.C | 30 +++--------- .../cellSizeFunction/cellSizeFunction.C | 21 ++++---- .../cellSizeCalculationType.C | 14 +++--- .../surfaceCellSizeFunction.C | 15 +++--- .../faceAreaWeightModel/faceAreaWeightModel.C | 35 +++++--------- .../initialPointsMethod/initialPointsMethod.C | 34 +++++-------- .../relaxationModel/relaxationModel.C | 34 +++++-------- .../searchableSurfaceFeatures.C | 9 ++-- .../faceSelection/faceSelection.C | 5 +- .../foamHelp/helpTypes/helpType/helpTypeNew.C | 3 +- .../tabulatedWallFunctionNew.C | 26 +++------- .../searchableSurfaceModifier.C | 5 +- src/ODE/ODESolvers/ODESolver/ODESolverNew.C | 11 ++--- src/OpenFOAM/db/IOstreams/token/token.C | 6 +-- .../functionEntry/functionEntry.C | 19 ++++---- .../functionObject/functionObject.C | 5 +- .../calculated/calculatedPointPatchField.C | 4 +- .../pointPatchField/pointPatchFieldNew.C | 25 +++++----- src/OpenFOAM/graph/graph.C | 9 ++-- .../tableReaders/tableReader.C | 13 ++--- .../interpolationWeights.C | 27 ++++------- .../LduMatrix/LduMatrixPreconditioner.C | 22 ++++----- .../LduMatrix/LduMatrix/LduMatrixSmoother.C | 18 ++++--- .../LduMatrix/LduMatrix/LduMatrixSolver.C | 20 ++++---- .../lduMatrix/lduMatrixPreconditioner.C | 14 +++--- .../lduMatrix/lduMatrix/lduMatrixSmoother.C | 14 +++--- .../lduMatrix/lduMatrix/lduMatrixSolver.C | 14 +++--- .../GAMGAgglomeration/GAMGAgglomeration.C | 16 +++---- .../GAMGProcAgglomeration.C | 5 +- .../GAMGInterfaceFieldNew.C | 10 ++-- .../GAMGInterface/GAMGInterfaceNew.C | 10 ++-- .../facePointPatch/facePointPatchNew.C | 8 ++-- .../polyPatches/polyPatch/polyPatch.C | 8 +--- .../polyPatches/polyPatch/polyPatchNew.C | 12 ++--- .../polyMesh/zones/cellZone/cellZoneNew.C | 5 +- .../polyMesh/zones/faceZone/faceZoneNew.C | 5 +- .../polyMesh/zones/pointZone/pointZoneNew.C | 5 +- .../Function1/Function1/Function1New.C | 10 ++-- .../turbulenceModels/LES/LESModel/LESModel.C | 3 +- .../LES/LESdeltas/LESdelta/LESdelta.C | 48 ++++++++----------- .../LES/LESfilters/LESfilter/LESfilter.C | 5 +- .../turbulenceModels/RAS/RASModel/RASModel.C | 3 +- .../TurbulenceModel/TurbulenceModel.C | 7 ++- .../laminar/laminarModel/laminarModel.C | 5 +- .../reactionRateFlameAreaNew.C | 10 ++-- .../psiCombustionModelNew.C | 7 ++- .../rhoCombustionModelNew.C | 7 ++- .../dynamicFvMesh/dynamicFvMeshNew.C | 5 +- .../meshCut/cellLooper/cellLooper.C | 7 ++- .../displacement/displacementMotionSolver.C | 5 +- .../solidBodyMotionFunctionNew.C | 5 +- .../motionSolvers/motionSolver/motionSolver.C | 11 ++--- .../polyMeshModifier/polyMeshModifierNew.C | 5 +- .../engineMesh/engineMesh/engineMeshNew.C | 5 +- src/fileFormats/sampledSetWriters/writer.C | 5 +- .../SRF/SRFModel/SRFModel/SRFModelNew.C | 5 +- .../cfdTools/general/fvOptions/fvOption.C | 12 ++--- .../porosityModel/porosityModelNew.C | 3 +- .../basic/calculated/calculatedFvPatchField.C | 3 +- .../fvPatchField/fvPatchFieldNew.C | 24 ++++------ .../calculated/calculatedFvsPatchField.C | 3 +- .../fvsPatchField/fvsPatchFieldNew.C | 27 +++++------ .../convectionScheme/convectionScheme.C | 12 ++--- .../d2dt2Schemes/d2dt2Scheme/d2dt2Scheme.C | 6 +-- .../ddtSchemes/ddtScheme/ddtScheme.C | 6 +-- .../divSchemes/divScheme/divScheme.C | 3 +- .../gradSchemes/gradScheme/gradScheme.C | 6 +-- .../laplacianScheme/laplacianScheme.C | 6 +-- .../snGradSchemes/snGradScheme/snGradScheme.C | 7 ++- .../fvMesh/fvPatches/fvPatch/fvPatch.C | 8 +--- .../fvMesh/fvPatches/fvPatch/fvPatchNew.C | 5 +- .../patchDistMethod/patchDistMethod.C | 26 +++++----- .../interpolation/interpolationNew.C | 3 +- .../limitedSurfaceInterpolationScheme.C | 14 +++--- .../multivariateSurfaceInterpolationScheme.C | 7 ++- .../surfaceInterpolationScheme.C | 17 +++---- .../fieldValues/fieldValue/fieldValueNew.C | 5 +- .../graphics/runTimePostProcessing/pathline.C | 5 +- .../runTimePostProcessing/pointData.C | 5 +- .../graphics/runTimePostProcessing/surface.C | 5 +- .../runTimeCondition/runTimeConditionNew.C | 7 ++- .../motionDiffusivity/motionDiffusivity.C | 5 +- .../motionInterpolation/motionInterpolation.C | 6 +-- .../profileModel/profileModel.C | 11 ++--- .../trimModel/trimModel/trimModelNew.C | 5 +- .../BinaryCollisionModelNew.C | 5 +- .../InflowBoundaryModelNew.C | 5 +- .../WallInteractionModelNew.C | 5 +- .../distributionModel/distributionModelNew.C | 8 ++-- .../IntegrationScheme/IntegrationSchemeNew.C | 5 +- .../CloudFunctionObjectNew.C | 5 +- .../CollisionModel/CollisionModelNew.C | 14 +++--- .../PairModel/PairModel/PairModelNew.C | 17 ++++--- .../WallModel/WallModel/WallModelNew.C | 16 +++---- .../DispersionModel/DispersionModelNew.C | 7 ++- .../InjectionModel/InjectionModelNew.C | 18 +++---- .../ParticleForce/ParticleForceNew.C | 8 ++-- .../PatchInteractionModelNew.C | 5 +- .../StochasticCollisionModelNew.C | 15 +++--- .../SurfaceFilmModel/SurfaceFilmModelNew.C | 7 ++- .../AveragingMethod/AveragingMethod.C | 11 ++--- .../CorrectionLimitingMethod.C | 9 ++-- .../DampingModels/DampingModel/DampingModel.C | 9 ++-- .../IsotropyModel/IsotropyModel.C | 9 ++-- .../PackingModels/PackingModel/PackingModel.C | 9 ++-- .../ParticleStressModel/ParticleStressModel.C | 11 ++--- .../TimeScaleModel/TimeScaleModel.C | 11 ++--- .../CompositionModel/CompositionModelNew.C | 7 ++- .../PhaseChangeModel/PhaseChangeModelNew.C | 7 ++- .../DevolatilisationModelNew.C | 7 ++- .../SurfaceReactionModelNew.C | 7 ++- .../HeatTransferModel/HeatTransferModelNew.C | 7 ++- .../basic/energyScalingFunctionNew.C | 5 +- .../pairPotential/basic/pairPotentialNew.C | 5 +- .../basic/tetherPotentialNew.C | 5 +- .../AtomizationModel/AtomizationModelNew.C | 17 ++++--- .../BreakupModel/BreakupModelNew.C | 17 ++++--- .../blockEdges/blockEdge/blockEdge.C | 5 +- .../blockFaces/blockFace/blockFace.C | 5 +- .../blockVertices/blockVertex/blockVertex.C | 5 +- src/mesh/blockMesh/blocks/block/block.C | 3 +- .../extrudeModel/extrudeModelNew.C | 5 +- .../externalDisplacementMeshMover.C | 3 +- .../AMIMethod/AMIMethod/AMIMethodNew.C | 8 ++-- .../coordinateRotationNew.C | 4 +- .../coordinateRotation/cylindrical.C | 6 +-- .../coordinateRotation/cylindrical.H | 2 +- .../coordinateSystems/coordinateSystemNew.C | 2 +- src/meshTools/edgeMesh/edgeMeshIO.C | 5 +- src/meshTools/edgeMesh/edgeMeshNew.C | 5 +- .../extendedEdgeMesh/extendedEdgeMeshNew.C | 5 +- .../searchableSurface/searchableSurface.C | 9 ++-- .../sets/topoSetSource/topoSetSource.C | 18 ++++--- src/meshTools/sets/topoSets/topoSet.C | 27 +++++------ .../cellCellStencil/cellCellStencil.C | 10 ++-- .../decompositionConstraint.C | 5 +- .../decompositionMethod/decompositionMethod.C | 7 ++- .../noiseModels/noiseModel/noiseModelNew.C | 5 +- .../windowModels/windowModel/windowModelNew.C | 5 +- .../pyrolysisModel/pyrolysisModelNew.C | 16 +++---- .../regionModelFunctionObjectNew.C | 5 +- .../filmThermoModel/filmThermoModelNew.C | 11 +++-- .../filmTurbulenceModelNew.C | 10 ++-- .../kinematic/force/force/forceNew.C | 11 ++--- .../injectionModel/injectionModelNew.C | 10 ++-- .../filmRadiationModelNew.C | 12 ++--- .../filmViscosityModelNew.C | 12 ++--- .../heatTransferModel/heatTransferModelNew.C | 12 ++--- .../phaseChangeModel/phaseChangeModelNew.C | 12 ++--- .../surfaceFilmModel/surfaceFilmModelNew.C | 10 ++-- .../thermalBaffleModelNew.C | 19 ++++---- .../renumberMethod/renumberMethod.C | 3 +- .../bodies/rigidBody/rigidBody.C | 5 +- src/rigidBodyDynamics/joints/joint/joint.C | 5 +- .../restraint/rigidBodyRestraintNew.C | 5 +- .../rigidBodySolver/newRigidBodySolver.C | 11 ++--- .../meshToMeshMethod/meshToMeshMethodNew.C | 8 ++-- .../sampledSet/sampledSet/sampledSet.C | 3 +- .../sampledSurface/readers/surfaceReaderNew.C | 3 +- .../sampledSurface/sampledSurface.C | 5 +- .../sampledSurface/writers/surfaceWriter.C | 6 +-- .../surfMeshSampler/surfMeshSampler.C | 3 +- .../sixDoFRigidBodyMotionConstraintNew.C | 5 +- .../sixDoFRigidBodyMotionRestraintNew.C | 5 +- .../sixDoFSolver/newSixDoFSolver.C | 13 +++-- src/surfMesh/MeshedSurface/MeshedSurface.C | 2 +- src/surfMesh/MeshedSurface/MeshedSurfaceNew.C | 2 +- .../MeshedSurfaceProxy/MeshedSurfaceProxy.C | 2 +- .../UnsortedMeshedSurface.C | 2 +- .../UnsortedMeshedSurfaceNew.C | 2 +- .../barotropicCompressibilityModelNew.C | 5 +- .../basic/basicThermo/basicThermoTemplates.C | 8 ++-- .../chemistryReductionMethodNew.C | 14 +++--- .../chemistryTabulationMethodNew.C | 12 ++--- .../basicChemistryModelTemplates.C | 16 ++++--- .../laminarFlameSpeed/laminarFlameSpeedNew.C | 5 +- .../radiationModel/radiationModelNew.C | 10 ++-- .../absorptionEmissionModelNew.C | 8 ++-- .../scatterModel/scatterModelNew.C | 5 +- .../sootModel/sootModel/sootModelNew.C | 8 ++-- .../transmissivityModelNew.C | 5 +- .../chemistryReader/chemistryReader.C | 13 +++-- .../basicSolidChemistryModelNew.C | 3 +- .../reaction/Reactions/Reaction/Reaction.C | 5 +- .../liquidProperties/liquidProperties.C | 24 +++++----- .../solidProperties/solidPropertiesNew.C | 9 ++-- .../thermophysicalFunction.C | 18 +++---- .../thermophysicalProperties.C | 11 ++--- .../viscosityModel/viscosityModelNew.C | 5 +- .../surfaceTensionModelNew.C | 14 +++--- src/waveModels/waveModel/waveModelNew.C | 5 +- 246 files changed, 1109 insertions(+), 1481 deletions(-) diff --git a/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/PDRDragModel/PDRDragModelNew.C b/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/PDRDragModel/PDRDragModelNew.C index 6a6581182b..25a4a2098e 100644 --- a/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/PDRDragModel/PDRDragModelNew.C +++ b/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/PDRDragModel/PDRDragModelNew.C @@ -40,15 +40,14 @@ Foam::autoPtr<Foam::PDRDragModel> Foam::PDRDragModel::New Info<< "Selecting flame-wrinkling model " << modelType << endl; - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(modelType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { FatalErrorInFunction << "Unknown PDRDragModel type " << modelType << nl << nl - << "Valid PDRDragModels are : " << endl + << "Valid PDRDragModel types :" << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/XiEqModel/XiEqModelNew.C b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/XiEqModel/XiEqModelNew.C index 932080e717..251d429c8f 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/XiEqModel/XiEqModelNew.C +++ b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/XiEqModel/XiEqModelNew.C @@ -39,15 +39,14 @@ Foam::autoPtr<Foam::XiEqModel> Foam::XiEqModel::New Info<< "Selecting flame-wrinkling model " << modelType << endl; - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(modelType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { FatalErrorInFunction << "Unknown XiEqModel type " << modelType << nl << nl - << "Valid XiEqModels are : " << endl + << "Valid XiEqModel types :" << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/XiGModel/XiGModelNew.C b/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/XiGModel/XiGModelNew.C index 27fe3f5e17..b46192ea38 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/XiGModel/XiGModelNew.C +++ b/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/XiGModel/XiGModelNew.C @@ -39,15 +39,14 @@ Foam::autoPtr<Foam::XiGModel> Foam::XiGModel::New Info<< "Selecting flame-wrinkling model " << modelType << endl; - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(modelType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { FatalErrorInFunction << "Unknown XiGModel type " << modelType << nl << nl - << "Valid XiGModels are : " << endl + << "Valid XiGModel types :" << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiModel/XiModelNew.C b/applications/solvers/combustion/PDRFoam/XiModels/XiModel/XiModelNew.C index ed9dfb2fb3..c2dccb0180 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/XiModel/XiModelNew.C +++ b/applications/solvers/combustion/PDRFoam/XiModels/XiModel/XiModelNew.C @@ -42,15 +42,14 @@ Foam::autoPtr<Foam::XiModel> Foam::XiModel::New Info<< "Selecting flame-wrinkling model " << modelType << endl; - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(modelType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { FatalErrorInFunction << "Unknown XiModel type " << modelType << nl << nl - << "Valid XiModels are : " << endl + << "Valid XiModel types :" << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/applications/solvers/multiphase/driftFluxFoam/mixtureViscosityModels/mixtureViscosityModel/mixtureViscosityModelNew.C b/applications/solvers/multiphase/driftFluxFoam/mixtureViscosityModels/mixtureViscosityModel/mixtureViscosityModelNew.C index 99c33123e8..b21c4b7b51 100644 --- a/applications/solvers/multiphase/driftFluxFoam/mixtureViscosityModels/mixtureViscosityModel/mixtureViscosityModelNew.C +++ b/applications/solvers/multiphase/driftFluxFoam/mixtureViscosityModels/mixtureViscosityModel/mixtureViscosityModelNew.C @@ -41,15 +41,14 @@ Foam::autoPtr<Foam::mixtureViscosityModel> Foam::mixtureViscosityModel::New Info<< "Selecting incompressible transport model " << modelType << endl; - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(modelType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { FatalErrorInFunction << "Unknown mixtureViscosityModel type " << modelType << nl << nl - << "Valid mixtureViscosityModels are : " << endl + << "Valid mixtureViscosityModel types :" << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/applications/solvers/multiphase/driftFluxFoam/relativeVelocityModels/relativeVelocityModel/relativeVelocityModel.C b/applications/solvers/multiphase/driftFluxFoam/relativeVelocityModels/relativeVelocityModel/relativeVelocityModel.C index cf8abd2e6e..f497b3c988 100644 --- a/applications/solvers/multiphase/driftFluxFoam/relativeVelocityModels/relativeVelocityModel/relativeVelocityModel.C +++ b/applications/solvers/multiphase/driftFluxFoam/relativeVelocityModels/relativeVelocityModel/relativeVelocityModel.C @@ -104,19 +104,18 @@ Foam::autoPtr<Foam::relativeVelocityModel> Foam::relativeVelocityModel::New const incompressibleTwoPhaseInteractingMixture& mixture ) { - word modelType(dict.lookup(typeName)); + const word modelType(dict.lookup(typeName)); Info<< "Selecting relative velocity model " << modelType << endl; - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(modelType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { FatalErrorInFunction - << "Unknown time scale model type " << modelType - << ", constructor not in hash table" << nl << nl - << " Valid time scale model types are:" << nl + << "Unknown time scale model type " + << modelType << nl << nl + << "Valid time scale model types :" << endl << dictionaryConstructorTablePtr_->sortedToc() << abort(FatalError); } @@ -141,13 +140,13 @@ Foam::relativeVelocityModel::~relativeVelocityModel() // * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * // -tmp<volScalarField> Foam::relativeVelocityModel::rho() const +Foam::tmp<Foam::volScalarField> Foam::relativeVelocityModel::rho() const { return alphac_*rhoc_ + alphad_*rhod_; } -tmp<volSymmTensorField> Foam::relativeVelocityModel::tauDm() const +Foam::tmp<Foam::volSymmTensorField> Foam::relativeVelocityModel::tauDm() const { volScalarField betac(alphac_*rhoc_); volScalarField betad(alphad_*rhod_); diff --git a/applications/solvers/multiphase/interCondensingEvaporatingFoam/temperaturePhaseChangeTwoPhaseMixtures/temperaturePhaseChangeTwoPhaseMixtures/newtemperaturePhaseChangeTwoPhaseMixture.C b/applications/solvers/multiphase/interCondensingEvaporatingFoam/temperaturePhaseChangeTwoPhaseMixtures/temperaturePhaseChangeTwoPhaseMixtures/newtemperaturePhaseChangeTwoPhaseMixture.C index e4d71d2397..137710d217 100644 --- a/applications/solvers/multiphase/interCondensingEvaporatingFoam/temperaturePhaseChangeTwoPhaseMixtures/temperaturePhaseChangeTwoPhaseMixtures/newtemperaturePhaseChangeTwoPhaseMixture.C +++ b/applications/solvers/multiphase/interCondensingEvaporatingFoam/temperaturePhaseChangeTwoPhaseMixtures/temperaturePhaseChangeTwoPhaseMixtures/newtemperaturePhaseChangeTwoPhaseMixture.C @@ -48,7 +48,7 @@ Foam::temperaturePhaseChangeTwoPhaseMixture::New ) ); - word temperaturePhaseChangeTwoPhaseMixtureTypeName + const word modelType ( phaseChangePropertiesDict.lookup ( @@ -56,19 +56,16 @@ Foam::temperaturePhaseChangeTwoPhaseMixture::New ) ); - Info<< "Selecting phaseChange model " - << temperaturePhaseChangeTwoPhaseMixtureTypeName << endl; + Info<< "Selecting phaseChange model " << modelType << endl; - componentsConstructorTable::iterator cstrIter = - componentsConstructorTablePtr_ - ->find(temperaturePhaseChangeTwoPhaseMixtureTypeName); + auto cstrIter = componentsConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { FatalErrorInFunction << "Unknown temperaturePhaseChangeTwoPhaseMixture type " - << temperaturePhaseChangeTwoPhaseMixtureTypeName << endl << endl - << "Valid temperaturePhaseChangeTwoPhaseMixtures are : " << endl + << modelType << nl << nl + << "Valid temperaturePhaseChangeTwoPhaseMixture types :" << endl << componentsConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/phaseChangeTwoPhaseMixture/newPhaseChangeTwoPhaseMixture.C b/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/phaseChangeTwoPhaseMixture/newPhaseChangeTwoPhaseMixture.C index c14fa08d59..534c1383e2 100644 --- a/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/phaseChangeTwoPhaseMixture/newPhaseChangeTwoPhaseMixture.C +++ b/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/phaseChangeTwoPhaseMixture/newPhaseChangeTwoPhaseMixture.C @@ -48,24 +48,21 @@ Foam::phaseChangeTwoPhaseMixture::New ) ); - word phaseChangeTwoPhaseMixtureTypeName + const word modelType ( transportPropertiesDict.lookup("phaseChangeTwoPhaseMixture") ); - Info<< "Selecting phaseChange model " - << phaseChangeTwoPhaseMixtureTypeName << endl; + Info<< "Selecting phaseChange model " << modelType << endl; - componentsConstructorTable::iterator cstrIter = - componentsConstructorTablePtr_ - ->find(phaseChangeTwoPhaseMixtureTypeName); + auto cstrIter = componentsConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { FatalErrorInFunction << "Unknown phaseChangeTwoPhaseMixture type " - << phaseChangeTwoPhaseMixtureTypeName << endl << endl - << "Valid phaseChangeTwoPhaseMixtures are : " << endl + << modelType << nl << nl + << "Valid phaseChangeTwoPhaseMixture types :" << endl << componentsConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/interfacialModels/dragModels/dragModel/newDragModel.C b/applications/solvers/multiphase/multiphaseEulerFoam/interfacialModels/dragModels/dragModel/newDragModel.C index b880c4a6d3..36765ebc3c 100644 --- a/applications/solvers/multiphase/multiphaseEulerFoam/interfacialModels/dragModels/dragModel/newDragModel.C +++ b/applications/solvers/multiphase/multiphaseEulerFoam/interfacialModels/dragModels/dragModel/newDragModel.C @@ -34,22 +34,21 @@ Foam::autoPtr<Foam::dragModel> Foam::dragModel::New const phaseModel& phase2 ) { - word dragModelType(interfaceDict.lookup("type")); + const word modelType(interfaceDict.lookup("type")); Info << "Selecting dragModel for phase " << phase1.name() << ": " - << dragModelType << endl; + << modelType << endl; - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(dragModelType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { FatalErrorInFunction - << "Unknown dragModelType type " - << dragModelType << endl << endl - << "Valid dragModel types are : " << endl + << "Unknown dragModel type " + << modelType << nl << nl + << "Valid dragModel types :" << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/interfacialModels/heatTransferModels/heatTransferModel/newHeatTransferModel.C b/applications/solvers/multiphase/multiphaseEulerFoam/interfacialModels/heatTransferModels/heatTransferModel/newHeatTransferModel.C index b43d46f8a3..db5d68f829 100644 --- a/applications/solvers/multiphase/multiphaseEulerFoam/interfacialModels/heatTransferModels/heatTransferModel/newHeatTransferModel.C +++ b/applications/solvers/multiphase/multiphaseEulerFoam/interfacialModels/heatTransferModels/heatTransferModel/newHeatTransferModel.C @@ -35,7 +35,7 @@ Foam::autoPtr<Foam::heatTransferModel> Foam::heatTransferModel::New const phaseModel& phase2 ) { - word heatTransferModelType + const word modelType ( interfaceDict.lookup("heatTransferModel" + phase1.name()) ); @@ -43,17 +43,16 @@ Foam::autoPtr<Foam::heatTransferModel> Foam::heatTransferModel::New Info<< "Selecting heatTransferModel for phase " << phase1.name() << ": " - << heatTransferModelType << endl; + << modelType << endl; - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(heatTransferModelType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { FatalErrorInFunction - << "Unknown heatTransferModelType type " - << heatTransferModelType << endl << endl - << "Valid heatTransferModel types are : " << endl + << "Unknown heatTransferModel type " + << modelType << nl << nl + << "Valid heatTransferModel types :" << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/diameterModels/diameterModel/newDiameterModel.C b/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/diameterModels/diameterModel/newDiameterModel.C index 963ad160f7..fc4000975d 100644 --- a/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/diameterModels/diameterModel/newDiameterModel.C +++ b/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/diameterModels/diameterModel/newDiameterModel.C @@ -33,32 +33,28 @@ Foam::autoPtr<Foam::diameterModel> Foam::diameterModel::New const phaseModel& phase ) { - word diameterModelType - ( - dict.lookup("diameterModel") - ); + const word modelType(dict.lookup("diameterModel")); Info << "Selecting diameterModel for phase " << phase.name() << ": " - << diameterModelType << endl; + << modelType << endl; - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(diameterModelType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { FatalErrorInFunction - << "Unknown diameterModelType type " - << diameterModelType << endl << endl - << "Valid diameterModel types are : " << endl + << "Unknown diameterModel type " + << modelType << nl << nl + << "Valid diameterModel types :" << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } return cstrIter() ( - dict.optionalSubDict(diameterModelType + "Coeffs"), + dict.optionalSubDict(modelType + "Coeffs"), phase ); } diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/interfaceCompositionModels/interfaceCompositionModel/newInterfaceCompositionModel.C b/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/interfaceCompositionModels/interfaceCompositionModel/newInterfaceCompositionModel.C index fee1253108..9b55bb0358 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/interfaceCompositionModels/interfaceCompositionModel/newInterfaceCompositionModel.C +++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/interfaceCompositionModels/interfaceCompositionModel/newInterfaceCompositionModel.C @@ -36,7 +36,7 @@ Foam::interfaceCompositionModel::New const phasePair& pair ) { - word interfaceCompositionModelType + const word modelType ( word(dict.lookup("type")) + "<" @@ -47,17 +47,16 @@ Foam::interfaceCompositionModel::New ); Info<< "Selecting interfaceCompositionModel for " - << pair << ": " << interfaceCompositionModelType << endl; + << pair << ": " << modelType << endl; - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(interfaceCompositionModelType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { FatalErrorInFunction - << "Unknown interfaceCompositionModelType type " - << interfaceCompositionModelType << endl << endl - << "Valid interfaceCompositionModel types are : " << endl + << "Unknown interfaceCompositionModel type " + << modelType << nl << nl + << "Valid interfaceCompositionModel types :" << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/massTransferModels/massTransferModel/newMassTransferModel.C b/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/massTransferModels/massTransferModel/newMassTransferModel.C index 3b349be693..8ae0f6f552 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/massTransferModels/massTransferModel/newMassTransferModel.C +++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/massTransferModels/massTransferModel/newMassTransferModel.C @@ -34,20 +34,19 @@ Foam::autoPtr<Foam::massTransferModel> Foam::massTransferModel::New const phasePair& pair ) { - word massTransferModelType(dict.lookup("type")); + const word modelType(dict.lookup("type")); Info<< "Selecting massTransferModel for " - << pair << ": " << massTransferModelType << endl; + << pair << ": " << modelType << endl; - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(massTransferModelType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { FatalErrorInFunction - << "Unknown massTransferModelType type " - << massTransferModelType << endl << endl - << "Valid massTransferModel types are : " << endl + << "Unknown massTransferModel type " + << modelType << nl << nl + << "Valid massTransferModel types :" << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/saturationModels/saturationModel/newSaturationModel.C b/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/saturationModels/saturationModel/newSaturationModel.C index 17fc43cac4..fb59ed2574 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/saturationModels/saturationModel/newSaturationModel.C +++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/saturationModels/saturationModel/newSaturationModel.C @@ -32,20 +32,18 @@ Foam::autoPtr<Foam::saturationModel> Foam::saturationModel::New const dictionary& dict ) { - word saturationModelType(dict.lookup("type")); + const word modelType(dict.lookup("type")); - Info<< "Selecting saturationModel: " - << saturationModelType << endl; + Info<< "Selecting saturationModel: " << modelType << endl; - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(saturationModelType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { FatalErrorInFunction - << "Unknown saturationModelType type " - << saturationModelType << endl << endl - << "Valid saturationModel types are : " << endl + << "Unknown saturationModel type " + << modelType << nl << nl + << "Valid saturationModel types :" << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/surfaceTensionModels/surfaceTensionModel/newSurfaceTensionModel.C b/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/surfaceTensionModels/surfaceTensionModel/newSurfaceTensionModel.C index f2c28eeb5d..57be04722d 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/surfaceTensionModels/surfaceTensionModel/newSurfaceTensionModel.C +++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/surfaceTensionModels/surfaceTensionModel/newSurfaceTensionModel.C @@ -35,20 +35,19 @@ Foam::surfaceTensionModel::New const phasePair& pair ) { - word surfaceTensionModelType(dict.lookup("type")); + const word modelType(dict.lookup("type")); Info<< "Selecting surfaceTensionModel for " - << pair << ": " << surfaceTensionModelType << endl; + << pair << ": " << modelType << endl; - multiphaseConstructorTable::iterator cstrIter = - multiphaseConstructorTablePtr_->find(surfaceTensionModelType); + auto cstrIter = multiphaseConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { FatalErrorInFunction - << "Unknown surfaceTensionModelType type " - << surfaceTensionModelType << endl << endl - << "Valid surfaceTensionModel types are : " << endl + << "Unknown surfaceTensionModel type " + << modelType << nl << nl + << "Valid surfaceTensionModel types :" << endl << multiphaseConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/aspectRatioModels/aspectRatioModel/newAspectRatioModel.C b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/aspectRatioModels/aspectRatioModel/newAspectRatioModel.C index 2946810cf5..5b44995b4e 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/aspectRatioModels/aspectRatioModel/newAspectRatioModel.C +++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/aspectRatioModels/aspectRatioModel/newAspectRatioModel.C @@ -35,20 +35,19 @@ Foam::aspectRatioModel::New const phasePair& pair ) { - word aspectRatioModelType(dict.lookup("type")); + const word modelType(dict.lookup("type")); Info<< "Selecting aspectRatioModel for " - << pair << ": " << aspectRatioModelType << endl; + << pair << ": " << modelType << endl; - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(aspectRatioModelType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { FatalErrorInFunction - << "Unknown aspectRatioModelType type " - << aspectRatioModelType << endl << endl - << "Valid aspectRatioModel types are : " << endl + << "Unknown aspectRatioModel type " + << modelType << nl << nl + << "Valid aspectRatioModel types :" << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/dragModels/dragModel/newDragModel.C b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/dragModels/dragModel/newDragModel.C index c2a5f4074e..de8bc17cda 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/dragModels/dragModel/newDragModel.C +++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/dragModels/dragModel/newDragModel.C @@ -34,20 +34,19 @@ Foam::autoPtr<Foam::dragModel> Foam::dragModel::New const phasePair& pair ) { - word dragModelType(dict.lookup("type")); + const word modelType(dict.lookup("type")); Info<< "Selecting dragModel for " - << pair << ": " << dragModelType << endl; + << pair << ": " << modelType << endl; - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(dragModelType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { FatalErrorInFunction - << "Unknown dragModelType type " - << dragModelType << endl << endl - << "Valid dragModel types are : " << endl + << "Unknown dragModel type " + << modelType << nl << nl + << "Valid dragModel types :" << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/heatTransferModels/heatTransferModel/newHeatTransferModel.C b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/heatTransferModels/heatTransferModel/newHeatTransferModel.C index 46e43f6b11..71654baea6 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/heatTransferModels/heatTransferModel/newHeatTransferModel.C +++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/heatTransferModels/heatTransferModel/newHeatTransferModel.C @@ -34,20 +34,19 @@ Foam::autoPtr<Foam::heatTransferModel> Foam::heatTransferModel::New const phasePair& pair ) { - word heatTransferModelType(dict.lookup("type")); + const word modelType(dict.lookup("type")); Info<< "Selecting heatTransferModel for " - << pair << ": " << heatTransferModelType << endl; + << pair << ": " << modelType << endl; - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(heatTransferModelType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { FatalErrorInFunction - << "Unknown heatTransferModelType type " - << heatTransferModelType << endl << endl - << "Valid heatTransferModel types are : " << endl + << "Unknown heatTransferModel type " + << modelType << nl << nl + << "Valid heatTransferModel types :" << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/liftModels/liftModel/newLiftModel.C b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/liftModels/liftModel/newLiftModel.C index 8dbdd5479c..a0fd721dfb 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/liftModels/liftModel/newLiftModel.C +++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/liftModels/liftModel/newLiftModel.C @@ -34,20 +34,19 @@ Foam::autoPtr<Foam::liftModel> Foam::liftModel::New const phasePair& pair ) { - word liftModelType(dict.lookup("type")); + const word modelType(dict.lookup("type")); Info<< "Selecting liftModel for " - << pair << ": " << liftModelType << endl; + << pair << ": " << modelType << endl; - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(liftModelType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { FatalErrorInFunction - << "Unknown liftModelType type " - << liftModelType << endl << endl - << "Valid liftModel types are : " << endl + << "Unknown liftModel type " + << modelType << nl << nl + << "Valid liftModel types :" << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/swarmCorrections/swarmCorrection/newSwarmCorrection.C b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/swarmCorrections/swarmCorrection/newSwarmCorrection.C index fb16d05418..a3f312de8f 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/swarmCorrections/swarmCorrection/newSwarmCorrection.C +++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/swarmCorrections/swarmCorrection/newSwarmCorrection.C @@ -35,20 +35,19 @@ Foam::swarmCorrection::New const phasePair& pair ) { - word swarmCorrectionType(dict.lookup("type")); + const word correctionType(dict.lookup("type")); Info<< "Selecting swarmCorrection for " - << pair << ": " << swarmCorrectionType << endl; + << pair << ": " << correctionType << endl; - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(swarmCorrectionType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(correctionType); if (!cstrIter.found()) { FatalErrorInFunction - << "Unknown swarmCorrectionType type " - << swarmCorrectionType << endl << endl - << "Valid swarmCorrection types are : " << endl + << "Unknown swarmCorrection type " + << correctionType << nl << nl + << "Valid swarmCorrection types :" << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/turbulentDispersionModels/turbulentDispersionModel/newTurbulentDispersionModel.C b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/turbulentDispersionModels/turbulentDispersionModel/newTurbulentDispersionModel.C index 53266ae6b2..123bad7691 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/turbulentDispersionModels/turbulentDispersionModel/newTurbulentDispersionModel.C +++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/turbulentDispersionModels/turbulentDispersionModel/newTurbulentDispersionModel.C @@ -35,20 +35,19 @@ Foam::turbulentDispersionModel::New const phasePair& pair ) { - word turbulentDispersionModelType(dict.lookup("type")); + const word modelType(dict.lookup("type")); Info<< "Selecting turbulentDispersionModel for " - << pair << ": " << turbulentDispersionModelType << endl; + << pair << ": " << modelType << endl; - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(turbulentDispersionModelType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { FatalErrorInFunction - << "Unknown turbulentDispersionModelType type " - << turbulentDispersionModelType << endl << endl - << "Valid turbulentDispersionModel types are : " << endl + << "Unknown turbulentDispersionModel type " + << modelType << nl << nl + << "Valid turbulentDispersionModel types :" << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/virtualMassModels/virtualMassModel/newVirtualMassModel.C b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/virtualMassModels/virtualMassModel/newVirtualMassModel.C index 1b092c197e..6884a6b3be 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/virtualMassModels/virtualMassModel/newVirtualMassModel.C +++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/virtualMassModels/virtualMassModel/newVirtualMassModel.C @@ -34,20 +34,19 @@ Foam::autoPtr<Foam::virtualMassModel> Foam::virtualMassModel::New const phasePair& pair ) { - word virtualMassModelType(dict.lookup("type")); + const word modelType(dict.lookup("type")); Info<< "Selecting virtualMassModel for " - << pair << ": " << virtualMassModelType << endl; + << pair << ": " << modelType << endl; - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(virtualMassModelType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { FatalErrorInFunction - << "Unknown virtualMassModelType type " - << virtualMassModelType << endl << endl - << "Valid virtualMassModel types are : " << endl + << "Unknown virtualMassModel type " + << modelType << nl << nl + << "Valid virtualMassModel types :" << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/wallDampingModels/wallDampingModel/newWallDampingModel.C b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/wallDampingModels/wallDampingModel/newWallDampingModel.C index 83ad7b42e5..bb59931dc1 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/wallDampingModels/wallDampingModel/newWallDampingModel.C +++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/wallDampingModels/wallDampingModel/newWallDampingModel.C @@ -34,20 +34,19 @@ Foam::autoPtr<Foam::wallDampingModel> Foam::wallDampingModel::New const phasePair& pair ) { - word wallDampingModelType(dict.lookup("type")); + const word modelType(dict.lookup("type")); Info<< "Selecting wallDampingModel for " - << pair << ": " << wallDampingModelType << endl; + << pair << ": " << modelType << endl; - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(wallDampingModelType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { FatalErrorInFunction - << "Unknown wallDampingModelType type " - << wallDampingModelType << endl << endl - << "Valid wallDampingModel types are : " << endl + << "Unknown wallDampingModel type " + << modelType << nl << nl + << "Valid wallDampingModel types :" << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/wallLubricationModels/wallLubricationModel/newWallLubricationModel.C b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/wallLubricationModels/wallLubricationModel/newWallLubricationModel.C index 806a1dd3b3..2cfddbd92c 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/wallLubricationModels/wallLubricationModel/newWallLubricationModel.C +++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/wallLubricationModels/wallLubricationModel/newWallLubricationModel.C @@ -34,20 +34,19 @@ Foam::autoPtr<Foam::wallLubricationModel> Foam::wallLubricationModel::New const phasePair& pair ) { - word wallLubricationModelType(dict.lookup("type")); + const word modelType(dict.lookup("type")); Info<< "Selecting wallLubricationModel for " - << pair << ": " << wallLubricationModelType << endl; + << pair << ": " << modelType << endl; - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(wallLubricationModelType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { FatalErrorInFunction - << "Unknown wallLubricationModelType type " - << wallLubricationModelType << endl << endl - << "Valid wallLubricationModel types are : " << endl + << "Unknown wallLubricationModel type " + << modelType << nl << nl + << "Valid wallLubricationModel types :" << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/BlendedInterfacialModel/blendingMethods/blendingMethod/newBlendingMethod.C b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/BlendedInterfacialModel/blendingMethods/blendingMethod/newBlendingMethod.C index cbb33a5fbd..8324dc52bc 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/BlendedInterfacialModel/blendingMethods/blendingMethod/newBlendingMethod.C +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/BlendedInterfacialModel/blendingMethods/blendingMethod/newBlendingMethod.C @@ -33,20 +33,19 @@ Foam::autoPtr<Foam::blendingMethod> Foam::blendingMethod::New const wordList& phaseNames ) { - word blendingMethodType(dict.lookup("type")); + const word methodType(dict.lookup("type")); Info<< "Selecting " << dict.dictName() << " blending method: " - << blendingMethodType << endl; + << methodType << endl; - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(blendingMethodType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(methodType); if (!cstrIter.found()) { FatalErrorInFunction - << "Unknown blendingMethodType type " - << blendingMethodType << endl << endl - << "Valid blendingMethod types are : " << endl + << "Unknown blendingMethod type " + << methodType << nl << nl + << "Valid blendingMethod types :" << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/diameterModels/diameterModel/newDiameterModel.C b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/diameterModels/diameterModel/newDiameterModel.C index 963ad160f7..fc4000975d 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/diameterModels/diameterModel/newDiameterModel.C +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/diameterModels/diameterModel/newDiameterModel.C @@ -33,32 +33,28 @@ Foam::autoPtr<Foam::diameterModel> Foam::diameterModel::New const phaseModel& phase ) { - word diameterModelType - ( - dict.lookup("diameterModel") - ); + const word modelType(dict.lookup("diameterModel")); Info << "Selecting diameterModel for phase " << phase.name() << ": " - << diameterModelType << endl; + << modelType << endl; - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(diameterModelType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { FatalErrorInFunction - << "Unknown diameterModelType type " - << diameterModelType << endl << endl - << "Valid diameterModel types are : " << endl + << "Unknown diameterModel type " + << modelType << nl << nl + << "Valid diameterModel types :" << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } return cstrIter() ( - dict.optionalSubDict(diameterModelType + "Coeffs"), + dict.optionalSubDict(modelType + "Coeffs"), phase ); } diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/phaseModel/newPhaseModel.C b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/phaseModel/newPhaseModel.C index c42b86070d..d78fdbba5a 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/phaseModel/newPhaseModel.C +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/phaseModel/newPhaseModel.C @@ -35,20 +35,19 @@ Foam::autoPtr<Foam::phaseModel> Foam::phaseModel::New const label index ) { - word phaseModelType(fluid.subDict(phaseName).lookup("type")); + const word modelType(fluid.subDict(phaseName).lookup("type")); Info<< "Selecting phaseModel for " - << phaseName << ": " << phaseModelType << endl; + << phaseName << ": " << modelType << endl; - phaseSystemConstructorTable::iterator cstrIter = - phaseSystemConstructorTablePtr_->find(phaseModelType); + auto cstrIter = phaseSystemConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { FatalErrorInFunction - << "Unknown phaseModelType type " - << phaseModelType << endl << endl - << "Valid phaseModel types are : " << endl + << "Unknown phaseModel type " + << modelType << nl << nl + << "Valid phaseModel types :" << endl << phaseSystemConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/multiphaseSystem/newMultiphaseSystem.C b/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/multiphaseSystem/newMultiphaseSystem.C index 0f116c7040..ae09589634 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/multiphaseSystem/newMultiphaseSystem.C +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/multiphaseSystem/newMultiphaseSystem.C @@ -32,7 +32,7 @@ Foam::autoPtr<Foam::multiphaseSystem> Foam::multiphaseSystem::New const fvMesh& mesh ) { - const word multiphaseSystemType + const word systemType ( IOdictionary ( @@ -48,18 +48,16 @@ Foam::autoPtr<Foam::multiphaseSystem> Foam::multiphaseSystem::New ).lookup("type") ); - Info<< "Selecting multiphaseSystem " - << multiphaseSystemType << endl; + Info<< "Selecting multiphaseSystem " << systemType << endl; - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(multiphaseSystemType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(systemType); if (!cstrIter.found()) { FatalErrorInFunction - << "Unknown multiphaseSystemType type " - << multiphaseSystemType << endl << endl - << "Valid multiphaseSystem types are : " << endl + << "Unknown multiphaseSystem type " + << systemType << nl << nl + << "Valid multiphaseSystem types :" << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/departureDiameterModels/departureDiameterModel/newDepartureDiameterModel.C b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/departureDiameterModels/departureDiameterModel/newDepartureDiameterModel.C index dcc0cc0d0f..94bbba3212 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/departureDiameterModels/departureDiameterModel/newDepartureDiameterModel.C +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/departureDiameterModels/departureDiameterModel/newDepartureDiameterModel.C @@ -33,20 +33,18 @@ Foam::wallBoilingModels::departureDiameterModel::New const dictionary& dict ) { - word departureDiameterModelType(dict.lookup("type")); + const word modelType(dict.lookup("type")); - Info<< "Selecting departureDiameterModel: " - << departureDiameterModelType << endl; + Info<< "Selecting departureDiameterModel: " << modelType << endl; - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(departureDiameterModelType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { FatalErrorInFunction - << "Unknown departureDiameterModelType type " - << departureDiameterModelType << endl << endl - << "Valid departureDiameterModel types are : " << endl + << "Unknown departureDiameterModel type " + << modelType << nl << nl + << "Valid departureDiameterModel types :" << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/departureFrequencyModels/departureFrequencyModel/newDepartureFrequencyModel.C b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/departureFrequencyModels/departureFrequencyModel/newDepartureFrequencyModel.C index 13987ff4b0..136224813a 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/departureFrequencyModels/departureFrequencyModel/newDepartureFrequencyModel.C +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/departureFrequencyModels/departureFrequencyModel/newDepartureFrequencyModel.C @@ -33,20 +33,18 @@ Foam::wallBoilingModels::departureFrequencyModel::New const dictionary& dict ) { - word departureFrequencyModelType(dict.lookup("type")); + const word modelType(dict.lookup("type")); - Info<< "Selecting departureFrequencyModel: " - << departureFrequencyModelType << endl; + Info<< "Selecting departureFrequencyModel: " << modelType << endl; - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(departureFrequencyModelType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { FatalErrorInFunction - << "Unknown departureFrequencyModelType type " - << departureFrequencyModelType << endl << endl - << "Valid departureFrequencyModel types are : " << endl + << "Unknown departureFrequencyModel type " + << modelType << nl << nl + << "Valid departureFrequencyModel types :" << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/nucleationSiteModels/nucleationSiteModel/newNucleationSiteModel.C b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/nucleationSiteModels/nucleationSiteModel/newNucleationSiteModel.C index 32f2d5a520..6338ab6669 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/nucleationSiteModels/nucleationSiteModel/newNucleationSiteModel.C +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/nucleationSiteModels/nucleationSiteModel/newNucleationSiteModel.C @@ -33,20 +33,18 @@ Foam::wallBoilingModels::nucleationSiteModel::New const dictionary& dict ) { - word nucleationSiteModelType(dict.lookup("type")); + const word modelType(dict.lookup("type")); - Info<< "Selecting nucleationSiteModel: " - << nucleationSiteModelType << endl; + Info<< "Selecting nucleationSiteModel: " << modelType << endl; - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(nucleationSiteModelType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { FatalErrorInFunction - << "Unknown nucleationSiteModelType type " - << nucleationSiteModelType << endl << endl - << "Valid nucleationSiteModel types are : " << endl + << "Unknown nucleationSiteModel type " + << modelType << nl << nl + << "Valid nucleationSiteModel types :" << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/partitioningModels/partitioningModel/newPartitioningModel.C b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/partitioningModels/partitioningModel/newPartitioningModel.C index 6cf6d1d64c..ddc57a3e65 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/partitioningModels/partitioningModel/newPartitioningModel.C +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/partitioningModels/partitioningModel/newPartitioningModel.C @@ -33,20 +33,18 @@ Foam::wallBoilingModels::partitioningModel::New const dictionary& dict ) { - word partitioningModelType(dict.lookup("type")); + const word modelType(dict.lookup("type")); - Info<< "Selecting partitioningModel: " - << partitioningModelType << endl; + Info<< "Selecting partitioningModel: " << modelType << endl; - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(partitioningModelType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { FatalErrorInFunction - << "Unknown partitioningModelType type " - << partitioningModelType << endl << endl - << "Valid partitioningModel types are : " << endl + << "Unknown partitioningModel type " + << modelType << nl << nl + << "Valid partitioningModel types :" << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/conductivityModel/conductivityModel/newConductivityModel.C b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/conductivityModel/conductivityModel/newConductivityModel.C index bfadfc6399..e4a3a64634 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/conductivityModel/conductivityModel/newConductivityModel.C +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/conductivityModel/conductivityModel/newConductivityModel.C @@ -33,23 +33,20 @@ Foam::kineticTheoryModels::conductivityModel::New const dictionary& dict ) { - word conductivityModelType(dict.lookup("conductivityModel")); + const word modelType(dict.lookup("conductivityModel")); - Info<< "Selecting conductivityModel " - << conductivityModelType << endl; + Info<< "Selecting conductivityModel " << modelType << endl; - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(conductivityModelType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { - FatalError - << "conductivityModel::New(const dictionary&) : " << endl - << " unknown conductivityModelType type " - << conductivityModelType - << ", constructor not in hash table" << endl << endl - << " Valid conductivityModelType types are :" << endl; - Info<< dictionaryConstructorTablePtr_->sortedToc() << abort(FatalError); + FatalErrorInFunction + << "Unknown conductivityModel type " + << modelType << nl << nl + << "Valid conductivityModel types :" << endl + << dictionaryConstructorTablePtr_->sortedToc() + << exit(FatalError); } return autoPtr<conductivityModel>(cstrIter()(dict)); diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/frictionalStressModel/newFrictionalStressModel.C b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/frictionalStressModel/newFrictionalStressModel.C index b68c03470f..608cd1178d 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/frictionalStressModel/newFrictionalStressModel.C +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/frictionalStressModel/newFrictionalStressModel.C @@ -33,24 +33,20 @@ Foam::kineticTheoryModels::frictionalStressModel::New const dictionary& dict ) { - word frictionalStressModelType(dict.lookup("frictionalStressModel")); + const word modelType(dict.lookup("frictionalStressModel")); - Info<< "Selecting frictionalStressModel " - << frictionalStressModelType << endl; + Info<< "Selecting frictionalStressModel " << modelType << endl; - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(frictionalStressModelType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { - FatalError - << "frictionalStressModel::New(const dictionary&) : " << endl - << " unknown frictionalStressModelType type " - << frictionalStressModelType - << ", constructor not in hash table" << endl << endl - << " Valid frictionalStressModelType types are :" << endl; - Info<< dictionaryConstructorTablePtr_->sortedToc() - << abort(FatalError); + FatalErrorInFunction + << "Unknown frictionalStressModel type " + << modelType << nl << nl + << "Valid frictionalStressModel types :" << endl + << dictionaryConstructorTablePtr_->sortedToc() + << exit(FatalError); } return autoPtr<frictionalStressModel>(cstrIter()(dict)); diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/granularPressureModel/granularPressureModel/newGranularPressureModel.C b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/granularPressureModel/granularPressureModel/newGranularPressureModel.C index a1ce25337f..1810e248bf 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/granularPressureModel/granularPressureModel/newGranularPressureModel.C +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/granularPressureModel/granularPressureModel/newGranularPressureModel.C @@ -33,24 +33,20 @@ Foam::kineticTheoryModels::granularPressureModel::New const dictionary& dict ) { - word granularPressureModelType(dict.lookup("granularPressureModel")); + const word modelType(dict.lookup("granularPressureModel")); - Info<< "Selecting granularPressureModel " - << granularPressureModelType << endl; + Info<< "Selecting granularPressureModel " << modelType << endl; - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(granularPressureModelType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { - FatalError - << "granularPressureModel::New(const dictionary&) : " << endl - << " unknown granularPressureModelType type " - << granularPressureModelType - << ", constructor not in hash table" << endl << endl - << " Valid granularPressureModelType types are :" << endl; - Info<< dictionaryConstructorTablePtr_->sortedToc() - << abort(FatalError); + FatalErrorInFunction + << "Unknown granularPressureModel type " + << modelType << nl << nl + << "Valid granularPressureModel types : " << nl + << dictionaryConstructorTablePtr_->sortedToc() + << exit(FatalError); } return autoPtr<granularPressureModel>(cstrIter()(dict)); diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/radialModel/radialModel/newRadialModel.C b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/radialModel/radialModel/newRadialModel.C index 583ce1c3ad..0ac0a36afe 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/radialModel/radialModel/newRadialModel.C +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/radialModel/radialModel/newRadialModel.C @@ -33,24 +33,20 @@ Foam::kineticTheoryModels::radialModel::New const dictionary& dict ) { - word radialModelType(dict.lookup("radialModel")); + const word modelType(dict.lookup("radialModel")); - Info<< "Selecting radialModel " - << radialModelType << endl; + Info<< "Selecting radialModel " << modelType << endl; - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(radialModelType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { - FatalError - << "radialModel::New(const dictionary&) : " << endl - << " unknown radialModelType type " - << radialModelType - << ", constructor not in hash table" << endl << endl - << " Valid radialModelType types are :" << endl; - Info<< dictionaryConstructorTablePtr_->sortedToc() - << abort(FatalError); + FatalErrorInFunction + << "Unknown radialModel type " + << modelType << nl << nl + << "Valid radialModel types :" << endl + << dictionaryConstructorTablePtr_->sortedToc() + << exit(FatalError); } return autoPtr<radialModel>(cstrIter()(dict)); diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/viscosityModel/viscosityModel/newViscosityModel.C b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/viscosityModel/viscosityModel/newViscosityModel.C index 361850b414..0120b2a1b4 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/viscosityModel/viscosityModel/newViscosityModel.C +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/viscosityModel/viscosityModel/newViscosityModel.C @@ -33,23 +33,20 @@ Foam::kineticTheoryModels::viscosityModel::New const dictionary& dict ) { - word viscosityModelType(dict.lookup("viscosityModel")); + const word modelType(dict.lookup("viscosityModel")); - Info<< "Selecting viscosityModel " - << viscosityModelType << endl; + Info<< "Selecting viscosityModel " << modelType << endl; - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(viscosityModelType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { - FatalError - << "viscosityModel::New(const dictionary&) : " << endl - << " unknown viscosityModelType type " - << viscosityModelType - << ", constructor not in hash table" << endl << endl - << " Valid viscosityModelType types are :" << endl; - Info<< dictionaryConstructorTablePtr_->sortedToc() << abort(FatalError); + FatalErrorInFunction + << "Unknown viscosityModel type " + << modelType << nl << nl + << "Valid viscosityModel types :" << nl + << dictionaryConstructorTablePtr_->sortedToc() + << exit(FatalError); } return autoPtr<viscosityModel>(cstrIter()(dict)); diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseSystem/diameterModels/IATE/IATEsources/IATEsource/IATEsource.C b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseSystem/diameterModels/IATE/IATEsources/IATEsource/IATEsource.C index dfbd95e6b2..18a941099a 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseSystem/diameterModels/IATE/IATEsources/IATEsource/IATEsource.C +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseSystem/diameterModels/IATE/IATEsources/IATEsource/IATEsource.C @@ -50,15 +50,14 @@ Foam::diameterModels::IATEsource::New const dictionary& dict ) { - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(type); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(type); if (!cstrIter.found()) { FatalErrorInFunction << "Unknown IATE source type " << type << nl << nl - << "Valid IATE source types : " << endl + << "Valid IATE source types :" << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseSystem/newTwoPhaseSystem.C b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseSystem/newTwoPhaseSystem.C index c2ca635873..50a2f015a7 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseSystem/newTwoPhaseSystem.C +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseSystem/newTwoPhaseSystem.C @@ -32,7 +32,7 @@ Foam::autoPtr<Foam::twoPhaseSystem> Foam::twoPhaseSystem::New const fvMesh& mesh ) { - const word twoPhaseSystemType + const word systemType ( IOdictionary ( @@ -48,18 +48,16 @@ Foam::autoPtr<Foam::twoPhaseSystem> Foam::twoPhaseSystem::New ).lookup("type") ); - Info<< "Selecting twoPhaseSystem " - << twoPhaseSystemType << endl; + Info<< "Selecting twoPhaseSystem " << systemType << endl; - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(twoPhaseSystemType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(systemType); if (!cstrIter.found()) { FatalErrorInFunction - << "Unknown twoPhaseSystemType type " - << twoPhaseSystemType << endl << endl - << "Valid twoPhaseSystem types are : " << endl + << "Unknown twoPhaseSystem type " + << systemType << nl << nl + << "Valid twoPhaseSystem types :" << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/aspectRatioModels/aspectRatioModel/newAspectRatioModel.C b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/aspectRatioModels/aspectRatioModel/newAspectRatioModel.C index 2946810cf5..5b44995b4e 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/aspectRatioModels/aspectRatioModel/newAspectRatioModel.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/aspectRatioModels/aspectRatioModel/newAspectRatioModel.C @@ -35,20 +35,19 @@ Foam::aspectRatioModel::New const phasePair& pair ) { - word aspectRatioModelType(dict.lookup("type")); + const word modelType(dict.lookup("type")); Info<< "Selecting aspectRatioModel for " - << pair << ": " << aspectRatioModelType << endl; + << pair << ": " << modelType << endl; - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(aspectRatioModelType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { FatalErrorInFunction - << "Unknown aspectRatioModelType type " - << aspectRatioModelType << endl << endl - << "Valid aspectRatioModel types are : " << endl + << "Unknown aspectRatioModel type " + << modelType << nl << nl + << "Valid aspectRatioModel types :" << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/dragModels/dragModel/newDragModel.C b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/dragModels/dragModel/newDragModel.C index c2a5f4074e..de8bc17cda 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/dragModels/dragModel/newDragModel.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/dragModels/dragModel/newDragModel.C @@ -34,20 +34,19 @@ Foam::autoPtr<Foam::dragModel> Foam::dragModel::New const phasePair& pair ) { - word dragModelType(dict.lookup("type")); + const word modelType(dict.lookup("type")); Info<< "Selecting dragModel for " - << pair << ": " << dragModelType << endl; + << pair << ": " << modelType << endl; - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(dragModelType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { FatalErrorInFunction - << "Unknown dragModelType type " - << dragModelType << endl << endl - << "Valid dragModel types are : " << endl + << "Unknown dragModel type " + << modelType << nl << nl + << "Valid dragModel types :" << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/heatTransferModels/heatTransferModel/newHeatTransferModel.C b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/heatTransferModels/heatTransferModel/newHeatTransferModel.C index 46e43f6b11..71654baea6 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/heatTransferModels/heatTransferModel/newHeatTransferModel.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/heatTransferModels/heatTransferModel/newHeatTransferModel.C @@ -34,20 +34,19 @@ Foam::autoPtr<Foam::heatTransferModel> Foam::heatTransferModel::New const phasePair& pair ) { - word heatTransferModelType(dict.lookup("type")); + const word modelType(dict.lookup("type")); Info<< "Selecting heatTransferModel for " - << pair << ": " << heatTransferModelType << endl; + << pair << ": " << modelType << endl; - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(heatTransferModelType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { FatalErrorInFunction - << "Unknown heatTransferModelType type " - << heatTransferModelType << endl << endl - << "Valid heatTransferModel types are : " << endl + << "Unknown heatTransferModel type " + << modelType << nl << nl + << "Valid heatTransferModel types :" << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/liftModels/liftModel/newLiftModel.C b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/liftModels/liftModel/newLiftModel.C index 8dbdd5479c..a0fd721dfb 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/liftModels/liftModel/newLiftModel.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/liftModels/liftModel/newLiftModel.C @@ -34,20 +34,19 @@ Foam::autoPtr<Foam::liftModel> Foam::liftModel::New const phasePair& pair ) { - word liftModelType(dict.lookup("type")); + const word modelType(dict.lookup("type")); Info<< "Selecting liftModel for " - << pair << ": " << liftModelType << endl; + << pair << ": " << modelType << endl; - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(liftModelType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { FatalErrorInFunction - << "Unknown liftModelType type " - << liftModelType << endl << endl - << "Valid liftModel types are : " << endl + << "Unknown liftModel type " + << modelType << nl << nl + << "Valid liftModel types :" << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/swarmCorrections/swarmCorrection/newSwarmCorrection.C b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/swarmCorrections/swarmCorrection/newSwarmCorrection.C index fb16d05418..5462b768a2 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/swarmCorrections/swarmCorrection/newSwarmCorrection.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/swarmCorrections/swarmCorrection/newSwarmCorrection.C @@ -35,20 +35,19 @@ Foam::swarmCorrection::New const phasePair& pair ) { - word swarmCorrectionType(dict.lookup("type")); + const word modelType(dict.lookup("type")); Info<< "Selecting swarmCorrection for " - << pair << ": " << swarmCorrectionType << endl; + << pair << ": " << modelType << endl; - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(swarmCorrectionType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { FatalErrorInFunction - << "Unknown swarmCorrectionType type " - << swarmCorrectionType << endl << endl - << "Valid swarmCorrection types are : " << endl + << "Unknown swarmCorrection type " + << modelType << nl << nl + << "Valid swarmCorrection types :" << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/turbulentDispersionModels/turbulentDispersionModel/newTurbulentDispersionModel.C b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/turbulentDispersionModels/turbulentDispersionModel/newTurbulentDispersionModel.C index 53266ae6b2..123bad7691 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/turbulentDispersionModels/turbulentDispersionModel/newTurbulentDispersionModel.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/turbulentDispersionModels/turbulentDispersionModel/newTurbulentDispersionModel.C @@ -35,20 +35,19 @@ Foam::turbulentDispersionModel::New const phasePair& pair ) { - word turbulentDispersionModelType(dict.lookup("type")); + const word modelType(dict.lookup("type")); Info<< "Selecting turbulentDispersionModel for " - << pair << ": " << turbulentDispersionModelType << endl; + << pair << ": " << modelType << endl; - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(turbulentDispersionModelType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { FatalErrorInFunction - << "Unknown turbulentDispersionModelType type " - << turbulentDispersionModelType << endl << endl - << "Valid turbulentDispersionModel types are : " << endl + << "Unknown turbulentDispersionModel type " + << modelType << nl << nl + << "Valid turbulentDispersionModel types :" << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/virtualMassModels/virtualMassModel/newVirtualMassModel.C b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/virtualMassModels/virtualMassModel/newVirtualMassModel.C index 1b092c197e..6884a6b3be 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/virtualMassModels/virtualMassModel/newVirtualMassModel.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/virtualMassModels/virtualMassModel/newVirtualMassModel.C @@ -34,20 +34,19 @@ Foam::autoPtr<Foam::virtualMassModel> Foam::virtualMassModel::New const phasePair& pair ) { - word virtualMassModelType(dict.lookup("type")); + const word modelType(dict.lookup("type")); Info<< "Selecting virtualMassModel for " - << pair << ": " << virtualMassModelType << endl; + << pair << ": " << modelType << endl; - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(virtualMassModelType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { FatalErrorInFunction - << "Unknown virtualMassModelType type " - << virtualMassModelType << endl << endl - << "Valid virtualMassModel types are : " << endl + << "Unknown virtualMassModel type " + << modelType << nl << nl + << "Valid virtualMassModel types :" << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/wallLubricationModels/wallLubricationModel/newWallLubricationModel.C b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/wallLubricationModels/wallLubricationModel/newWallLubricationModel.C index 806a1dd3b3..2cfddbd92c 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/wallLubricationModels/wallLubricationModel/newWallLubricationModel.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/wallLubricationModels/wallLubricationModel/newWallLubricationModel.C @@ -34,20 +34,19 @@ Foam::autoPtr<Foam::wallLubricationModel> Foam::wallLubricationModel::New const phasePair& pair ) { - word wallLubricationModelType(dict.lookup("type")); + const word modelType(dict.lookup("type")); Info<< "Selecting wallLubricationModel for " - << pair << ": " << wallLubricationModelType << endl; + << pair << ": " << modelType << endl; - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(wallLubricationModelType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { FatalErrorInFunction - << "Unknown wallLubricationModelType type " - << wallLubricationModelType << endl << endl - << "Valid wallLubricationModel types are : " << endl + << "Unknown wallLubricationModel type " + << modelType << nl << nl + << "Valid wallLubricationModel types :" << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/conductivityModel/conductivityModel/newConductivityModel.C b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/conductivityModel/conductivityModel/newConductivityModel.C index bfadfc6399..e4a3a64634 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/conductivityModel/conductivityModel/newConductivityModel.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/conductivityModel/conductivityModel/newConductivityModel.C @@ -33,23 +33,20 @@ Foam::kineticTheoryModels::conductivityModel::New const dictionary& dict ) { - word conductivityModelType(dict.lookup("conductivityModel")); + const word modelType(dict.lookup("conductivityModel")); - Info<< "Selecting conductivityModel " - << conductivityModelType << endl; + Info<< "Selecting conductivityModel " << modelType << endl; - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(conductivityModelType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { - FatalError - << "conductivityModel::New(const dictionary&) : " << endl - << " unknown conductivityModelType type " - << conductivityModelType - << ", constructor not in hash table" << endl << endl - << " Valid conductivityModelType types are :" << endl; - Info<< dictionaryConstructorTablePtr_->sortedToc() << abort(FatalError); + FatalErrorInFunction + << "Unknown conductivityModel type " + << modelType << nl << nl + << "Valid conductivityModel types :" << endl + << dictionaryConstructorTablePtr_->sortedToc() + << exit(FatalError); } return autoPtr<conductivityModel>(cstrIter()(dict)); diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/frictionalStressModel/newFrictionalStressModel.C b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/frictionalStressModel/newFrictionalStressModel.C index b68c03470f..255b15593a 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/frictionalStressModel/newFrictionalStressModel.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/frictionalStressModel/newFrictionalStressModel.C @@ -33,24 +33,20 @@ Foam::kineticTheoryModels::frictionalStressModel::New const dictionary& dict ) { - word frictionalStressModelType(dict.lookup("frictionalStressModel")); + const word modelType(dict.lookup("frictionalStressModel")); - Info<< "Selecting frictionalStressModel " - << frictionalStressModelType << endl; + Info<< "Selecting frictionalStressModel " << modelType << endl; - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(frictionalStressModelType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { - FatalError - << "frictionalStressModel::New(const dictionary&) : " << endl - << " unknown frictionalStressModelType type " - << frictionalStressModelType - << ", constructor not in hash table" << endl << endl - << " Valid frictionalStressModelType types are :" << endl; - Info<< dictionaryConstructorTablePtr_->sortedToc() - << abort(FatalError); + FatalErrorInFunction + << "Unknown frictionalStressModel type " + << modelType << nl << nl + << "Valid frictionalStressModelType types :" << endl + << dictionaryConstructorTablePtr_->sortedToc() + << exit(FatalError); } return autoPtr<frictionalStressModel>(cstrIter()(dict)); diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/granularPressureModel/granularPressureModel/newGranularPressureModel.C b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/granularPressureModel/granularPressureModel/newGranularPressureModel.C index a1ce25337f..7898a94cca 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/granularPressureModel/granularPressureModel/newGranularPressureModel.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/granularPressureModel/granularPressureModel/newGranularPressureModel.C @@ -33,24 +33,20 @@ Foam::kineticTheoryModels::granularPressureModel::New const dictionary& dict ) { - word granularPressureModelType(dict.lookup("granularPressureModel")); + const word modelType(dict.lookup("granularPressureModel")); - Info<< "Selecting granularPressureModel " - << granularPressureModelType << endl; + Info<< "Selecting granularPressureModel " << modelType << endl; - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(granularPressureModelType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { - FatalError - << "granularPressureModel::New(const dictionary&) : " << endl - << " unknown granularPressureModelType type " - << granularPressureModelType - << ", constructor not in hash table" << endl << endl - << " Valid granularPressureModelType types are :" << endl; - Info<< dictionaryConstructorTablePtr_->sortedToc() - << abort(FatalError); + FatalErrorInFunction + << "Unknown granularPressureModel type " + << modelType << nl << nl + << "Valid granularPressureModel types :" << nl + << dictionaryConstructorTablePtr_->sortedToc() + << exit(FatalError); } return autoPtr<granularPressureModel>(cstrIter()(dict)); diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/radialModel/radialModel/newRadialModel.C b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/radialModel/radialModel/newRadialModel.C index 583ce1c3ad..0ac0a36afe 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/radialModel/radialModel/newRadialModel.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/radialModel/radialModel/newRadialModel.C @@ -33,24 +33,20 @@ Foam::kineticTheoryModels::radialModel::New const dictionary& dict ) { - word radialModelType(dict.lookup("radialModel")); + const word modelType(dict.lookup("radialModel")); - Info<< "Selecting radialModel " - << radialModelType << endl; + Info<< "Selecting radialModel " << modelType << endl; - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(radialModelType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { - FatalError - << "radialModel::New(const dictionary&) : " << endl - << " unknown radialModelType type " - << radialModelType - << ", constructor not in hash table" << endl << endl - << " Valid radialModelType types are :" << endl; - Info<< dictionaryConstructorTablePtr_->sortedToc() - << abort(FatalError); + FatalErrorInFunction + << "Unknown radialModel type " + << modelType << nl << nl + << "Valid radialModel types :" << endl + << dictionaryConstructorTablePtr_->sortedToc() + << exit(FatalError); } return autoPtr<radialModel>(cstrIter()(dict)); diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/viscosityModel/viscosityModel/newViscosityModel.C b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/viscosityModel/viscosityModel/newViscosityModel.C index 361850b414..83067ea6ee 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/viscosityModel/viscosityModel/newViscosityModel.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/viscosityModel/viscosityModel/newViscosityModel.C @@ -33,23 +33,20 @@ Foam::kineticTheoryModels::viscosityModel::New const dictionary& dict ) { - word viscosityModelType(dict.lookup("viscosityModel")); + const word modelName(dict.lookup("viscosityModel")); - Info<< "Selecting viscosityModel " - << viscosityModelType << endl; + Info<< "Selecting viscosityModel " << modelName << endl; - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(viscosityModelType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelName); if (!cstrIter.found()) { - FatalError - << "viscosityModel::New(const dictionary&) : " << endl - << " unknown viscosityModelType type " - << viscosityModelType - << ", constructor not in hash table" << endl << endl - << " Valid viscosityModelType types are :" << endl; - Info<< dictionaryConstructorTablePtr_->sortedToc() << abort(FatalError); + FatalErrorInFunction + << "Unknown viscosityModel type " + << modelName << nl << nl + << "Valid viscosityModel types :" << nl + << dictionaryConstructorTablePtr_->sortedToc() + << exit(FatalError); } return autoPtr<viscosityModel>(cstrIter()(dict)); diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/BlendedInterfacialModel/blendingMethods/blendingMethod/newBlendingMethod.C b/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/BlendedInterfacialModel/blendingMethods/blendingMethod/newBlendingMethod.C index cbb33a5fbd..f4419b735e 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/BlendedInterfacialModel/blendingMethods/blendingMethod/newBlendingMethod.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/BlendedInterfacialModel/blendingMethods/blendingMethod/newBlendingMethod.C @@ -33,20 +33,19 @@ Foam::autoPtr<Foam::blendingMethod> Foam::blendingMethod::New const wordList& phaseNames ) { - word blendingMethodType(dict.lookup("type")); + const word methodName(dict.lookup("type")); Info<< "Selecting " << dict.dictName() << " blending method: " - << blendingMethodType << endl; + << methodName << endl; - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(blendingMethodType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(methodName); if (!cstrIter.found()) { FatalErrorInFunction - << "Unknown blendingMethodType type " - << blendingMethodType << endl << endl - << "Valid blendingMethod types are : " << endl + << "Unknown blendingMethod type " + << methodName << nl << nl + << "Valid blendingMethod types :" << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/diameterModels/IATE/IATEsources/IATEsource/IATEsource.C b/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/diameterModels/IATE/IATEsources/IATEsource/IATEsource.C index fc011ece0c..c77c7e7e99 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/diameterModels/IATE/IATEsources/IATEsource/IATEsource.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/diameterModels/IATE/IATEsources/IATEsource/IATEsource.C @@ -51,15 +51,14 @@ Foam::diameterModels::IATEsource::New const dictionary& dict ) { - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(type); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(type); if (!cstrIter.found()) { FatalErrorInFunction << "Unknown IATE source type " << type << nl << nl - << "Valid IATE source types : " << endl + << "Valid IATE source types :" << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/diameterModels/diameterModel/newDiameterModel.C b/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/diameterModels/diameterModel/newDiameterModel.C index 963ad160f7..fc4000975d 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/diameterModels/diameterModel/newDiameterModel.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/diameterModels/diameterModel/newDiameterModel.C @@ -33,32 +33,28 @@ Foam::autoPtr<Foam::diameterModel> Foam::diameterModel::New const phaseModel& phase ) { - word diameterModelType - ( - dict.lookup("diameterModel") - ); + const word modelType(dict.lookup("diameterModel")); Info << "Selecting diameterModel for phase " << phase.name() << ": " - << diameterModelType << endl; + << modelType << endl; - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(diameterModelType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { FatalErrorInFunction - << "Unknown diameterModelType type " - << diameterModelType << endl << endl - << "Valid diameterModel types are : " << endl + << "Unknown diameterModel type " + << modelType << nl << nl + << "Valid diameterModel types :" << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } return cstrIter() ( - dict.optionalSubDict(diameterModelType + "Coeffs"), + dict.optionalSubDict(modelType + "Coeffs"), phase ); } 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 15604c8867..c37b1ee0cc 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 @@ -35,10 +35,6 @@ defineRunTimeSelectionTable(cellSizeAndAlignmentControl, dictionary); } -// * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * * // - - - // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // Foam::cellSizeAndAlignmentControl::cellSizeAndAlignmentControl @@ -57,7 +53,7 @@ Foam::cellSizeAndAlignmentControl::cellSizeAndAlignmentControl controlFunctionDict.lookupOrDefault<Switch> ( "forceInitialPointInsertion", - "off" + Switch::OFF ) ), name_(name) @@ -76,28 +72,20 @@ Foam::cellSizeAndAlignmentControl::New const scalar& defaultCellSize ) { - word cellSizeAndAlignmentControlTypeName - ( - controlFunctionDict.lookup("type") - ); + const word controlType(controlFunctionDict.lookup("type")); Info<< indent << "Selecting cellSizeAndAlignmentControl " - << cellSizeAndAlignmentControlTypeName << endl; + << controlType << endl; - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find - ( - cellSizeAndAlignmentControlTypeName - ); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(controlType); if (!cstrIter.found()) { FatalErrorInFunction << "Unknown cellSizeAndAlignmentControl type " - << cellSizeAndAlignmentControlTypeName - << endl << endl - << "Valid cellSizeAndAlignmentControl types are :" << endl - << dictionaryConstructorTablePtr_->toc() + << controlType << nl << nl + << "Valid cellSizeAndAlignmentControl types :" << endl + << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } @@ -121,8 +109,4 @@ Foam::cellSizeAndAlignmentControl::~cellSizeAndAlignmentControl() {} -// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * // - - - // ************************************************************************* // diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/cellSizeControlSurfaces/cellSizeFunction/cellSizeFunction/cellSizeFunction.C b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/cellSizeControlSurfaces/cellSizeFunction/cellSizeFunction/cellSizeFunction.C index 9a0333e970..77316af0a9 100644 --- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/cellSizeControlSurfaces/cellSizeFunction/cellSizeFunction/cellSizeFunction.C +++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/cellSizeControlSurfaces/cellSizeFunction/cellSizeFunction/cellSizeFunction.C @@ -32,10 +32,11 @@ namespace Foam { defineTypeNameAndDebug(cellSizeFunction, 0); defineRunTimeSelectionTable(cellSizeFunction, dictionary); - - scalar cellSizeFunction::snapToSurfaceTol_ = 1e-10; } +Foam::scalar Foam::cellSizeFunction::snapToSurfaceTol_ = 1e-10; + + // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // Foam::cellSizeFunction::cellSizeFunction @@ -122,25 +123,23 @@ Foam::autoPtr<Foam::cellSizeFunction> Foam::cellSizeFunction::New const labelList regionIndices ) { - word cellSizeFunctionTypeName + const word functionName ( cellSizeFunctionDict.lookup("cellSizeFunction") ); - Info<< indent << "Selecting cellSizeFunction " << cellSizeFunctionTypeName - << endl; + Info<< indent << "Selecting cellSizeFunction " + << functionName << endl; - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(cellSizeFunctionTypeName); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(functionName); if (!cstrIter.found()) { FatalErrorInFunction << "Unknown cellSizeFunction type " - << cellSizeFunctionTypeName - << endl << endl - << "Valid cellSizeFunction types are :" << endl - << dictionaryConstructorTablePtr_->toc() + << functionName << nl << nl + << "Valid cellSizeFunction types :" << endl + << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/cellSizeControlSurfaces/surfaceCellSizeFunction/cellSizeCalculationType/cellSizeCalculationType/cellSizeCalculationType.C b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/cellSizeControlSurfaces/surfaceCellSizeFunction/cellSizeCalculationType/cellSizeCalculationType/cellSizeCalculationType.C index 93aa04c5ab..2f4447d505 100644 --- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/cellSizeControlSurfaces/surfaceCellSizeFunction/cellSizeCalculationType/cellSizeCalculationType/cellSizeCalculationType.C +++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/cellSizeControlSurfaces/surfaceCellSizeFunction/cellSizeCalculationType/cellSizeCalculationType/cellSizeCalculationType.C @@ -60,25 +60,23 @@ Foam::autoPtr<Foam::cellSizeCalculationType> Foam::cellSizeCalculationType::New const scalar& defaultCellSize ) { - word cellSizeCalculationTypeTypeName + const word calculationType ( cellSizeCalculationTypeDict.lookup("cellSizeCalculationType") ); Info<< indent << "Selecting cellSizeCalculationType " - << cellSizeCalculationTypeTypeName << endl; + << calculationType << endl; - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(cellSizeCalculationTypeTypeName); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(calculationType); if (!cstrIter.found()) { FatalErrorInFunction << "Unknown cellSizeCalculationType type " - << cellSizeCalculationTypeTypeName - << endl << endl - << "Valid cellSizeCalculationType types are :" << endl - << dictionaryConstructorTablePtr_->toc() + << calculationType << nl << nl + << "Valid cellSizeCalculationType types :" << endl + << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } 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 ac6c12ce6b..ac72678573 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 @@ -34,6 +34,7 @@ namespace Foam defineRunTimeSelectionTable(surfaceCellSizeFunction, dictionary); } + // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // Foam::surfaceCellSizeFunction::surfaceCellSizeFunction @@ -64,25 +65,23 @@ Foam::autoPtr<Foam::surfaceCellSizeFunction> Foam::surfaceCellSizeFunction::New const scalar& defaultCellSize ) { - word surfaceCellSizeFunctionTypeName + const word functionName ( surfaceCellSizeFunctionDict.lookup("surfaceCellSizeFunction") ); Info<< indent << "Selecting surfaceCellSizeFunction " - << surfaceCellSizeFunctionTypeName << endl; + << functionName << endl; - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(surfaceCellSizeFunctionTypeName); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(functionName); if (!cstrIter.found()) { FatalErrorInFunction << "Unknown surfaceCellSizeFunction type " - << surfaceCellSizeFunctionTypeName - << endl << endl - << "Valid surfaceCellSizeFunction types are :" << endl - << dictionaryConstructorTablePtr_->toc() + << functionName << nl << nl + << "Valid surfaceCellSizeFunction types :" << endl + << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/faceAreaWeightModel/faceAreaWeightModel/faceAreaWeightModel.C b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/faceAreaWeightModel/faceAreaWeightModel/faceAreaWeightModel.C index 151a0b7884..49c62fa66d 100644 --- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/faceAreaWeightModel/faceAreaWeightModel/faceAreaWeightModel.C +++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/faceAreaWeightModel/faceAreaWeightModel/faceAreaWeightModel.C @@ -26,20 +26,17 @@ License #include "faceAreaWeightModel.H" #include "addToRunTimeSelectionTable.H" -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // namespace Foam { - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - defineTypeNameAndDebug(faceAreaWeightModel, 0); defineRunTimeSelectionTable(faceAreaWeightModel, dictionary); - +} // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -faceAreaWeightModel::faceAreaWeightModel +Foam::faceAreaWeightModel::faceAreaWeightModel ( const word& type, const dictionary& relaxationDict @@ -52,30 +49,24 @@ faceAreaWeightModel::faceAreaWeightModel // * * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * // -autoPtr<faceAreaWeightModel> faceAreaWeightModel::New +Foam::autoPtr<Foam::faceAreaWeightModel> Foam::faceAreaWeightModel::New ( const dictionary& relaxationDict ) { - word faceAreaWeightModelTypeName - ( - relaxationDict.lookup("faceAreaWeightModel") - ); + const word modelType(relaxationDict.lookup("faceAreaWeightModel")); - Info<< nl << "Selecting faceAreaWeightModel " - << faceAreaWeightModelTypeName << endl; + Info<< nl << "Selecting faceAreaWeightModel " << modelType << endl; - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(faceAreaWeightModelTypeName); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { FatalErrorInFunction << "Unknown faceAreaWeightModel type " - << faceAreaWeightModelTypeName - << endl << endl - << "Valid faceAreaWeightModel types are :" << endl - << dictionaryConstructorTablePtr_->toc() + << modelType << nl << nl + << "Valid faceAreaWeightModel types :" << endl + << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } @@ -85,12 +76,8 @@ autoPtr<faceAreaWeightModel> faceAreaWeightModel::New // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // -faceAreaWeightModel::~faceAreaWeightModel() +Foam::faceAreaWeightModel::~faceAreaWeightModel() {} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - // ************************************************************************* // diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/initialPointsMethod/initialPointsMethod/initialPointsMethod.C b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/initialPointsMethod/initialPointsMethod/initialPointsMethod.C index 3cca22c751..48e45954fb 100644 --- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/initialPointsMethod/initialPointsMethod/initialPointsMethod.C +++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/initialPointsMethod/initialPointsMethod/initialPointsMethod.C @@ -26,20 +26,17 @@ License #include "initialPointsMethod.H" #include "addToRunTimeSelectionTable.H" -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // namespace Foam { - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - defineTypeNameAndDebug(initialPointsMethod, 0); defineRunTimeSelectionTable(initialPointsMethod, dictionary); - +} // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -initialPointsMethod::initialPointsMethod +Foam::initialPointsMethod::initialPointsMethod ( const word& type, const dictionary& initialPointsDict, @@ -73,7 +70,7 @@ initialPointsMethod::initialPointsMethod // * * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * // -autoPtr<initialPointsMethod> initialPointsMethod::New +Foam::autoPtr<Foam::initialPointsMethod> Foam::initialPointsMethod::New ( const dictionary& initialPointsDict, const Time& runTime, @@ -83,25 +80,20 @@ autoPtr<initialPointsMethod> initialPointsMethod::New const autoPtr<backgroundMeshDecomposition>& decomposition ) { - word initialPointsMethodTypeName - ( - initialPointsDict.lookup("initialPointsMethod") - ); + const word methodName(initialPointsDict.lookup("initialPointsMethod")); Info<< nl << "Selecting initialPointsMethod " - << initialPointsMethodTypeName << endl; + << methodName << endl; - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(initialPointsMethodTypeName); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(methodName); if (!cstrIter.found()) { FatalErrorInFunction << "Unknown initialPointsMethod type " - << initialPointsMethodTypeName - << endl << endl - << "Valid initialPointsMethod types are :" << endl - << dictionaryConstructorTablePtr_->toc() + << methodName << nl << nl + << "Valid initialPointsMethod types :" << endl + << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } @@ -123,12 +115,8 @@ autoPtr<initialPointsMethod> initialPointsMethod::New // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // -initialPointsMethod::~initialPointsMethod() +Foam::initialPointsMethod::~initialPointsMethod() {} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - // ************************************************************************* // diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/relaxationModel/relaxationModel/relaxationModel.C b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/relaxationModel/relaxationModel/relaxationModel.C index b968dd2ebe..5f0fd95993 100644 --- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/relaxationModel/relaxationModel/relaxationModel.C +++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/relaxationModel/relaxationModel/relaxationModel.C @@ -26,20 +26,18 @@ License #include "relaxationModel.H" #include "addToRunTimeSelectionTable.H" -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // namespace Foam { - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - defineTypeNameAndDebug(relaxationModel, 0); defineRunTimeSelectionTable(relaxationModel, dictionary); +} // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -relaxationModel::relaxationModel +Foam::relaxationModel::relaxationModel ( const word& type, const dictionary& relaxationDict, @@ -54,31 +52,25 @@ relaxationModel::relaxationModel // * * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * // -autoPtr<relaxationModel> relaxationModel::New +Foam::autoPtr<Foam::relaxationModel> Foam::relaxationModel::New ( const dictionary& relaxationDict, const Time& runTime ) { - word relaxationModelTypeName - ( - relaxationDict.lookup("relaxationModel") - ); + const word modelType(relaxationDict.lookup("relaxationModel")); - Info<< nl << "Selecting relaxationModel " - << relaxationModelTypeName << endl; + Info<< nl << "Selecting relaxationModel " << modelType << endl; - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(relaxationModelTypeName); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { FatalErrorInFunction << "Unknown relaxationModel type " - << relaxationModelTypeName - << endl << endl - << "Valid relaxationModel types are :" << endl - << dictionaryConstructorTablePtr_->toc() + << modelType << nl << nl + << "Valid relaxationModel types :" << endl + << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } @@ -88,12 +80,8 @@ autoPtr<relaxationModel> relaxationModel::New // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // -relaxationModel::~relaxationModel() +Foam::relaxationModel::~relaxationModel() {} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - // ************************************************************************* // diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/searchableSurfaceFeatures/searchableSurfaceFeatures.C b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/searchableSurfaceFeatures/searchableSurfaceFeatures.C index b35c37df1a..946f15ccae 100644 --- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/searchableSurfaceFeatures/searchableSurfaceFeatures.C +++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/searchableSurfaceFeatures/searchableSurfaceFeatures.C @@ -43,17 +43,16 @@ Foam::searchableSurfaceFeatures::New const dictionary& dict ) { - word searchableSurfaceFeaturesType = surface.type() + "Features"; + const word featuresType = surface.type() + "Features"; - dictConstructorTable::iterator cstrIter = - dictConstructorTablePtr_->find(searchableSurfaceFeaturesType); + auto cstrIter = dictConstructorTablePtr_->cfind(featuresType); if (!cstrIter.found()) { FatalErrorInFunction << "Unknown searchableSurfaceFeatures type " - << searchableSurfaceFeaturesType << endl << endl - << "Valid searchableSurfaceFeatures types : " << endl + << featuresType << nl << nl + << "Valid searchableSurfaceFeatures types :" << endl << dictConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/applications/utilities/mesh/manipulation/createBaffles/faceSelection/faceSelection.C b/applications/utilities/mesh/manipulation/createBaffles/faceSelection/faceSelection.C index dd66f694aa..5c42ba3596 100644 --- a/applications/utilities/mesh/manipulation/createBaffles/faceSelection/faceSelection.C +++ b/applications/utilities/mesh/manipulation/createBaffles/faceSelection/faceSelection.C @@ -68,15 +68,14 @@ Foam::autoPtr<Foam::faceSelection> Foam::faceSelection::New { const word sampleType(dict.lookup("type")); - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(sampleType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(sampleType); if (!cstrIter.found()) { FatalErrorInFunction << "Unknown faceSelection type " << sampleType << nl << nl - << "Valid faceSelection types : " << endl + << "Valid faceSelection types :" << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/applications/utilities/miscellaneous/foamHelp/helpTypes/helpType/helpTypeNew.C b/applications/utilities/miscellaneous/foamHelp/helpTypes/helpType/helpTypeNew.C index 3feb5f8659..dff74bf277 100644 --- a/applications/utilities/miscellaneous/foamHelp/helpTypes/helpType/helpTypeNew.C +++ b/applications/utilities/miscellaneous/foamHelp/helpTypes/helpType/helpTypeNew.C @@ -34,8 +34,7 @@ Foam::autoPtr<Foam::helpType> Foam::helpType::New { Info<< "Selecting helpType " << helpTypeName << endl; - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(helpTypeName); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(helpTypeName); if (!cstrIter.found()) { diff --git a/applications/utilities/preProcessing/wallFunctionTable/tabulatedWallFunction/tabulatedWallFunction/tabulatedWallFunctionNew.C b/applications/utilities/preProcessing/wallFunctionTable/tabulatedWallFunction/tabulatedWallFunction/tabulatedWallFunctionNew.C index b4d67de9e2..2f6cfa09fc 100644 --- a/applications/utilities/preProcessing/wallFunctionTable/tabulatedWallFunction/tabulatedWallFunction/tabulatedWallFunctionNew.C +++ b/applications/utilities/preProcessing/wallFunctionTable/tabulatedWallFunction/tabulatedWallFunction/tabulatedWallFunctionNew.C @@ -25,34 +25,27 @@ License #include "tabulatedWallFunction.H" -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace tabulatedWallFunctions -{ - // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -autoPtr<tabulatedWallFunction> tabulatedWallFunction::New +Foam::autoPtr<Foam::tabulatedWallFunctions::tabulatedWallFunction> +Foam::tabulatedWallFunctions::tabulatedWallFunction::New ( const dictionary& dict, const polyMesh& mesh ) { - word twfTypeName = dict.lookup("tabulatedWallFunction"); + const word functionName = dict.lookup("tabulatedWallFunction"); - Info<< "Selecting tabulatedWallFunction " << twfTypeName << endl; + Info<< "Selecting tabulatedWallFunction " << functionName << endl; - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(twfTypeName); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(functionName); if (!cstrIter.found()) { FatalErrorInFunction - << "Unknown tabulatedWallFunction type " << twfTypeName + << "Unknown tabulatedWallFunction type " << functionName << nl << nl << "Valid tabulatedWallFunction types are:" << nl - << dictionaryConstructorTablePtr_->toc() + << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } @@ -60,9 +53,4 @@ autoPtr<tabulatedWallFunction> tabulatedWallFunction::New } -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace tabulatedWallFunctions -} // End namespace Foam - // ************************************************************************* // diff --git a/applications/utilities/surface/surfacePatch/searchableSurfaceModifier/searchableSurfaceModifier.C b/applications/utilities/surface/surfacePatch/searchableSurfaceModifier/searchableSurfaceModifier.C index a3dc719dc8..67a47a6de3 100644 --- a/applications/utilities/surface/surfacePatch/searchableSurfaceModifier/searchableSurfaceModifier.C +++ b/applications/utilities/surface/surfacePatch/searchableSurfaceModifier/searchableSurfaceModifier.C @@ -64,15 +64,14 @@ Foam::searchableSurfaceModifier::New const dictionary& dict ) { - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(type); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(type); if (!cstrIter.found()) { FatalErrorInFunction << "Unknown searchableSurfaceModifier type " << type << nl << nl - << "Valid searchableSurfaceModifier types : " << endl + << "Valid searchableSurfaceModifier types :" << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/src/ODE/ODESolvers/ODESolver/ODESolverNew.C b/src/ODE/ODESolvers/ODESolver/ODESolverNew.C index 20d6bc8831..f4cfc95a2f 100644 --- a/src/ODE/ODESolvers/ODESolver/ODESolverNew.C +++ b/src/ODE/ODESolvers/ODESolver/ODESolverNew.C @@ -33,18 +33,17 @@ Foam::autoPtr<Foam::ODESolver> Foam::ODESolver::New const dictionary& dict ) { - word ODESolverTypeName(dict.lookup("solver")); - Info<< "Selecting ODE solver " << ODESolverTypeName << endl; + const word solverType(dict.lookup("solver")); + Info<< "Selecting ODE solver " << solverType << endl; - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(ODESolverTypeName); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(solverType); if (!cstrIter.found()) { FatalErrorInFunction << "Unknown ODESolver type " - << ODESolverTypeName << nl << nl - << "Valid ODESolvers are : " << endl + << solverType << nl << nl + << "Valid ODESolver types :" << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/src/OpenFOAM/db/IOstreams/token/token.C b/src/OpenFOAM/db/IOstreams/token/token.C index 7e8b7ed141..4246fc80e7 100644 --- a/src/OpenFOAM/db/IOstreams/token/token.C +++ b/src/OpenFOAM/db/IOstreams/token/token.C @@ -62,13 +62,13 @@ Foam::autoPtr<Foam::token::compound> Foam::token::compound::New Istream& is ) { - IstreamConstructorTable::iterator cstrIter = - IstreamConstructorTablePtr_->find(compoundType); + auto cstrIter = IstreamConstructorTablePtr_->cfind(compoundType); if (!cstrIter.found()) { FatalIOErrorInFunction(is) - << "Unknown compound type " << compoundType << nl << nl + << "Unknown compound type " + << compoundType << nl << nl << "Valid compound types:" << endl << IstreamConstructorTablePtr_->sortedToc() << abort(FatalIOError); diff --git a/src/OpenFOAM/db/dictionary/functionEntries/functionEntry/functionEntry.C b/src/OpenFOAM/db/dictionary/functionEntries/functionEntry/functionEntry.C index d72a67791f..2798b924e3 100644 --- a/src/OpenFOAM/db/dictionary/functionEntries/functionEntry/functionEntry.C +++ b/src/OpenFOAM/db/dictionary/functionEntries/functionEntry/functionEntry.C @@ -97,8 +97,8 @@ bool Foam::functionEntry::execute return true; } - executedictionaryIstreamMemberFunctionTable::iterator mfIter = - executedictionaryIstreamMemberFunctionTablePtr_->find(functionName); + auto mfIter = + executedictionaryIstreamMemberFunctionTablePtr_->cfind(functionName); if (!mfIter.found()) { @@ -106,8 +106,8 @@ bool Foam::functionEntry::execute << "Unknown functionEntry '" << functionName << "' in " << is.name() << " near line " << is.lineNumber() << nl << nl - << "Valid functionEntries are :" << endl - << executedictionaryIstreamMemberFunctionTablePtr_->toc() + << "Valid functionEntries :" << endl + << executedictionaryIstreamMemberFunctionTablePtr_->sortedToc() << exit(FatalError); } @@ -136,8 +136,11 @@ bool Foam::functionEntry::execute return true; } - executeprimitiveEntryIstreamMemberFunctionTable::iterator mfIter = - executeprimitiveEntryIstreamMemberFunctionTablePtr_->find(functionName); + auto mfIter = + executeprimitiveEntryIstreamMemberFunctionTablePtr_->cfind + ( + functionName + ); if (!mfIter.found()) { @@ -145,8 +148,8 @@ bool Foam::functionEntry::execute << "Unknown functionEntry '" << functionName << "' in " << is.name() << " near line " << is.lineNumber() << nl << nl - << "Valid functionEntries are :" << endl - << executeprimitiveEntryIstreamMemberFunctionTablePtr_->toc() + << "Valid functionEntries :" << endl + << executeprimitiveEntryIstreamMemberFunctionTablePtr_->sortedToc() << exit(FatalError); } diff --git a/src/OpenFOAM/db/functionObjects/functionObject/functionObject.C b/src/OpenFOAM/db/functionObjects/functionObject/functionObject.C index a3141abb91..51e1323ec8 100644 --- a/src/OpenFOAM/db/functionObjects/functionObject/functionObject.C +++ b/src/OpenFOAM/db/functionObjects/functionObject/functionObject.C @@ -100,15 +100,14 @@ Foam::autoPtr<Foam::functionObject> Foam::functionObject::New << exit(FatalError); } - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(functionType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(functionType); if (!cstrIter.found()) { FatalErrorInFunction << "Unknown function type " << functionType << nl << nl - << "Valid functions are : " << nl + << "Valid function types :" << nl << dictionaryConstructorTablePtr_->sortedToc() << endl << exit(FatalError); } diff --git a/src/OpenFOAM/fields/pointPatchFields/basic/calculated/calculatedPointPatchField.C b/src/OpenFOAM/fields/pointPatchFields/basic/calculated/calculatedPointPatchField.C index 47a8a8c3ce..1dcbd94279 100644 --- a/src/OpenFOAM/fields/pointPatchFields/basic/calculated/calculatedPointPatchField.C +++ b/src/OpenFOAM/fields/pointPatchFields/basic/calculated/calculatedPointPatchField.C @@ -91,8 +91,8 @@ Foam::pointPatchField<Type>::NewCalculatedType const pointPatchField<Type2>& pf ) { - typename pointPatchConstructorTable::iterator patchTypeCstrIter = - pointPatchConstructorTablePtr_->find(pf.patch().type()); + auto patchTypeCstrIter = + pointPatchConstructorTablePtr_->cfind(pf.patch().type()); if (patchTypeCstrIter.found()) { diff --git a/src/OpenFOAM/fields/pointPatchFields/pointPatchField/pointPatchFieldNew.C b/src/OpenFOAM/fields/pointPatchFields/pointPatchField/pointPatchFieldNew.C index 79d90cf3a2..666ccc2fde 100644 --- a/src/OpenFOAM/fields/pointPatchFields/pointPatchField/pointPatchFieldNew.C +++ b/src/OpenFOAM/fields/pointPatchFields/pointPatchField/pointPatchFieldNew.C @@ -39,15 +39,14 @@ Foam::autoPtr<Foam::pointPatchField<Type>> Foam::pointPatchField<Type>::New InfoInFunction << "Constructing pointPatchField<Type>" << endl; } - typename pointPatchConstructorTable::iterator cstrIter = - pointPatchConstructorTablePtr_->find(patchFieldType); + auto cstrIter = pointPatchConstructorTablePtr_->cfind(patchFieldType); if (!cstrIter.found()) { FatalErrorInFunction << "Unknown patchFieldType type " << patchFieldType << nl << nl - << "Valid patchField types are :" << endl + << "Valid patchField types :" << endl << pointPatchConstructorTablePtr_->sortedToc() << exit(FatalError); } @@ -63,8 +62,8 @@ Foam::autoPtr<Foam::pointPatchField<Type>> Foam::pointPatchField<Type>::New if (pfPtr().constraintType() != p.constraintType()) { // Use default constraint type - typename pointPatchConstructorTable::iterator patchTypeCstrIter = - pointPatchConstructorTablePtr_->find(p.type()); + auto patchTypeCstrIter = + pointPatchConstructorTablePtr_->cfind(p.type()); if (!patchTypeCstrIter.found()) { @@ -117,14 +116,13 @@ Foam::autoPtr<Foam::pointPatchField<Type>> Foam::pointPatchField<Type>::New word patchFieldType(dict.lookup("type")); - typename dictionaryConstructorTable::iterator cstrIter - = dictionaryConstructorTablePtr_->find(patchFieldType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(patchFieldType); if (!cstrIter.found()) { if (!disallowGenericPointPatchField) { - cstrIter = dictionaryConstructorTablePtr_->find("generic"); + cstrIter = dictionaryConstructorTablePtr_->cfind("generic"); } if (!cstrIter.found()) @@ -134,7 +132,7 @@ Foam::autoPtr<Foam::pointPatchField<Type>> Foam::pointPatchField<Type>::New dict ) << "Unknown patchField type " << patchFieldType << " for patch type " << p.type() << nl << nl - << "Valid patchField types are :" << endl + << "Valid patchField types :" << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalIOError); } @@ -157,8 +155,8 @@ Foam::autoPtr<Foam::pointPatchField<Type>> Foam::pointPatchField<Type>::New else { // Use default constraint type - typename dictionaryConstructorTable::iterator patchTypeCstrIter - = dictionaryConstructorTablePtr_->find(p.type()); + auto patchTypeCstrIter + = dictionaryConstructorTablePtr_->cfind(p.type()); if (!patchTypeCstrIter.found()) { @@ -193,15 +191,14 @@ Foam::autoPtr<Foam::pointPatchField<Type>> Foam::pointPatchField<Type>::New InfoInFunction << "Constructing pointPatchField<Type>" << endl; } - typename patchMapperConstructorTable::iterator cstrIter = - patchMapperConstructorTablePtr_->find(ptf.type()); + auto cstrIter = patchMapperConstructorTablePtr_->cfind(ptf.type()); if (!cstrIter.found()) { FatalErrorInFunction << "Unknown patchField type " << ptf.type() << nl << nl - << "Valid patchField types are :" << endl + << "Valid patchField types :" << endl << patchMapperConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/src/OpenFOAM/graph/graph.C b/src/OpenFOAM/graph/graph.C index 105c69bcd5..9f5532575d 100644 --- a/src/OpenFOAM/graph/graph.C +++ b/src/OpenFOAM/graph/graph.C @@ -212,15 +212,14 @@ Foam::autoPtr<Foam::graph::writer> Foam::graph::writer::New << exit(FatalError); } - wordConstructorTable::iterator cstrIter = - wordConstructorTablePtr_->find(graphFormat); + auto cstrIter = wordConstructorTablePtr_->cfind(graphFormat); if (!cstrIter.found()) { FatalErrorInFunction - << "Unknown graph format " << graphFormat - << endl << endl - << "Valid graph formats are : " << endl + << "Unknown graph format " + << graphFormat << nl << nl + << "Valid graph formats :" << endl << wordConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/src/OpenFOAM/interpolations/interpolationTable/tableReaders/tableReader.C b/src/OpenFOAM/interpolations/interpolationTable/tableReaders/tableReader.C index 58060e89fe..b3d96d50b0 100644 --- a/src/OpenFOAM/interpolations/interpolationTable/tableReaders/tableReader.C +++ b/src/OpenFOAM/interpolations/interpolationTable/tableReaders/tableReader.C @@ -39,16 +39,14 @@ Foam::autoPtr<Foam::tableReader<Type>> Foam::tableReader<Type>::New "openFoam" ); - typename dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_ - ->find(readerType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(readerType); if (!cstrIter.found()) { FatalErrorInFunction - << "Unknown reader type " << readerType - << nl << nl - << "Valid reader types : " << nl + << "Unknown reader type " + << readerType << nl << nl + << "Valid reader types :" << nl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } @@ -78,8 +76,7 @@ void Foam::tableReader<Type>::write(Ostream& os) const { if (this->type() != "openFoam") { - os.writeKeyword("readerType") - << this->type() << token::END_STATEMENT << nl; + os.writeEntry("readerType", this->type()); } } diff --git a/src/OpenFOAM/interpolations/interpolationWeights/interpolationWeights/interpolationWeights.C b/src/OpenFOAM/interpolations/interpolationWeights/interpolationWeights/interpolationWeights.C index 59dd7cc0fd..01ee15eabd 100644 --- a/src/OpenFOAM/interpolations/interpolationWeights/interpolationWeights/interpolationWeights.C +++ b/src/OpenFOAM/interpolations/interpolationWeights/interpolationWeights/interpolationWeights.C @@ -27,23 +27,18 @@ License #include "addToRunTimeSelectionTable.H" #include "Time.H" -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // namespace Foam { - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - defineTypeNameAndDebug(interpolationWeights, 0); defineRunTimeSelectionTable(interpolationWeights, word); +} // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -interpolationWeights::interpolationWeights -( - const scalarField& samples -) +Foam::interpolationWeights::interpolationWeights(const scalarField& samples) : samples_(samples) {} @@ -51,7 +46,7 @@ interpolationWeights::interpolationWeights // * * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * // -autoPtr<interpolationWeights> interpolationWeights::New +Foam::autoPtr<Foam::interpolationWeights> Foam::interpolationWeights::New ( const word& type, const scalarField& samples @@ -64,16 +59,14 @@ autoPtr<interpolationWeights> interpolationWeights::New << type << endl; } - wordConstructorTable::iterator cstrIter = - wordConstructorTablePtr_->find(type); + auto cstrIter = wordConstructorTablePtr_->cfind(type); if (!cstrIter.found()) { FatalErrorInFunction << "Unknown interpolationWeights type " - << type - << endl << endl - << "Valid interpolationWeights types are :" << endl + << type << nl << nl + << "Valid interpolationWeights types :" << endl << wordConstructorTablePtr_->sortedToc() << exit(FatalError); } @@ -84,12 +77,8 @@ autoPtr<interpolationWeights> interpolationWeights::New // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // -interpolationWeights::~interpolationWeights() +Foam::interpolationWeights::~interpolationWeights() {} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - // ************************************************************************* // diff --git a/src/OpenFOAM/matrices/LduMatrix/LduMatrix/LduMatrixPreconditioner.C b/src/OpenFOAM/matrices/LduMatrix/LduMatrix/LduMatrixPreconditioner.C index 8e1aa10b79..ad3de4764c 100644 --- a/src/OpenFOAM/matrices/LduMatrix/LduMatrix/LduMatrixPreconditioner.C +++ b/src/OpenFOAM/matrices/LduMatrix/LduMatrix/LduMatrixPreconditioner.C @@ -35,14 +35,14 @@ Foam::LduMatrix<Type, DType, LUType>::preconditioner::New const dictionary& preconditionerDict ) { - word preconditionerName = preconditionerDict.lookup("preconditioner"); + const word preconditionerName = preconditionerDict.lookup("preconditioner"); if (sol.matrix().symmetric()) { - typename symMatrixConstructorTable::iterator constructorIter = - symMatrixConstructorTablePtr_->find(preconditionerName); + auto cstrIter = + symMatrixConstructorTablePtr_->cfind(preconditionerName); - if (!constructorIter.found()) + if (!cstrIter.found()) { FatalIOErrorInFunction ( @@ -50,13 +50,13 @@ Foam::LduMatrix<Type, DType, LUType>::preconditioner::New ) << "Unknown symmetric matrix preconditioner " << preconditionerName << endl << endl << "Valid symmetric matrix preconditioners are :" << endl - << symMatrixConstructorTablePtr_->toc() + << symMatrixConstructorTablePtr_->sortedToc() << exit(FatalIOError); } return autoPtr<typename LduMatrix<Type, DType, LUType>::preconditioner> ( - constructorIter() + cstrIter() ( sol, preconditionerDict @@ -65,10 +65,10 @@ Foam::LduMatrix<Type, DType, LUType>::preconditioner::New } else if (sol.matrix().asymmetric()) { - typename asymMatrixConstructorTable::iterator constructorIter = - asymMatrixConstructorTablePtr_->find(preconditionerName); + auto cstrIter = + asymMatrixConstructorTablePtr_->cfind(preconditionerName); - if (!constructorIter.found()) + if (!cstrIter.found()) { FatalIOErrorInFunction ( @@ -76,13 +76,13 @@ Foam::LduMatrix<Type, DType, LUType>::preconditioner::New ) << "Unknown asymmetric matrix preconditioner " << preconditionerName << endl << endl << "Valid asymmetric matrix preconditioners are :" << endl - << asymMatrixConstructorTablePtr_->toc() + << asymMatrixConstructorTablePtr_->sortedToc() << exit(FatalIOError); } return autoPtr<typename LduMatrix<Type, DType, LUType>::preconditioner> ( - constructorIter() + cstrIter() ( sol, preconditionerDict diff --git a/src/OpenFOAM/matrices/LduMatrix/LduMatrix/LduMatrixSmoother.C b/src/OpenFOAM/matrices/LduMatrix/LduMatrix/LduMatrixSmoother.C index 195871e41f..758dafff9a 100644 --- a/src/OpenFOAM/matrices/LduMatrix/LduMatrix/LduMatrixSmoother.C +++ b/src/OpenFOAM/matrices/LduMatrix/LduMatrix/LduMatrixSmoother.C @@ -40,22 +40,21 @@ Foam::LduMatrix<Type, DType, LUType>::smoother::New if (matrix.symmetric()) { - typename symMatrixConstructorTable::iterator constructorIter = - symMatrixConstructorTablePtr_->find(smootherName); + auto cstrIter = symMatrixConstructorTablePtr_->cfind(smootherName); - if (!constructorIter.found()) + if (!cstrIter.found()) { FatalIOErrorInFunction(smootherDict) << "Unknown symmetric matrix smoother " << smootherName << endl << endl << "Valid symmetric matrix smoothers are :" << endl - << symMatrixConstructorTablePtr_->toc() + << symMatrixConstructorTablePtr_->sortedToc() << exit(FatalIOError); } return autoPtr<typename LduMatrix<Type, DType, LUType>::smoother> ( - constructorIter() + cstrIter() ( fieldName, matrix @@ -64,22 +63,21 @@ Foam::LduMatrix<Type, DType, LUType>::smoother::New } else if (matrix.asymmetric()) { - typename asymMatrixConstructorTable::iterator constructorIter = - asymMatrixConstructorTablePtr_->find(smootherName); + auto cstrIter = asymMatrixConstructorTablePtr_->cfind(smootherName); - if (!constructorIter.found()) + if (!cstrIter.found()) { FatalIOErrorInFunction(smootherDict) << "Unknown asymmetric matrix smoother " << smootherName << endl << endl << "Valid asymmetric matrix smoothers are :" << endl - << asymMatrixConstructorTablePtr_->toc() + << asymMatrixConstructorTablePtr_->sortedToc() << exit(FatalIOError); } return autoPtr<typename LduMatrix<Type, DType, LUType>::smoother> ( - constructorIter() + cstrIter() ( fieldName, matrix diff --git a/src/OpenFOAM/matrices/LduMatrix/LduMatrix/LduMatrixSolver.C b/src/OpenFOAM/matrices/LduMatrix/LduMatrix/LduMatrixSolver.C index 8338abdbf4..6ca7b2a64c 100644 --- a/src/OpenFOAM/matrices/LduMatrix/LduMatrix/LduMatrixSolver.C +++ b/src/OpenFOAM/matrices/LduMatrix/LduMatrix/LduMatrixSolver.C @@ -37,7 +37,7 @@ Foam::LduMatrix<Type, DType, LUType>::solver::New const dictionary& solverDict ) { - word solverName = solverDict.lookup("solver"); + const word solverName = solverDict.lookup("solver"); if (matrix.diagonal()) { @@ -53,22 +53,21 @@ Foam::LduMatrix<Type, DType, LUType>::solver::New } else if (matrix.symmetric()) { - typename symMatrixConstructorTable::iterator constructorIter = - symMatrixConstructorTablePtr_->find(solverName); + auto cstrIter = symMatrixConstructorTablePtr_->cfind(solverName); - if (!constructorIter.found()) + if (!cstrIter.found()) { FatalIOErrorInFunction(solverDict) << "Unknown symmetric matrix solver " << solverName << endl << endl << "Valid symmetric matrix solvers are :" << endl - << symMatrixConstructorTablePtr_->toc() + << symMatrixConstructorTablePtr_->sortedToc() << exit(FatalIOError); } return autoPtr<typename LduMatrix<Type, DType, LUType>::solver> ( - constructorIter() + cstrIter() ( fieldName, matrix, @@ -78,22 +77,21 @@ Foam::LduMatrix<Type, DType, LUType>::solver::New } else if (matrix.asymmetric()) { - typename asymMatrixConstructorTable::iterator constructorIter = - asymMatrixConstructorTablePtr_->find(solverName); + auto cstrIter = asymMatrixConstructorTablePtr_->cfind(solverName); - if (!constructorIter.found()) + if (!cstrIter.found()) { FatalIOErrorInFunction(solverDict) << "Unknown asymmetric matrix solver " << solverName << endl << endl << "Valid asymmetric matrix solvers are :" << endl - << asymMatrixConstructorTablePtr_->toc() + << asymMatrixConstructorTablePtr_->sortedToc() << exit(FatalIOError); } return autoPtr<typename LduMatrix<Type, DType, LUType>::solver> ( - constructorIter() + cstrIter() ( fieldName, matrix, diff --git a/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrixPreconditioner.C b/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrixPreconditioner.C index 36d85e76e8..2d85cca0ae 100644 --- a/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrixPreconditioner.C +++ b/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrixPreconditioner.C @@ -82,10 +82,9 @@ Foam::lduMatrix::preconditioner::New if (sol.matrix().symmetric()) { - symMatrixConstructorTable::iterator constructorIter = - symMatrixConstructorTablePtr_->find(name); + auto cstrIter = symMatrixConstructorTablePtr_->cfind(name); - if (!constructorIter.found()) + if (!cstrIter.found()) { FatalIOErrorInFunction ( @@ -99,7 +98,7 @@ Foam::lduMatrix::preconditioner::New return autoPtr<lduMatrix::preconditioner> ( - constructorIter() + cstrIter() ( sol, controls @@ -108,10 +107,9 @@ Foam::lduMatrix::preconditioner::New } else if (sol.matrix().asymmetric()) { - asymMatrixConstructorTable::iterator constructorIter = - asymMatrixConstructorTablePtr_->find(name); + auto cstrIter = asymMatrixConstructorTablePtr_->cfind(name); - if (!constructorIter.found()) + if (!cstrIter.found()) { FatalIOErrorInFunction ( @@ -125,7 +123,7 @@ Foam::lduMatrix::preconditioner::New return autoPtr<lduMatrix::preconditioner> ( - constructorIter() + cstrIter() ( sol, controls diff --git a/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrixSmoother.C b/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrixSmoother.C index 4692df969b..0edeea6a9c 100644 --- a/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrixSmoother.C +++ b/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrixSmoother.C @@ -86,10 +86,9 @@ Foam::autoPtr<Foam::lduMatrix::smoother> Foam::lduMatrix::smoother::New if (matrix.symmetric()) { - symMatrixConstructorTable::iterator constructorIter = - symMatrixConstructorTablePtr_->find(name); + auto cstrIter = symMatrixConstructorTablePtr_->cfind(name); - if (!constructorIter.found()) + if (!cstrIter.found()) { FatalIOErrorInFunction(solverControls) << "Unknown symmetric matrix smoother " @@ -101,7 +100,7 @@ Foam::autoPtr<Foam::lduMatrix::smoother> Foam::lduMatrix::smoother::New return autoPtr<lduMatrix::smoother> ( - constructorIter() + cstrIter() ( fieldName, matrix, @@ -113,10 +112,9 @@ Foam::autoPtr<Foam::lduMatrix::smoother> Foam::lduMatrix::smoother::New } else if (matrix.asymmetric()) { - asymMatrixConstructorTable::iterator constructorIter = - asymMatrixConstructorTablePtr_->find(name); + auto cstrIter = asymMatrixConstructorTablePtr_->cfind(name); - if (!constructorIter.found()) + if (!cstrIter.found()) { FatalIOErrorInFunction(solverControls) << "Unknown asymmetric matrix smoother " @@ -128,7 +126,7 @@ Foam::autoPtr<Foam::lduMatrix::smoother> Foam::lduMatrix::smoother::New return autoPtr<lduMatrix::smoother> ( - constructorIter() + cstrIter() ( fieldName, matrix, diff --git a/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrixSolver.C b/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrixSolver.C index 5caa6d627c..0bcd04bf4e 100644 --- a/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrixSolver.C +++ b/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrixSolver.C @@ -66,10 +66,9 @@ Foam::autoPtr<Foam::lduMatrix::solver> Foam::lduMatrix::solver::New } else if (matrix.symmetric()) { - symMatrixConstructorTable::iterator constructorIter = - symMatrixConstructorTablePtr_->find(name); + auto cstrIter = symMatrixConstructorTablePtr_->cfind(name); - if (!constructorIter.found()) + if (!cstrIter.found()) { FatalIOErrorInFunction(solverControls) << "Unknown symmetric matrix solver " << name << nl << nl @@ -80,7 +79,7 @@ Foam::autoPtr<Foam::lduMatrix::solver> Foam::lduMatrix::solver::New return autoPtr<lduMatrix::solver> ( - constructorIter() + cstrIter() ( fieldName, matrix, @@ -93,10 +92,9 @@ Foam::autoPtr<Foam::lduMatrix::solver> Foam::lduMatrix::solver::New } else if (matrix.asymmetric()) { - asymMatrixConstructorTable::iterator constructorIter = - asymMatrixConstructorTablePtr_->find(name); + auto cstrIter = asymMatrixConstructorTablePtr_->cfind(name); - if (!constructorIter.found()) + if (!cstrIter.found()) { FatalIOErrorInFunction(solverControls) << "Unknown asymmetric matrix solver " << name << nl << nl @@ -107,7 +105,7 @@ Foam::autoPtr<Foam::lduMatrix::solver> Foam::lduMatrix::solver::New return autoPtr<lduMatrix::solver> ( - constructorIter() + cstrIter() ( fieldName, matrix, 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 d0168688fa..5095e2be6f 100644 --- a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/GAMGAgglomeration/GAMGAgglomeration.C +++ b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/GAMGAgglomeration/GAMGAgglomeration.C @@ -304,17 +304,16 @@ const Foam::GAMGAgglomeration& Foam::GAMGAgglomeration::New lduMeshConstructorTablePtr_ ); - lduMeshConstructorTable::iterator cstrIter = - lduMeshConstructorTablePtr_->find(agglomeratorType); + auto cstrIter = lduMeshConstructorTablePtr_->cfind(agglomeratorType); if (!cstrIter.found()) { FatalErrorInFunction << "Unknown GAMGAgglomeration type " << agglomeratorType << ".\n" - << "Valid matrix GAMGAgglomeration types are :" + << "Valid matrix GAMGAgglomeration types :" << lduMatrixConstructorTablePtr_->sortedToc() << endl - << "Valid geometric GAMGAgglomeration types are :" + << "Valid geometric GAMGAgglomeration types :" << lduMeshConstructorTablePtr_->sortedToc() << exit(FatalError); } @@ -369,8 +368,8 @@ const Foam::GAMGAgglomeration& Foam::GAMGAgglomeration::New } else { - lduMatrixConstructorTable::iterator cstrIter = - lduMatrixConstructorTablePtr_->find(agglomeratorType); + auto cstrIter = + lduMatrixConstructorTablePtr_->cfind(agglomeratorType); return store(cstrIter()(matrix, controlDict).ptr()); } @@ -405,15 +404,14 @@ Foam::autoPtr<Foam::GAMGAgglomeration> Foam::GAMGAgglomeration::New geometryConstructorTablePtr_ ); - geometryConstructorTable::iterator cstrIter = - geometryConstructorTablePtr_->find(agglomeratorType); + auto cstrIter = geometryConstructorTablePtr_->cfind(agglomeratorType); if (!cstrIter.found()) { FatalErrorInFunction << "Unknown GAMGAgglomeration type " << agglomeratorType << ".\n" - << "Valid geometric GAMGAgglomeration types are :" + << "Valid geometric GAMGAgglomeration types :" << geometryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGProcAgglomerations/GAMGProcAgglomeration/GAMGProcAgglomeration.C b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGProcAgglomerations/GAMGProcAgglomeration/GAMGProcAgglomeration.C index 642151da87..96849e559c 100644 --- a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGProcAgglomerations/GAMGProcAgglomeration/GAMGProcAgglomeration.C +++ b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGProcAgglomerations/GAMGProcAgglomeration/GAMGProcAgglomeration.C @@ -361,15 +361,14 @@ Foam::autoPtr<Foam::GAMGProcAgglomeration> Foam::GAMGProcAgglomeration::New InfoInFunction << "Constructing GAMGProcAgglomeration" << endl; } - GAMGAgglomerationConstructorTable::iterator cstrIter = - GAMGAgglomerationConstructorTablePtr_->find(type); + auto cstrIter = GAMGAgglomerationConstructorTablePtr_->cfind(type); if (!cstrIter.found()) { FatalErrorInFunction << "Unknown GAMGProcAgglomeration type " << type << " for GAMGAgglomeration " << agglom.type() << nl << nl - << "Valid GAMGProcAgglomeration types are :" << endl + << "Valid GAMGProcAgglomeration types :" << endl << GAMGAgglomerationConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/interfaceFields/GAMGInterfaceField/GAMGInterfaceFieldNew.C b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/interfaceFields/GAMGInterfaceField/GAMGInterfaceFieldNew.C index dda2e9024d..d10610212c 100644 --- a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/interfaceFields/GAMGInterfaceField/GAMGInterfaceFieldNew.C +++ b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/interfaceFields/GAMGInterfaceField/GAMGInterfaceFieldNew.C @@ -35,15 +35,14 @@ Foam::autoPtr<Foam::GAMGInterfaceField> Foam::GAMGInterfaceField::New { const word coupleType(fineInterface.interfaceFieldType()); - lduInterfaceFieldConstructorTable::iterator cstrIter = - lduInterfaceFieldConstructorTablePtr_->find(coupleType); + auto cstrIter = lduInterfaceFieldConstructorTablePtr_->cfind(coupleType); if (!cstrIter.found()) { FatalErrorInFunction << "Unknown GAMGInterfaceField type " << coupleType << nl - << "Valid GAMGInterfaceField types are :" + << "Valid GAMGInterfaceField types :" << lduInterfaceFieldConstructorTablePtr_->sortedToc() << exit(FatalError); } @@ -61,15 +60,14 @@ Foam::autoPtr<Foam::GAMGInterfaceField> Foam::GAMGInterfaceField::New { const word coupleType(GAMGCp.type()); - lduInterfaceConstructorTable::iterator cstrIter = - lduInterfaceConstructorTablePtr_->find(coupleType); + auto cstrIter = lduInterfaceConstructorTablePtr_->cfind(coupleType); if (!cstrIter.found()) { FatalErrorInFunction << "Unknown GAMGInterfaceField type " << coupleType << nl - << "Valid GAMGInterfaceField types are :" + << "Valid GAMGInterfaceField types :" << lduInterfaceConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/interfaces/GAMGInterface/GAMGInterfaceNew.C b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/interfaces/GAMGInterface/GAMGInterfaceNew.C index 686fe2094e..284757c98f 100644 --- a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/interfaces/GAMGInterface/GAMGInterfaceNew.C +++ b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/interfaces/GAMGInterface/GAMGInterfaceNew.C @@ -43,14 +43,13 @@ Foam::autoPtr<Foam::GAMGInterface> Foam::GAMGInterface::New { const word coupleType(fineInterface.type()); - lduInterfaceConstructorTable::iterator cstrIter = - lduInterfaceConstructorTablePtr_->find(coupleType); + auto cstrIter = lduInterfaceConstructorTablePtr_->cfind(coupleType); if (!cstrIter.found()) { FatalErrorInFunction << "Unknown GAMGInterface type " << coupleType << ".\n" - << "Valid GAMGInterface types are :" + << "Valid GAMGInterface types :" << lduInterfaceConstructorTablePtr_->sortedToc() << exit(FatalError); } @@ -79,14 +78,13 @@ Foam::autoPtr<Foam::GAMGInterface> Foam::GAMGInterface::New Istream& is ) { - IstreamConstructorTable::iterator cstrIter = - IstreamConstructorTablePtr_->find(coupleType); + auto cstrIter = IstreamConstructorTablePtr_->cfind(coupleType); if (!cstrIter.found()) { FatalErrorInFunction << "Unknown GAMGInterface type " << coupleType << ".\n" - << "Valid GAMGInterface types are :" + << "Valid GAMGInterface types :" << IstreamConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/src/OpenFOAM/meshes/pointMesh/pointPatches/facePointPatch/facePointPatchNew.C b/src/OpenFOAM/meshes/pointMesh/pointPatches/facePointPatch/facePointPatchNew.C index 69e76fe3b6..04aaeffd4d 100644 --- a/src/OpenFOAM/meshes/pointMesh/pointPatches/facePointPatch/facePointPatchNew.C +++ b/src/OpenFOAM/meshes/pointMesh/pointPatches/facePointPatch/facePointPatchNew.C @@ -38,16 +38,14 @@ Foam::autoPtr<Foam::facePointPatch> Foam::facePointPatch::New InfoInFunction << "Constructing facePointPatch" << endl; } - polyPatchConstructorTable::iterator cstrIter = - polyPatchConstructorTablePtr_->find(patch.type()); + auto cstrIter = polyPatchConstructorTablePtr_->cfind(patch.type()); if (!cstrIter.found()) { FatalErrorInFunction << "Unknown facePointPatch type " - << patch.type() - << nl << nl - << "Valid facePointPatch types are :" << endl + << patch.type() << nl << nl + << "Valid facePointPatch types :" << endl << polyPatchConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/src/OpenFOAM/meshes/polyMesh/polyPatches/polyPatch/polyPatch.C b/src/OpenFOAM/meshes/polyMesh/polyPatches/polyPatch/polyPatch.C index 7a26581fe7..bd14deffc6 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyPatches/polyPatch/polyPatch.C +++ b/src/OpenFOAM/meshes/polyMesh/polyPatches/polyPatch/polyPatch.C @@ -279,13 +279,7 @@ Foam::wordList Foam::polyPatch::constraintTypes() label i = 0; - for - ( - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->begin(); - cstrIter != dictionaryConstructorTablePtr_->end(); - ++cstrIter - ) + forAllConstIters(*dictionaryConstructorTablePtr_, cstrIter) { if (constraintType(cstrIter.key())) { diff --git a/src/OpenFOAM/meshes/polyMesh/polyPatches/polyPatch/polyPatchNew.C b/src/OpenFOAM/meshes/polyMesh/polyPatches/polyPatch/polyPatchNew.C index 97d8f602c0..f8289222d8 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyPatches/polyPatch/polyPatchNew.C +++ b/src/OpenFOAM/meshes/polyMesh/polyPatches/polyPatch/polyPatchNew.C @@ -43,15 +43,14 @@ Foam::autoPtr<Foam::polyPatch> Foam::polyPatch::New InfoInFunction << "Constructing polyPatch" << endl; } - wordConstructorTable::iterator cstrIter = - wordConstructorTablePtr_->find(patchType); + auto cstrIter = wordConstructorTablePtr_->cfind(patchType); if (!cstrIter.found()) { FatalErrorInFunction << "Unknown polyPatch type " << patchType << " for patch " << name << nl << nl - << "Valid polyPatch types are :" << endl + << "Valid polyPatch types :" << endl << wordConstructorTablePtr_->sortedToc() << exit(FatalError); } @@ -105,14 +104,13 @@ Foam::autoPtr<Foam::polyPatch> Foam::polyPatch::New InfoInFunction << "Constructing polyPatch" << endl; } - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(patchType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(patchType); if (!cstrIter.found()) { if (!disallowGenericPolyPatch) { - cstrIter = dictionaryConstructorTablePtr_->find("genericPatch"); + cstrIter = dictionaryConstructorTablePtr_->cfind("genericPatch"); } if (!cstrIter.found()) @@ -122,7 +120,7 @@ Foam::autoPtr<Foam::polyPatch> Foam::polyPatch::New dict ) << "Unknown polyPatch type " << patchType << " for patch " << name << nl << nl - << "Valid polyPatch types are :" << endl + << "Valid polyPatch types :" << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalIOError); } diff --git a/src/OpenFOAM/meshes/polyMesh/zones/cellZone/cellZoneNew.C b/src/OpenFOAM/meshes/polyMesh/zones/cellZone/cellZoneNew.C index 2281285c07..ae9efcb289 100644 --- a/src/OpenFOAM/meshes/polyMesh/zones/cellZone/cellZoneNew.C +++ b/src/OpenFOAM/meshes/polyMesh/zones/cellZone/cellZoneNew.C @@ -43,8 +43,7 @@ Foam::autoPtr<Foam::cellZone> Foam::cellZone::New const word zoneType(dict.lookup("type")); - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(zoneType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(zoneType); if (!cstrIter.found()) { @@ -53,7 +52,7 @@ Foam::autoPtr<Foam::cellZone> Foam::cellZone::New dict ) << "Unknown cellZone type " << zoneType << nl << nl - << "Valid cellZone types are:" << nl + << "Valid cellZone types :" << nl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalIOError); } diff --git a/src/OpenFOAM/meshes/polyMesh/zones/faceZone/faceZoneNew.C b/src/OpenFOAM/meshes/polyMesh/zones/faceZone/faceZoneNew.C index b7d1e7a8d9..58acaf9ce2 100644 --- a/src/OpenFOAM/meshes/polyMesh/zones/faceZone/faceZoneNew.C +++ b/src/OpenFOAM/meshes/polyMesh/zones/faceZone/faceZoneNew.C @@ -43,8 +43,7 @@ Foam::autoPtr<Foam::faceZone> Foam::faceZone::New const word zoneType(dict.lookup("type")); - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(zoneType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(zoneType); if (!cstrIter.found()) { @@ -53,7 +52,7 @@ Foam::autoPtr<Foam::faceZone> Foam::faceZone::New dict ) << "Unknown faceZone type " << zoneType << nl << nl - << "Valid faceZone types are:" << nl + << "Valid faceZone types :" << nl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalIOError); } diff --git a/src/OpenFOAM/meshes/polyMesh/zones/pointZone/pointZoneNew.C b/src/OpenFOAM/meshes/polyMesh/zones/pointZone/pointZoneNew.C index e17d645b4a..a27c65d5b9 100644 --- a/src/OpenFOAM/meshes/polyMesh/zones/pointZone/pointZoneNew.C +++ b/src/OpenFOAM/meshes/polyMesh/zones/pointZone/pointZoneNew.C @@ -43,8 +43,7 @@ Foam::autoPtr<Foam::pointZone> Foam::pointZone::New const word zoneType(dict.lookup("type")); - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(zoneType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(zoneType); if (!cstrIter.found()) { @@ -53,7 +52,7 @@ Foam::autoPtr<Foam::pointZone> Foam::pointZone::New dict ) << "Unknown pointZone type " << zoneType << nl << nl - << "Valid pointZone types are:" << nl + << "Valid pointZone types :" << nl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalIOError); } diff --git a/src/OpenFOAM/primitives/functions/Function1/Function1/Function1New.C b/src/OpenFOAM/primitives/functions/Function1/Function1/Function1New.C index b9a8682a0b..fe97b5acc2 100644 --- a/src/OpenFOAM/primitives/functions/Function1/Function1/Function1New.C +++ b/src/OpenFOAM/primitives/functions/Function1/Function1/Function1New.C @@ -40,8 +40,7 @@ Foam::autoPtr<Foam::Function1<Type>> Foam::Function1<Type>::New const word Function1Type(coeffsDict.lookup("type")); - typename dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(Function1Type); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(Function1Type); if (!cstrIter.found()) { @@ -49,7 +48,7 @@ Foam::autoPtr<Foam::Function1<Type>> Foam::Function1<Type>::New << "Unknown Function1 type " << Function1Type << " for Function1 " << entryName << nl << nl - << "Valid Function1 types are:" << nl + << "Valid Function1 types :" << nl << dictionaryConstructorTablePtr_->sortedToc() << nl << exit(FatalError); } @@ -76,8 +75,7 @@ Foam::autoPtr<Foam::Function1<Type>> Foam::Function1<Type>::New Function1Type = firstToken.wordToken(); } - typename dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(Function1Type); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(Function1Type); if (!cstrIter.found()) { @@ -85,7 +83,7 @@ Foam::autoPtr<Foam::Function1<Type>> Foam::Function1<Type>::New << "Unknown Function1 type " << Function1Type << " for Function1 " << entryName << nl << nl - << "Valid Function1 types are:" << nl + << "Valid Function1 types :" << nl << dictionaryConstructorTablePtr_->sortedToc() << nl << exit(FatalError); } diff --git a/src/TurbulenceModels/turbulenceModels/LES/LESModel/LESModel.C b/src/TurbulenceModels/turbulenceModels/LES/LESModel/LESModel.C index 5257a4c52a..0bd80034de 100644 --- a/src/TurbulenceModels/turbulenceModels/LES/LESModel/LESModel.C +++ b/src/TurbulenceModels/turbulenceModels/LES/LESModel/LESModel.C @@ -153,8 +153,7 @@ Foam::LESModel<BasicTurbulenceModel>::New Info<< "Selecting LES turbulence model " << modelType << endl; - typename dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(modelType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { diff --git a/src/TurbulenceModels/turbulenceModels/LES/LESdeltas/LESdelta/LESdelta.C b/src/TurbulenceModels/turbulenceModels/LES/LESdeltas/LESdelta/LESdelta.C index 0f0cafba0b..1cdb6fd53b 100644 --- a/src/TurbulenceModels/turbulenceModels/LES/LESdeltas/LESdelta/LESdelta.C +++ b/src/TurbulenceModels/turbulenceModels/LES/LESdeltas/LESdelta/LESdelta.C @@ -73,15 +73,14 @@ Foam::autoPtr<Foam::LESdelta> Foam::LESdelta::New Info<< "Selecting LES delta type " << deltaType << endl; - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(deltaType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(deltaType); if (!cstrIter.found()) { FatalErrorInFunction << "Unknown LESdelta type " << deltaType << nl << nl - << "Valid LESdelta types are :" << endl + << "Valid LESdelta types :" << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } @@ -102,36 +101,31 @@ Foam::autoPtr<Foam::LESdelta> Foam::LESdelta::New Info<< "Selecting LES delta type " << deltaType << endl; - // First on additional ones - dictionaryConstructorTable::const_iterator cstrIter = - additionalConstructors.find(deltaType); - - if (cstrIter != additionalConstructors.end()) - { - return autoPtr<LESdelta>(cstrIter()(name, turbulence, dict)); - } - else + // First any additional ones { - dictionaryConstructorTable::const_iterator cstrIter = - dictionaryConstructorTablePtr_->find(deltaType); + auto cstrIter = additionalConstructors.cfind(deltaType); - if (!cstrIter.found()) - { - FatalErrorInFunction - << "Unknown LESdelta type " - << deltaType << nl << nl - << "Valid LESdelta types are :" << endl - << additionalConstructors.sortedToc() - << " and " - << dictionaryConstructorTablePtr_->sortedToc() - << exit(FatalError); - return autoPtr<LESdelta>(); - } - else + if (cstrIter.found()) { return autoPtr<LESdelta>(cstrIter()(name, turbulence, dict)); } } + + auto cstrIter = dictionaryConstructorTablePtr_->cfind(deltaType); + + if (!cstrIter.found()) + { + FatalErrorInFunction + << "Unknown LESdelta type " + << deltaType << nl << nl + << "Valid LESdelta types :" << endl + << additionalConstructors.sortedToc() + << " and " + << dictionaryConstructorTablePtr_->sortedToc() + << exit(FatalError); + } + + return autoPtr<LESdelta>(cstrIter()(name, turbulence, dict)); } diff --git a/src/TurbulenceModels/turbulenceModels/LES/LESfilters/LESfilter/LESfilter.C b/src/TurbulenceModels/turbulenceModels/LES/LESfilters/LESfilter/LESfilter.C index dba84f07f8..ae7017eb91 100644 --- a/src/TurbulenceModels/turbulenceModels/LES/LESfilters/LESfilter/LESfilter.C +++ b/src/TurbulenceModels/turbulenceModels/LES/LESfilters/LESfilter/LESfilter.C @@ -46,15 +46,14 @@ Foam::autoPtr<Foam::LESfilter> Foam::LESfilter::New { const word filterType(dict.lookup(filterDictName)); - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(filterType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(filterType); if (!cstrIter.found()) { FatalErrorInFunction << "Unknown LESfilter type " << filterType << nl << nl - << "Valid LESfilter types are :" << endl + << "Valid LESfilter types :" << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/src/TurbulenceModels/turbulenceModels/RAS/RASModel/RASModel.C b/src/TurbulenceModels/turbulenceModels/RAS/RASModel/RASModel.C index a4b283ff78..424c286f79 100644 --- a/src/TurbulenceModels/turbulenceModels/RAS/RASModel/RASModel.C +++ b/src/TurbulenceModels/turbulenceModels/RAS/RASModel/RASModel.C @@ -143,8 +143,7 @@ Foam::RASModel<BasicTurbulenceModel>::New Info<< "Selecting RAS turbulence model " << modelType << endl; - typename dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(modelType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { diff --git a/src/TurbulenceModels/turbulenceModels/TurbulenceModel/TurbulenceModel.C b/src/TurbulenceModels/turbulenceModels/TurbulenceModel/TurbulenceModel.C index 8593c72df5..18d5be2cb9 100644 --- a/src/TurbulenceModels/turbulenceModels/TurbulenceModel/TurbulenceModel.C +++ b/src/TurbulenceModels/turbulenceModels/TurbulenceModel/TurbulenceModel.C @@ -105,15 +105,14 @@ Foam::TurbulenceModel<Alpha, Rho, BasicTurbulenceModel, TransportModel>::New Info<< "Selecting turbulence model type " << modelType << endl; - typename dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(modelType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { FatalErrorInFunction - << "Unknown TurbulenceModel type " + << "Unknown simulationType " << modelType << nl << nl - << "Valid TurbulenceModel types:" << endl + << "Valid simulation types:" << nl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/src/TurbulenceModels/turbulenceModels/laminar/laminarModel/laminarModel.C b/src/TurbulenceModels/turbulenceModels/laminar/laminarModel/laminarModel.C index 33bba64b66..44e0556bc5 100644 --- a/src/TurbulenceModels/turbulenceModels/laminar/laminarModel/laminarModel.C +++ b/src/TurbulenceModels/turbulenceModels/laminar/laminarModel/laminarModel.C @@ -114,15 +114,14 @@ Foam::laminarModel<BasicTurbulenceModel>::New Info<< "Selecting laminar stress model " << modelType << endl; - typename dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(modelType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { FatalErrorInFunction << "Unknown laminarModel type " << modelType << nl << nl - << "Valid laminarModel types:" << endl + << "Valid laminarModel types :" << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/src/combustionModels/FSD/reactionRateFlameAreaModels/reactionRateFlameArea/reactionRateFlameAreaNew.C b/src/combustionModels/FSD/reactionRateFlameAreaModels/reactionRateFlameArea/reactionRateFlameAreaNew.C index cefaf8a127..2154d2cc94 100644 --- a/src/combustionModels/FSD/reactionRateFlameAreaModels/reactionRateFlameArea/reactionRateFlameAreaNew.C +++ b/src/combustionModels/FSD/reactionRateFlameAreaModels/reactionRateFlameArea/reactionRateFlameAreaNew.C @@ -42,8 +42,8 @@ Foam::autoPtr<Foam::reactionRateFlameArea> Foam::reactionRateFlameArea::New Info<< "Selecting reaction rate flame area correlation " << reactionRateFlameAreaType << endl; - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(reactionRateFlameAreaType); + auto cstrIter = + dictionaryConstructorTablePtr_->cfind(reactionRateFlameAreaType); if (!cstrIter.found()) { @@ -51,9 +51,9 @@ Foam::autoPtr<Foam::reactionRateFlameArea> Foam::reactionRateFlameArea::New ( dict ) << "Unknown reactionRateFlameArea type " - << reactionRateFlameAreaType << endl << endl - << "Valid reaction rate flame area types are :" << endl - << dictionaryConstructorTablePtr_->toc() + << reactionRateFlameAreaType << nl << nl + << "Valid reaction rate flame area types :" << endl + << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalIOError); } diff --git a/src/combustionModels/psiCombustionModel/psiCombustionModel/psiCombustionModelNew.C b/src/combustionModels/psiCombustionModel/psiCombustionModel/psiCombustionModelNew.C index 76c2fb76ae..ca7d0616b8 100644 --- a/src/combustionModels/psiCombustionModel/psiCombustionModel/psiCombustionModelNew.C +++ b/src/combustionModels/psiCombustionModel/psiCombustionModel/psiCombustionModelNew.C @@ -53,16 +53,15 @@ Foam::combustionModels::psiCombustionModel::New Info<< "Selecting combustion model " << combModelName << endl; - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(combModelName); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(combModelName); if (!cstrIter.found()) { FatalErrorInFunction << "Unknown psiCombustionModel type " << combModelName << endl << endl - << "Valid combustionModels are : " << endl - << dictionaryConstructorTablePtr_->toc() + << "Valid combustionModel types :" << endl + << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/src/combustionModels/rhoCombustionModel/rhoCombustionModel/rhoCombustionModelNew.C b/src/combustionModels/rhoCombustionModel/rhoCombustionModel/rhoCombustionModelNew.C index 6060d2acc5..f6ffadc0b6 100644 --- a/src/combustionModels/rhoCombustionModel/rhoCombustionModel/rhoCombustionModelNew.C +++ b/src/combustionModels/rhoCombustionModel/rhoCombustionModel/rhoCombustionModelNew.C @@ -53,16 +53,15 @@ Foam::combustionModels::rhoCombustionModel::New Info<< "Selecting combustion model " << combTypeName << endl; - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(combTypeName); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(combTypeName); if (!cstrIter.found()) { FatalErrorInFunction << "Unknown rhoCombustionModel type " << combTypeName << endl << endl - << "Valid combustionModels are : " << endl - << dictionaryConstructorTablePtr_->toc() + << "Valid combustionModel types :" << endl + << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/src/dynamicFvMesh/dynamicFvMesh/dynamicFvMeshNew.C b/src/dynamicFvMesh/dynamicFvMesh/dynamicFvMeshNew.C index d9edadcc3f..aa4a74a790 100644 --- a/src/dynamicFvMesh/dynamicFvMesh/dynamicFvMeshNew.C +++ b/src/dynamicFvMesh/dynamicFvMesh/dynamicFvMeshNew.C @@ -68,15 +68,14 @@ Foam::autoPtr<Foam::dynamicFvMesh> Foam::dynamicFvMesh::New(const IOobject& io) << exit(FatalError); } - IOobjectConstructorTable::iterator cstrIter = - IOobjectConstructorTablePtr_->find(dynamicFvMeshTypeName); + auto cstrIter = IOobjectConstructorTablePtr_->cfind(dynamicFvMeshTypeName); if (!cstrIter.found()) { FatalErrorInFunction << "Unknown dynamicFvMesh type " << dynamicFvMeshTypeName << nl << nl - << "Valid dynamicFvMesh types are :" << endl + << "Valid dynamicFvMesh types :" << endl << IOobjectConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/src/dynamicMesh/meshCut/cellLooper/cellLooper.C b/src/dynamicMesh/meshCut/cellLooper/cellLooper.C index 629d16a478..9345538266 100644 --- a/src/dynamicMesh/meshCut/cellLooper/cellLooper.C +++ b/src/dynamicMesh/meshCut/cellLooper/cellLooper.C @@ -45,15 +45,14 @@ Foam::autoPtr<Foam::cellLooper> Foam::cellLooper::New const polyMesh& mesh ) { - wordConstructorTable::iterator cstrIter = - wordConstructorTablePtr_->find(type); + auto cstrIter = wordConstructorTablePtr_->cfind(type); if (!cstrIter.found()) { FatalErrorInFunction - << "Unknown set type " + << "Unknown cellLooper type " << type << nl << nl - << "Valid cellLooper types : " << endl + << "Valid cellLooper types :" << endl << wordConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/src/dynamicMesh/motionSolvers/displacement/displacement/displacementMotionSolver.C b/src/dynamicMesh/motionSolvers/displacement/displacement/displacementMotionSolver.C index 6a8dbe3640..cfff04f05f 100644 --- a/src/dynamicMesh/motionSolvers/displacement/displacement/displacementMotionSolver.C +++ b/src/dynamicMesh/motionSolvers/displacement/displacement/displacementMotionSolver.C @@ -107,15 +107,14 @@ Foam::displacementMotionSolver::New << exit(FatalError); } - displacementConstructorTable::iterator cstrIter = - displacementConstructorTablePtr_->find(solverTypeName); + auto cstrIter = displacementConstructorTablePtr_->cfind(solverTypeName); if (!cstrIter.found()) { FatalErrorInFunction << "Unknown solver type " << solverTypeName << nl << nl - << "Valid solver types are:" << endl + << "Valid solver types :" << endl << displacementConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/src/dynamicMesh/motionSolvers/displacement/solidBody/solidBodyMotionFunctions/solidBodyMotionFunction/solidBodyMotionFunctionNew.C b/src/dynamicMesh/motionSolvers/displacement/solidBody/solidBodyMotionFunctions/solidBodyMotionFunction/solidBodyMotionFunctionNew.C index 911c888101..3ff7098ca0 100644 --- a/src/dynamicMesh/motionSolvers/displacement/solidBody/solidBodyMotionFunctions/solidBodyMotionFunction/solidBodyMotionFunctionNew.C +++ b/src/dynamicMesh/motionSolvers/displacement/solidBody/solidBodyMotionFunctions/solidBodyMotionFunction/solidBodyMotionFunctionNew.C @@ -37,15 +37,14 @@ Foam::autoPtr<Foam::solidBodyMotionFunction> Foam::solidBodyMotionFunction::New Info<< "Selecting solid-body motion function " << motionType << endl; - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(motionType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(motionType); if (!cstrIter.found()) { FatalErrorInFunction << "Unknown solidBodyMotionFunction type " << motionType << nl << nl - << "Valid solidBodyMotionFunctions are : " << endl + << "Valid solidBodyMotionFunction types :" << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/src/dynamicMesh/motionSolvers/motionSolver/motionSolver.C b/src/dynamicMesh/motionSolvers/motionSolver/motionSolver.C index a3d8580554..054524a29b 100644 --- a/src/dynamicMesh/motionSolvers/motionSolver/motionSolver.C +++ b/src/dynamicMesh/motionSolvers/motionSolver/motionSolver.C @@ -104,14 +104,14 @@ Foam::autoPtr<Foam::motionSolver> Foam::motionSolver::New const IOdictionary& solverDict ) { - const word solverTypeName + const word solverName ( solverDict.found("motionSolver") ? solverDict.lookup("motionSolver") : solverDict.lookup("solver") ); - Info<< "Selecting motion solver: " << solverTypeName << endl; + Info<< "Selecting motion solver: " << solverName << endl; const_cast<Time&>(mesh.time()).libs().open ( @@ -127,15 +127,14 @@ Foam::autoPtr<Foam::motionSolver> Foam::motionSolver::New << exit(FatalError); } - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(solverTypeName); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(solverName); if (!cstrIter.found()) { FatalErrorInFunction << "Unknown solver type " - << solverTypeName << nl << nl - << "Valid solver types are:" << endl + << solverName << nl << nl + << "Valid solver types :" << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/src/dynamicMesh/polyTopoChange/polyMeshModifier/polyMeshModifierNew.C b/src/dynamicMesh/polyTopoChange/polyMeshModifier/polyMeshModifierNew.C index f445f1a348..2569a86ce4 100644 --- a/src/dynamicMesh/polyTopoChange/polyMeshModifier/polyMeshModifierNew.C +++ b/src/dynamicMesh/polyTopoChange/polyMeshModifier/polyMeshModifierNew.C @@ -43,8 +43,7 @@ Foam::autoPtr<Foam::polyMeshModifier> Foam::polyMeshModifier::New const word modifierType(dict.lookup("type")); - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(modifierType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modifierType); if (!cstrIter.found()) { @@ -53,7 +52,7 @@ Foam::autoPtr<Foam::polyMeshModifier> Foam::polyMeshModifier::New dict ) << "Unknown polyMeshModifier type " << modifierType << nl << nl - << "Valid polyMeshModifier types are :" << endl + << "Valid polyMeshModifier types :" << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalIOError); } diff --git a/src/engine/engineMesh/engineMesh/engineMeshNew.C b/src/engine/engineMesh/engineMesh/engineMeshNew.C index 8d074d8e9c..38e23f1b5b 100644 --- a/src/engine/engineMesh/engineMesh/engineMeshNew.C +++ b/src/engine/engineMesh/engineMesh/engineMeshNew.C @@ -53,15 +53,14 @@ Foam::autoPtr<Foam::engineMesh> Foam::engineMesh::New Info<< "Selecting engineMesh " << modelType << endl; - IOobjectConstructorTable::iterator cstrIter = - IOobjectConstructorTablePtr_->find(modelType); + auto cstrIter = IOobjectConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { FatalErrorInFunction << "Unknown engineMesh type " << modelType << nl << nl - << "Valid engineMesh types are :" << endl + << "Valid engineMesh types :" << endl << IOobjectConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/src/fileFormats/sampledSetWriters/writer.C b/src/fileFormats/sampledSetWriters/writer.C index 64b9743203..0caac20548 100644 --- a/src/fileFormats/sampledSetWriters/writer.C +++ b/src/fileFormats/sampledSetWriters/writer.C @@ -36,15 +36,14 @@ Foam::autoPtr<Foam::writer<Type>> Foam::writer<Type>::New const word& writeType ) { - typename wordConstructorTable::iterator cstrIter = - wordConstructorTablePtr_->find(writeType); + auto cstrIter = wordConstructorTablePtr_->cfind(writeType); if (!cstrIter.found()) { FatalErrorInFunction << "Unknown write type " << writeType << nl << nl - << "Valid write types : " << endl + << "Valid write types :" << endl << wordConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/src/finiteVolume/cfdTools/general/SRF/SRFModel/SRFModel/SRFModelNew.C b/src/finiteVolume/cfdTools/general/SRF/SRFModel/SRFModel/SRFModelNew.C index ce5a5d148b..6851c76951 100644 --- a/src/finiteVolume/cfdTools/general/SRF/SRFModel/SRFModel/SRFModelNew.C +++ b/src/finiteVolume/cfdTools/general/SRF/SRFModel/SRFModel/SRFModelNew.C @@ -52,15 +52,14 @@ Foam::autoPtr<Foam::SRF::SRFModel> Foam::SRF::SRFModel::New Info<< "Selecting SRFModel " << modelType << endl; - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(modelType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { FatalErrorInFunction << "Unknown SRFModel type " << modelType << nl << nl - << "Valid SRFModel types are :" << nl + << "Valid SRFModel types :" << nl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/src/finiteVolume/cfdTools/general/fvOptions/fvOption.C b/src/finiteVolume/cfdTools/general/fvOptions/fvOption.C index f63fd852bf..76042ef024 100644 --- a/src/finiteVolume/cfdTools/general/fvOptions/fvOption.C +++ b/src/finiteVolume/cfdTools/general/fvOptions/fvOption.C @@ -70,10 +70,10 @@ Foam::autoPtr<Foam::fv::option> Foam::fv::option::New const fvMesh& mesh ) { - word modelType(coeffs.lookup("type")); + const word modelType(coeffs.lookup("type")); Info<< indent - << "Selecting finite volume options model type " << modelType << endl; + << "Selecting finite volume options type " << modelType << endl; const_cast<Time&>(mesh.time()).libs().open ( @@ -82,14 +82,14 @@ Foam::autoPtr<Foam::fv::option> Foam::fv::option::New dictionaryConstructorTablePtr_ ); - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(modelType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { FatalErrorInFunction - << "Unknown Model type " << modelType << nl << nl - << "Valid model types are:" << nl + << "Unknown fvOption model type " + << modelType << nl << nl + << "Valid fvOption types are:" << nl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/src/finiteVolume/cfdTools/general/porosityModel/porosityModel/porosityModelNew.C b/src/finiteVolume/cfdTools/general/porosityModel/porosityModel/porosityModelNew.C index e45f4a2964..811023faaa 100644 --- a/src/finiteVolume/cfdTools/general/porosityModel/porosityModel/porosityModelNew.C +++ b/src/finiteVolume/cfdTools/general/porosityModel/porosityModel/porosityModelNew.C @@ -40,8 +40,7 @@ Foam::autoPtr<Foam::porosityModel> Foam::porosityModel::New Info<< "Porosity region " << name << ":" << nl << " selecting model: " << modelType << endl; - meshConstructorTable::iterator cstrIter = - meshConstructorTablePtr_->find(modelType); + auto cstrIter = meshConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { diff --git a/src/finiteVolume/fields/fvPatchFields/basic/calculated/calculatedFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/basic/calculated/calculatedFvPatchField.C index 0f205cd057..27f2d4f98f 100644 --- a/src/finiteVolume/fields/fvPatchFields/basic/calculated/calculatedFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/basic/calculated/calculatedFvPatchField.C @@ -102,8 +102,7 @@ Foam::fvPatchField<Type>::NewCalculatedType const fvPatch& p ) { - typename patchConstructorTable::iterator patchTypeCstrIter = - patchConstructorTablePtr_->find(p.type()); + auto patchTypeCstrIter = patchConstructorTablePtr_->cfind(p.type()); if (patchTypeCstrIter.found()) { diff --git a/src/finiteVolume/fields/fvPatchFields/fvPatchField/fvPatchFieldNew.C b/src/finiteVolume/fields/fvPatchFields/fvPatchField/fvPatchFieldNew.C index bf62d071dc..866c8a48a5 100644 --- a/src/finiteVolume/fields/fvPatchFields/fvPatchField/fvPatchFieldNew.C +++ b/src/finiteVolume/fields/fvPatchFields/fvPatchField/fvPatchFieldNew.C @@ -42,21 +42,19 @@ Foam::tmp<Foam::fvPatchField<Type>> Foam::fvPatchField<Type>::New << endl; } - typename patchConstructorTable::iterator cstrIter = - patchConstructorTablePtr_->find(patchFieldType); + auto cstrIter = patchConstructorTablePtr_->cfind(patchFieldType); if (!cstrIter.found()) { FatalErrorInFunction << "Unknown patchField type " << patchFieldType << nl << nl - << "Valid patchField types are :" << endl + << "Valid patchField types :" << endl << patchConstructorTablePtr_->sortedToc() << exit(FatalError); } - typename patchConstructorTable::iterator patchTypeCstrIter = - patchConstructorTablePtr_->find(p.type()); + auto patchTypeCstrIter = patchConstructorTablePtr_->cfind(p.type()); if ( @@ -116,14 +114,13 @@ Foam::tmp<Foam::fvPatchField<Type>> Foam::fvPatchField<Type>::New << endl; } - typename dictionaryConstructorTable::iterator cstrIter - = dictionaryConstructorTablePtr_->find(patchFieldType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(patchFieldType); if (!cstrIter.found()) { if (!disallowGenericFvPatchField) { - cstrIter = dictionaryConstructorTablePtr_->find("generic"); + cstrIter = dictionaryConstructorTablePtr_->cfind("generic"); } if (!cstrIter.found()) @@ -133,7 +130,7 @@ Foam::tmp<Foam::fvPatchField<Type>> Foam::fvPatchField<Type>::New dict ) << "Unknown patchField type " << patchFieldType << " for patch type " << p.type() << nl << nl - << "Valid patchField types are :" << endl + << "Valid patchField types :" << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalIOError); } @@ -145,8 +142,8 @@ Foam::tmp<Foam::fvPatchField<Type>> Foam::fvPatchField<Type>::New || word(dict.lookup("patchType")) != p.type() ) { - typename dictionaryConstructorTable::iterator patchTypeCstrIter - = dictionaryConstructorTablePtr_->find(p.type()); + auto patchTypeCstrIter + = dictionaryConstructorTablePtr_->cfind(p.type()); if (patchTypeCstrIter.found() && patchTypeCstrIter() != cstrIter()) { @@ -178,14 +175,13 @@ Foam::tmp<Foam::fvPatchField<Type>> Foam::fvPatchField<Type>::New InfoInFunction << "Constructing fvPatchField<Type>" << endl; } - typename patchMapperConstructorTable::iterator cstrIter = - patchMapperConstructorTablePtr_->find(ptf.type()); + auto cstrIter = patchMapperConstructorTablePtr_->cfind(ptf.type()); if (!cstrIter.found()) { FatalErrorInFunction << "Unknown patchField type " << ptf.type() << nl << nl - << "Valid patchField types are :" << endl + << "Valid patchField types :" << endl << patchMapperConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/src/finiteVolume/fields/fvsPatchFields/basic/calculated/calculatedFvsPatchField.C b/src/finiteVolume/fields/fvsPatchFields/basic/calculated/calculatedFvsPatchField.C index fcfbb1dae1..383d613a22 100644 --- a/src/finiteVolume/fields/fvsPatchFields/basic/calculated/calculatedFvsPatchField.C +++ b/src/finiteVolume/fields/fvsPatchFields/basic/calculated/calculatedFvsPatchField.C @@ -100,8 +100,7 @@ Foam::fvsPatchField<Type>::NewCalculatedType const fvPatch& p ) { - typename patchConstructorTable::iterator patchTypeCstrIter = - patchConstructorTablePtr_->find(p.type()); + auto patchTypeCstrIter = patchConstructorTablePtr_->cfind(p.type()); if (patchTypeCstrIter.found()) { diff --git a/src/finiteVolume/fields/fvsPatchFields/fvsPatchField/fvsPatchFieldNew.C b/src/finiteVolume/fields/fvsPatchFields/fvsPatchField/fvsPatchFieldNew.C index 12af314f87..5bcd17570e 100644 --- a/src/finiteVolume/fields/fvsPatchFields/fvsPatchField/fvsPatchFieldNew.C +++ b/src/finiteVolume/fields/fvsPatchFields/fvsPatchField/fvsPatchFieldNew.C @@ -39,15 +39,14 @@ Foam::tmp<Foam::fvsPatchField<Type>> Foam::fvsPatchField<Type>::New InfoInFunction << "Constructing fvsPatchField<Type>" << endl; } - typename patchConstructorTable::iterator cstrIter = - patchConstructorTablePtr_->find(patchFieldType); + auto cstrIter = patchConstructorTablePtr_->cfind(patchFieldType); if (!cstrIter.found()) { FatalErrorInFunction << "Unknown patchField type " << patchFieldType << nl << nl - << "Valid patchField types are :" << endl + << "Valid patchField types :" << endl << patchConstructorTablePtr_->sortedToc() << exit(FatalError); } @@ -58,8 +57,7 @@ Foam::tmp<Foam::fvsPatchField<Type>> Foam::fvsPatchField<Type>::New || actualPatchType != p.type() ) { - typename patchConstructorTable::iterator patchTypeCstrIter = - patchConstructorTablePtr_->find(p.type()); + auto patchTypeCstrIter = patchConstructorTablePtr_->cfind(p.type()); if (patchTypeCstrIter.found()) { @@ -104,14 +102,13 @@ Foam::tmp<Foam::fvsPatchField<Type>> Foam::fvsPatchField<Type>::New const word patchFieldType(dict.lookup("type")); - typename dictionaryConstructorTable::iterator cstrIter - = dictionaryConstructorTablePtr_->find(patchFieldType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(patchFieldType); if (!cstrIter.found()) { if (!disallowGenericFvsPatchField) { - cstrIter = dictionaryConstructorTablePtr_->find("generic"); + cstrIter = dictionaryConstructorTablePtr_->cfind("generic"); } if (!cstrIter.found()) @@ -121,7 +118,7 @@ Foam::tmp<Foam::fvsPatchField<Type>> Foam::fvsPatchField<Type>::New dict ) << "Unknown patchField type " << patchFieldType << " for patch type " << p.type() << nl << nl - << "Valid patchField types are :" << endl + << "Valid patchField types :" << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalIOError); } @@ -133,8 +130,8 @@ Foam::tmp<Foam::fvsPatchField<Type>> Foam::fvsPatchField<Type>::New || word(dict.lookup("patchType")) != p.type() ) { - typename dictionaryConstructorTable::iterator patchTypeCstrIter - = dictionaryConstructorTablePtr_->find(p.type()); + auto patchTypeCstrIter + = dictionaryConstructorTablePtr_->cfind(p.type()); if (patchTypeCstrIter.found() && patchTypeCstrIter() != cstrIter()) { @@ -166,20 +163,18 @@ Foam::tmp<Foam::fvsPatchField<Type>> Foam::fvsPatchField<Type>::New InfoInFunction << "Constructing fvsPatchField<Type>" << endl; } - typename patchMapperConstructorTable::iterator cstrIter = - patchMapperConstructorTablePtr_->find(ptf.type()); + auto cstrIter = patchMapperConstructorTablePtr_->cfind(ptf.type()); if (!cstrIter.found()) { FatalErrorInFunction << "Unknown patchField type " << ptf.type() << nl << nl - << "Valid patchField types are :" << endl + << "Valid patchField types :" << endl << patchMapperConstructorTablePtr_->sortedToc() << exit(FatalError); } - typename patchMapperConstructorTable::iterator - patchTypeCstrIter = patchMapperConstructorTablePtr_->find(p.type()); + auto patchTypeCstrIter = patchMapperConstructorTablePtr_->cfind(p.type()); if (patchTypeCstrIter.found()) { diff --git a/src/finiteVolume/finiteVolume/convectionSchemes/convectionScheme/convectionScheme.C b/src/finiteVolume/finiteVolume/convectionSchemes/convectionScheme/convectionScheme.C index a8539a5c48..ca63afc788 100644 --- a/src/finiteVolume/finiteVolume/convectionSchemes/convectionScheme/convectionScheme.C +++ b/src/finiteVolume/finiteVolume/convectionSchemes/convectionScheme/convectionScheme.C @@ -79,15 +79,15 @@ tmp<convectionScheme<Type>> convectionScheme<Type>::New const word schemeName(schemeData); - typename IstreamConstructorTable::iterator cstrIter = - IstreamConstructorTablePtr_->find(schemeName); + auto cstrIter = IstreamConstructorTablePtr_->cfind(schemeName); if (!cstrIter.found()) { FatalIOErrorInFunction ( schemeData - ) << "Unknown convection scheme " << schemeName << nl << nl + ) << "Unknown convection scheme " + << schemeName << nl << nl << "Valid convection schemes are :" << endl << IstreamConstructorTablePtr_->sortedToc() << exit(FatalIOError); @@ -125,15 +125,15 @@ tmp<convectionScheme<Type>> convectionScheme<Type>::New const word schemeName(schemeData); - typename MultivariateConstructorTable::iterator cstrIter = - MultivariateConstructorTablePtr_->find(schemeName); + auto cstrIter = MultivariateConstructorTablePtr_->cfind(schemeName); if (!cstrIter.found()) { FatalIOErrorInFunction ( schemeData - ) << "Unknown convection scheme " << schemeName << nl << nl + ) << "Unknown convection scheme " + << schemeName << nl << nl << "Valid convection schemes are :" << endl << MultivariateConstructorTablePtr_->sortedToc() << exit(FatalIOError); diff --git a/src/finiteVolume/finiteVolume/d2dt2Schemes/d2dt2Scheme/d2dt2Scheme.C b/src/finiteVolume/finiteVolume/d2dt2Schemes/d2dt2Scheme/d2dt2Scheme.C index d9c7091e6b..ffdc4c25b8 100644 --- a/src/finiteVolume/finiteVolume/d2dt2Schemes/d2dt2Scheme/d2dt2Scheme.C +++ b/src/finiteVolume/finiteVolume/d2dt2Schemes/d2dt2Scheme/d2dt2Scheme.C @@ -66,15 +66,15 @@ tmp<d2dt2Scheme<Type>> d2dt2Scheme<Type>::New const word schemeName(schemeData); - typename IstreamConstructorTable::iterator cstrIter = - IstreamConstructorTablePtr_->find(schemeName); + auto cstrIter = IstreamConstructorTablePtr_->cfind(schemeName); if (!cstrIter.found()) { FatalIOErrorInFunction ( schemeData - ) << "Unknown d2dt2 scheme " << schemeName << nl << nl + ) << "Unknown d2dt2 scheme " + << schemeName << nl << nl << "Valid d2dt2 schemes are :" << endl << IstreamConstructorTablePtr_->sortedToc() << exit(FatalIOError); diff --git a/src/finiteVolume/finiteVolume/ddtSchemes/ddtScheme/ddtScheme.C b/src/finiteVolume/finiteVolume/ddtSchemes/ddtScheme/ddtScheme.C index f5e11840b9..fd4f502ed9 100644 --- a/src/finiteVolume/finiteVolume/ddtSchemes/ddtScheme/ddtScheme.C +++ b/src/finiteVolume/finiteVolume/ddtSchemes/ddtScheme/ddtScheme.C @@ -66,15 +66,15 @@ tmp<ddtScheme<Type>> ddtScheme<Type>::New const word schemeName(schemeData); - typename IstreamConstructorTable::iterator cstrIter = - IstreamConstructorTablePtr_->find(schemeName); + auto cstrIter = IstreamConstructorTablePtr_->cfind(schemeName); if (!cstrIter.found()) { FatalIOErrorInFunction ( schemeData - ) << "Unknown ddt scheme " << schemeName << nl << nl + ) << "Unknown ddt scheme " + << schemeName << nl << nl << "Valid ddt schemes are :" << endl << IstreamConstructorTablePtr_->sortedToc() << exit(FatalIOError); diff --git a/src/finiteVolume/finiteVolume/divSchemes/divScheme/divScheme.C b/src/finiteVolume/finiteVolume/divSchemes/divScheme/divScheme.C index af586b63a5..8c71aafcb3 100644 --- a/src/finiteVolume/finiteVolume/divSchemes/divScheme/divScheme.C +++ b/src/finiteVolume/finiteVolume/divSchemes/divScheme/divScheme.C @@ -67,8 +67,7 @@ tmp<divScheme<Type>> divScheme<Type>::New const word schemeName(schemeData); - typename IstreamConstructorTable::iterator cstrIter = - IstreamConstructorTablePtr_->find(schemeName); + auto cstrIter = IstreamConstructorTablePtr_->cfind(schemeName); if (!cstrIter.found()) { diff --git a/src/finiteVolume/finiteVolume/gradSchemes/gradScheme/gradScheme.C b/src/finiteVolume/finiteVolume/gradSchemes/gradScheme/gradScheme.C index 4358fab029..1a055779f1 100644 --- a/src/finiteVolume/finiteVolume/gradSchemes/gradScheme/gradScheme.C +++ b/src/finiteVolume/finiteVolume/gradSchemes/gradScheme/gradScheme.C @@ -54,15 +54,15 @@ Foam::tmp<Foam::fv::gradScheme<Type>> Foam::fv::gradScheme<Type>::New const word schemeName(schemeData); - typename IstreamConstructorTable::iterator cstrIter = - IstreamConstructorTablePtr_->find(schemeName); + auto cstrIter = IstreamConstructorTablePtr_->cfind(schemeName); if (!cstrIter.found()) { FatalIOErrorInFunction ( schemeData - ) << "Unknown grad scheme " << schemeName << nl << nl + ) << "Unknown grad scheme " + << schemeName << nl << nl << "Valid grad schemes are :" << endl << IstreamConstructorTablePtr_->sortedToc() << exit(FatalIOError); diff --git a/src/finiteVolume/finiteVolume/laplacianSchemes/laplacianScheme/laplacianScheme.C b/src/finiteVolume/finiteVolume/laplacianSchemes/laplacianScheme/laplacianScheme.C index f783228754..0a774bdf5d 100644 --- a/src/finiteVolume/finiteVolume/laplacianSchemes/laplacianScheme/laplacianScheme.C +++ b/src/finiteVolume/finiteVolume/laplacianSchemes/laplacianScheme/laplacianScheme.C @@ -65,15 +65,15 @@ tmp<laplacianScheme<Type, GType>> laplacianScheme<Type, GType>::New const word schemeName(schemeData); - typename IstreamConstructorTable::iterator cstrIter = - IstreamConstructorTablePtr_->find(schemeName); + auto cstrIter = IstreamConstructorTablePtr_->cfind(schemeName); if (!cstrIter.found()) { FatalIOErrorInFunction ( schemeData - ) << "Unknown laplacian scheme " << schemeName << nl << nl + ) << "Unknown laplacian scheme " + << schemeName << nl << nl << "Valid laplacian schemes are :" << endl << IstreamConstructorTablePtr_->sortedToc() << exit(FatalIOError); diff --git a/src/finiteVolume/finiteVolume/snGradSchemes/snGradScheme/snGradScheme.C b/src/finiteVolume/finiteVolume/snGradSchemes/snGradScheme/snGradScheme.C index 5644e7a6b1..d5422e729d 100644 --- a/src/finiteVolume/finiteVolume/snGradSchemes/snGradScheme/snGradScheme.C +++ b/src/finiteVolume/finiteVolume/snGradSchemes/snGradScheme/snGradScheme.C @@ -67,10 +67,9 @@ tmp<snGradScheme<Type>> snGradScheme<Type>::New const word schemeName(schemeData); - typename MeshConstructorTable::iterator constructorIter = - MeshConstructorTablePtr_->find(schemeName); + auto cstrIter = MeshConstructorTablePtr_->cfind(schemeName); - if (!constructorIter.found()) + if (!cstrIter.found()) { FatalIOErrorInFunction ( @@ -82,7 +81,7 @@ tmp<snGradScheme<Type>> snGradScheme<Type>::New << exit(FatalIOError); } - return constructorIter()(mesh, schemeData); + return cstrIter()(mesh, schemeData); } diff --git a/src/finiteVolume/fvMesh/fvPatches/fvPatch/fvPatch.C b/src/finiteVolume/fvMesh/fvPatches/fvPatch/fvPatch.C index 77c05e0863..579387eaec 100644 --- a/src/finiteVolume/fvMesh/fvPatches/fvPatch/fvPatch.C +++ b/src/finiteVolume/fvMesh/fvPatches/fvPatch/fvPatch.C @@ -70,13 +70,7 @@ Foam::wordList Foam::fvPatch::constraintTypes() label i = 0; - for - ( - polyPatchConstructorTable::iterator cstrIter = - polyPatchConstructorTablePtr_->begin(); - cstrIter != polyPatchConstructorTablePtr_->end(); - ++cstrIter - ) + forAllConstIters(*polyPatchConstructorTablePtr_, cstrIter) { if (constraintType(cstrIter.key())) { diff --git a/src/finiteVolume/fvMesh/fvPatches/fvPatch/fvPatchNew.C b/src/finiteVolume/fvMesh/fvPatches/fvPatch/fvPatchNew.C index 468b9b88f6..a916503f98 100644 --- a/src/finiteVolume/fvMesh/fvPatches/fvPatch/fvPatchNew.C +++ b/src/finiteVolume/fvMesh/fvPatches/fvPatch/fvPatchNew.C @@ -40,14 +40,13 @@ Foam::autoPtr<Foam::fvPatch> Foam::fvPatch::New InfoInFunction << "Constructing fvPatch" << endl; } - polyPatchConstructorTable::iterator cstrIter = - polyPatchConstructorTablePtr_->find(patch.type()); + auto cstrIter = polyPatchConstructorTablePtr_->cfind(patch.type()); if (!cstrIter.found()) { FatalErrorInFunction << "Unknown fvPatch type " << patch.type() << nl - << "Valid fvPatch types are :" + << "Valid fvPatch types :" << polyPatchConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/src/finiteVolume/fvMesh/wallDist/patchDistMethods/patchDistMethod/patchDistMethod.C b/src/finiteVolume/fvMesh/wallDist/patchDistMethods/patchDistMethod/patchDistMethod.C index 349d356497..e7357ff4d4 100644 --- a/src/finiteVolume/fvMesh/wallDist/patchDistMethods/patchDistMethod/patchDistMethod.C +++ b/src/finiteVolume/fvMesh/wallDist/patchDistMethods/patchDistMethod/patchDistMethod.C @@ -56,19 +56,18 @@ Foam::autoPtr<Foam::patchDistMethod> Foam::patchDistMethod::New const labelHashSet& patchIDs ) { - word patchDistMethodType(dict.lookup("method")); + const word methodType(dict.lookup("method")); - Info<< "Selecting patchDistMethod " << patchDistMethodType << endl; + Info<< "Selecting patchDistMethod " << methodType << endl; - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(patchDistMethodType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(methodType); if (!cstrIter.found()) { FatalErrorInFunction - << "Unknown patchDistMethodType type " - << patchDistMethodType << endl << endl - << "Valid patchDistMethod types are : " << endl + << "Unknown patchDistMethod type " + << methodType << endl << endl + << "Valid patchDistMethod types : " << nl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } @@ -86,19 +85,18 @@ Foam::autoPtr<Foam::patchDistMethod> Foam::patchDistMethod::New const word& defaultPatchDistMethod ) { - word patchDistMethodType = defaultPatchDistMethod; - dict.readIfPresent("method", patchDistMethodType); + word methodType = defaultPatchDistMethod; + dict.readIfPresent("method", methodType); - Info<< "Selecting patchDistMethod " << patchDistMethodType << endl; - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(patchDistMethodType); + Info<< "Selecting patchDistMethod " << methodType << endl; + auto cstrIter = dictionaryConstructorTablePtr_->cfind(methodType); if (!cstrIter.found()) { FatalErrorInFunction << "Unknown patchDistMethodType type " - << patchDistMethodType << endl << endl - << "Valid patchDistMethod types are : " << endl + << methodType << endl << endl + << "Valid patchDistMethod types : " << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/src/finiteVolume/interpolation/interpolation/interpolation/interpolationNew.C b/src/finiteVolume/interpolation/interpolation/interpolation/interpolationNew.C index decc033fe5..14f3f86f6d 100644 --- a/src/finiteVolume/interpolation/interpolation/interpolation/interpolationNew.C +++ b/src/finiteVolume/interpolation/interpolation/interpolation/interpolationNew.C @@ -35,8 +35,7 @@ Foam::autoPtr<Foam::interpolation<Type>> Foam::interpolation<Type>::New const GeometricField<Type, fvPatchField, volMesh>& psi ) { - typename dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(interpolationType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(interpolationType); if (!cstrIter.found()) { diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/limitedSchemes/limitedSurfaceInterpolationScheme/limitedSurfaceInterpolationScheme.C b/src/finiteVolume/interpolation/surfaceInterpolation/limitedSchemes/limitedSurfaceInterpolationScheme/limitedSurfaceInterpolationScheme.C index fae9dddca3..d2c301c8dc 100644 --- a/src/finiteVolume/interpolation/surfaceInterpolation/limitedSchemes/limitedSurfaceInterpolationScheme/limitedSurfaceInterpolationScheme.C +++ b/src/finiteVolume/interpolation/surfaceInterpolation/limitedSchemes/limitedSurfaceInterpolationScheme/limitedSurfaceInterpolationScheme.C @@ -58,10 +58,9 @@ Foam::limitedSurfaceInterpolationScheme<Type>::New const word schemeName(schemeData); - typename MeshConstructorTable::iterator constructorIter = - MeshConstructorTablePtr_->find(schemeName); + auto cstrIter = MeshConstructorTablePtr_->cfind(schemeName); - if (!constructorIter.found()) + if (!cstrIter.found()) { FatalIOErrorInFunction ( @@ -73,7 +72,7 @@ Foam::limitedSurfaceInterpolationScheme<Type>::New << exit(FatalIOError); } - return constructorIter()(mesh, schemeData); + return cstrIter()(mesh, schemeData); } @@ -107,10 +106,9 @@ Foam::limitedSurfaceInterpolationScheme<Type>::New const word schemeName(schemeData); - typename MeshFluxConstructorTable::iterator constructorIter = - MeshFluxConstructorTablePtr_->find(schemeName); + auto cstrIter = MeshFluxConstructorTablePtr_->cfind(schemeName); - if (!constructorIter.found()) + if (!cstrIter.found()) { FatalIOErrorInFunction ( @@ -122,7 +120,7 @@ Foam::limitedSurfaceInterpolationScheme<Type>::New << exit(FatalIOError); } - return constructorIter()(mesh, faceFlux, schemeData); + return cstrIter()(mesh, faceFlux, schemeData); } diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/multivariateSchemes/multivariateSurfaceInterpolationScheme/multivariateSurfaceInterpolationScheme.C b/src/finiteVolume/interpolation/surfaceInterpolation/multivariateSchemes/multivariateSurfaceInterpolationScheme/multivariateSurfaceInterpolationScheme.C index ea3017016b..e9400fbfee 100644 --- a/src/finiteVolume/interpolation/surfaceInterpolation/multivariateSchemes/multivariateSurfaceInterpolationScheme/multivariateSurfaceInterpolationScheme.C +++ b/src/finiteVolume/interpolation/surfaceInterpolation/multivariateSchemes/multivariateSurfaceInterpolationScheme/multivariateSurfaceInterpolationScheme.C @@ -68,10 +68,9 @@ Foam::multivariateSurfaceInterpolationScheme<Type>::New const word schemeName(schemeData); - typename IstreamConstructorTable::iterator constructorIter = - IstreamConstructorTablePtr_->find(schemeName); + auto cstrIter = IstreamConstructorTablePtr_->cfind(schemeName); - if (!constructorIter.found()) + if (!cstrIter.found()) { FatalIOErrorInFunction ( @@ -82,7 +81,7 @@ Foam::multivariateSurfaceInterpolationScheme<Type>::New << exit(FatalIOError); } - return constructorIter()(mesh, vtfs, faceFlux, schemeData); + return cstrIter()(mesh, vtfs, faceFlux, schemeData); } diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/surfaceInterpolationScheme/surfaceInterpolationScheme.C b/src/finiteVolume/interpolation/surfaceInterpolation/surfaceInterpolationScheme/surfaceInterpolationScheme.C index 0fbf63650b..b35c82f8a7 100644 --- a/src/finiteVolume/interpolation/surfaceInterpolation/surfaceInterpolationScheme/surfaceInterpolationScheme.C +++ b/src/finiteVolume/interpolation/surfaceInterpolation/surfaceInterpolationScheme/surfaceInterpolationScheme.C @@ -58,10 +58,9 @@ Foam::surfaceInterpolationScheme<Type>::New InfoInFunction << "Discretisation scheme = " << schemeName << endl; } - typename MeshConstructorTable::iterator constructorIter = - MeshConstructorTablePtr_->find(schemeName); + auto cstrIter = MeshConstructorTablePtr_->cfind(schemeName); - if (!constructorIter.found()) + if (!cstrIter.found()) { FatalIOErrorInFunction ( @@ -73,7 +72,7 @@ Foam::surfaceInterpolationScheme<Type>::New << exit(FatalIOError); } - return constructorIter()(mesh, schemeData); + return cstrIter()(mesh, schemeData); } @@ -106,10 +105,9 @@ Foam::surfaceInterpolationScheme<Type>::New << "Discretisation scheme = " << schemeName << endl; } - typename MeshFluxConstructorTable::iterator constructorIter = - MeshFluxConstructorTablePtr_->find(schemeName); + auto cstrIter = MeshFluxConstructorTablePtr_->cfind(schemeName); - if (!constructorIter.found()) + if (!cstrIter.found()) { FatalIOErrorInFunction ( @@ -121,7 +119,7 @@ Foam::surfaceInterpolationScheme<Type>::New << exit(FatalIOError); } - return constructorIter()(mesh, faceFlux, schemeData); + return cstrIter()(mesh, faceFlux, schemeData); } @@ -241,8 +239,7 @@ Foam::surfaceInterpolationScheme<Type>::dotInterpolate << "Interpolating " << vf.type() << " " << vf.name() - << " from cells to faces " - "without explicit correction" + << " from cells to faces without explicit correction" << endl; } diff --git a/src/functionObjects/field/fieldValues/fieldValue/fieldValueNew.C b/src/functionObjects/field/fieldValues/fieldValue/fieldValueNew.C index 270859347e..b665ee2896 100644 --- a/src/functionObjects/field/fieldValues/fieldValue/fieldValueNew.C +++ b/src/functionObjects/field/fieldValues/fieldValue/fieldValueNew.C @@ -43,15 +43,14 @@ Foam::functionObjects::fieldValue::New Info<< "Selecting " << typeName << " " << modelType << endl; } - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(modelType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { FatalErrorInFunction << "Unknown " << typeName << " type " << modelType << nl << nl - << "Valid " << typeName << " types are:" << nl + << "Valid " << typeName << " types :" << nl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/src/functionObjects/graphics/runTimePostProcessing/pathline.C b/src/functionObjects/graphics/runTimePostProcessing/pathline.C index 717125fdc9..770356a70c 100644 --- a/src/functionObjects/graphics/runTimePostProcessing/pathline.C +++ b/src/functionObjects/graphics/runTimePostProcessing/pathline.C @@ -183,15 +183,14 @@ Foam::functionObjects::runTimePostPro::pathline::New Info<< "Selecting pathline " << pathlineType << endl; } - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(pathlineType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(pathlineType); if (!cstrIter.found()) { FatalErrorInFunction << "Unknown pathline type " << pathlineType << nl << nl - << "Valid pathline types are:" << endl + << "Valid pathline types :" << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/src/functionObjects/graphics/runTimePostProcessing/pointData.C b/src/functionObjects/graphics/runTimePostProcessing/pointData.C index e9c8afacce..4274296288 100644 --- a/src/functionObjects/graphics/runTimePostProcessing/pointData.C +++ b/src/functionObjects/graphics/runTimePostProcessing/pointData.C @@ -143,15 +143,14 @@ Foam::autoPtr<Foam::functionObjects::runTimePostPro::pointData> Foam::functionOb Info<< "Selecting pointData " << pointDataType << endl; } - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(pointDataType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(pointDataType); if (!cstrIter.found()) { FatalErrorInFunction << "Unknown pointData type " << pointDataType << nl << nl - << "Valid pointData types are:" << endl + << "Valid pointData types :" << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/src/functionObjects/graphics/runTimePostProcessing/surface.C b/src/functionObjects/graphics/runTimePostProcessing/surface.C index 809b8294ad..fe58ffc99a 100644 --- a/src/functionObjects/graphics/runTimePostProcessing/surface.C +++ b/src/functionObjects/graphics/runTimePostProcessing/surface.C @@ -209,15 +209,14 @@ Foam::functionObjects::runTimePostPro::surface::New Info<< "Selecting surface " << surfaceType << endl; } - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(surfaceType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(surfaceType); if (!cstrIter.found()) { FatalErrorInFunction << "Unknown surface type " << surfaceType << nl << nl - << "Valid surface types are:" << endl + << "Valid surface types :" << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/src/functionObjects/utilities/runTimeControl/runTimeCondition/runTimeCondition/runTimeConditionNew.C b/src/functionObjects/utilities/runTimeControl/runTimeCondition/runTimeCondition/runTimeConditionNew.C index 85192b98ec..5f5d878bae 100644 --- a/src/functionObjects/utilities/runTimeControl/runTimeCondition/runTimeCondition/runTimeConditionNew.C +++ b/src/functionObjects/utilities/runTimeControl/runTimeCondition/runTimeCondition/runTimeConditionNew.C @@ -36,19 +36,18 @@ Foam::functionObjects::runTimeControls::runTimeCondition::New stateFunctionObject& state ) { - word conditionType(dict.lookup("type")); + const word conditionType(dict.lookup("type")); Info<< "Selecting runTimeCondition " << conditionType << endl; - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(conditionType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(conditionType); if (!cstrIter.found()) { FatalErrorInFunction << "Unknown runTimeCondition type " << conditionType << nl << nl - << "Valid runTimeCondition types are:" << nl + << "Valid runTimeCondition types :" << nl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/src/fvMotionSolver/motionDiffusivity/motionDiffusivity/motionDiffusivity.C b/src/fvMotionSolver/motionDiffusivity/motionDiffusivity/motionDiffusivity.C index 161c424b26..c197e03ce8 100644 --- a/src/fvMotionSolver/motionDiffusivity/motionDiffusivity/motionDiffusivity.C +++ b/src/fvMotionSolver/motionDiffusivity/motionDiffusivity/motionDiffusivity.C @@ -54,15 +54,14 @@ Foam::autoPtr<Foam::motionDiffusivity> Foam::motionDiffusivity::New Info<< "Selecting motion diffusion: " << motionType << endl; - IstreamConstructorTable::iterator cstrIter = - IstreamConstructorTablePtr_->find(motionType); + auto cstrIter = IstreamConstructorTablePtr_->cfind(motionType); if (!cstrIter.found()) { FatalErrorInFunction << "Unknown diffusion type " << motionType << nl << nl - << "Valid diffusion types are :" << endl + << "Valid diffusion types :" << nl << IstreamConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/src/fvMotionSolver/motionInterpolation/motionInterpolation/motionInterpolation.C b/src/fvMotionSolver/motionInterpolation/motionInterpolation/motionInterpolation.C index c59808a21b..5210b6e286 100644 --- a/src/fvMotionSolver/motionInterpolation/motionInterpolation/motionInterpolation.C +++ b/src/fvMotionSolver/motionInterpolation/motionInterpolation/motionInterpolation.C @@ -32,7 +32,6 @@ License namespace Foam { defineTypeNameAndDebug(motionInterpolation, 0); - defineRunTimeSelectionTable(motionInterpolation, Istream); } @@ -74,15 +73,14 @@ Foam::motionInterpolation::New(const fvMesh& mesh, Istream& entry) Info<< "Selecting motion interpolation: " << type << endl; - IstreamConstructorTable::iterator cstrIter = - IstreamConstructorTablePtr_->find(type); + auto cstrIter = IstreamConstructorTablePtr_->cfind(type); if (!cstrIter.found()) { FatalErrorInFunction << "Unknown interpolation type " << type << nl << nl - << "Valid interpolation types are :" << endl + << "Valid interpolation types :" << endl << IstreamConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/src/fvOptions/sources/derived/rotorDiskSource/profileModel/profileModel.C b/src/fvOptions/sources/derived/rotorDiskSource/profileModel/profileModel.C index a9b037a8ae..8f4f471567 100644 --- a/src/fvOptions/sources/derived/rotorDiskSource/profileModel/profileModel.C +++ b/src/fvOptions/sources/derived/rotorDiskSource/profileModel/profileModel.C @@ -73,21 +73,20 @@ Foam::autoPtr<Foam::profileModel> Foam::profileModel::New const dictionary& dict ) { - const word& modelName(dict.dictName()); + const word& modelName = dict.dictName(); const word modelType(dict.lookup("type")); Info<< " - creating " << modelType << " profile " << modelName << endl; - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(modelType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { FatalErrorInFunction - << "Unknown profile model type " << modelType - << nl << nl - << "Valid model types are :" << nl + << "Unknown profile model type " + << modelType << nl << nl + << "Valid model types :" << nl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/src/fvOptions/sources/derived/rotorDiskSource/trimModel/trimModel/trimModelNew.C b/src/fvOptions/sources/derived/rotorDiskSource/trimModel/trimModel/trimModelNew.C index 92b0b09f5c..3aef03cc40 100644 --- a/src/fvOptions/sources/derived/rotorDiskSource/trimModel/trimModel/trimModelNew.C +++ b/src/fvOptions/sources/derived/rotorDiskSource/trimModel/trimModel/trimModelNew.C @@ -37,15 +37,14 @@ Foam::autoPtr<Foam::trimModel> Foam::trimModel::New Info<< " Selecting " << typeName << " " << modelType << endl; - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(modelType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { FatalErrorInFunction << "Unknown " << typeName << " type " << modelType << nl << nl - << "Valid " << typeName << " types are:" << nl + << "Valid " << typeName << " types :" << nl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/src/lagrangian/DSMC/submodels/BinaryCollisionModel/BinaryCollisionModel/BinaryCollisionModelNew.C b/src/lagrangian/DSMC/submodels/BinaryCollisionModel/BinaryCollisionModel/BinaryCollisionModelNew.C index 43488462bd..549932dfe2 100644 --- a/src/lagrangian/DSMC/submodels/BinaryCollisionModel/BinaryCollisionModel/BinaryCollisionModelNew.C +++ b/src/lagrangian/DSMC/submodels/BinaryCollisionModel/BinaryCollisionModel/BinaryCollisionModelNew.C @@ -39,15 +39,14 @@ Foam::BinaryCollisionModel<CloudType>::New Info<< "Selecting BinaryCollisionModel " << modelType << endl; - typename dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(modelType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { FatalErrorInFunction << "Unknown BinaryCollisionModel type " << modelType << nl << nl - << "Valid BinaryCollisionModel types are:" << nl + << "Valid BinaryCollisionModel types :" << nl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/src/lagrangian/DSMC/submodels/InflowBoundaryModel/InflowBoundaryModel/InflowBoundaryModelNew.C b/src/lagrangian/DSMC/submodels/InflowBoundaryModel/InflowBoundaryModel/InflowBoundaryModelNew.C index fb67a50e0a..70f9d09e80 100644 --- a/src/lagrangian/DSMC/submodels/InflowBoundaryModel/InflowBoundaryModel/InflowBoundaryModelNew.C +++ b/src/lagrangian/DSMC/submodels/InflowBoundaryModel/InflowBoundaryModel/InflowBoundaryModelNew.C @@ -39,15 +39,14 @@ Foam::InflowBoundaryModel<CloudType>::New Info<< "Selecting InflowBoundaryModel " << modelType << endl; - typename dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(modelType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { FatalErrorInFunction << "Unknown InflowBoundaryModel type " << modelType << nl << nl - << "Valid InflowBoundaryModel types are:" << nl + << "Valid InflowBoundaryModel types :" << nl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/src/lagrangian/DSMC/submodels/WallInteractionModel/WallInteractionModel/WallInteractionModelNew.C b/src/lagrangian/DSMC/submodels/WallInteractionModel/WallInteractionModel/WallInteractionModelNew.C index 55a134367e..6254511609 100644 --- a/src/lagrangian/DSMC/submodels/WallInteractionModel/WallInteractionModel/WallInteractionModelNew.C +++ b/src/lagrangian/DSMC/submodels/WallInteractionModel/WallInteractionModel/WallInteractionModelNew.C @@ -39,15 +39,14 @@ Foam::WallInteractionModel<CloudType>::New Info<< "Selecting WallInteractionModel " << modelType << endl; - typename dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(modelType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { FatalErrorInFunction << "Unknown WallInteractionModel type " << modelType << nl << nl - << "Valid WallInteractionModel types are:" << nl + << "Valid WallInteractionModel types :" << nl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/src/lagrangian/distributionModels/distributionModel/distributionModelNew.C b/src/lagrangian/distributionModels/distributionModel/distributionModelNew.C index 9fa9d5c334..aa596e6898 100644 --- a/src/lagrangian/distributionModels/distributionModel/distributionModelNew.C +++ b/src/lagrangian/distributionModels/distributionModel/distributionModelNew.C @@ -37,14 +37,14 @@ Foam::autoPtr<Foam::distributionModel> Foam::distributionModel::New Info<< "Selecting distribution model " << modelType << endl; - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(modelType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { FatalErrorInFunction - << "Unknown distribution model type " << modelType << nl << nl - << "Valid distribution model types are:" << nl + << "Unknown distribution model type " + << modelType << nl << nl + << "Valid distribution model types :" << nl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/src/lagrangian/intermediate/IntegrationScheme/IntegrationScheme/IntegrationSchemeNew.C b/src/lagrangian/intermediate/IntegrationScheme/IntegrationScheme/IntegrationSchemeNew.C index 1c84dc5ae9..c6fbb3e632 100644 --- a/src/lagrangian/intermediate/IntegrationScheme/IntegrationScheme/IntegrationSchemeNew.C +++ b/src/lagrangian/intermediate/IntegrationScheme/IntegrationScheme/IntegrationSchemeNew.C @@ -41,15 +41,14 @@ Foam::IntegrationScheme<Type>::New Info<< "Selecting " << phiName << " integration scheme " << schemeName << endl; - typename dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(schemeName); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(schemeName); if (!cstrIter.found()) { FatalErrorInFunction << "Unknown integration scheme type " << schemeName << nl << nl - << "Valid integration scheme types are:" << nl + << "Valid integration scheme types :" << nl << dictionaryConstructorTablePtr_->sortedToc() << nl << exit(FatalError); } diff --git a/src/lagrangian/intermediate/submodels/CloudFunctionObjects/CloudFunctionObject/CloudFunctionObjectNew.C b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/CloudFunctionObject/CloudFunctionObjectNew.C index 1b115c6c26..0fe50e2e75 100644 --- a/src/lagrangian/intermediate/submodels/CloudFunctionObjects/CloudFunctionObject/CloudFunctionObjectNew.C +++ b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/CloudFunctionObject/CloudFunctionObjectNew.C @@ -40,15 +40,14 @@ Foam::CloudFunctionObject<CloudType>::New Info<< " Selecting cloud function " << modelName << " of type " << objectType << endl; - typename dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(objectType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(objectType); if (!cstrIter.found()) { FatalErrorInFunction << "Unknown cloud function type " << objectType << nl << nl - << "Valid cloud function types are:" << nl + << "Valid cloud function types :" << nl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/CollisionModel/CollisionModelNew.C b/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/CollisionModel/CollisionModelNew.C index 8548abfc76..5c8b778c91 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/CollisionModel/CollisionModelNew.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/CollisionModel/CollisionModelNew.C @@ -35,20 +35,20 @@ Foam::CollisionModel<CloudType>::New CloudType& owner ) { - word modelType(dict.lookup("collisionModel")); + const word modelType(dict.lookup("collisionModel")); Info<< "Selecting collision model " << modelType << endl; - typename dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(modelType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { FatalErrorInFunction - << "Unknown collision model type " << modelType - << ", constructor not in hash table" << nl << nl - << " Valid collision model types are:" << nl - << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); + << "Unknown collisionModel type " + << modelType << nl << nl + << "Valid collisionModel types :" << nl + << dictionaryConstructorTablePtr_->sortedToc() + << exit(FatalError); } return autoPtr<CollisionModel<CloudType>>(cstrIter()(dict, owner)); diff --git a/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/PairCollision/PairModel/PairModel/PairModelNew.C b/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/PairCollision/PairModel/PairModel/PairModelNew.C index f98062e8e1..6f8a2d1b42 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/PairCollision/PairModel/PairModel/PairModelNew.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/PairCollision/PairModel/PairModel/PairModelNew.C @@ -35,21 +35,20 @@ Foam::PairModel<CloudType>::New CloudType& owner ) { - word PairModelType(dict.lookup("pairModel")); + const word modelType(dict.lookup("pairModel")); - Info<< "Selecting pair model " << PairModelType << endl; + Info<< "Selecting pair model " << modelType << endl; - typename dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(PairModelType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { FatalErrorInFunction - << "Unknown pair model type " - << PairModelType - << ", constructor not in hash table" << nl << nl - << " Valid pair model types are:" << nl - << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); + << "Unknown pairModel type " + << modelType << nl << nl + << "Valid pairModel types :" << nl + << dictionaryConstructorTablePtr_->sortedToc() + << exit(FatalError); } return autoPtr<PairModel<CloudType>>(cstrIter()(dict, owner)); diff --git a/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/PairCollision/WallModel/WallModel/WallModelNew.C b/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/PairCollision/WallModel/WallModel/WallModelNew.C index 21b9f57318..936163a3fe 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/PairCollision/WallModel/WallModel/WallModelNew.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/PairCollision/WallModel/WallModel/WallModelNew.C @@ -35,20 +35,20 @@ Foam::WallModel<CloudType>::New CloudType& owner ) { - word WallModelType(dict.lookup("wallModel")); + const word modelType(dict.lookup("wallModel")); - Info<< "Selecting wall model " << WallModelType << endl; + Info<< "Selecting wall model " << modelType << endl; - typename dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(WallModelType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { FatalErrorInFunction - << "Unknown wall model type type " << WallModelType - << ", constructor not in hash table" << nl << nl - << " Valid wall model types are:" << nl - << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); + << "Unknown wallModel type " + << modelType << nl << nl + << "Valid wallModel types :" << nl + << dictionaryConstructorTablePtr_->sortedToc() + << exit(FatalError); } return autoPtr<WallModel<CloudType>>(cstrIter()(dict, owner)); diff --git a/src/lagrangian/intermediate/submodels/Kinematic/DispersionModel/DispersionModel/DispersionModelNew.C b/src/lagrangian/intermediate/submodels/Kinematic/DispersionModel/DispersionModel/DispersionModelNew.C index f8c1f4f538..990da5b40f 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/DispersionModel/DispersionModel/DispersionModelNew.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/DispersionModel/DispersionModel/DispersionModelNew.C @@ -39,15 +39,14 @@ Foam::DispersionModel<CloudType>::New Info<< "Selecting dispersion model " << modelType << endl; - typename dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(modelType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { FatalErrorInFunction - << "Unknown dispersion model type " + << "Unknown dispersionModel type " << modelType << nl << nl - << "Valid dispersion model types are:" << nl + << "Valid dispersionModel types :" << nl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModelNew.C b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModelNew.C index b60c2e0031..3fde72fdd1 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModelNew.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModelNew.C @@ -39,16 +39,16 @@ Foam::InjectionModel<CloudType>::New Info<< "Selecting injection model " << modelType << endl; - typename dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(modelType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { FatalErrorInFunction - << "Unknown injection model type " + << "Unknown injectionModel type " << modelType << nl << nl - << "Valid injection model types are:" << nl - << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); + << "Valid injectionModel types :" << nl + << dictionaryConstructorTablePtr_->sortedToc() + << exit(FatalError); } return autoPtr<InjectionModel<CloudType>>(cstrIter()(dict, owner)); @@ -67,16 +67,16 @@ Foam::InjectionModel<CloudType>::New { Info<< "Selecting injection model " << modelType << endl; - typename dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(modelType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { FatalErrorInFunction << "Unknown injection model type " << modelType << nl << nl - << "Valid injection model types are:" << nl - << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); + << "Valid injection model types :" << nl + << dictionaryConstructorTablePtr_->sortedToc() + << exit(FatalError); } return diff --git a/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/ParticleForce/ParticleForceNew.C b/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/ParticleForce/ParticleForceNew.C index a4f1db04b5..2e801a88dc 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/ParticleForce/ParticleForceNew.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/ParticleForce/ParticleForceNew.C @@ -39,16 +39,14 @@ Foam::ParticleForce<CloudType>::New { Info<< " Selecting particle force " << forceType << endl; - typename dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(forceType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(forceType); if (!cstrIter.found()) { FatalErrorInFunction << "Unknown particle force type " - << forceType - << ", constructor not in hash table" << nl << nl - << " Valid particle force types are:" << nl + << forceType << nl << nl + << "Valid particle force types :" << nl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/PatchInteractionModel/PatchInteractionModelNew.C b/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/PatchInteractionModel/PatchInteractionModelNew.C index 19611a30b8..381fe58e29 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/PatchInteractionModel/PatchInteractionModelNew.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/PatchInteractionModel/PatchInteractionModelNew.C @@ -39,15 +39,14 @@ Foam::PatchInteractionModel<CloudType>::New Info<< "Selecting patch interaction model " << modelType << endl; - typename dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(modelType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { FatalErrorInFunction << "Unknown patch interaction model type " << modelType << nl << nl - << "Valid patch interaction model types are:" << nl + << "Valid patch interaction model types :" << nl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/src/lagrangian/intermediate/submodels/Kinematic/StochasticCollision/StochasticCollisionModel/StochasticCollisionModelNew.C b/src/lagrangian/intermediate/submodels/Kinematic/StochasticCollision/StochasticCollisionModel/StochasticCollisionModelNew.C index 3364416bbb..c35eece969 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/StochasticCollision/StochasticCollisionModel/StochasticCollisionModelNew.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/StochasticCollision/StochasticCollisionModel/StochasticCollisionModelNew.C @@ -35,20 +35,21 @@ Foam::StochasticCollisionModel<CloudType>::New CloudType& owner ) { - word modelType(dict.lookup("stochasticCollisionModel")); + const word modelType(dict.lookup("stochasticCollisionModel")); Info<< "Selecting stochastic collision model " << modelType << endl; - typename dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(modelType); + auto cstrIter = + dictionaryConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { FatalErrorInFunction - << "Unknown model type type " - << modelType << ", constructor not in hash table" << nl << nl - << " Valid model types are:" << nl - << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); + << "Unknown stochasticCollisionModel type " + << modelType << nl << nl + << "Valid stochasticCollisionModel types :" << nl + << dictionaryConstructorTablePtr_->sortedToc() + << exit(FatalError); } return autoPtr<StochasticCollisionModel<CloudType>> diff --git a/src/lagrangian/intermediate/submodels/Kinematic/SurfaceFilmModel/SurfaceFilmModel/SurfaceFilmModelNew.C b/src/lagrangian/intermediate/submodels/Kinematic/SurfaceFilmModel/SurfaceFilmModel/SurfaceFilmModelNew.C index 7344b41f77..07331049c7 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/SurfaceFilmModel/SurfaceFilmModel/SurfaceFilmModelNew.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/SurfaceFilmModel/SurfaceFilmModel/SurfaceFilmModelNew.C @@ -39,15 +39,14 @@ Foam::SurfaceFilmModel<CloudType>::New Info<< "Selecting surface film model " << modelType << endl; - typename dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(modelType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { FatalErrorInFunction - << "Unknown surface film model type " + << "Unknown surfaceFilmModel type " << modelType << nl << nl - << "Valid surface film model types are:" << nl + << "Valid surfaceFilmModel types :" << nl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/src/lagrangian/intermediate/submodels/MPPIC/AveragingMethods/AveragingMethod/AveragingMethod.C b/src/lagrangian/intermediate/submodels/MPPIC/AveragingMethods/AveragingMethod/AveragingMethod.C index c64b12115a..b26b326d6e 100644 --- a/src/lagrangian/intermediate/submodels/MPPIC/AveragingMethods/AveragingMethod/AveragingMethod.C +++ b/src/lagrangian/intermediate/submodels/MPPIC/AveragingMethods/AveragingMethod/AveragingMethod.C @@ -84,20 +84,19 @@ Foam::AveragingMethod<Type>::New const fvMesh& mesh ) { - word averageType(dict.lookup(typeName)); + const word averageType(dict.lookup(typeName)); //Info<< "Selecting averaging method " // << averageType << endl; - typename dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(averageType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(averageType); if (!cstrIter.found()) { FatalErrorInFunction - << "Unknown averaging method " << averageType - << ", constructor not in hash table" << nl << nl - << " Valid averaging methods are:" << nl + << "Unknown averaging method " + << averageType << nl << nl + << "Valid averaging methods :" << nl << dictionaryConstructorTablePtr_->sortedToc() << abort(FatalError); } diff --git a/src/lagrangian/intermediate/submodels/MPPIC/CorrectionLimitingMethods/CorrectionLimitingMethod/CorrectionLimitingMethod.C b/src/lagrangian/intermediate/submodels/MPPIC/CorrectionLimitingMethods/CorrectionLimitingMethod/CorrectionLimitingMethod.C index d958d1a146..5298d93b1a 100644 --- a/src/lagrangian/intermediate/submodels/MPPIC/CorrectionLimitingMethods/CorrectionLimitingMethod/CorrectionLimitingMethod.C +++ b/src/lagrangian/intermediate/submodels/MPPIC/CorrectionLimitingMethods/CorrectionLimitingMethod/CorrectionLimitingMethod.C @@ -60,15 +60,14 @@ Foam::CorrectionLimitingMethod::New Info<< "Selecting correction limiter " << modelType << endl; - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(modelType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { FatalErrorInFunction - << "Unknown correction limiter type " << modelType - << ", constructor not in hash table" << nl << nl - << " Valid correction limiter types are:" << nl + << "Unknown correction limiter type " + << modelType << nl << nl + << "Valid correction limiter types :" << nl << dictionaryConstructorTablePtr_->sortedToc() << abort(FatalError); } diff --git a/src/lagrangian/intermediate/submodels/MPPIC/DampingModels/DampingModel/DampingModel.C b/src/lagrangian/intermediate/submodels/MPPIC/DampingModels/DampingModel/DampingModel.C index 8d7836cb2b..fd2a6cb375 100644 --- a/src/lagrangian/intermediate/submodels/MPPIC/DampingModels/DampingModel/DampingModel.C +++ b/src/lagrangian/intermediate/submodels/MPPIC/DampingModels/DampingModel/DampingModel.C @@ -84,15 +84,14 @@ Foam::DampingModel<CloudType>::New Info<< "Selecting damping model " << modelType << endl; - typename dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(modelType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { FatalErrorInFunction - << "Unknown damping model type " << modelType - << ", constructor not in hash table" << nl << nl - << " Valid damping model types are:" << nl + << "Unknown damping model type " + << modelType << nl << nl + << "Valid damping model types :" << nl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/src/lagrangian/intermediate/submodels/MPPIC/IsotropyModels/IsotropyModel/IsotropyModel.C b/src/lagrangian/intermediate/submodels/MPPIC/IsotropyModels/IsotropyModel/IsotropyModel.C index c8b02261b8..d929247b2e 100644 --- a/src/lagrangian/intermediate/submodels/MPPIC/IsotropyModels/IsotropyModel/IsotropyModel.C +++ b/src/lagrangian/intermediate/submodels/MPPIC/IsotropyModels/IsotropyModel/IsotropyModel.C @@ -88,15 +88,14 @@ Foam::IsotropyModel<CloudType>::New Info<< "Selecting isotropy model " << modelType << endl; - typename dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(modelType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { FatalErrorInFunction - << "Unknown isotropy model type " << modelType - << ", constructor not in hash table" << nl << nl - << " Valid isotropy model types are:" << nl + << "Unknown isotropy model type " + << modelType << nl << nl + << "Valid isotropy model types :" << nl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/src/lagrangian/intermediate/submodels/MPPIC/PackingModels/PackingModel/PackingModel.C b/src/lagrangian/intermediate/submodels/MPPIC/PackingModels/PackingModel/PackingModel.C index 136c13eff4..0307220208 100644 --- a/src/lagrangian/intermediate/submodels/MPPIC/PackingModels/PackingModel/PackingModel.C +++ b/src/lagrangian/intermediate/submodels/MPPIC/PackingModels/PackingModel/PackingModel.C @@ -86,15 +86,14 @@ Foam::PackingModel<CloudType>::New Info<< "Selecting packing model " << modelType << endl; - typename dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(modelType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { FatalErrorInFunction - << "Unknown packing model type " << modelType - << ", constructor not in hash table" << nl << nl - << " Valid packing model types are:" << nl + << "Unknown packing model type " + << modelType << nl << nl + << "Valid packing model types :" << nl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/src/lagrangian/intermediate/submodels/MPPIC/ParticleStressModels/ParticleStressModel/ParticleStressModel.C b/src/lagrangian/intermediate/submodels/MPPIC/ParticleStressModels/ParticleStressModel/ParticleStressModel.C index 29e95f3095..8fca6accbc 100644 --- a/src/lagrangian/intermediate/submodels/MPPIC/ParticleStressModels/ParticleStressModel/ParticleStressModel.C +++ b/src/lagrangian/intermediate/submodels/MPPIC/ParticleStressModels/ParticleStressModel/ParticleStressModel.C @@ -63,19 +63,18 @@ Foam::autoPtr<Foam::ParticleStressModel> Foam::ParticleStressModel::New const dictionary& dict ) { - word modelType(dict.lookup("type")); + const word modelType(dict.lookup("type")); Info<< "Selecting particle stress model " << modelType << endl; - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(modelType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { FatalErrorInFunction - << "Unknown particle stress model type " << modelType - << ", constructor not in hash table" << nl << nl - << " Valid particle stress model types are:" << nl + << "Unknown particle stress model type " + << modelType << nl << nl + << "Valid particle stress model types :" << nl << dictionaryConstructorTablePtr_->sortedToc() << abort(FatalError); } diff --git a/src/lagrangian/intermediate/submodels/MPPIC/TimeScaleModels/TimeScaleModel/TimeScaleModel.C b/src/lagrangian/intermediate/submodels/MPPIC/TimeScaleModels/TimeScaleModel/TimeScaleModel.C index 6502846403..8499550278 100644 --- a/src/lagrangian/intermediate/submodels/MPPIC/TimeScaleModels/TimeScaleModel/TimeScaleModel.C +++ b/src/lagrangian/intermediate/submodels/MPPIC/TimeScaleModels/TimeScaleModel/TimeScaleModel.C @@ -65,19 +65,18 @@ Foam::autoPtr<Foam::TimeScaleModel> Foam::TimeScaleModel::New const dictionary& dict ) { - word modelType(dict.lookup("type")); + const word modelType(dict.lookup("type")); Info<< "Selecting time scale model " << modelType << endl; - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(modelType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { FatalErrorInFunction - << "Unknown time scale model type " << modelType - << ", constructor not in hash table" << nl << nl - << " Valid time scale model types are:" << nl + << "Unknown time scale model type " + << modelType << nl << nl + << "Valid time scale model types :" << nl << dictionaryConstructorTablePtr_->sortedToc() << abort(FatalError); } diff --git a/src/lagrangian/intermediate/submodels/Reacting/CompositionModel/CompositionModel/CompositionModelNew.C b/src/lagrangian/intermediate/submodels/Reacting/CompositionModel/CompositionModel/CompositionModelNew.C index 3ed57d2d48..6d226d6b1e 100644 --- a/src/lagrangian/intermediate/submodels/Reacting/CompositionModel/CompositionModel/CompositionModelNew.C +++ b/src/lagrangian/intermediate/submodels/Reacting/CompositionModel/CompositionModel/CompositionModelNew.C @@ -39,15 +39,14 @@ Foam::CompositionModel<CloudType>::New Info<< "Selecting composition model " << modelType << endl; - typename dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(modelType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { FatalErrorInFunction - << "Unknown composition model type " + << "Unknown compositionModel type " << modelType << nl << nl - << "Valid composition model types are:" << nl + << "Valid compositionModel types :" << nl << dictionaryConstructorTablePtr_->sortedToc() << nl << exit(FatalError); } diff --git a/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/PhaseChangeModel/PhaseChangeModelNew.C b/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/PhaseChangeModel/PhaseChangeModelNew.C index 8f85b5298e..3e8abf2397 100644 --- a/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/PhaseChangeModel/PhaseChangeModelNew.C +++ b/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/PhaseChangeModel/PhaseChangeModelNew.C @@ -39,15 +39,14 @@ Foam::PhaseChangeModel<CloudType>::New Info<< "Selecting phase change model " << modelType << endl; - typename dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(modelType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { FatalErrorInFunction - << "Unknown phase change model type " + << "Unknown phaseChangeModel type " << modelType << nl << nl - << "Valid phase change model types are:" << nl + << "Valid phaseChangeModel types :" << nl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/src/lagrangian/intermediate/submodels/ReactingMultiphase/DevolatilisationModel/DevolatilisationModel/DevolatilisationModelNew.C b/src/lagrangian/intermediate/submodels/ReactingMultiphase/DevolatilisationModel/DevolatilisationModel/DevolatilisationModelNew.C index 195a955fbf..2bfb98886f 100644 --- a/src/lagrangian/intermediate/submodels/ReactingMultiphase/DevolatilisationModel/DevolatilisationModel/DevolatilisationModelNew.C +++ b/src/lagrangian/intermediate/submodels/ReactingMultiphase/DevolatilisationModel/DevolatilisationModel/DevolatilisationModelNew.C @@ -39,15 +39,14 @@ Foam::DevolatilisationModel<CloudType>::New Info<< "Selecting devolatilisation model " << modelType << endl; - typename dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(modelType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { FatalErrorInFunction - << "Unknown devolatilisation model type " + << "Unknown devolatilisationModel type " << modelType << nl << nl - << "Valid devolatilisation model types are:" << nl + << "Valid devolatilisationModel types :" << nl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/src/lagrangian/intermediate/submodels/ReactingMultiphase/SurfaceReactionModel/SurfaceReactionModel/SurfaceReactionModelNew.C b/src/lagrangian/intermediate/submodels/ReactingMultiphase/SurfaceReactionModel/SurfaceReactionModel/SurfaceReactionModelNew.C index f57f768e95..9888a13c6f 100644 --- a/src/lagrangian/intermediate/submodels/ReactingMultiphase/SurfaceReactionModel/SurfaceReactionModel/SurfaceReactionModelNew.C +++ b/src/lagrangian/intermediate/submodels/ReactingMultiphase/SurfaceReactionModel/SurfaceReactionModel/SurfaceReactionModelNew.C @@ -39,15 +39,14 @@ Foam::SurfaceReactionModel<CloudType>::New Info<< "Selecting surface reaction model " << modelType << endl; - typename dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(modelType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { FatalErrorInFunction - << "Unknown surface reaction model type " + << "Unknown surfaceReactionModel type " << modelType << nl << nl - << "Valid surface reaction model types are:" << nl + << "Valid surfaceReactionModel types :" << nl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/src/lagrangian/intermediate/submodels/Thermodynamic/HeatTransferModel/HeatTransferModel/HeatTransferModelNew.C b/src/lagrangian/intermediate/submodels/Thermodynamic/HeatTransferModel/HeatTransferModel/HeatTransferModelNew.C index 6396e4c698..c0f72be44f 100644 --- a/src/lagrangian/intermediate/submodels/Thermodynamic/HeatTransferModel/HeatTransferModel/HeatTransferModelNew.C +++ b/src/lagrangian/intermediate/submodels/Thermodynamic/HeatTransferModel/HeatTransferModel/HeatTransferModelNew.C @@ -39,15 +39,14 @@ Foam::HeatTransferModel<CloudType>::New Info<< "Selecting heat transfer model " << modelType << endl; - typename dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(modelType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { FatalErrorInFunction - << "Unknown heat transfer model type " + << "Unknown heatTransferModel type " << modelType << nl << nl - << "Valid heat transfer model types are:" << nl + << "Valid heatTransferModel types :" << nl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/src/lagrangian/molecularDynamics/potential/energyScalingFunction/basic/energyScalingFunctionNew.C b/src/lagrangian/molecularDynamics/potential/energyScalingFunction/basic/energyScalingFunctionNew.C index fdc1b1bfd8..f5ddf77009 100644 --- a/src/lagrangian/molecularDynamics/potential/energyScalingFunction/basic/energyScalingFunctionNew.C +++ b/src/lagrangian/molecularDynamics/potential/energyScalingFunction/basic/energyScalingFunctionNew.C @@ -41,15 +41,14 @@ Foam::autoPtr<Foam::energyScalingFunction> Foam::energyScalingFunction::New << scalingType << " for " << name << " potential energy." << endl; - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(scalingType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(scalingType); if (!cstrIter.found()) { FatalErrorInFunction << "Unknown energyScalingFunction type " << scalingType << nl << nl - << "Valid energyScalingFunctions are:" << nl + << "Valid energyScalingFunction types:" << nl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/src/lagrangian/molecularDynamics/potential/pairPotential/basic/pairPotentialNew.C b/src/lagrangian/molecularDynamics/potential/pairPotential/basic/pairPotentialNew.C index a6ed6c1e2c..22bc439d78 100644 --- a/src/lagrangian/molecularDynamics/potential/pairPotential/basic/pairPotentialNew.C +++ b/src/lagrangian/molecularDynamics/potential/pairPotential/basic/pairPotentialNew.C @@ -40,15 +40,14 @@ Foam::autoPtr<Foam::pairPotential> Foam::pairPotential::New << potentialType << " for " << name << " interaction." << endl; - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(potentialType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(potentialType); if (!cstrIter.found()) { FatalErrorInFunction << "Unknown pairPotential type " << potentialType << nl << nl - << "Valid pairPotentials are:" << nl + << "Valid pairPotential types :" << nl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/src/lagrangian/molecularDynamics/potential/tetherPotential/basic/tetherPotentialNew.C b/src/lagrangian/molecularDynamics/potential/tetherPotential/basic/tetherPotentialNew.C index 55d1f6864a..3570517f8d 100644 --- a/src/lagrangian/molecularDynamics/potential/tetherPotential/basic/tetherPotentialNew.C +++ b/src/lagrangian/molecularDynamics/potential/tetherPotential/basic/tetherPotentialNew.C @@ -38,15 +38,14 @@ Foam::autoPtr<Foam::tetherPotential> Foam::tetherPotential::New Info<< nl << "Selecting tether potential " << potentialType << " for " << name << endl; - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(potentialType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(potentialType); if (!cstrIter.found()) { FatalErrorInFunction << "Unknown tetherPotential type " << potentialType << nl << nl - << "Valid tetherPotentials are:" << nl + << "Valid tetherPotential types :" << nl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/src/lagrangian/spray/submodels/AtomizationModel/AtomizationModel/AtomizationModelNew.C b/src/lagrangian/spray/submodels/AtomizationModel/AtomizationModel/AtomizationModelNew.C index 5562895841..2ac000be12 100644 --- a/src/lagrangian/spray/submodels/AtomizationModel/AtomizationModel/AtomizationModelNew.C +++ b/src/lagrangian/spray/submodels/AtomizationModel/AtomizationModel/AtomizationModelNew.C @@ -35,21 +35,20 @@ Foam::AtomizationModel<CloudType>::New CloudType& owner ) { - word AtomizationModelType(dict.lookup("atomizationModel")); + const word modelType(dict.lookup("atomizationModel")); - Info<< "Selecting AtomizationModel " << AtomizationModelType << endl; + Info<< "Selecting atomizationModel " << modelType << endl; - typename dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(AtomizationModelType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { FatalErrorInFunction - << "Unknown AtomizationModelType type " - << AtomizationModelType - << ", constructor not in hash table" << nl << nl - << " Valid AtomizationModel types are:" << nl - << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); + << "Unknown atomizationModel type " + << modelType + << "Valid atomizationModel types :" << nl + << dictionaryConstructorTablePtr_->sortedToc() + << exit(FatalError); } return autoPtr<AtomizationModel<CloudType>>(cstrIter()(dict, owner)); diff --git a/src/lagrangian/spray/submodels/BreakupModel/BreakupModel/BreakupModelNew.C b/src/lagrangian/spray/submodels/BreakupModel/BreakupModel/BreakupModelNew.C index 25a1e75d69..3189306a86 100644 --- a/src/lagrangian/spray/submodels/BreakupModel/BreakupModel/BreakupModelNew.C +++ b/src/lagrangian/spray/submodels/BreakupModel/BreakupModel/BreakupModelNew.C @@ -35,21 +35,20 @@ Foam::BreakupModel<CloudType>::New CloudType& owner ) { - word BreakupModelType(dict.lookup("breakupModel")); + const word modelType(dict.lookup("breakupModel")); - Info<< "Selecting BreakupModel " << BreakupModelType << endl; + Info<< "Selecting breakupModel " << modelType << endl; - typename dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(BreakupModelType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { FatalErrorInFunction - << "Unknown BreakupModelType type " - << BreakupModelType - << ", constructor not in hash table" << nl << nl - << " Valid BreakupModel types are:" << nl - << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); + << "Unknown breakupModel type " + << modelType << nl << nl + << "Valid breakupModel types :" << nl + << dictionaryConstructorTablePtr_->sortedToc() + << exit(FatalError); } return autoPtr<BreakupModel<CloudType>>(cstrIter()(dict, owner)); diff --git a/src/mesh/blockMesh/blockEdges/blockEdge/blockEdge.C b/src/mesh/blockMesh/blockEdges/blockEdge/blockEdge.C index fd53017394..04ea707fa8 100644 --- a/src/mesh/blockMesh/blockEdges/blockEdge/blockEdge.C +++ b/src/mesh/blockMesh/blockEdges/blockEdge/blockEdge.C @@ -87,15 +87,14 @@ Foam::autoPtr<Foam::blockEdge> Foam::blockEdge::New const word edgeType(is); - IstreamConstructorTable::iterator cstrIter = - IstreamConstructorTablePtr_->find(edgeType); + auto cstrIter = IstreamConstructorTablePtr_->cfind(edgeType); if (!cstrIter.found()) { FatalErrorInFunction << "Unknown blockEdge type " << edgeType << nl << nl - << "Valid blockEdge types are" << endl + << "Valid blockEdge types :" << endl << IstreamConstructorTablePtr_->sortedToc() << abort(FatalError); } diff --git a/src/mesh/blockMesh/blockFaces/blockFace/blockFace.C b/src/mesh/blockMesh/blockFaces/blockFace/blockFace.C index cec92a091a..dd194b52c4 100644 --- a/src/mesh/blockMesh/blockFaces/blockFace/blockFace.C +++ b/src/mesh/blockMesh/blockFaces/blockFace/blockFace.C @@ -84,15 +84,14 @@ Foam::autoPtr<Foam::blockFace> Foam::blockFace::New const word faceType(is); - IstreamConstructorTable::iterator cstrIter = - IstreamConstructorTablePtr_->find(faceType); + auto cstrIter = IstreamConstructorTablePtr_->cfind(faceType); if (!cstrIter.found()) { FatalErrorInFunction << "Unknown blockFace type " << faceType << nl << nl - << "Valid blockFace types are" << endl + << "Valid blockFace types :" << endl << IstreamConstructorTablePtr_->sortedToc() << abort(FatalError); } diff --git a/src/mesh/blockMesh/blockVertices/blockVertex/blockVertex.C b/src/mesh/blockMesh/blockVertices/blockVertex/blockVertex.C index 3593a69ec8..e40ff63751 100644 --- a/src/mesh/blockMesh/blockVertices/blockVertex/blockVertex.C +++ b/src/mesh/blockMesh/blockVertices/blockVertex/blockVertex.C @@ -78,15 +78,14 @@ Foam::autoPtr<Foam::blockVertex> Foam::blockVertex::New { const word faceType(firstToken.wordToken()); - IstreamConstructorTable::iterator cstrIter = - IstreamConstructorTablePtr_->find(faceType); + auto cstrIter = IstreamConstructorTablePtr_->cfind(faceType); if (!cstrIter.found()) { FatalErrorInFunction << "Unknown blockVertex type " << faceType << nl << nl - << "Valid blockVertex types are" << endl + << "Valid blockVertex types :" << endl << IstreamConstructorTablePtr_->sortedToc() << abort(FatalError); } diff --git a/src/mesh/blockMesh/blocks/block/block.C b/src/mesh/blockMesh/blocks/block/block.C index 96e8c5d4c1..dc842131a2 100644 --- a/src/mesh/blockMesh/blocks/block/block.C +++ b/src/mesh/blockMesh/blocks/block/block.C @@ -78,8 +78,7 @@ Foam::autoPtr<Foam::block> Foam::block::New const word blockOrCellShapeType(is); - IstreamConstructorTable::iterator cstrIter = - IstreamConstructorTablePtr_->find(blockOrCellShapeType); + auto cstrIter = IstreamConstructorTablePtr_->cfind(blockOrCellShapeType); if (!cstrIter.found()) { diff --git a/src/mesh/extrudeModel/extrudeModel/extrudeModelNew.C b/src/mesh/extrudeModel/extrudeModel/extrudeModelNew.C index 570a4518d3..a70ba047e3 100644 --- a/src/mesh/extrudeModel/extrudeModel/extrudeModelNew.C +++ b/src/mesh/extrudeModel/extrudeModel/extrudeModelNew.C @@ -36,15 +36,14 @@ Foam::autoPtr<Foam::extrudeModel> Foam::extrudeModel::New Info<< "Selecting extrudeModel " << modelType << endl; - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(modelType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { FatalErrorInFunction << "Unknown extrudeModel type " << modelType << nl << nl - << "Valid extrudeModel types are :" << nl + << "Valid extrudeModel types :" << nl << dictionaryConstructorTablePtr_->sortedToc() << nl << exit(FatalError); } diff --git a/src/mesh/snappyHexMesh/externalDisplacementMeshMover/externalDisplacementMeshMover.C b/src/mesh/snappyHexMesh/externalDisplacementMeshMover/externalDisplacementMeshMover.C index 5b945d5164..4da5721d72 100644 --- a/src/mesh/snappyHexMesh/externalDisplacementMeshMover/externalDisplacementMeshMover.C +++ b/src/mesh/snappyHexMesh/externalDisplacementMeshMover/externalDisplacementMeshMover.C @@ -141,8 +141,7 @@ Foam::externalDisplacementMeshMover::New { Info<< "Selecting externalDisplacementMeshMover " << type << endl; - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(type); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(type); if (!cstrIter.found()) { diff --git a/src/meshTools/AMIInterpolation/AMIInterpolation/AMIMethod/AMIMethod/AMIMethodNew.C b/src/meshTools/AMIInterpolation/AMIInterpolation/AMIMethod/AMIMethod/AMIMethodNew.C index c43a03c950..840cbdb9ce 100644 --- a/src/meshTools/AMIInterpolation/AMIInterpolation/AMIMethod/AMIMethod/AMIMethodNew.C +++ b/src/meshTools/AMIInterpolation/AMIInterpolation/AMIMethod/AMIMethod/AMIMethodNew.C @@ -44,16 +44,16 @@ Foam::AMIMethod<SourcePatch, TargetPatch>::New Info<< "Selecting AMIMethod " << methodName << endl; } - typename componentsConstructorTable::iterator cstrIter = - componentsConstructorTablePtr_->find(methodName); + auto cstrIter = componentsConstructorTablePtr_->cfind(methodName); if (!cstrIter.found()) { FatalErrorInFunction << "Unknown AMIMethod type " << methodName << nl << nl - << "Valid AMIMethod types are:" << nl - << componentsConstructorTablePtr_->sortedToc() << exit(FatalError); + << "Valid AMIMethod types:" << nl + << componentsConstructorTablePtr_->sortedToc() + << exit(FatalError); } return autoPtr<AMIMethod<SourcePatch, TargetPatch>> diff --git a/src/meshTools/coordinateSystems/coordinateRotation/coordinateRotationNew.C b/src/meshTools/coordinateSystems/coordinateRotation/coordinateRotationNew.C index feb473421c..a1e939abad 100644 --- a/src/meshTools/coordinateSystems/coordinateRotation/coordinateRotationNew.C +++ b/src/meshTools/coordinateSystems/coordinateRotation/coordinateRotationNew.C @@ -42,7 +42,7 @@ Foam::autoPtr<Foam::coordinateRotation> Foam::coordinateRotation::New { FatalIOErrorInFunction(dict) << "Unknown coordinateRotation type " << rotType << nl << nl - << "Valid coordinateRotation types are :" << nl + << "Valid coordinateRotation types :" << nl << objectRegistryConstructorTablePtr_->sortedToc() << exit(FatalIOError); } @@ -64,7 +64,7 @@ Foam::autoPtr<Foam::coordinateRotation> Foam::coordinateRotation::New { FatalIOErrorInFunction(dict) << "Unknown coordinateRotation type " << rotType << nl << nl - << "Valid coordinateRotation types are :" << nl + << "Valid coordinateRotation types :" << nl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalIOError); } diff --git a/src/meshTools/coordinateSystems/coordinateRotation/cylindrical.C b/src/meshTools/coordinateSystems/coordinateRotation/cylindrical.C index 3ebc07d442..481f15f71b 100644 --- a/src/meshTools/coordinateSystems/coordinateRotation/cylindrical.C +++ b/src/meshTools/coordinateSystems/coordinateRotation/cylindrical.C @@ -113,12 +113,12 @@ Foam::cylindrical::cylindrical(const tensorField& R) Foam::cylindrical::cylindrical(const dictionary& dict) : Rptr_(), - origin_(), - e3_() + origin_(Zero), + e3_(Zero) { FatalErrorInFunction << " cylindrical can not be constructed from dictionary " - << " use the construtctor : " + << " use the constructor : " "(" " const dictionary&, const objectRegistry&" ")" diff --git a/src/meshTools/coordinateSystems/coordinateRotation/cylindrical.H b/src/meshTools/coordinateSystems/coordinateRotation/cylindrical.H index 2baca6682c..b8502d8aab 100644 --- a/src/meshTools/coordinateSystems/coordinateRotation/cylindrical.H +++ b/src/meshTools/coordinateSystems/coordinateRotation/cylindrical.H @@ -69,7 +69,7 @@ class cylindrical { // Private data - //- AutoPtr to transformation tensor + //- An autoPtr to the transformation tensor autoPtr<tensorField> Rptr_; //- Origin of the coordinate system diff --git a/src/meshTools/coordinateSystems/coordinateSystemNew.C b/src/meshTools/coordinateSystems/coordinateSystemNew.C index bb4b860e86..486a12bc89 100644 --- a/src/meshTools/coordinateSystems/coordinateSystemNew.C +++ b/src/meshTools/coordinateSystems/coordinateSystemNew.C @@ -46,7 +46,7 @@ Foam::autoPtr<Foam::coordinateSystem> Foam::coordinateSystem::New dict ) << "Unknown coordinateSystem type " << coordType << nl << nl - << "Valid coordinateSystem types are :" << nl + << "Valid coordinateSystem types :" << nl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalIOError); } diff --git a/src/meshTools/edgeMesh/edgeMeshIO.C b/src/meshTools/edgeMesh/edgeMeshIO.C index a187cb2d6c..f04f03456f 100644 --- a/src/meshTools/edgeMesh/edgeMeshIO.C +++ b/src/meshTools/edgeMesh/edgeMeshIO.C @@ -96,14 +96,13 @@ void Foam::edgeMesh::write const word ext = name.ext(); - writefileExtensionMemberFunctionTable::iterator mfIter = - writefileExtensionMemberFunctionTablePtr_->find(ext); + auto mfIter = writefileExtensionMemberFunctionTablePtr_->cfind(ext); if (!mfIter.found()) { FatalErrorInFunction << "Unknown file extension " << ext << nl << nl - << "Valid types are :" << endl + << "Valid types :" << endl << writefileExtensionMemberFunctionTablePtr_->sortedToc() << exit(FatalError); } diff --git a/src/meshTools/edgeMesh/edgeMeshNew.C b/src/meshTools/edgeMesh/edgeMeshNew.C index fa488d6f55..60ed8096e9 100644 --- a/src/meshTools/edgeMesh/edgeMeshNew.C +++ b/src/meshTools/edgeMesh/edgeMeshNew.C @@ -33,15 +33,14 @@ Foam::autoPtr<Foam::edgeMesh> Foam::edgeMesh::New const word& ext ) { - fileExtensionConstructorTable::iterator cstrIter = - fileExtensionConstructorTablePtr_->find(ext); + auto cstrIter = fileExtensionConstructorTablePtr_->cfind(ext); if (!cstrIter.found()) { FatalErrorInFunction << "Unknown file extension " << ext << " for file " << name << nl << nl - << "Valid extensions are :" << nl + << "Valid extensions :" << nl << fileExtensionConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/src/meshTools/edgeMesh/extendedEdgeMesh/extendedEdgeMeshNew.C b/src/meshTools/edgeMesh/extendedEdgeMesh/extendedEdgeMeshNew.C index c960f10370..b83678f40b 100644 --- a/src/meshTools/edgeMesh/extendedEdgeMesh/extendedEdgeMeshNew.C +++ b/src/meshTools/edgeMesh/extendedEdgeMesh/extendedEdgeMeshNew.C @@ -42,15 +42,14 @@ Foam::autoPtr<Foam::extendedEdgeMesh> Foam::extendedEdgeMesh::New const word& ext ) { - fileExtensionConstructorTable::iterator cstrIter = - fileExtensionConstructorTablePtr_->find(ext); + auto cstrIter = fileExtensionConstructorTablePtr_->cfind(ext); if (!cstrIter.found()) { FatalErrorInFunction << "Unknown file extension " << ext << " for file " << name << nl << nl - << "Valid extensions are :" << nl + << "Valid extensions :" << nl << fileExtensionConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/src/meshTools/searchableSurfaces/searchableSurface/searchableSurface.C b/src/meshTools/searchableSurfaces/searchableSurface/searchableSurface.C index ac9b9daab0..2b1a224a75 100644 --- a/src/meshTools/searchableSurfaces/searchableSurface/searchableSurface.C +++ b/src/meshTools/searchableSurfaces/searchableSurface/searchableSurface.C @@ -43,15 +43,14 @@ Foam::autoPtr<Foam::searchableSurface> Foam::searchableSurface::New const dictionary& dict ) { - dictConstructorTable::iterator cstrIter = - dictConstructorTablePtr_->find(searchableSurfaceType); + auto cstrIter = dictConstructorTablePtr_->cfind(searchableSurfaceType); if (!cstrIter.found()) { FatalErrorInFunction - << "Unknown searchableSurface type " << searchableSurfaceType - << endl << endl - << "Valid searchableSurface types : " << endl + << "Unknown searchableSurface type " + << searchableSurfaceType << nl << nl + << "Valid searchableSurface types :" << endl << dictConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/src/meshTools/sets/topoSetSource/topoSetSource.C b/src/meshTools/sets/topoSetSource/topoSetSource.C index acf6238b38..40c20d21de 100644 --- a/src/meshTools/sets/topoSetSource/topoSetSource.C +++ b/src/meshTools/sets/topoSetSource/topoSetSource.C @@ -73,15 +73,14 @@ Foam::autoPtr<Foam::topoSetSource> Foam::topoSetSource::New const dictionary& dict ) { - wordConstructorTable::iterator cstrIter = - wordConstructorTablePtr_->find(topoSetSourceType); + auto cstrIter = wordConstructorTablePtr_->cfind(topoSetSourceType); if (!cstrIter.found()) { FatalErrorInFunction - << "Unknown topoSetSource type " << topoSetSourceType - << endl << endl - << "Valid topoSetSource types : " << endl + << "Unknown topoSetSource type " + << topoSetSourceType << nl << nl + << "Valid topoSetSource types :" << endl << wordConstructorTablePtr_->sortedToc() << exit(FatalError); } @@ -97,15 +96,14 @@ Foam::autoPtr<Foam::topoSetSource> Foam::topoSetSource::New Istream& is ) { - istreamConstructorTable::iterator cstrIter = - istreamConstructorTablePtr_->find(topoSetSourceType); + auto cstrIter = istreamConstructorTablePtr_->cfind(topoSetSourceType); if (!cstrIter.found()) { FatalErrorInFunction - << "Unknown topoSetSource type " << topoSetSourceType - << endl << endl - << "Valid topoSetSource types : " << endl + << "Unknown topoSetSource type " + << topoSetSourceType << nl << nl + << "Valid topoSetSource types :" << endl << istreamConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/src/meshTools/sets/topoSets/topoSet.C b/src/meshTools/sets/topoSets/topoSet.C index ca2e6d7bbc..b7e574ddcd 100644 --- a/src/meshTools/sets/topoSets/topoSet.C +++ b/src/meshTools/sets/topoSets/topoSet.C @@ -51,15 +51,14 @@ Foam::autoPtr<Foam::topoSet> Foam::topoSet::New writeOption w ) { - wordConstructorTable::iterator cstrIter = - wordConstructorTablePtr_->find(setType); + auto cstrIter = wordConstructorTablePtr_->cfind(setType); if (!cstrIter.found()) { FatalErrorInFunction - << "Unknown set type " << setType - << endl << endl - << "Valid set types : " << endl + << "Unknown set type " + << setType << nl << nl + << "Valid set types :" << endl << wordConstructorTablePtr_->sortedToc() << exit(FatalError); } @@ -77,15 +76,14 @@ Foam::autoPtr<Foam::topoSet> Foam::topoSet::New writeOption w ) { - sizeConstructorTable::iterator cstrIter = - sizeConstructorTablePtr_->find(setType); + auto cstrIter = sizeConstructorTablePtr_->cfind(setType); if (!cstrIter.found()) { FatalErrorInFunction - << "Unknown set type " << setType - << endl << endl - << "Valid set types : " << endl + << "Unknown set type " + << setType << nl << nl + << "Valid set types :" << endl << sizeConstructorTablePtr_->sortedToc() << exit(FatalError); } @@ -103,15 +101,14 @@ Foam::autoPtr<Foam::topoSet> Foam::topoSet::New writeOption w ) { - setConstructorTable::iterator cstrIter = - setConstructorTablePtr_->find(setType); + auto cstrIter = setConstructorTablePtr_->cfind(setType); if (!cstrIter.found()) { FatalErrorInFunction - << "Unknown set type " << setType - << endl << endl - << "Valid set types : " << endl + << "Unknown set type " + << setType << nl << nl + << "Valid set types :" << endl << setConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/src/overset/cellCellStencil/cellCellStencil/cellCellStencil.C b/src/overset/cellCellStencil/cellCellStencil/cellCellStencil.C index c6327181dc..8eb4dca330 100644 --- a/src/overset/cellCellStencil/cellCellStencil/cellCellStencil.C +++ b/src/overset/cellCellStencil/cellCellStencil/cellCellStencil.C @@ -68,18 +68,16 @@ Foam::autoPtr<Foam::cellCellStencil> Foam::cellCellStencil::New InfoInFunction << "Constructing cellCellStencil" << endl; } - word type(dict.lookup("method")); + const word stencilType(dict.lookup("method")); - - meshConstructorTable::iterator cstrIter = - meshConstructorTablePtr_->find(type); + auto cstrIter = meshConstructorTablePtr_->cfind(stencilType); if (cstrIter == meshConstructorTablePtr_->end()) { FatalErrorInFunction << "Unknown cellCellStencil type " - << type << nl << nl - << "Valid cellCellStencil types are" << endl + << stencilType << nl << nl + << "Valid cellCellStencil types :" << endl << meshConstructorTablePtr_->sortedToc() << abort(FatalError); } diff --git a/src/parallel/decompose/decompositionMethods/decompositionConstraints/decompositionConstraint/decompositionConstraint.C b/src/parallel/decompose/decompositionMethods/decompositionConstraints/decompositionConstraint/decompositionConstraint.C index 8ede3a7294..57ac5fb352 100644 --- a/src/parallel/decompose/decompositionMethods/decompositionConstraints/decompositionConstraint/decompositionConstraint.C +++ b/src/parallel/decompose/decompositionMethods/decompositionConstraints/decompositionConstraint/decompositionConstraint.C @@ -56,15 +56,14 @@ Foam::decompositionConstraint::New { Info<< "Selecting decompositionConstraint " << modelType << endl; - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(modelType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { FatalIOErrorInFunction(dict) << "Unknown decompositionConstraint type " << modelType << nl << nl - << "Valid decompositionConstraint types:" << endl + << "Valid decompositionConstraint types :" << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalIOError); } diff --git a/src/parallel/decompose/decompositionMethods/decompositionMethod/decompositionMethod.C b/src/parallel/decompose/decompositionMethods/decompositionMethod/decompositionMethod.C index 984851df71..a66acf8dbd 100644 --- a/src/parallel/decompose/decompositionMethods/decompositionMethod/decompositionMethod.C +++ b/src/parallel/decompose/decompositionMethods/decompositionMethod/decompositionMethod.C @@ -180,19 +180,18 @@ Foam::autoPtr<Foam::decompositionMethod> Foam::decompositionMethod::New const dictionary& decompositionDict ) { - word methodType(decompositionDict.lookup("method")); + const word methodType(decompositionDict.lookup("method")); Info<< "Selecting decompositionMethod " << methodType << endl; - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(methodType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(methodType); if (!cstrIter.found()) { FatalErrorInFunction << "Unknown decompositionMethod " << methodType << nl << nl - << "Valid decompositionMethods are : " << endl + << "Valid decompositionMethods : " << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/src/randomProcesses/noise/noiseModels/noiseModel/noiseModelNew.C b/src/randomProcesses/noise/noiseModels/noiseModel/noiseModelNew.C index 72f06f7649..9ebd3e518b 100644 --- a/src/randomProcesses/noise/noiseModels/noiseModel/noiseModelNew.C +++ b/src/randomProcesses/noise/noiseModels/noiseModel/noiseModelNew.C @@ -33,15 +33,14 @@ Foam::autoPtr<Foam::noiseModel> Foam::noiseModel::New(const dictionary& dict) Info<< "Selecting noiseModel " << modelType << endl; - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(modelType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { FatalErrorInFunction << "Unknown noiseModel type " << modelType << nl << nl - << "Valid noiseModel types are:" << nl + << "Valid noiseModel types :" << nl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/src/randomProcesses/windowModels/windowModel/windowModelNew.C b/src/randomProcesses/windowModels/windowModel/windowModelNew.C index 7b1c8a7e72..fad8be3d92 100644 --- a/src/randomProcesses/windowModels/windowModel/windowModelNew.C +++ b/src/randomProcesses/windowModels/windowModel/windowModelNew.C @@ -37,15 +37,14 @@ Foam::autoPtr<Foam::windowModel> Foam::windowModel::New Info<< "Selecting windowModel " << modelType << endl; - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(modelType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { FatalErrorInFunction << "Unknown windowModel type " << modelType << nl << nl - << "Valid windowModel types are:" << nl + << "Valid windowModel types :" << nl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/src/regionModels/pyrolysisModels/pyrolysisModel/pyrolysisModelNew.C b/src/regionModels/pyrolysisModels/pyrolysisModel/pyrolysisModelNew.C index 85db5ce6c8..2eb2bf5824 100644 --- a/src/regionModels/pyrolysisModels/pyrolysisModel/pyrolysisModelNew.C +++ b/src/regionModels/pyrolysisModels/pyrolysisModel/pyrolysisModelNew.C @@ -63,14 +63,14 @@ autoPtr<pyrolysisModel> pyrolysisModel::New Info<< "Selecting pyrolysisModel " << modelType << endl; - meshConstructorTable::iterator cstrIter = - meshConstructorTablePtr_->find(modelType); + auto cstrIter = meshConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { FatalErrorInFunction - << "Unknown pyrolysisModel type " << modelType - << nl << nl << "Valid pyrolisisModel types are:" << nl + << "Unknown pyrolysisModel type " + << modelType << nl << nl + << "Valid pyrolysisModel types :" << nl << meshConstructorTablePtr_->sortedToc() << exit(FatalError); } @@ -91,14 +91,14 @@ autoPtr<pyrolysisModel> pyrolysisModel::New Info<< "Selecting pyrolysisModel " << modelType << endl; - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(modelType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { FatalErrorInFunction - << "Unknown pyrolysisModel type " << modelType - << nl << nl << "Valid pyrolisisModel types are:" << nl + << "Unknown pyrolysisModel type " + << modelType << nl << nl + << "Valid pyrolysisModel types :" << nl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/src/regionModels/regionModel/regionModelFunctionObject/regionModelFunctionObject/regionModelFunctionObjectNew.C b/src/regionModels/regionModel/regionModelFunctionObject/regionModelFunctionObject/regionModelFunctionObjectNew.C index 7d585e7e2d..75d1694a71 100644 --- a/src/regionModels/regionModel/regionModelFunctionObject/regionModelFunctionObject/regionModelFunctionObjectNew.C +++ b/src/regionModels/regionModel/regionModelFunctionObject/regionModelFunctionObject/regionModelFunctionObjectNew.C @@ -39,15 +39,14 @@ Foam::regionModels::regionModelFunctionObject::New Info<< " " << modelType << endl; - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(modelType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { FatalErrorInFunction << "Unknown region model function type " << modelType << nl << nl - << "Valid region model function types are:" << nl + << "Valid region model function types :" << nl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/src/regionModels/surfaceFilmModels/submodels/kinematic/filmThermoModel/filmThermoModel/filmThermoModelNew.C b/src/regionModels/surfaceFilmModels/submodels/kinematic/filmThermoModel/filmThermoModel/filmThermoModelNew.C index 67baf4f6c1..8b36192035 100644 --- a/src/regionModels/surfaceFilmModels/submodels/kinematic/filmThermoModel/filmThermoModel/filmThermoModelNew.C +++ b/src/regionModels/surfaceFilmModels/submodels/kinematic/filmThermoModel/filmThermoModel/filmThermoModelNew.C @@ -46,15 +46,16 @@ autoPtr<filmThermoModel> filmThermoModel::New Info<< " Selecting filmThermoModel " << modelType << endl; - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(modelType); + auto cstrIter = + dictionaryConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { FatalErrorInFunction - << "Unknown filmThermoModel type " << modelType << nl << nl - << "Valid filmThermoModel types are:" << nl - << dictionaryConstructorTablePtr_->toc() + << "Unknown filmThermoModel type " + << modelType << nl << nl + << "Valid filmThermoModel types :" << nl + << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/src/regionModels/surfaceFilmModels/submodels/kinematic/filmTurbulenceModel/filmTurbulenceModel/filmTurbulenceModelNew.C b/src/regionModels/surfaceFilmModels/submodels/kinematic/filmTurbulenceModel/filmTurbulenceModel/filmTurbulenceModelNew.C index a138fa6a68..a27014fc3f 100644 --- a/src/regionModels/surfaceFilmModels/submodels/kinematic/filmTurbulenceModel/filmTurbulenceModel/filmTurbulenceModelNew.C +++ b/src/regionModels/surfaceFilmModels/submodels/kinematic/filmTurbulenceModel/filmTurbulenceModel/filmTurbulenceModelNew.C @@ -46,15 +46,15 @@ autoPtr<filmTurbulenceModel> filmTurbulenceModel::New Info<< " Selecting filmTurbulenceModel " << modelType << endl; - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(modelType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { FatalErrorInFunction - << "Unknown filmTurbulenceModel type " << modelType - << nl << nl << "Valid filmTurbulenceModel types are:" << nl - << dictionaryConstructorTablePtr_->toc() + << "Unknown filmTurbulenceModel type " + << modelType << nl << nl + << "Valid filmTurbulenceModel types :" << nl + << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/src/regionModels/surfaceFilmModels/submodels/kinematic/force/force/forceNew.C b/src/regionModels/surfaceFilmModels/submodels/kinematic/force/force/forceNew.C index 4ce1b6608d..4ebc37462a 100644 --- a/src/regionModels/surfaceFilmModels/submodels/kinematic/force/force/forceNew.C +++ b/src/regionModels/surfaceFilmModels/submodels/kinematic/force/force/forceNew.C @@ -45,15 +45,14 @@ autoPtr<force> force::New { Info<< " " << modelType << endl; - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(modelType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { - FatalErrorInFunction - << "Unknown force type " << modelType - << nl << nl << "Valid force types are:" << nl - << dictionaryConstructorTablePtr_->toc() + FatalErrorInFunction << "Unknown force type " + << modelType << nl << nl + << "Valid force types :" << nl + << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/src/regionModels/surfaceFilmModels/submodels/kinematic/injectionModel/injectionModel/injectionModelNew.C b/src/regionModels/surfaceFilmModels/submodels/kinematic/injectionModel/injectionModel/injectionModelNew.C index b06590a55c..19d56b4e63 100644 --- a/src/regionModels/surfaceFilmModels/submodels/kinematic/injectionModel/injectionModel/injectionModelNew.C +++ b/src/regionModels/surfaceFilmModels/submodels/kinematic/injectionModel/injectionModel/injectionModelNew.C @@ -45,15 +45,15 @@ autoPtr<injectionModel> injectionModel::New { Info<< " " << modelType << endl; - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(modelType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { FatalErrorInFunction - << "Unknown injectionModel type " << modelType - << nl << nl << "Valid injectionModel types are:" << nl - << dictionaryConstructorTablePtr_->toc() + << "Unknown injectionModel type " + << modelType << nl << nl + << "Valid injectionModel types :" << nl + << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/src/regionModels/surfaceFilmModels/submodels/thermo/filmRadiationModel/filmRadiationModel/filmRadiationModelNew.C b/src/regionModels/surfaceFilmModels/submodels/thermo/filmRadiationModel/filmRadiationModel/filmRadiationModelNew.C index 781f1778ef..ef7d7e69d6 100644 --- a/src/regionModels/surfaceFilmModels/submodels/thermo/filmRadiationModel/filmRadiationModel/filmRadiationModelNew.C +++ b/src/regionModels/surfaceFilmModels/submodels/thermo/filmRadiationModel/filmRadiationModel/filmRadiationModelNew.C @@ -42,19 +42,19 @@ autoPtr<filmRadiationModel> filmRadiationModel::New const dictionary& dict ) { - word modelType(dict.lookup("radiationModel")); + const word modelType(dict.lookup("radiationModel")); Info<< " Selecting radiationModel " << modelType << endl; - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(modelType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { FatalErrorInFunction - << "Unknown radiationModel type " << modelType << nl << nl - << "Valid filmRadiationModel types are:" << nl - << dictionaryConstructorTablePtr_->toc() + << "Unknown radiationModel type " + << modelType << nl << nl + << "Valid filmRadiationModel types :" << nl + << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/src/regionModels/surfaceFilmModels/submodels/thermo/filmViscosityModel/filmViscosityModel/filmViscosityModelNew.C b/src/regionModels/surfaceFilmModels/submodels/thermo/filmViscosityModel/filmViscosityModel/filmViscosityModelNew.C index 25be0a0c28..7e9635a3ac 100644 --- a/src/regionModels/surfaceFilmModels/submodels/thermo/filmViscosityModel/filmViscosityModel/filmViscosityModelNew.C +++ b/src/regionModels/surfaceFilmModels/submodels/thermo/filmViscosityModel/filmViscosityModel/filmViscosityModelNew.C @@ -43,19 +43,19 @@ autoPtr<filmViscosityModel> filmViscosityModel::New volScalarField& mu ) { - word modelType(dict.lookup("filmViscosityModel")); + const word modelType(dict.lookup("filmViscosityModel")); Info<< " Selecting filmViscosityModel " << modelType << endl; - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(modelType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { FatalErrorInFunction - << "Unknown filmViscosityModel type " << modelType - << nl << nl << "Valid filmViscosityModel types are:" << nl - << dictionaryConstructorTablePtr_->toc() + << "Unknown filmViscosityModel type " + << modelType << nl << nl + << "Valid filmViscosityModel types :" << nl + << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/src/regionModels/surfaceFilmModels/submodels/thermo/heatTransferModel/heatTransferModel/heatTransferModelNew.C b/src/regionModels/surfaceFilmModels/submodels/thermo/heatTransferModel/heatTransferModel/heatTransferModelNew.C index 52b1870390..6adfe59247 100644 --- a/src/regionModels/surfaceFilmModels/submodels/thermo/heatTransferModel/heatTransferModel/heatTransferModelNew.C +++ b/src/regionModels/surfaceFilmModels/submodels/thermo/heatTransferModel/heatTransferModel/heatTransferModelNew.C @@ -42,19 +42,19 @@ autoPtr<heatTransferModel> heatTransferModel::New const dictionary& dict ) { - word modelType(dict.lookup("heatTransferModel")); + const word modelType(dict.lookup("heatTransferModel")); Info<< " Selecting heatTransferModel " << modelType << endl; - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(modelType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { FatalErrorInFunction - << "Unknown heatTransferModel type " << modelType << nl << nl - << "Valid heatTransferModel types are:" << nl - << dictionaryConstructorTablePtr_->toc() + << "Unknown heatTransferModel type " + << modelType << nl << nl + << "Valid heatTransferModel types :" << nl + << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/src/regionModels/surfaceFilmModels/submodels/thermo/phaseChangeModel/phaseChangeModel/phaseChangeModelNew.C b/src/regionModels/surfaceFilmModels/submodels/thermo/phaseChangeModel/phaseChangeModel/phaseChangeModelNew.C index add63599f3..476222fdac 100644 --- a/src/regionModels/surfaceFilmModels/submodels/thermo/phaseChangeModel/phaseChangeModel/phaseChangeModelNew.C +++ b/src/regionModels/surfaceFilmModels/submodels/thermo/phaseChangeModel/phaseChangeModel/phaseChangeModelNew.C @@ -42,19 +42,19 @@ autoPtr<phaseChangeModel> phaseChangeModel::New const dictionary& dict ) { - word modelType(dict.lookup("phaseChangeModel")); + const word modelType(dict.lookup("phaseChangeModel")); Info<< " Selecting phaseChangeModel " << modelType << endl; - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(modelType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { FatalErrorInFunction - << "Unknown phaseChangeModel type " << modelType - << nl << nl << "Valid phaseChangeModel types are:" << nl - << dictionaryConstructorTablePtr_->toc() + << "Unknown phaseChangeModel type " + << modelType << nl << nl + << "Valid phaseChangeModel types :" << nl + << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/src/regionModels/surfaceFilmModels/surfaceFilmModel/surfaceFilmModelNew.C b/src/regionModels/surfaceFilmModels/surfaceFilmModel/surfaceFilmModelNew.C index 91b7639d9c..e6251116e7 100644 --- a/src/regionModels/surfaceFilmModels/surfaceFilmModel/surfaceFilmModelNew.C +++ b/src/regionModels/surfaceFilmModels/surfaceFilmModel/surfaceFilmModelNew.C @@ -66,15 +66,15 @@ autoPtr<surfaceFilmModel> surfaceFilmModel::New Info<< "Selecting surfaceFilmModel " << modelType << endl; - meshConstructorTable::iterator cstrIter = - meshConstructorTablePtr_->find(modelType); + auto cstrIter = meshConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { FatalErrorInFunction - << "Unknown surfaceFilmModel type " << modelType - << nl << nl << "Valid surfaceFilmModel types are:" << nl - << meshConstructorTablePtr_->toc() + << "Unknown surfaceFilmModel type " + << modelType << nl << nl + << "Valid surfaceFilmModel types :" << nl + << meshConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/src/regionModels/thermalBaffleModels/thermalBaffleModel/thermalBaffleModelNew.C b/src/regionModels/thermalBaffleModels/thermalBaffleModel/thermalBaffleModelNew.C index 6a9f88a1f0..ee6831c9ee 100644 --- a/src/regionModels/thermalBaffleModels/thermalBaffleModel/thermalBaffleModelNew.C +++ b/src/regionModels/thermalBaffleModels/thermalBaffleModel/thermalBaffleModelNew.C @@ -61,16 +61,15 @@ autoPtr<thermalBaffleModel> thermalBaffleModel::New(const fvMesh& mesh) ); } - meshConstructorTable::iterator cstrIter = - meshConstructorTablePtr_->find(modelType); + auto cstrIter = meshConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { FatalErrorInFunction - << "Unknown thermalBaffleModel type " << modelType - << nl << nl - << "Valid thermalBaffleModel types are:" << nl + << "Unknown thermalBaffleModel type " + << modelType << nl << nl + << "Valid thermalBaffleModel types :" << nl << meshConstructorTablePtr_->sortedToc() << exit(FatalError); } @@ -88,16 +87,14 @@ autoPtr<thermalBaffleModel> thermalBaffleModel::New word modelType = dict.lookupOrDefault<word>("thermalBaffleModel", "thermalBaffle"); - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(modelType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { - FatalErrorInFunction - << "Unknown thermalBaffleModel type " << modelType - << nl << nl - << "Valid thermalBaffleModel types are:" << nl + << "Unknown thermalBaffleModel type " + << modelType << nl << nl + << "Valid thermalBaffleModel types :" << nl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/src/renumber/renumberMethods/renumberMethod/renumberMethod.C b/src/renumber/renumberMethods/renumberMethod/renumberMethod.C index 8c91320221..ce5a12d6cf 100644 --- a/src/renumber/renumberMethods/renumberMethod/renumberMethod.C +++ b/src/renumber/renumberMethods/renumberMethod/renumberMethod.C @@ -48,8 +48,7 @@ Foam::autoPtr<Foam::renumberMethod> Foam::renumberMethod::New //Info<< "Selecting renumberMethod " << methodType << endl; - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(methodType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(methodType); if (!cstrIter.found()) { diff --git a/src/rigidBodyDynamics/bodies/rigidBody/rigidBody.C b/src/rigidBodyDynamics/bodies/rigidBody/rigidBody.C index 20ba5e1423..d13772c100 100644 --- a/src/rigidBodyDynamics/bodies/rigidBody/rigidBody.C +++ b/src/rigidBodyDynamics/bodies/rigidBody/rigidBody.C @@ -76,15 +76,14 @@ Foam::autoPtr<Foam::RBD::rigidBody> Foam::RBD::rigidBody::New { const word bodyType(dict.lookup("type")); - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(bodyType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(bodyType); if (!cstrIter.found()) { FatalErrorInFunction << "Unknown rigidBody type " << bodyType << nl << nl - << "Valid rigidBody types are : " << endl + << "Valid rigidBody types :" << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/src/rigidBodyDynamics/joints/joint/joint.C b/src/rigidBodyDynamics/joints/joint/joint.C index f5a89e9b72..92204ffebd 100644 --- a/src/rigidBodyDynamics/joints/joint/joint.C +++ b/src/rigidBodyDynamics/joints/joint/joint.C @@ -53,15 +53,14 @@ Foam::autoPtr<Foam::RBD::joint> Foam::RBD::joint::New { const word bodyType(dict.lookup("type")); - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(bodyType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(bodyType); if (!cstrIter.found()) { FatalErrorInFunction << "Unknown joint type " << bodyType << nl << nl - << "Valid joint types are : " << endl + << "Valid joint types :" << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/src/rigidBodyDynamics/restraints/restraint/rigidBodyRestraintNew.C b/src/rigidBodyDynamics/restraints/restraint/rigidBodyRestraintNew.C index ba95967324..dd2356982a 100644 --- a/src/rigidBodyDynamics/restraints/restraint/rigidBodyRestraintNew.C +++ b/src/rigidBodyDynamics/restraints/restraint/rigidBodyRestraintNew.C @@ -37,15 +37,14 @@ Foam::RBD::restraint::New { const word restraintType(dict.lookup("type")); - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(restraintType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(restraintType); if (!cstrIter.found()) { FatalErrorInFunction << "Unknown restraint type " << restraintType << nl << nl - << "Valid restraint types are : " << endl + << "Valid restraint types :" << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/src/rigidBodyDynamics/rigidBodySolvers/rigidBodySolver/newRigidBodySolver.C b/src/rigidBodyDynamics/rigidBodySolvers/rigidBodySolver/newRigidBodySolver.C index 0a24730e7e..10909d79fb 100644 --- a/src/rigidBodyDynamics/rigidBodySolvers/rigidBodySolver/newRigidBodySolver.C +++ b/src/rigidBodyDynamics/rigidBodySolvers/rigidBodySolver/newRigidBodySolver.C @@ -33,19 +33,18 @@ Foam::autoPtr<Foam::RBD::rigidBodySolver> Foam::RBD::rigidBodySolver::New const dictionary& dict ) { - word rigidBodySolverType(dict.lookup("type")); + const word solverType(dict.lookup("type")); - Info<< "Selecting rigidBodySolver " << rigidBodySolverType << endl; + Info<< "Selecting rigidBodySolver " << solverType << endl; - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(rigidBodySolverType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(solverType); if (!cstrIter.found()) { FatalErrorInFunction << "Unknown rigidBodySolverType type " - << rigidBodySolverType << endl << endl - << "Valid rigidBodySolver types are : " << endl + << solverType << nl << nl + << "Valid rigidBodySolver types :" << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/src/sampling/meshToMesh/calcMethod/meshToMeshMethod/meshToMeshMethodNew.C b/src/sampling/meshToMesh/calcMethod/meshToMeshMethod/meshToMeshMethodNew.C index c315dfc76b..d5ae8a9e1a 100644 --- a/src/sampling/meshToMesh/calcMethod/meshToMeshMethod/meshToMeshMethodNew.C +++ b/src/sampling/meshToMesh/calcMethod/meshToMeshMethod/meshToMeshMethodNew.C @@ -39,16 +39,16 @@ Foam::autoPtr<Foam::meshToMeshMethod> Foam::meshToMeshMethod::New Info<< "Selecting AMIMethod " << methodName << endl; } - componentsConstructorTable::iterator cstrIter = - componentsConstructorTablePtr_->find(methodName); + auto cstrIter = componentsConstructorTablePtr_->cfind(methodName); if (!cstrIter.found()) { FatalErrorInFunction << "Unknown meshToMesh type " << methodName << nl << nl - << "Valid meshToMesh types are:" << nl - << componentsConstructorTablePtr_->sortedToc() << exit(FatalError); + << "Valid meshToMesh types :" << nl + << componentsConstructorTablePtr_->sortedToc() + << exit(FatalError); } return autoPtr<meshToMeshMethod>(cstrIter()(src, tgt)); diff --git a/src/sampling/sampledSet/sampledSet/sampledSet.C b/src/sampling/sampledSet/sampledSet/sampledSet.C index 6e7ad85748..78694160f3 100644 --- a/src/sampling/sampledSet/sampledSet/sampledSet.C +++ b/src/sampling/sampledSet/sampledSet/sampledSet.C @@ -448,8 +448,7 @@ Foam::autoPtr<Foam::sampledSet> Foam::sampledSet::New { const word sampleType(dict.lookup("type")); - wordConstructorTable::iterator cstrIter = - wordConstructorTablePtr_->find(sampleType); + auto cstrIter = wordConstructorTablePtr_->cfind(sampleType); if (!cstrIter.found()) { diff --git a/src/sampling/sampledSurface/readers/surfaceReaderNew.C b/src/sampling/sampledSurface/readers/surfaceReaderNew.C index 9a360611f3..53be1c7a0e 100644 --- a/src/sampling/sampledSurface/readers/surfaceReaderNew.C +++ b/src/sampling/sampledSurface/readers/surfaceReaderNew.C @@ -33,8 +33,7 @@ Foam::autoPtr<Foam::surfaceReader> Foam::surfaceReader::New const fileName& fName ) { - fileNameConstructorTable::iterator cstrIter = - fileNameConstructorTablePtr_->find(readerType); + auto cstrIter = fileNameConstructorTablePtr_->cfind(readerType); if (!cstrIter.found()) { diff --git a/src/sampling/sampledSurface/sampledSurface/sampledSurface.C b/src/sampling/sampledSurface/sampledSurface/sampledSurface.C index b075331031..8082337550 100644 --- a/src/sampling/sampledSurface/sampledSurface/sampledSurface.C +++ b/src/sampling/sampledSurface/sampledSurface/sampledSurface.C @@ -61,15 +61,14 @@ Foam::autoPtr<Foam::sampledSurface> Foam::sampledSurface::New Info<< "Selecting sampledType " << sampleType << endl; } - wordConstructorTable::iterator cstrIter = - wordConstructorTablePtr_->find(sampleType); + auto cstrIter = wordConstructorTablePtr_->cfind(sampleType); if (!cstrIter.found()) { FatalErrorInFunction << "Unknown sample type " << sampleType << nl << nl - << "Valid sample types : " << endl + << "Valid sample types :" << endl << wordConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/src/sampling/sampledSurface/writers/surfaceWriter.C b/src/sampling/sampledSurface/writers/surfaceWriter.C index 355f6431bf..801ef79215 100644 --- a/src/sampling/sampledSurface/writers/surfaceWriter.C +++ b/src/sampling/sampledSurface/writers/surfaceWriter.C @@ -54,8 +54,7 @@ namespace Foam Foam::autoPtr<Foam::surfaceWriter> Foam::surfaceWriter::New(const word& writeType) { - wordConstructorTable::iterator cstrIter = - wordConstructorTablePtr_->find(writeType); + auto cstrIter = wordConstructorTablePtr_->cfind(writeType); if (!cstrIter.found()) { @@ -86,8 +85,7 @@ Foam::autoPtr<Foam::surfaceWriter> Foam::surfaceWriter::New(const word& writeType, const dictionary& optDict) { // find constructors with dictionary options - wordDictConstructorTable::iterator cstrIter = - wordDictConstructorTablePtr_->find(writeType); + auto cstrIter = wordDictConstructorTablePtr_->cfind(writeType); if (!cstrIter.found()) { diff --git a/src/sampling/surfMeshSampler/surfMeshSampler/surfMeshSampler.C b/src/sampling/surfMeshSampler/surfMeshSampler/surfMeshSampler.C index dffee65df2..29de6a8523 100644 --- a/src/sampling/surfMeshSampler/surfMeshSampler/surfMeshSampler.C +++ b/src/sampling/surfMeshSampler/surfMeshSampler/surfMeshSampler.C @@ -78,8 +78,7 @@ Foam::surfMeshSampler::New { const word sampleType(dict.lookup("type")); - wordConstructorTable::iterator cstrIter = - wordConstructorTablePtr_->find(sampleType); + auto cstrIter = wordConstructorTablePtr_->cfind(sampleType); if (!cstrIter.found()) { diff --git a/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/constraints/sixDoFRigidBodyMotionConstraint/sixDoFRigidBodyMotionConstraintNew.C b/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/constraints/sixDoFRigidBodyMotionConstraint/sixDoFRigidBodyMotionConstraintNew.C index 6200cdcc67..a80ea68ce8 100644 --- a/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/constraints/sixDoFRigidBodyMotionConstraint/sixDoFRigidBodyMotionConstraintNew.C +++ b/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/constraints/sixDoFRigidBodyMotionConstraint/sixDoFRigidBodyMotionConstraintNew.C @@ -40,15 +40,14 @@ Foam::sixDoFRigidBodyMotionConstraint::New sDoFRBMCDict.lookup("sixDoFRigidBodyMotionConstraint") ); - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(constraintType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(constraintType); if (!cstrIter.found()) { FatalErrorInFunction << "Unknown sixDoFRigidBodyMotionConstraint type " << constraintType << nl << nl - << "Valid sixDoFRigidBodyMotionConstraints are : " << endl + << "Valid sixDoFRigidBodyMotionConstraint types :" << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/restraints/sixDoFRigidBodyMotionRestraint/sixDoFRigidBodyMotionRestraintNew.C b/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/restraints/sixDoFRigidBodyMotionRestraint/sixDoFRigidBodyMotionRestraintNew.C index 864e8eee8c..33f2da687c 100644 --- a/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/restraints/sixDoFRigidBodyMotionRestraint/sixDoFRigidBodyMotionRestraintNew.C +++ b/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/restraints/sixDoFRigidBodyMotionRestraint/sixDoFRigidBodyMotionRestraintNew.C @@ -39,15 +39,14 @@ Foam::sixDoFRigidBodyMotionRestraint::New sDoFRBMRDict.lookup("sixDoFRigidBodyMotionRestraint") ); - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(restraintType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(restraintType); if (!cstrIter.found()) { FatalErrorInFunction << "Unknown sixDoFRigidBodyMotionRestraint type " << restraintType << nl << nl - << "Valid sixDoFRigidBodyMotionRestraint types are : " << endl + << "Valid sixDoFRigidBodyMotionRestraint types :" << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/src/sixDoFRigidBodyMotion/sixDoFSolvers/sixDoFSolver/newSixDoFSolver.C b/src/sixDoFRigidBodyMotion/sixDoFSolvers/sixDoFSolver/newSixDoFSolver.C index 44e4f0b58e..706583a560 100644 --- a/src/sixDoFRigidBodyMotion/sixDoFSolvers/sixDoFSolver/newSixDoFSolver.C +++ b/src/sixDoFRigidBodyMotion/sixDoFSolvers/sixDoFSolver/newSixDoFSolver.C @@ -33,19 +33,18 @@ Foam::autoPtr<Foam::sixDoFSolver> Foam::sixDoFSolver::New sixDoFRigidBodyMotion& body ) { - word sixDoFSolverType(dict.lookup("type")); + word solverType(dict.lookup("type")); - Info<< "Selecting sixDoFSolver " << sixDoFSolverType << endl; + Info<< "Selecting sixDoFSolver " << solverType << endl; - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(sixDoFSolverType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(solverType); if (!cstrIter.found()) { FatalErrorInFunction - << "Unknown sixDoFSolverType type " - << sixDoFSolverType << endl << endl - << "Valid sixDoFSolver types are : " << endl + << "Unknown sixDoFSolver type " + << solverType << nl << nl + << "Valid sixDoFSolver types :" << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/src/surfMesh/MeshedSurface/MeshedSurface.C b/src/surfMesh/MeshedSurface/MeshedSurface.C index 41d0418a3b..a2efe775e6 100644 --- a/src/surfMesh/MeshedSurface/MeshedSurface.C +++ b/src/surfMesh/MeshedSurface/MeshedSurface.C @@ -127,7 +127,7 @@ void Foam::MeshedSurface<Face>::write InfoInFunction << "Writing to " << name << endl; } - auto mfIter = writefileExtensionMemberFunctionTablePtr_->find(ext); + auto mfIter = writefileExtensionMemberFunctionTablePtr_->cfind(ext); if (!mfIter.found()) { diff --git a/src/surfMesh/MeshedSurface/MeshedSurfaceNew.C b/src/surfMesh/MeshedSurface/MeshedSurfaceNew.C index 7d345191ff..ae18f3b9bb 100644 --- a/src/surfMesh/MeshedSurface/MeshedSurfaceNew.C +++ b/src/surfMesh/MeshedSurface/MeshedSurfaceNew.C @@ -38,7 +38,7 @@ Foam::MeshedSurface<Face>::New(const fileName& name, const word& ext) InfoInFunction << "Constructing MeshedSurface" << endl; } - auto cstrIter = fileExtensionConstructorTablePtr_->find(ext); + auto cstrIter = fileExtensionConstructorTablePtr_->cfind(ext); if (!cstrIter.found()) { diff --git a/src/surfMesh/MeshedSurfaceProxy/MeshedSurfaceProxy.C b/src/surfMesh/MeshedSurfaceProxy/MeshedSurfaceProxy.C index b5dbdb6c99..dd15f9d31f 100644 --- a/src/surfMesh/MeshedSurfaceProxy/MeshedSurfaceProxy.C +++ b/src/surfMesh/MeshedSurfaceProxy/MeshedSurfaceProxy.C @@ -78,7 +78,7 @@ void Foam::MeshedSurfaceProxy<Face>::write InfoInFunction << "Writing to " << name << endl; } - auto mfIter = writefileExtensionMemberFunctionTablePtr_->find(ext); + auto mfIter = writefileExtensionMemberFunctionTablePtr_->cfind(ext); if (!mfIter.found()) { diff --git a/src/surfMesh/UnsortedMeshedSurface/UnsortedMeshedSurface.C b/src/surfMesh/UnsortedMeshedSurface/UnsortedMeshedSurface.C index b54f3c4ce1..ab426dc13d 100644 --- a/src/surfMesh/UnsortedMeshedSurface/UnsortedMeshedSurface.C +++ b/src/surfMesh/UnsortedMeshedSurface/UnsortedMeshedSurface.C @@ -113,7 +113,7 @@ void Foam::UnsortedMeshedSurface<Face>::write const word ext = name.ext(); - auto mfIter = writefileExtensionMemberFunctionTablePtr_->find(ext); + auto mfIter = writefileExtensionMemberFunctionTablePtr_->cfind(ext); if (!mfIter.found()) { diff --git a/src/surfMesh/UnsortedMeshedSurface/UnsortedMeshedSurfaceNew.C b/src/surfMesh/UnsortedMeshedSurface/UnsortedMeshedSurfaceNew.C index 6f50b23897..8986188350 100644 --- a/src/surfMesh/UnsortedMeshedSurface/UnsortedMeshedSurfaceNew.C +++ b/src/surfMesh/UnsortedMeshedSurface/UnsortedMeshedSurfaceNew.C @@ -37,7 +37,7 @@ Foam::UnsortedMeshedSurface<Face>::New(const fileName& name, const word& ext) InfoInFunction << "Constructing UnsortedMeshedSurface" << endl; } - auto cstrIter = fileExtensionConstructorTablePtr_->find(ext); + auto cstrIter = fileExtensionConstructorTablePtr_->cfind(ext); if (!cstrIter.found()) { diff --git a/src/thermophysicalModels/barotropicCompressibilityModel/barotropicCompressibilityModel/barotropicCompressibilityModelNew.C b/src/thermophysicalModels/barotropicCompressibilityModel/barotropicCompressibilityModel/barotropicCompressibilityModelNew.C index 3ba0e8e5c1..56d3d985fb 100644 --- a/src/thermophysicalModels/barotropicCompressibilityModel/barotropicCompressibilityModel/barotropicCompressibilityModelNew.C +++ b/src/thermophysicalModels/barotropicCompressibilityModel/barotropicCompressibilityModel/barotropicCompressibilityModelNew.C @@ -42,15 +42,14 @@ Foam::barotropicCompressibilityModel::New Info<< "Selecting compressibility model " << modelType << endl; - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(modelType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { FatalErrorInFunction << "Unknown barotropicCompressibilityModel type " << modelType << nl << nl - << "Valid barotropicCompressibilityModels are : " << endl + << "Valid barotropicCompressibilityModel types : " << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/src/thermophysicalModels/basic/basicThermo/basicThermoTemplates.C b/src/thermophysicalModels/basic/basicThermo/basicThermoTemplates.C index 56817cd219..0d6be8b710 100644 --- a/src/thermophysicalModels/basic/basicThermo/basicThermoTemplates.C +++ b/src/thermophysicalModels/basic/basicThermo/basicThermoTemplates.C @@ -38,7 +38,7 @@ typename Table::iterator Foam::basicThermo::lookupThermo ) { // Lookup the thermo package - typename Table::iterator cstrIter = tablePtr->find(thermoTypeName); + auto cstrIter = tablePtr->find(thermoTypeName); // Print error message if package not found in the table if (!cstrIter.found()) @@ -180,7 +180,7 @@ typename Table::iterator Foam::basicThermo::lookupThermo Info<< "Selecting thermodynamics package " << thermoTypeName << endl; - typename Table::iterator cstrIter = tablePtr->find(thermoTypeName); + auto cstrIter = tablePtr->find(thermoTypeName); if (!cstrIter.found()) { @@ -217,7 +217,7 @@ Foam::autoPtr<Thermo> Foam::basicThermo::New ) ); - typename Thermo::fvMeshConstructorTable::iterator cstrIter = + auto cstrIter = lookupThermo<Thermo, typename Thermo::fvMeshConstructorTable> ( thermoDict, @@ -236,7 +236,7 @@ Foam::autoPtr<Thermo> Foam::basicThermo::New const word& phaseName ) { - typename Thermo::dictionaryConstructorTable::iterator cstrIter = + auto cstrIter = lookupThermo<Thermo, typename Thermo::dictionaryConstructorTable> ( dict, diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/reduction/chemistryReductionMethod/chemistryReductionMethodNew.C b/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/reduction/chemistryReductionMethod/chemistryReductionMethodNew.C index bdc0a3e2a7..6f676d8893 100644 --- a/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/reduction/chemistryReductionMethod/chemistryReductionMethodNew.C +++ b/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/reduction/chemistryReductionMethod/chemistryReductionMethodNew.C @@ -70,22 +70,20 @@ Foam::chemistryReductionMethod<CompType, ThermoType>::New dictionary MRdict(dict.subDict("reduction")); - word chemistryReductionMethodTypeName = + word methodName = word(MRdict.lookup("method")) + '<' + word(dict.subDict("chemistryType").lookup("chemistryThermo")) + ',' + thermoTypeName + '>'; - typename dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(chemistryReductionMethodTypeName); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(methodName); if (!cstrIter.found()) { FatalErrorInFunction - << "Unknown chemistryReductionMethodType type " - << chemistryReductionMethodTypeName - << endl << endl - << "Valid chemistryReductionMethodType types are :" << endl - << dictionaryConstructorTablePtr_->toc() + << "Unknown chemistryReductionMethod type " + << methodName << nl << nl + << "Valid chemistryReductionMethod types :" << endl + << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/tabulation/chemistryTabulationMethod/chemistryTabulationMethodNew.C b/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/tabulation/chemistryTabulationMethod/chemistryTabulationMethodNew.C index a7f9268d3e..46c1a3e17c 100644 --- a/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/tabulation/chemistryTabulationMethod/chemistryTabulationMethodNew.C +++ b/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/tabulation/chemistryTabulationMethod/chemistryTabulationMethodNew.C @@ -70,22 +70,20 @@ Foam::chemistryTabulationMethod<CompType, ThermoType>::New dictionary tabdict(dict.subDict("tabulation")); - word chemistryTabulationMethodName = + const word methodName = word(tabdict.lookup("method")) + '<' + word(dict.subDict("chemistryType").lookup("chemistryThermo")) + ',' + thermoTypeName + '>'; - typename dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(chemistryTabulationMethodName); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(methodName); if (!cstrIter.found()) { FatalErrorInFunction << "Unknown chemistryTabulationMethodType type " - << chemistryTabulationMethodName - << endl << endl - << "Valid chemistryTabulationMethodType types are :" << endl - << dictionaryConstructorTablePtr_->toc() + << methodName << nl << nl + << "Valid chemistryTabulationMethodType types :" << endl + << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/basicChemistryModel/basicChemistryModelTemplates.C b/src/thermophysicalModels/chemistryModel/chemistryModel/basicChemistryModel/basicChemistryModelTemplates.C index b0e72f1c5e..0b58ed3ec8 100644 --- a/src/thermophysicalModels/chemistryModel/chemistryModel/basicChemistryModel/basicChemistryModelTemplates.C +++ b/src/thermophysicalModels/chemistryModel/chemistryModel/basicChemistryModel/basicChemistryModelTemplates.C @@ -123,15 +123,17 @@ Foam::autoPtr<ChemistryModel> Foam::basicChemistryModel::New + thermoTypeName + ">>"; } - typename ChemistryModel::fvMeshConstructorTable::iterator cstrIter = - ChemistryModel::fvMeshConstructorTablePtr_->find(chemistryTypeName); + auto cstrIter = ChemistryModel::fvMeshConstructorTablePtr_->cfind + ( + chemistryTypeName + ); if (!cstrIter.found()) { FatalErrorInFunction << "Unknown " << ChemistryModel::typeName << " type " << nl << "chemistryType" << chemistryTypeDict << nl << nl - << "Valid " << ChemistryModel ::typeName << " types are:" + << "Valid " << ChemistryModel ::typeName << " types :" << nl << nl; // Get the list of all the suitable chemistry packages available @@ -179,15 +181,17 @@ Foam::autoPtr<ChemistryModel> Foam::basicChemistryModel::New Info<< "Selecting chemistry type " << chemistryTypeName << endl; - typename ChemistryModel::fvMeshConstructorTable::iterator cstrIter = - ChemistryModel::fvMeshConstructorTablePtr_->find(chemistryTypeName); + auto cstrIter = ChemistryModel::fvMeshConstructorTablePtr_->cfind + ( + chemistryTypeName + ); if (!cstrIter.found()) { FatalErrorInFunction << "Unknown " << ChemistryModel::typeName << " type " << chemistryTypeName << nl << nl - << "Valid ChemistryModel types are:" << nl + << "Valid ChemistryModel types :" << nl << ChemistryModel::fvMeshConstructorTablePtr_->sortedToc() << nl << exit(FatalError); } diff --git a/src/thermophysicalModels/laminarFlameSpeed/laminarFlameSpeed/laminarFlameSpeedNew.C b/src/thermophysicalModels/laminarFlameSpeed/laminarFlameSpeed/laminarFlameSpeedNew.C index 74c87d4dd5..74d7f074e6 100644 --- a/src/thermophysicalModels/laminarFlameSpeed/laminarFlameSpeed/laminarFlameSpeedNew.C +++ b/src/thermophysicalModels/laminarFlameSpeed/laminarFlameSpeed/laminarFlameSpeedNew.C @@ -50,8 +50,7 @@ Foam::autoPtr<Foam::laminarFlameSpeed> Foam::laminarFlameSpeed::New Info<< "Selecting laminar flame speed correlation " << corrType << endl; - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(corrType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(corrType); if (!cstrIter.found()) { @@ -60,7 +59,7 @@ Foam::autoPtr<Foam::laminarFlameSpeed> Foam::laminarFlameSpeed::New propDict ) << "Unknown laminarFlameSpeed type " << corrType << nl << nl - << "Valid laminarFlameSpeed types are :" << endl + << "Valid laminarFlameSpeed types :" << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalIOError); } diff --git a/src/thermophysicalModels/radiation/radiationModels/radiationModel/radiationModelNew.C b/src/thermophysicalModels/radiation/radiationModels/radiationModel/radiationModelNew.C index 9b730c2228..21fc0f4f22 100644 --- a/src/thermophysicalModels/radiation/radiationModels/radiationModel/radiationModelNew.C +++ b/src/thermophysicalModels/radiation/radiationModels/radiationModel/radiationModelNew.C @@ -57,15 +57,14 @@ Foam::radiation::radiationModel::New Info<< "Selecting radiationModel " << modelType << endl; - TConstructorTable::iterator cstrIter = - TConstructorTablePtr_->find(modelType); + auto cstrIter = TConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { FatalErrorInFunction << "Unknown radiationModel type " << modelType << nl << nl - << "Valid radiationModel types are:" << nl + << "Valid radiationModel types :" << nl << TConstructorTablePtr_->sortedToc() << exit(FatalError); } @@ -85,15 +84,14 @@ Foam::radiation::radiationModel::New Info<< "Selecting radiationModel " << modelType << endl; - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(modelType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { FatalErrorInFunction << "Unknown radiationModel type " << modelType << nl << nl - << "Valid radiationModel types are:" << nl + << "Valid radiationModel types :" << nl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/absorptionEmissionModel/absorptionEmissionModelNew.C b/src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/absorptionEmissionModel/absorptionEmissionModelNew.C index 0705302b45..82b6e9b0c2 100644 --- a/src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/absorptionEmissionModel/absorptionEmissionModelNew.C +++ b/src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/absorptionEmissionModel/absorptionEmissionModelNew.C @@ -39,16 +39,16 @@ Foam::radiation::absorptionEmissionModel::New Info<< "Selecting absorptionEmissionModel " << modelType << endl; - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(modelType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { FatalErrorInFunction << "Unknown absorptionEmissionModel type " << modelType << nl << nl - << "Valid absorptionEmissionModel types are :" << nl - << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); + << "Valid absorptionEmissionModel types :" << nl + << dictionaryConstructorTablePtr_->sortedToc() + << exit(FatalError); } return autoPtr<absorptionEmissionModel>(cstrIter()(dict, mesh)); diff --git a/src/thermophysicalModels/radiation/submodels/scatterModel/scatterModel/scatterModelNew.C b/src/thermophysicalModels/radiation/submodels/scatterModel/scatterModel/scatterModelNew.C index ab825045bc..c742a18f6f 100644 --- a/src/thermophysicalModels/radiation/submodels/scatterModel/scatterModel/scatterModelNew.C +++ b/src/thermophysicalModels/radiation/submodels/scatterModel/scatterModel/scatterModelNew.C @@ -38,15 +38,14 @@ Foam::autoPtr<Foam::radiation::scatterModel> Foam::radiation::scatterModel::New Info<< "Selecting scatterModel " << modelType << endl; - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(modelType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { FatalErrorInFunction << "Unknown scatterModel type " << modelType << nl << nl - << "Valid scatterModel types are :" << nl + << "Valid scatterModel types :" << nl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/src/thermophysicalModels/radiation/submodels/sootModel/sootModel/sootModelNew.C b/src/thermophysicalModels/radiation/submodels/sootModel/sootModel/sootModelNew.C index 1871870591..18fc90ada9 100644 --- a/src/thermophysicalModels/radiation/submodels/sootModel/sootModel/sootModelNew.C +++ b/src/thermophysicalModels/radiation/submodels/sootModel/sootModel/sootModelNew.C @@ -44,16 +44,16 @@ Foam::radiation::sootModel::New Info<< "Selecting sootModel " << modelType << endl; } - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(modelType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { FatalErrorInFunction << "Unknown sootModel type " << modelType << nl << nl - << "Valid sootModel types are :" << nl - << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); + << "Valid sootModel types :" << nl + << dictionaryConstructorTablePtr_->sortedToc() + << exit(FatalError); } const label tempOpen = modelType.find('<'); diff --git a/src/thermophysicalModels/radiation/submodels/transmissivityModel/transmissivityModel/transmissivityModelNew.C b/src/thermophysicalModels/radiation/submodels/transmissivityModel/transmissivityModel/transmissivityModelNew.C index 07298ef596..da82c756f9 100644 --- a/src/thermophysicalModels/radiation/submodels/transmissivityModel/transmissivityModel/transmissivityModelNew.C +++ b/src/thermophysicalModels/radiation/submodels/transmissivityModel/transmissivityModel/transmissivityModelNew.C @@ -39,15 +39,14 @@ transmissivityModel::New Info<< "Selecting transmissivityModel " << modelType << endl; - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(modelType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { FatalErrorInFunction << "Unknown transmissivityModel type " << modelType << nl << nl - << "Valid transmissivityModel types are :" << nl + << "Valid transmissivityModel types :" << nl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/src/thermophysicalModels/reactionThermo/chemistryReaders/chemistryReader/chemistryReader.C b/src/thermophysicalModels/reactionThermo/chemistryReaders/chemistryReader/chemistryReader.C index c0d9e3f7af..69032a1169 100644 --- a/src/thermophysicalModels/reactionThermo/chemistryReaders/chemistryReader/chemistryReader.C +++ b/src/thermophysicalModels/reactionThermo/chemistryReaders/chemistryReader/chemistryReader.C @@ -37,22 +37,21 @@ Foam::chemistryReader<ThermoType>::New { // Let the chemistry reader type default to CHEMKIN // for backward compatibility - word chemistryReaderTypeName("chemkinReader"); + word readerName("chemkinReader"); // otherwise use the specified reader - thermoDict.readIfPresent("chemistryReader", chemistryReaderTypeName); + thermoDict.readIfPresent("chemistryReader", readerName); - Info<< "Selecting chemistryReader " << chemistryReaderTypeName << endl; + Info<< "Selecting chemistryReader " << readerName << endl; - typename dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(chemistryReaderTypeName); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(readerName); if (!cstrIter.found()) { FatalErrorInFunction << "Unknown chemistryReader type " - << chemistryReaderTypeName << nl << nl - << "Valid chemistryReader types are:" << nl + << readerName << nl << nl + << "Valid chemistryReader types :" << nl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/src/thermophysicalModels/solidChemistryModel/basicSolidChemistryModel/basicSolidChemistryModelNew.C b/src/thermophysicalModels/solidChemistryModel/basicSolidChemistryModel/basicSolidChemistryModelNew.C index 5ac8e03ef3..43f1010465 100644 --- a/src/thermophysicalModels/solidChemistryModel/basicSolidChemistryModel/basicSolidChemistryModelNew.C +++ b/src/thermophysicalModels/solidChemistryModel/basicSolidChemistryModel/basicSolidChemistryModelNew.C @@ -116,8 +116,7 @@ New Info<< "chemistryTypeName " << chemistryTypeName << endl; - fvMeshConstructorTable::iterator cstrIter = - fvMeshConstructorTablePtr_->find(chemistryTypeName); + auto cstrIter = fvMeshConstructorTablePtr_->cfind(chemistryTypeName); if (!cstrIter.found()) { diff --git a/src/thermophysicalModels/specie/reaction/Reactions/Reaction/Reaction.C b/src/thermophysicalModels/specie/reaction/Reactions/Reaction/Reaction.C index 645cc4fc80..8f0330cea9 100644 --- a/src/thermophysicalModels/specie/reaction/Reactions/Reaction/Reaction.C +++ b/src/thermophysicalModels/specie/reaction/Reactions/Reaction/Reaction.C @@ -366,15 +366,14 @@ Foam::Reaction<ReactionThermo>::New { const word& reactionTypeName = dict.lookup("type"); - typename dictionaryConstructorTable::iterator cstrIter - = dictionaryConstructorTablePtr_->find(reactionTypeName); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(reactionTypeName); if (!cstrIter.found()) { FatalErrorInFunction << "Unknown reaction type " << reactionTypeName << nl << nl - << "Valid reaction types are :" << nl + << "Valid reaction types :" << nl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/src/thermophysicalModels/thermophysicalProperties/liquidProperties/liquidProperties/liquidProperties.C b/src/thermophysicalModels/thermophysicalProperties/liquidProperties/liquidProperties/liquidProperties.C index f454eb7bf8..e0dec535cf 100644 --- a/src/thermophysicalModels/thermophysicalProperties/liquidProperties/liquidProperties/liquidProperties.C +++ b/src/thermophysicalModels/thermophysicalProperties/liquidProperties/liquidProperties/liquidProperties.C @@ -95,14 +95,14 @@ Foam::autoPtr<Foam::liquidProperties> Foam::liquidProperties::New InfoInFunction << "Constructing liquidProperties" << endl; } - ConstructorTable::iterator cstrIter = ConstructorTablePtr_->find(name); + auto cstrIter = ConstructorTablePtr_->cfind(name); if (!cstrIter.found()) { FatalErrorInFunction << "Unknown liquidProperties type " << name << nl << nl - << "Valid liquidProperties types are:" << nl + << "Valid liquidProperties types :" << nl << ConstructorTablePtr_->sortedToc() << exit(FatalError); } @@ -121,7 +121,7 @@ Foam::autoPtr<Foam::liquidProperties> Foam::liquidProperties::New InfoInFunction << "Constructing liquidProperties" << endl; } - const word& liquidPropertiesTypeName = dict.dictName(); + const word& liquidType = dict.dictName(); if (dict.found("defaultCoeffs")) { @@ -129,19 +129,18 @@ Foam::autoPtr<Foam::liquidProperties> Foam::liquidProperties::New if (Switch(dict.lookup("defaultCoeffs"))) { - return New(liquidPropertiesTypeName); + return New(liquidType); } else { - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(liquidPropertiesTypeName); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(liquidType); if (!cstrIter.found()) { FatalErrorInFunction << "Unknown liquidProperties type " - << liquidPropertiesTypeName << nl << nl - << "Valid liquidProperties types are:" << nl + << liquidType << nl << nl + << "Valid liquidProperties types :" << nl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } @@ -150,22 +149,21 @@ Foam::autoPtr<Foam::liquidProperties> Foam::liquidProperties::New ( cstrIter() ( - dict.optionalSubDict(liquidPropertiesTypeName + "Coeffs") + dict.optionalSubDict(liquidType + "Coeffs") ) ); } } else { - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(liquidPropertiesTypeName); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(liquidType); if (!cstrIter.found()) { FatalErrorInFunction << "Unknown liquidProperties type " - << liquidPropertiesTypeName << nl << nl - << "Valid liquidProperties types are:" << nl + << liquidType << nl << nl + << "Valid liquidProperties types :" << nl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/src/thermophysicalModels/thermophysicalProperties/solidProperties/solidProperties/solidPropertiesNew.C b/src/thermophysicalModels/thermophysicalProperties/solidProperties/solidProperties/solidPropertiesNew.C index f27570bf7b..89c4de9b2e 100644 --- a/src/thermophysicalModels/thermophysicalProperties/solidProperties/solidProperties/solidPropertiesNew.C +++ b/src/thermophysicalModels/thermophysicalProperties/solidProperties/solidProperties/solidPropertiesNew.C @@ -38,14 +38,14 @@ Foam::autoPtr<Foam::solidProperties> Foam::solidProperties::New InfoInFunction << "Constructing solidProperties" << endl; } - ConstructorTable::iterator cstrIter = ConstructorTablePtr_->find(name); + auto cstrIter = ConstructorTablePtr_->cfind(name); if (!cstrIter.found()) { FatalErrorInFunction << "Unknown solidProperties type " << name << nl << nl - << "Valid solidProperties types are:" << nl + << "Valid solidProperties types :" << nl << ConstructorTablePtr_->sortedToc() << exit(FatalError); } @@ -84,15 +84,14 @@ Foam::autoPtr<Foam::solidProperties> Foam::solidProperties::New } else { - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(solidType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(solidType); if (!cstrIter.found()) { FatalErrorInFunction << "Unknown solidProperties type " << solidType << nl << nl - << "Valid solidProperties types are:" << nl + << "Valid solidProperties types :" << nl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/src/thermophysicalModels/thermophysicalProperties/thermophysicalFunctions/thermophysicalFunction/thermophysicalFunction.C b/src/thermophysicalModels/thermophysicalProperties/thermophysicalFunctions/thermophysicalFunction/thermophysicalFunction.C index f26d242681..d88b584de1 100644 --- a/src/thermophysicalModels/thermophysicalProperties/thermophysicalFunctions/thermophysicalFunction/thermophysicalFunction.C +++ b/src/thermophysicalModels/thermophysicalProperties/thermophysicalFunctions/thermophysicalFunction/thermophysicalFunction.C @@ -50,18 +50,16 @@ Foam::autoPtr<Foam::thermophysicalFunction> Foam::thermophysicalFunction::New << endl; } - const word thermophysicalFunctionType(is); + const word functionType(is); - IstreamConstructorTable::iterator cstrIter = - IstreamConstructorTablePtr_->find(thermophysicalFunctionType); + auto cstrIter = IstreamConstructorTablePtr_->cfind(functionType); if (!cstrIter.found()) { FatalErrorInFunction << "Unknown thermophysicalFunction type " - << thermophysicalFunctionType - << nl << nl - << "Valid thermophysicalFunction types are :" << endl + << functionType << nl << nl + << "Valid thermophysicalFunction types :" << endl << IstreamConstructorTablePtr_->sortedToc() << abort(FatalError); } @@ -82,17 +80,15 @@ Foam::autoPtr<Foam::thermophysicalFunction> Foam::thermophysicalFunction::New << endl; } - const word thermophysicalFunctionType(dict.lookup("functionType")); + const word functionType(dict.lookup("functionType")); - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(thermophysicalFunctionType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(functionType); if (!cstrIter.found()) { FatalErrorInFunction << "Unknown thermophysicalFunction type " - << thermophysicalFunctionType - << nl << nl + << functionType << nl << nl << "Valid thermophysicalFunction types are :" << endl << dictionaryConstructorTablePtr_->sortedToc() << abort(FatalError); diff --git a/src/thermophysicalModels/thermophysicalProperties/thermophysicalProperties/thermophysicalProperties.C b/src/thermophysicalModels/thermophysicalProperties/thermophysicalProperties/thermophysicalProperties.C index d82d3f2a24..52570ede10 100644 --- a/src/thermophysicalModels/thermophysicalProperties/thermophysicalProperties/thermophysicalProperties.C +++ b/src/thermophysicalModels/thermophysicalProperties/thermophysicalProperties/thermophysicalProperties.C @@ -61,7 +61,7 @@ Foam::thermophysicalProperties::New InfoInFunction << "Constructing thermophysicalProperties" << endl; } - ConstructorTable::iterator cstrIter = ConstructorTablePtr_->find(name); + auto cstrIter = ConstructorTablePtr_->cfind(name); if (!cstrIter.found()) { @@ -88,17 +88,16 @@ Foam::thermophysicalProperties::New InfoInFunction << "Constructing thermophysicalProperties" << endl; } - const word& thermophysicalPropertiesTypeName = dict.dictName(); + const word& propertiesTypeName = dict.dictName(); - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(thermophysicalPropertiesTypeName); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(propertiesTypeName); if (!cstrIter.found()) { FatalErrorInFunction << "Unknown thermophysicalProperties type " - << thermophysicalPropertiesTypeName << nl << nl - << "Valid thermophysicalProperties types are:" << nl + << propertiesTypeName << nl << nl + << "Valid thermophysicalProperties types :" << nl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/src/transportModels/incompressible/viscosityModels/viscosityModel/viscosityModelNew.C b/src/transportModels/incompressible/viscosityModels/viscosityModel/viscosityModelNew.C index df4dcff09e..482036bbbb 100644 --- a/src/transportModels/incompressible/viscosityModels/viscosityModel/viscosityModelNew.C +++ b/src/transportModels/incompressible/viscosityModels/viscosityModel/viscosityModelNew.C @@ -41,15 +41,14 @@ Foam::autoPtr<Foam::viscosityModel> Foam::viscosityModel::New Info<< "Selecting incompressible transport model " << modelType << endl; - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(modelType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { FatalErrorInFunction << "Unknown viscosityModel type " << modelType << nl << nl - << "Valid viscosityModels are : " << endl + << "Valid viscosityModels :" << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/src/transportModels/interfaceProperties/surfaceTensionModels/surfaceTensionModel/surfaceTensionModelNew.C b/src/transportModels/interfaceProperties/surfaceTensionModels/surfaceTensionModel/surfaceTensionModelNew.C index 6b2aa962cb..7abdb1a75d 100644 --- a/src/transportModels/interfaceProperties/surfaceTensionModels/surfaceTensionModel/surfaceTensionModelNew.C +++ b/src/transportModels/interfaceProperties/surfaceTensionModels/surfaceTensionModel/surfaceTensionModelNew.C @@ -38,20 +38,18 @@ Foam::autoPtr<Foam::surfaceTensionModel> Foam::surfaceTensionModel::New { const dictionary& sigmaDict = surfaceTensionModel::sigmaDict(dict); - word surfaceTensionModelType(sigmaDict.lookup("type")); + const word modelType(sigmaDict.lookup("type")); - Info<< "Selecting surfaceTensionModel " - << surfaceTensionModelType << endl; + Info<< "Selecting surfaceTensionModel " << modelType << endl; - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(surfaceTensionModelType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { FatalErrorInFunction - << "Unknown surfaceTensionModelType type " - << surfaceTensionModelType << endl << endl - << "Valid surfaceTensionModel types are : " << endl + << "Unknown surfaceTensionModel type " + << modelType << nl << nl + << "Valid surfaceTensionModel types :" << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/src/waveModels/waveModel/waveModelNew.C b/src/waveModels/waveModel/waveModelNew.C index b47ea48217..95315fa4a6 100644 --- a/src/waveModels/waveModel/waveModelNew.C +++ b/src/waveModels/waveModel/waveModelNew.C @@ -62,15 +62,14 @@ Foam::autoPtr<Foam::waveModel> Foam::waveModel::New Info<< "Selecting waveModel " << modelType << endl; - patchConstructorTable::iterator cstrIter = - patchConstructorTablePtr_->find(modelType); + auto cstrIter = patchConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { FatalIOErrorInFunction(waveDict) << "Unknown waveModel type " << modelType << nl << nl - << "Valid waveModel types are:" << nl + << "Valid waveModel types :" << nl << patchConstructorTablePtr_->sortedToc() << exit(FatalIOError); } -- GitLab