diff --git a/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/PDRDragModel/PDRDragModelNew.C b/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/PDRDragModel/PDRDragModelNew.C index 6a6581182bbbacd58fe71bb8667fdee4f63efd54..25a4a2098edcf0197458e5d45a2d03d3ce7662fd 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 932080e71761b89b120fce4012831693b0eb8758..251d429c8fa2a9861e5e0606a34c2fd33f24ee23 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 27fe3f5e17f1e37a4bd0c8bda24f5b412a3b8a6b..b46192ea3891800b4f30f3d9edfd718b94b9bd84 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 ed9dfb2fb3d46f9638a076091ea96d6badd19862..c2dccb018047d61776bac9805819066ce83e99af 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 99c33123e8d75663ba6752f3859e94532f041c48..b21c4b7b5188223119539d91dd3e81ab1259775e 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 cf8abd2e6e75086835559093f93a80f9a327d165..f497b3c9884b49c92a769b60fbbd917dc83b49f5 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 e4d71d2397ad6f7b5250596a0a86bd48bd63c306..137710d217e46193ab8eba72b9d125755f8d1c9f 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 c14fa08d59be5ea32d3fa204a14506247d7eb6f2..534c1383e231802f35e1846a41954ee111893929 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 b880c4a6d34a9a8bda2a5965931a25fed3b82938..36765ebc3c18f581a4c52d93de9222f46f2ba358 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 b43d46f8a3d71b5461a8e1011e546413d0e7e6cb..db5d68f82942cbb08ff96687bf2651fc60bb5893 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 963ad160f7ec26e4186acb1fb8c0b9d806dd6e74..fc4000975d63ac73434dcb61ab91497dc1963fed 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 fee1253108be1e7481d70f8faa56185a7c9b8386..9b55bb03585ab18978b01a46b001c9937731751f 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 3b349be6939828af40848995ab76fc77d8683c10..8ae0f6f55220d7ba2244794a57ce7c734eade8ad 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 17fc43cac4280b85e3795ee922ee22a45abf86ee..fb59ed25747ae3e8c4fb667f63561bd99b55c544 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 f2c28eeb5ddbfba5a968bfbd990ffeb9fc8cf10c..57be04722d95f6bf81cd91024d55ee1ee8ea2574 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 2946810cf5ff13e1564172b0143618de1ae4d67b..5b44995b4e230b1047609c8759a4e047101bb6c3 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 c2a5f4074e731e968d92920abe99c52ba605d5d4..de8bc17cda56e94f8cd33947ccb0bb4692040683 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 46e43f6b11a9e253832b2fceab8cd524d24ab543..71654baea64ad877a39685e767c4db2f932e936e 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 8dbdd5479c3a4bee3038cef438b947c346da58bc..a0fd721dfb6d60ce52f9203cd428cdf19192f9dd 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 fb16d0541833fa0453f69095f8776d5a600e75cd..a3f312de8f91ad7ff8fc2eee47e4b9f9d912a655 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 53266ae6b2db068a89d828ab56aa5780a11d6832..123bad7691ed119d0be022d7e48be35350b23543 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 1b092c197e9c0184092ce56f00d8f883998be5f8..6884a6b3bedc643791e47ee18140b1b3131993d8 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 83ad7b42e5437c463cbfbd32cc4737459d33710a..bb59931dc15adabf011be771a2a3bc4e5201bcb1 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 806a1dd3b34897023a88a27c8a6aaa7e3e904777..2cfddbd92ca71fe51d5645de0cfe33212ef1b962 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 cbb33a5fbd0299ff9c01eaa35b19174229431622..8324dc52bc9cd874eb144545d27c3fe8b11afbef 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 963ad160f7ec26e4186acb1fb8c0b9d806dd6e74..fc4000975d63ac73434dcb61ab91497dc1963fed 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 c42b86070dacc6aca8aa994c691d35f4189c8578..d78fdbba5a9b9210cc0ea7e4e3c29962159d8f1b 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 0f116c70402a39763440c26e5c2dade9733c85a0..ae0958963491cf8a84e11dcf42947b9fddfc65f4 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 dcc0cc0d0f11b4138f98bec8312adb566ffad1f1..94bbba3212d80c70530ec00a81e34bab4e7af7e4 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 13987ff4b0924f751a3bfa3e73887241bb4d0661..136224813a005206351cdad30a5938d3c87801df 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 32f2d5a520d59211f7f411934b9170cfc34db99b..6338ab66691086227e50cbd5af18e25d8a99436c 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 6cf6d1d64cda6fbe8c49c97a52a9b96ea307ba08..ddc57a3e65d094b60c198dc7dc3d36246575e398 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 bfadfc6399ce0d83f3f56b9a49c3e98606a60f5e..e4a3a64634503549c577c247bb2eb7001efa6fc6 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 b68c03470f2c12225f178c169a60cdc2da2c3571..608cd1178da09fdf9a3221e6182526686e81e5db 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 a1ce25337f71f85046461e94a63ea7e5ecb3f8d5..1810e248bfe719fd6a55f8b248683756af9bfa10 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 583ce1c3ad3e1f7e54aba3b5356929f5fabcad52..0ac0a36afee89d037fe6f05bea5371b2fd5d9cb5 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 361850b414d6e1f6bdcf65a67ea84a24545db1f8..0120b2a1b49feeb954a1f5b027459c6dd64d493f 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 dfbd95e6b2d757baee0d1c3c77d9a1cb4766e182..18a941099adcf50f63162899dc926c8057525719 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 c2ca6358737700f5976caba090aadd55a5bbca55..50a2f015a76e37ab3e02990026d51709ec500ddd 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 2946810cf5ff13e1564172b0143618de1ae4d67b..5b44995b4e230b1047609c8759a4e047101bb6c3 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 c2a5f4074e731e968d92920abe99c52ba605d5d4..de8bc17cda56e94f8cd33947ccb0bb4692040683 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 46e43f6b11a9e253832b2fceab8cd524d24ab543..71654baea64ad877a39685e767c4db2f932e936e 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 8dbdd5479c3a4bee3038cef438b947c346da58bc..a0fd721dfb6d60ce52f9203cd428cdf19192f9dd 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 fb16d0541833fa0453f69095f8776d5a600e75cd..5462b768a2fd1779c979243b5f76af153a62ca70 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 53266ae6b2db068a89d828ab56aa5780a11d6832..123bad7691ed119d0be022d7e48be35350b23543 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 1b092c197e9c0184092ce56f00d8f883998be5f8..6884a6b3bedc643791e47ee18140b1b3131993d8 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 806a1dd3b34897023a88a27c8a6aaa7e3e904777..2cfddbd92ca71fe51d5645de0cfe33212ef1b962 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 bfadfc6399ce0d83f3f56b9a49c3e98606a60f5e..e4a3a64634503549c577c247bb2eb7001efa6fc6 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 b68c03470f2c12225f178c169a60cdc2da2c3571..255b15593a983d669f6ebc4b9ff20bf805ec1c08 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 a1ce25337f71f85046461e94a63ea7e5ecb3f8d5..7898a94ccab9477d227dc10d263feb0006390ff0 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 583ce1c3ad3e1f7e54aba3b5356929f5fabcad52..0ac0a36afee89d037fe6f05bea5371b2fd5d9cb5 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 361850b414d6e1f6bdcf65a67ea84a24545db1f8..83067ea6eec0883acbc9387811bacdb0a30adaf2 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 cbb33a5fbd0299ff9c01eaa35b19174229431622..f4419b735e1f7f4759396681573ae4e3d1b15b76 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 fc011ece0c99be3ec20ac50c7718f0b9e0db6ab3..c77c7e7e996820ed743093d7a4feae5424657866 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 963ad160f7ec26e4186acb1fb8c0b9d806dd6e74..fc4000975d63ac73434dcb61ab91497dc1963fed 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 15604c8867705a7a8ed7814c10a0fee8535f1669..c37b1ee0cc6b79825365e46df35c3fb8f1bf1dba 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 9a0333e9708f652c0edf42e149604bef1c29d5de..77316af0a9ccdbf8d03de0131a83d91cacb72fde 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 93aa04c5abb95a94b00e69742633f61410f095f8..2f4447d505301d8659c952991b416f2a78c612cc 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 ac6c12ce6bd5b0315baaa6d6457166aea490a247..ac72678573a5b38510a27f4d12e4e42c37d0f50e 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 151a0b78844315d1a461611f45953729f2f29e7c..49c62fa66d44efc29dd31db22a585b182c7edfa7 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 3cca22c751d775b6ae620586adc14ffa16b9b194..48e45954fb76352910e1f3e50c51a5a952979984 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 b968dd2ebe0e2f3fc2920c070d80333754eddb51..5f0fd959931b1be386c74d1bb8f8332417317fc6 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 b35c37df1a5c5e442451f10be558425ed5d91883..946f15ccaef2d98abb4e99a88807e35216994eff 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 dd66f694aa34c960c02c324aa710f2e3484c5b72..5c42ba3596b07ecebc6b5ec179bfb9db5a254f00 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 3feb5f8659d93d5a2c7dc4d24840875e6a0bb301..dff74bf277e60611ef10ea0f002c3d30a0490962 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 b4d67de9e2e2efc5a4776fc0db601fd961a14fc3..2f6cfa09fc3da358710368b606520c094c9aef25 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 a3dc719dc8e51ddd2fde7867aaccb489bf0413e8..67a47a6de3f990d58ab0dfa7fe9d38442a3f304d 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 20d6bc883143b23b2f20b3ef0039836a29ee3a39..f4cfc95a2f6016bf87f93fda9c7d9dc97e22cf76 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 7e8b7ed141a79f11c18a2674cfccf34ce7332927..4246fc80e740c70cbd953beb6c48fbe4e8769f24 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 d72a67791f0cf02a34eecab3c15f3d47c01cac2c..2798b924e3a77b936f3e876ef4c41682b04228fe 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 a3141abb9164618a97001cdbea55c62980965c29..51e1323ec8d16fd288a4740990e7e417b4d7ad66 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 47a8a8c3ce7411fddff201e3ea5151bf7fe1bbed..1dcbd942795535cc006924d49c6272ebe765563d 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 79d90cf3a2e3adb7caa143aaa6e2dc8c18f24be4..666ccc2fdecbc6eac1c90a402c22c19d099ee11c 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 105c69bcd563db2283fe02c9482e8bf973240a92..9f5532575d184625ae517b80f54d594795275704 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 58060e89fe3942789c58003db446b1a4c9c4b482..b3d96d50b0b7864dd4ce2b10b30356b4dfbb1a00 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 59dd7cc0fdfc48b97291aa82ad4fbdc535dbb367..01ee15eabd5bb8c5ac92e0aae9ec41d5b05d572e 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 8e1aa10b79c34d256cbc292d59b2eb3556a14167..ad3de4764ce68b4bb42e5f00c208eebad6b26166 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 195871e41fb3b03b49897e84c617ba40041b07cb..758dafff9a518989772484dd56bdf2583dc08ebb 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 8338abdbf4486ef0eb4d30c4e352b087727ae1f6..6ca7b2a64ce30ed5690e40c6cd2396b69c6d503d 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 36d85e76e838094304e452fcfc3029a82bdeeae7..2d85cca0ae013ed04aca1f77c4ffabfe4e717e98 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 4692df969be7e66286ed3c723bb3d080672d08dd..0edeea6a9cbb285bd411f395c8cd4a42212d8b3f 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 5caa6d627ce551bef1b85d9ad1ba9467da987643..0bcd04bf4ee71dc1316a569f7b83a6d31248638f 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 d0168688fa29d7666fcc6d773fff039275a0da29..5095e2be6f8fcd53dc707373d3e2c2dd6d3d2209 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 642151da87a517584f65b675026623e2f8bf7b61..96849e559c11dd0e0dbd0053db97e896af79f803 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 dda2e9024dba6b75d1724ed0e3b7025e895c9ebf..d10610212c0f401f1feaf6bd8261e1877fbffc19 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 686fe2094e2f37328a0b1be4aac3d737912382a1..284757c98fa7de99a77789b399a249141d6f1621 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 69e76fe3b6c7b13528c767beedb776a87910117a..04aaeffd4de9a1d75e96cb9f3902b36a295bd83f 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 7a26581fe7baa08483851392317370989678fd84..bd14deffc6b8269934234dc334a42f4483806e19 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 97d8f602c08a5d2fb0da46258eac52c38bd2b131..f8289222d8acbbbb41d115faf0f21eb744407340 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 2281285c074a78269f83ceccc8534baf2d20cc33..ae9efcb289d920a7bc65b6672346adf08c14772a 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 b7d1e7a8d91552606863ebb417ba241c24701560..58acaf9ce2e33e7821bdd29ae23c93ced19d3e70 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 e17d645b4ab98ddd7108be1016220bec8690f8f4..a27c65d5b9a2783bf4910574aaf41e89cda15da4 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 b9a8682a0b6117b80f2846e6cf762f170936d079..fe97b5acc2228264919f14c18e7b57fe083a7508 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 5257a4c52a066d86191ed9268c9e2acde8f09480..0bd80034def533035a38a78716c3ab9b1fb8bd75 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 0f0cafba0b5e7aa07067da7511a05b0d6b68bb3c..1cdb6fd53bb12e4b14d289c2a2676d4e391fc5d5 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 dba84f07f8cd1cd34b7161b57602adf5bb0067e7..ae7017eb9168249882f04ef62f4218752dc98fc8 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 a4b283ff785e57edfcb140f87877110e4cc33777..424c286f79e97896f7bd2c422304b952eee104c9 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 8593c72df514cb4093cd619e8737beb4277b30e6..18d5be2cb9c02a1d34ff7fd66370d46878b11539 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 33bba64b66901df02a36a8c8a77189ae9e7a0572..44e0556bc56412011183aa457878c04fc55249d1 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 cefaf8a1274ef217f8a661b58455603f8d3a82f0..2154d2cc948a7f3112980d486b88e336f6f1706d 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 76c2fb76aeb7ee11500bf7700d58c6bee9eac99e..ca7d0616b8d6b7d169eb52a21529a82d0f488fd8 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 6060d2acc595708c1aa286713a5f2309e9bf0a62..f6ffadc0b6a74e13c266266adeac412c063a344f 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 d9edadcc3f549c865847d713e9ba7674173b8ade..aa4a74a790b2db287583bda7c0c41d193eed60d0 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 629d16a478f4dd6f342c113a79b63c4251f21b11..934553826668960841df6fb40424024ab1b26fd9 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 6a8dbe3640eb9e6f9a22096b40fd7618f69fdb53..cfff04f05f2acc13c6cd72679ff3b1166477fc8c 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 911c888101a2a4b6866445ea8f5e2f0315a07848..3ff7098ca03041666454e9b9afed1f0cf189bae9 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 a3d8580554165bc93b2dcec69071a7a137663957..054524a29b22ae8bf762caea07760b8e8096b4c2 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 f445f1a348d138ee15d6eaf66f943c5ca28b84b9..2569a86ce47c47914f2c5763e6be77ed5f282a84 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 8d074d8e9ce0824f829f8a85d4a2cf51610b7222..38e23f1b5be2d59db4c8d0e5224ddf2de040dd01 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 64b9743203fedf6e118a25a5dfca202c673deae5..0caac2054838e36d0643bfb1339835cf459edca1 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 ce5a5d148b1483de699e88014e87bb7dd94fb0a0..6851c76951cb16e6b69f2e71617d79ae1c3e0824 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 f63fd852bf2dd26a5e01ba5f792e2647b827514c..76042ef02419735ae4363825c05eec369bd79bd9 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 e45f4a2964d2c38122b68806d84aa9e98c3e3c37..811023faaaee87ef90a82e4c4fb3662f58b09c5b 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 0f205cd057023fbe454a872a336ba70ff17e33f6..27f2d4f98f5e19c802acbcf806b1f09b7f818bd1 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 bf62d071dc2469c1d99832e4ac8c62c85ea88645..866c8a48a52d303d2e42bdc3990597c8cda5d6e3 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 fcfbb1dae1edfd6b6174cc1f5f0eacd83fa5d053..383d613a2249e2c17f952750f9d1e1bf8ccddc46 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 12af314f87581998f7e9af3380e269247ca2cb2d..5bcd17570ea0ac94cc5047d9eed74a68160dd4af 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 a8539a5c48a54230a765964a1898950d8272d35c..ca63afc7882048563465dfed8cccefcc412496af 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 d9c7091e6b34c9a9d6627dc1547b03a780ce548a..ffdc4c25b8bfc5c9c2019f969248e2306460c957 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 f5e11840b9532a84435e96ad5a039f4c63266006..fd4f502ed991ea0fa282ebee81da93fac88470fc 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 af586b63a52d5dc82058ef44baca4ec1ef60bc41..8c71aafcb3dc3b1b2422729a040a1e048113980a 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 4358fab0292d57f5afdad77c85b9cc0f8dc6de26..1a055779f19bcd493cd7ebeae40feb01e736f595 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 f7832287548e0f83df605e5dd11f89514cd938b1..0a774bdf5dcf6a8f2680a829b2fc7f1bb0937ea0 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 5644e7a6b1a4998986354d967af12385b69e7307..d5422e729d5a6b66488e43ff41e24371b62ef8dc 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 77c05e08631b54abd5ff7c2fa13d53a11bfbfb11..579387eaecf3f593f6795c34c0cdd1b6e709f01b 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 468b9b88f60a798e5aa4564e54ba3c8c1f61d2b1..a916503f98ebecad87a8dc4f3ec2809ef6948b06 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 349d356497049896916094d32bc5439b7961a2e0..e7357ff4d41b02b85356fc174d57060645f5bc5b 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 decc033fe599292987a00d67694d43807a0c7218..14f3f86f6d51da2f6f52dc2884012e703e9e79bf 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 fae9dddca3969a6a78968f78f9d45cff92aac7ee..d2c301c8dc0871c5a5a7219c190864dcebd0b53f 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 ea3017016ba04be9ce6a4cbc076892f9360522a9..e9400fbfee6e191fb900a6edf7783a414a165431 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 0fbf63650b1034e24cca8fe46fcfb9791a6965fa..b35c82f8a7b7952c550352ec4fac6d163ddcfd78 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 270859347ed65636cd10654622edc84a984dd7ab..b665ee289649098609b17d999dbb161187633dfb 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 717125fdc92c50e4ab8b7e7b6e5bca4bdbf2ff92..770356a70ce8767fbef5fec282555e1ccb61ffd4 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 e9c8afacce4c7e6cbc2476d54079deb1d26ae02d..42742962888b0de578a1fed1c10cdeab51ae23fc 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 809b8294ad7cf2d2b98fc36e9123669651981824..fe58ffc99a189f20bda65e5e7bdf4f709c3172eb 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 85192b98ec60e97ef431f429cecf8c51db575dcd..5f5d878bae8a946208efc30a1025c1a9bd7aece6 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 161c424b26aa1271eb202728f11064d37df9852e..c197e03ce88e53a57a9f337411a8e622f62378f1 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 c59808a21b5da47c1ddb9529d4a0bc313af6350d..5210b6e2862b159790e462094d2cc7d30f9bd5c8 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 a9b037a8ae5cfdcdc7f5cf47be2a8b6c00bc9fad..8f4f4715674e24767ca8622fe9eae503cd303e02 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 92b0b09f5ce515059d18ca99f97a510890f6fd88..3aef03cc409f928613e2e3067a98299cedf81b62 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 43488462bdf0afb7bf78ad97a6714ca4c48b31ea..549932dfe2cc5c98e0bec049614db2acfb27c72a 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 fb67a50e0a700895c70eedfd89a42cb60825b61c..70f9d09e80c94ececc43e1325b055894ad286a06 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 55a134367eab362c76cb7e480d50840b0a83906c..62545116095b8bac5e9f284537bc36ad6f795d23 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 9fa9d5c334cb5aa6c469346d27454cf9647f08a3..aa596e689879f345a7f579fdd3964b3efbc836e2 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 1c84dc5ae9ddfac2c9c3717314f70c3675eb4d7e..c6fbb3e6328150f7aa564f188b1dddc4e15397c4 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 1b115c6c264853c6457401b3fabc1da2c5086c5e..0fe50e2e75402666249728f326d2bc99c7ad6a68 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 8548abfc76cf2659a61ba5aa9b73b26292a6d818..5c8b778c91fbfdf93729bf30454b49bf2d8ef399 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 f98062e8e1f5fade9c96b0ba2af46f68d2c382c9..6f8a2d1b420af8585eaf18ffb41f64d8baa6c63f 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 21b9f57318ddee14f3445f0d24aca267183c6a52..936163a3fece8c6f86e72c915bc5834397baad84 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 f8c1f4f5388f707ba24a76f0a2fe44baf58094a7..990da5b40f48f0a38c662fb574a42e221b430239 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 b60c2e0031d6ff0bfba0b3ebb828130bc0371655..3fde72fdd1ce14b4b423dbc7ae85b094913fe860 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 a4f1db04b5fa9380b6e852333a0a6991ea644305..2e801a88dc9bc9f8789f8df7d833dd754f3838b4 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 19611a30b8e53f16350fda8b1267721a3f989f5b..381fe58e29f048dadfc5db89181431f42a7c5a9a 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 3364416bbbed6396ee6a92646dffc9b7581b2bc3..c35eece9699454df200d20f31ccb94ea67d178f5 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 7344b41f77cb7ae52b6715f3e44d5309e032620e..07331049c72a070e02cc1482326310de824ed9a3 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 c64b12115af2129e11721d0fb08bcec011c459ca..b26b326d6efc13ad144b9093b890145d6eb65d20 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 d958d1a146a2019721d62399f0da617ef22ea996..5298d93b1abfdaa4ee7ce092f6941369872d9013 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 8d7836cb2bd2d1010e0737fa3a9ed536daa4448a..fd2a6cb3751eb9b415593d739a5a03db1bf1dd77 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 c8b02261b8492a35859c9e2427aca0ec5a28899e..d929247b2e03a350d8242ae253e27d36cbcfe30e 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 136c13eff44296e295b866d695cce9414902db33..0307220208d1ea4dbfdd3195a7dcedc1b5356696 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 29e95f3095b86d00d59fdad49d9bf964f93f9633..8fca6accbcba1ddd8642ce7edb6ee61556bb21f4 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 6502846403fdb8716190f0862aeb2630801eff3f..849955027866a629687db41d85c5645f1343b75f 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 3ed57d2d480ef767e3bf0490dacfc6904be2a1c9..6d226d6b1e9ee07d49a1b593d7da65e890aa9025 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 8f85b5298e49d052fe7646d1fa88c7879987eb89..3e8abf239792a5e2354b3d6c57b811aeed2441dd 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 195a955fbf4d4699417a496f52b9c94fc396e75c..2bfb98886f7aa636d34808110db1fa6fbd18a969 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 f57f768e95ab5a3731c6140fdaf5712c97e039c4..9888a13c6fe24fa9dfb2aa169b8d07a735193755 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 6396e4c6988f68a1594e7d336177f3b95805b08e..c0f72be44fb4a3f2fcaed19459b082cf594c495d 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 fdc1b1bfd8cdf50d9bac8d103f3c867fa7758893..f5ddf770093eecaa7e67ae134f7153e7993ef69b 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 a6ed6c1e2c9ea5e99050c2efd23bbc4f9d5af64a..22bc439d78e41d93e63c25f9e095e63c6f1b018d 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 55d1f6864abffa3c015856c39fc66d81c32d5cda..3570517f8d32644fb5a0d9179f97cfb8f829972e 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 55628958411eb68939fa1a4ff457ce4668906d57..2ac000be1259721e922328141b24778b13d82148 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 25a1e75d69315f32f39902d6bd696bad894aea1b..3189306a8687d5f53eac4672bb43e2c824327e45 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 fd5301739420ba21184512f216c5e1c15bac26b9..04ea707fa81a7effa281fe6290fe8c1af6c51a20 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 cec92a091a9c237b46c5f529305362934dcd0c6b..dd194b52c405508f039352731c0c1de5148a3b71 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 3593a69ec8735408ba39cf05f1f48f613f41065d..e40ff63751e2647b744d58f3b0774b6491066c69 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 96e8c5d4c1077c083da3943bbc2c1f70b94bfc2b..dc842131a281384c66f7ffad3305e6fc3fd26899 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 570a4518d3d7fa32e262b9215270069aba5bc539..a70ba047e33ddc540f087b1dea1e93d945f12844 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 5b945d5164d5e256fe34aa458be405e666a20cbd..4da5721d72eb8a2e8f318aff0e7f7acf2560a56b 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 c43a03c950c184c54975943071adfb2cef436014..840cbdb9ce29a1a3d2a5bc2cd5a0d4d6b2f93274 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 feb473421cf83a52549f9fb373ae609621f332f6..a1e939abad048d9783b563567dcd66d091f1a947 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 3ebc07d442f4c6cb88cbfa4c310135e21fa67653..481f15f71bf40ac00b90da5b7a63146fb4f8f8bf 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 2baca6682cb40efa323b9ea43affbede922cd8a3..b8502d8aabf99a5048048048625e9cfe80854eeb 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 bb4b860e86b3a1f18a5096ad1a26469a57741b11..486a12bc8901c69c0fe77cb77a67588fac92c973 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 a187cb2d6c24eeaac1f47de3bc9352bd7c99241e..f04f03456fac7aa661e6d456c5454fc243c129a0 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 fa488d6f556cb196298103f338562d6767732e93..60ed8096e9c344ea501bad9a1bcaf71c5e6b67d5 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 c960f1037052371d406f3c89465f79c16de8f83f..b83678f40ba892fcdd15a6d25a38a5dc94e91a17 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 ac9b9daab0b949ef3b621438451dc3bafbe0b7b4..2b1a224a7585dd793be312c99cd0da658914e1c2 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 acf6238b38536edcd2f1f6cfa997a793d2792886..40c20d21de95516e5e18a8a3ae3bb07a0ac324c8 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 ca2e6d7bbc8cc4d4669881d7811f66592598a692..b7e574ddcddd1475eb42d301ee0472454fa8e141 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 c6327181dc4e0a5e373dccbd900024ded29a2859..8eb4dca33007eb6e061b7479ec4fb364b50cee28 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 8ede3a729438b2323dbf1fd4498a727e9e7341e2..57ac5fb352c946239ef4e88da3c6380674556fea 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 984851df718c7b9ab96107d1e97aadb720f292ee..a66acf8dbd331f260d3dae05e611261eb531018c 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 72f06f764926b51827022e7dac27afe84bff0343..9ebd3e518b3a6704009d19adc10c11b768012b5e 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 7b1c8a7e7214e255d12235d581b0c6496e1515af..fad8be3d92411eb748bccad79ac3933b5dd6b963 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 85db5ce6c807270094f52878ccbee47285b4337f..2eb2bf58240d38c96a10fe2c24faa5919b54251d 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 7d585e7e2d72b4593d59d927b3b1b479fb351424..75d1694a71c3780533c92babb88c54554939cb8f 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 67baf4f6c1fea15fcd2569929c301ddbe9172378..8b36192035c506f11292e13fe444a930f2625375 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 a138fa6a68895c625316e6c60e54f6a46648b367..a27014fc3feeb4ba1ed90c43528cdceb5a06f654 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 4ce1b6608ded317913b31371d48650c506ea4d4e..4ebc37462a8516e64e5a5e136390fccf0479f09c 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 b06590a55c4e239ab2e9d2cf2f9780eaae2a1ff7..19d56b4e63012957ed60351365b47f433381a802 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 781f1778efb313cd0f6ea3bbd353937f5c4623ac..ef7d7e69d65452fba7d369c73e9629f858f3c062 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 25be0a0c28dc1bd315b8bd234c9b3d345b7c0183..7e9635a3ac1be9453103ac529ac95e284ee16a97 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 52b1870390d7047ef97be99fadb8974a0a78ba38..6adfe592473827021b1b6c59b096ccd1126bebcc 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 add63599f3421895b6a0e4963171aba264433ae2..476222fdac81ad5cc0f5b7a0f664f433dd70cf19 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 91b7639d9c00f58e1e553ec926d685dd70a1ceac..e6251116e794c67492269b966dd6b252b6cb3829 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 6a9f88a1f09c564d39b5f5edcf9459c295a4d918..ee6831c9ee4fcc6d8235a4de43371856b38628e0 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 8c91320221a3377d64f0569e3c5ea4a77edb4c11..ce5a12d6cf3dc986ebf9da27ccfb5a334d648166 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 20ba5e14239cc12493295c6c6bf30cb856796cdc..d13772c1000f56a71cc1d7d080624df1c0c95651 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 f5a89e9b72019a4520d377562b7cb55481065223..92204ffebd87a192ca78ab91d833632a768123b2 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 ba95967324a7833686d9a41572838e0fd6183a9a..dd2356982a175c70f0feff2557fbd364d568ef8e 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 0a24730e7ebd29ebe8a5cc6744def0d7ed26d8db..10909d79fb9e18b7af492b1fec425234cc703c81 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 c315dfc76b7e2b6457dd9b0b45ce3bb6d9bc95d7..d5ae8a9e1ab29dc0bc819c9f20f7837e3156ba7e 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 6e7ad85748521697915a5392fbf0845927ed8b26..78694160f3577a9ec06f99141755a70e2c54949d 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 9a360611f38a55650086e7f2aae1568051352995..53be1c7a0e7eef8cf70452c1d0f9e3a1f51a2bf1 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 b075331031339f79facc888298c84c71e55c1c4b..8082337550fb8f232ee62ab17afcb40ca25883df 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 355f6431bf220155dcc4fc87a080f20516e90a24..801ef79215371d92d9f5fe2dbef0aa5ea119b4b8 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 dffee65df23af2f3487849b4d546dc8953d796a5..29de6a852334402f77a5b0ba64708f0031b4e353 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 6200cdcc673b0c9fb8035ed5789cf166fa250c4f..a80ea68ce8d8fb56b41a640330f96dbc92210ba9 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 864e8eee8c5ef055488f6ba7cd32ef63e7519097..33f2da687ccdcf9f0125fe9d2f3fd9c0917f0d40 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 44e4f0b58eec38e92d80a61e8ba8406d1a226b0b..706583a560c78882c0a30c0d76bf0e4e232a058a 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 41d0418a3b7d38a1935d59c9f87fe3f69a5d2fa4..a2efe775e6a7bec91c8046439efb778e61e2845c 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 7d345191ff8539fe5590cdb8cd39ee0e28618b6d..ae18f3b9bbb673c513ab14d3af073d67fac0ed90 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 b5dbdb6c99d3a23dda30fbe7177723c4350898c0..dd15f9d31fbb646e3ce068894b9b447f224f3b85 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 b54f3c4ce1da3a572c956b7c4ba96c1c53add50c..ab426dc13d12e91c946db4f95be5337aacc49298 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 6f50b238975201c096eff579cb5da7c54b0340d9..89861883503eace0c1ee6a6e08140aa74743e618 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 3ba0e8e5c1c13ff77ba5173ea09bf31860b371ec..56d3d985fb5f55b2b38661b52f987de7b70dd103 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 56817cd219d5406aebcfef2e76755009d4fba844..0d6be8b710bd834ce05cc0e1ea8558c665e34fba 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 bdc0a3e2a7f1101f1a29aa448f631317b8825090..6f676d88939041f0bbd168ec3e05f7ed12aab514 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 a7f9268d3edc19945ddedc1778bcfb33b34162c0..46c1a3e17cdd6805f3aa4bc52a6a441933a438f9 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 b0e72f1c5ecdc3a19cf0422615eadef52efeb7d9..0b58ed3ec867dc3f677cba55a34559d1e020f01c 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 74c87d4dd5d44a5f03e12629b11624140c152697..74d7f074e67cf33a51e4949be45c976654568328 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 9b730c22286be55b13a4bcda8c43e3d22d0e4cbf..21fc0f4f226c1b252bf4bccf03d9575711e8162e 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 0705302b45fba59949be83c30a866415109f2a96..82b6e9b0c214360a5f8ae6ae2368f5ece7949eb1 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 ab825045bccf44624b03d8a364ea479746794d0c..c742a18f6fb23577d7d0ed71e48fa3a1e36b77f6 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 18718705913ae292d2c4bcd39e675e47bc2e4cc7..18fc90ada9f2d02b2ff66a7a0f74b111052cc665 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 07298ef596c48f8a029e93e10cf2d72607a7d88e..da82c756f9a7f5265cfbe440f566effdeb9630a0 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 c0d9e3f7af89ff845d235835b2d46c2cb92b844d..69032a116947e1910aad891ba53f829b03957a49 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 5ac8e03ef3abc3414c38d06ecd6b6688ec57777e..43f1010465f60e70c8563c58db84a3e9f7da0167 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 645cc4fc806b2b11734b0690ab481863da23bf31..8f0330cea9995f36cf6b551dda070ebebb101401 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 f454eb7bf8ab24a9482e4cf9cde99c6097872c5a..e0dec535cfd56618909dc800a75e7efc8504c761 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 f27570bf7b3b501ddc2d701d2c275b2443a9a41c..89c4de9b2e8a50750050d5ca38c7869a2ef485a8 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 f26d2426812c47ecb2ab3aec4c02a3301e91cefe..d88b584de1d73db97ae9d9da2697235f2fe44de4 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 d82d3f2a2486591f87a5638f7ae1ff75f1f6bc99..52570ede1089bbbcfcbdd23051d3c440579f13e5 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 df4dcff09e6538bc8eb0d0f6b323c39a124a37c9..482036bbbbabf68ba4bae2be6cb83e249adf2753 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 6b2aa962cb97a3219d1ec168fcb0fd8435540240..7abdb1a75d3f2b3a887f5c44782f0774e3c21213 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 b47ea482171c2443d14a69cd99d43c3f4d851888..95315fa4a66d546a82c557d9be3cb671c711fe94 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); }