ENH: Cleaned up hash table item found checks

This commit is contained in:
Andrew Heather
2017-05-19 11:15:35 +01:00
parent c1cbfe7a46
commit bb67ccd37d
231 changed files with 277 additions and 277 deletions

View File

@ -43,7 +43,7 @@ Foam::autoPtr<Foam::PDRDragModel> Foam::PDRDragModel::New
dictionaryConstructorTable::iterator cstrIter =
dictionaryConstructorTablePtr_->find(modelType);
if (cstrIter == dictionaryConstructorTablePtr_->end())
if (!cstrIter.found())
{
FatalErrorInFunction
<< "Unknown PDRDragModel type "

View File

@ -42,7 +42,7 @@ Foam::autoPtr<Foam::XiEqModel> Foam::XiEqModel::New
dictionaryConstructorTable::iterator cstrIter =
dictionaryConstructorTablePtr_->find(modelType);
if (cstrIter == dictionaryConstructorTablePtr_->end())
if (!cstrIter.found())
{
FatalErrorInFunction
<< "Unknown XiEqModel type "

View File

@ -42,7 +42,7 @@ Foam::autoPtr<Foam::XiGModel> Foam::XiGModel::New
dictionaryConstructorTable::iterator cstrIter =
dictionaryConstructorTablePtr_->find(modelType);
if (cstrIter == dictionaryConstructorTablePtr_->end())
if (!cstrIter.found())
{
FatalErrorInFunction
<< "Unknown XiGModel type "

View File

@ -45,7 +45,7 @@ Foam::autoPtr<Foam::XiModel> Foam::XiModel::New
dictionaryConstructorTable::iterator cstrIter =
dictionaryConstructorTablePtr_->find(modelType);
if (cstrIter == dictionaryConstructorTablePtr_->end())
if (!cstrIter.found())
{
FatalErrorInFunction
<< "Unknown XiModel type "

View File

@ -44,7 +44,7 @@ Foam::autoPtr<Foam::mixtureViscosityModel> Foam::mixtureViscosityModel::New
dictionaryConstructorTable::iterator cstrIter =
dictionaryConstructorTablePtr_->find(modelType);
if (cstrIter == dictionaryConstructorTablePtr_->end())
if (!cstrIter.found())
{
FatalErrorInFunction
<< "Unknown mixtureViscosityModel type "

View File

@ -111,7 +111,7 @@ Foam::autoPtr<Foam::relativeVelocityModel> Foam::relativeVelocityModel::New
dictionaryConstructorTable::iterator cstrIter =
dictionaryConstructorTablePtr_->find(modelType);
if (cstrIter == dictionaryConstructorTablePtr_->end())
if (!cstrIter.found())
{
FatalErrorInFunction
<< "Unknown time scale model type " << modelType

View File

@ -63,7 +63,7 @@ Foam::temperaturePhaseChangeTwoPhaseMixture::New
componentsConstructorTablePtr_
->find(temperaturePhaseChangeTwoPhaseMixtureTypeName);
if (cstrIter == componentsConstructorTablePtr_->end())
if (!cstrIter.found())
{
FatalErrorInFunction
<< "Unknown temperaturePhaseChangeTwoPhaseMixture type "

View File

@ -60,7 +60,7 @@ Foam::phaseChangeTwoPhaseMixture::New
componentsConstructorTablePtr_
->find(phaseChangeTwoPhaseMixtureTypeName);
if (cstrIter == componentsConstructorTablePtr_->end())
if (!cstrIter.found())
{
FatalErrorInFunction
<< "Unknown phaseChangeTwoPhaseMixture type "

View File

@ -44,7 +44,7 @@ Foam::autoPtr<Foam::dragModel> Foam::dragModel::New
dictionaryConstructorTable::iterator cstrIter =
dictionaryConstructorTablePtr_->find(dragModelType);
if (cstrIter == dictionaryConstructorTablePtr_->end())
if (!cstrIter.found())
{
FatalErrorInFunction
<< "Unknown dragModelType type "

View File

@ -48,7 +48,7 @@ Foam::autoPtr<Foam::heatTransferModel> Foam::heatTransferModel::New
dictionaryConstructorTable::iterator cstrIter =
dictionaryConstructorTablePtr_->find(heatTransferModelType);
if (cstrIter == dictionaryConstructorTablePtr_->end())
if (!cstrIter.found())
{
FatalErrorInFunction
<< "Unknown heatTransferModelType type "

View File

@ -46,7 +46,7 @@ Foam::autoPtr<Foam::diameterModel> Foam::diameterModel::New
dictionaryConstructorTable::iterator cstrIter =
dictionaryConstructorTablePtr_->find(diameterModelType);
if (cstrIter == dictionaryConstructorTablePtr_->end())
if (!cstrIter.found())
{
FatalErrorInFunction
<< "Unknown diameterModelType type "

View File

@ -52,7 +52,7 @@ Foam::interfaceCompositionModel::New
dictionaryConstructorTable::iterator cstrIter =
dictionaryConstructorTablePtr_->find(interfaceCompositionModelType);
if (cstrIter == dictionaryConstructorTablePtr_->end())
if (!cstrIter.found())
{
FatalErrorInFunction
<< "Unknown interfaceCompositionModelType type "

View File

@ -42,7 +42,7 @@ Foam::autoPtr<Foam::massTransferModel> Foam::massTransferModel::New
dictionaryConstructorTable::iterator cstrIter =
dictionaryConstructorTablePtr_->find(massTransferModelType);
if (cstrIter == dictionaryConstructorTablePtr_->end())
if (!cstrIter.found())
{
FatalErrorInFunction
<< "Unknown massTransferModelType type "

View File

@ -40,7 +40,7 @@ Foam::autoPtr<Foam::saturationModel> Foam::saturationModel::New
dictionaryConstructorTable::iterator cstrIter =
dictionaryConstructorTablePtr_->find(saturationModelType);
if (cstrIter == dictionaryConstructorTablePtr_->end())
if (!cstrIter.found())
{
FatalErrorInFunction
<< "Unknown saturationModelType type "

View File

@ -43,7 +43,7 @@ Foam::surfaceTensionModel::New
dictionaryConstructorTable::iterator cstrIter =
dictionaryConstructorTablePtr_->find(surfaceTensionModelType);
if (cstrIter == dictionaryConstructorTablePtr_->end())
if (!cstrIter.found())
{
FatalErrorInFunction
<< "Unknown surfaceTensionModelType type "

View File

@ -43,7 +43,7 @@ Foam::aspectRatioModel::New
dictionaryConstructorTable::iterator cstrIter =
dictionaryConstructorTablePtr_->find(aspectRatioModelType);
if (cstrIter == dictionaryConstructorTablePtr_->end())
if (!cstrIter.found())
{
FatalErrorInFunction
<< "Unknown aspectRatioModelType type "

View File

@ -42,7 +42,7 @@ Foam::autoPtr<Foam::dragModel> Foam::dragModel::New
dictionaryConstructorTable::iterator cstrIter =
dictionaryConstructorTablePtr_->find(dragModelType);
if (cstrIter == dictionaryConstructorTablePtr_->end())
if (!cstrIter.found())
{
FatalErrorInFunction
<< "Unknown dragModelType type "

View File

@ -42,7 +42,7 @@ Foam::autoPtr<Foam::heatTransferModel> Foam::heatTransferModel::New
dictionaryConstructorTable::iterator cstrIter =
dictionaryConstructorTablePtr_->find(heatTransferModelType);
if (cstrIter == dictionaryConstructorTablePtr_->end())
if (!cstrIter.found())
{
FatalErrorInFunction
<< "Unknown heatTransferModelType type "

View File

@ -42,7 +42,7 @@ Foam::autoPtr<Foam::liftModel> Foam::liftModel::New
dictionaryConstructorTable::iterator cstrIter =
dictionaryConstructorTablePtr_->find(liftModelType);
if (cstrIter == dictionaryConstructorTablePtr_->end())
if (!cstrIter.found())
{
FatalErrorInFunction
<< "Unknown liftModelType type "

View File

@ -43,7 +43,7 @@ Foam::swarmCorrection::New
dictionaryConstructorTable::iterator cstrIter =
dictionaryConstructorTablePtr_->find(swarmCorrectionType);
if (cstrIter == dictionaryConstructorTablePtr_->end())
if (!cstrIter.found())
{
FatalErrorInFunction
<< "Unknown swarmCorrectionType type "

View File

@ -43,7 +43,7 @@ Foam::turbulentDispersionModel::New
dictionaryConstructorTable::iterator cstrIter =
dictionaryConstructorTablePtr_->find(turbulentDispersionModelType);
if (cstrIter == dictionaryConstructorTablePtr_->end())
if (!cstrIter.found())
{
FatalErrorInFunction
<< "Unknown turbulentDispersionModelType type "

View File

@ -42,7 +42,7 @@ Foam::autoPtr<Foam::virtualMassModel> Foam::virtualMassModel::New
dictionaryConstructorTable::iterator cstrIter =
dictionaryConstructorTablePtr_->find(virtualMassModelType);
if (cstrIter == dictionaryConstructorTablePtr_->end())
if (!cstrIter.found())
{
FatalErrorInFunction
<< "Unknown virtualMassModelType type "

View File

@ -42,7 +42,7 @@ Foam::autoPtr<Foam::wallDampingModel> Foam::wallDampingModel::New
dictionaryConstructorTable::iterator cstrIter =
dictionaryConstructorTablePtr_->find(wallDampingModelType);
if (cstrIter == dictionaryConstructorTablePtr_->end())
if (!cstrIter.found())
{
FatalErrorInFunction
<< "Unknown wallDampingModelType type "

View File

@ -42,7 +42,7 @@ Foam::autoPtr<Foam::wallLubricationModel> Foam::wallLubricationModel::New
dictionaryConstructorTable::iterator cstrIter =
dictionaryConstructorTablePtr_->find(wallLubricationModelType);
if (cstrIter == dictionaryConstructorTablePtr_->end())
if (!cstrIter.found())
{
FatalErrorInFunction
<< "Unknown wallLubricationModelType type "

View File

@ -41,7 +41,7 @@ Foam::autoPtr<Foam::blendingMethod> Foam::blendingMethod::New
dictionaryConstructorTable::iterator cstrIter =
dictionaryConstructorTablePtr_->find(blendingMethodType);
if (cstrIter == dictionaryConstructorTablePtr_->end())
if (!cstrIter.found())
{
FatalErrorInFunction
<< "Unknown blendingMethodType type "

View File

@ -46,7 +46,7 @@ Foam::autoPtr<Foam::diameterModel> Foam::diameterModel::New
dictionaryConstructorTable::iterator cstrIter =
dictionaryConstructorTablePtr_->find(diameterModelType);
if (cstrIter == dictionaryConstructorTablePtr_->end())
if (!cstrIter.found())
{
FatalErrorInFunction
<< "Unknown diameterModelType type "

View File

@ -43,7 +43,7 @@ Foam::autoPtr<Foam::phaseModel> Foam::phaseModel::New
phaseSystemConstructorTable::iterator cstrIter =
phaseSystemConstructorTablePtr_->find(phaseModelType);
if (cstrIter == phaseSystemConstructorTablePtr_->end())
if (!cstrIter.found())
{
FatalErrorInFunction
<< "Unknown phaseModelType type "

View File

@ -54,7 +54,7 @@ Foam::autoPtr<Foam::multiphaseSystem> Foam::multiphaseSystem::New
dictionaryConstructorTable::iterator cstrIter =
dictionaryConstructorTablePtr_->find(multiphaseSystemType);
if (cstrIter == dictionaryConstructorTablePtr_->end())
if (!cstrIter.found())
{
FatalErrorInFunction
<< "Unknown multiphaseSystemType type "

View File

@ -41,7 +41,7 @@ Foam::wallBoilingModels::departureDiameterModel::New
dictionaryConstructorTable::iterator cstrIter =
dictionaryConstructorTablePtr_->find(departureDiameterModelType);
if (cstrIter == dictionaryConstructorTablePtr_->end())
if (!cstrIter.found())
{
FatalErrorInFunction
<< "Unknown departureDiameterModelType type "

View File

@ -41,7 +41,7 @@ Foam::wallBoilingModels::departureFrequencyModel::New
dictionaryConstructorTable::iterator cstrIter =
dictionaryConstructorTablePtr_->find(departureFrequencyModelType);
if (cstrIter == dictionaryConstructorTablePtr_->end())
if (!cstrIter.found())
{
FatalErrorInFunction
<< "Unknown departureFrequencyModelType type "

View File

@ -41,7 +41,7 @@ Foam::wallBoilingModels::nucleationSiteModel::New
dictionaryConstructorTable::iterator cstrIter =
dictionaryConstructorTablePtr_->find(nucleationSiteModelType);
if (cstrIter == dictionaryConstructorTablePtr_->end())
if (!cstrIter.found())
{
FatalErrorInFunction
<< "Unknown nucleationSiteModelType type "

View File

@ -41,7 +41,7 @@ Foam::wallBoilingModels::partitioningModel::New
dictionaryConstructorTable::iterator cstrIter =
dictionaryConstructorTablePtr_->find(partitioningModelType);
if (cstrIter == dictionaryConstructorTablePtr_->end())
if (!cstrIter.found())
{
FatalErrorInFunction
<< "Unknown partitioningModelType type "

View File

@ -41,7 +41,7 @@ Foam::kineticTheoryModels::conductivityModel::New
dictionaryConstructorTable::iterator cstrIter =
dictionaryConstructorTablePtr_->find(conductivityModelType);
if (cstrIter == dictionaryConstructorTablePtr_->end())
if (!cstrIter.found())
{
FatalError
<< "conductivityModel::New(const dictionary&) : " << endl

View File

@ -41,7 +41,7 @@ Foam::kineticTheoryModels::frictionalStressModel::New
dictionaryConstructorTable::iterator cstrIter =
dictionaryConstructorTablePtr_->find(frictionalStressModelType);
if (cstrIter == dictionaryConstructorTablePtr_->end())
if (!cstrIter.found())
{
FatalError
<< "frictionalStressModel::New(const dictionary&) : " << endl

View File

@ -41,7 +41,7 @@ Foam::kineticTheoryModels::granularPressureModel::New
dictionaryConstructorTable::iterator cstrIter =
dictionaryConstructorTablePtr_->find(granularPressureModelType);
if (cstrIter == dictionaryConstructorTablePtr_->end())
if (!cstrIter.found())
{
FatalError
<< "granularPressureModel::New(const dictionary&) : " << endl

View File

@ -41,7 +41,7 @@ Foam::kineticTheoryModels::radialModel::New
dictionaryConstructorTable::iterator cstrIter =
dictionaryConstructorTablePtr_->find(radialModelType);
if (cstrIter == dictionaryConstructorTablePtr_->end())
if (!cstrIter.found())
{
FatalError
<< "radialModel::New(const dictionary&) : " << endl

View File

@ -41,7 +41,7 @@ Foam::kineticTheoryModels::viscosityModel::New
dictionaryConstructorTable::iterator cstrIter =
dictionaryConstructorTablePtr_->find(viscosityModelType);
if (cstrIter == dictionaryConstructorTablePtr_->end())
if (!cstrIter.found())
{
FatalError
<< "viscosityModel::New(const dictionary&) : " << endl

View File

@ -53,7 +53,7 @@ Foam::diameterModels::IATEsource::New
dictionaryConstructorTable::iterator cstrIter =
dictionaryConstructorTablePtr_->find(type);
if (cstrIter == dictionaryConstructorTablePtr_->end())
if (!cstrIter.found())
{
FatalErrorInFunction
<< "Unknown IATE source type "

View File

@ -54,7 +54,7 @@ Foam::autoPtr<Foam::twoPhaseSystem> Foam::twoPhaseSystem::New
dictionaryConstructorTable::iterator cstrIter =
dictionaryConstructorTablePtr_->find(twoPhaseSystemType);
if (cstrIter == dictionaryConstructorTablePtr_->end())
if (!cstrIter.found())
{
FatalErrorInFunction
<< "Unknown twoPhaseSystemType type "

View File

@ -43,7 +43,7 @@ Foam::aspectRatioModel::New
dictionaryConstructorTable::iterator cstrIter =
dictionaryConstructorTablePtr_->find(aspectRatioModelType);
if (cstrIter == dictionaryConstructorTablePtr_->end())
if (!cstrIter.found())
{
FatalErrorInFunction
<< "Unknown aspectRatioModelType type "

View File

@ -42,7 +42,7 @@ Foam::autoPtr<Foam::dragModel> Foam::dragModel::New
dictionaryConstructorTable::iterator cstrIter =
dictionaryConstructorTablePtr_->find(dragModelType);
if (cstrIter == dictionaryConstructorTablePtr_->end())
if (!cstrIter.found())
{
FatalErrorInFunction
<< "Unknown dragModelType type "

View File

@ -42,7 +42,7 @@ Foam::autoPtr<Foam::heatTransferModel> Foam::heatTransferModel::New
dictionaryConstructorTable::iterator cstrIter =
dictionaryConstructorTablePtr_->find(heatTransferModelType);
if (cstrIter == dictionaryConstructorTablePtr_->end())
if (!cstrIter.found())
{
FatalErrorInFunction
<< "Unknown heatTransferModelType type "

View File

@ -42,7 +42,7 @@ Foam::autoPtr<Foam::liftModel> Foam::liftModel::New
dictionaryConstructorTable::iterator cstrIter =
dictionaryConstructorTablePtr_->find(liftModelType);
if (cstrIter == dictionaryConstructorTablePtr_->end())
if (!cstrIter.found())
{
FatalErrorInFunction
<< "Unknown liftModelType type "

View File

@ -43,7 +43,7 @@ Foam::swarmCorrection::New
dictionaryConstructorTable::iterator cstrIter =
dictionaryConstructorTablePtr_->find(swarmCorrectionType);
if (cstrIter == dictionaryConstructorTablePtr_->end())
if (!cstrIter.found())
{
FatalErrorInFunction
<< "Unknown swarmCorrectionType type "

View File

@ -43,7 +43,7 @@ Foam::turbulentDispersionModel::New
dictionaryConstructorTable::iterator cstrIter =
dictionaryConstructorTablePtr_->find(turbulentDispersionModelType);
if (cstrIter == dictionaryConstructorTablePtr_->end())
if (!cstrIter.found())
{
FatalErrorInFunction
<< "Unknown turbulentDispersionModelType type "

View File

@ -42,7 +42,7 @@ Foam::autoPtr<Foam::virtualMassModel> Foam::virtualMassModel::New
dictionaryConstructorTable::iterator cstrIter =
dictionaryConstructorTablePtr_->find(virtualMassModelType);
if (cstrIter == dictionaryConstructorTablePtr_->end())
if (!cstrIter.found())
{
FatalErrorInFunction
<< "Unknown virtualMassModelType type "

View File

@ -42,7 +42,7 @@ Foam::autoPtr<Foam::wallLubricationModel> Foam::wallLubricationModel::New
dictionaryConstructorTable::iterator cstrIter =
dictionaryConstructorTablePtr_->find(wallLubricationModelType);
if (cstrIter == dictionaryConstructorTablePtr_->end())
if (!cstrIter.found())
{
FatalErrorInFunction
<< "Unknown wallLubricationModelType type "

View File

@ -41,7 +41,7 @@ Foam::kineticTheoryModels::conductivityModel::New
dictionaryConstructorTable::iterator cstrIter =
dictionaryConstructorTablePtr_->find(conductivityModelType);
if (cstrIter == dictionaryConstructorTablePtr_->end())
if (!cstrIter.found())
{
FatalError
<< "conductivityModel::New(const dictionary&) : " << endl

View File

@ -41,7 +41,7 @@ Foam::kineticTheoryModels::frictionalStressModel::New
dictionaryConstructorTable::iterator cstrIter =
dictionaryConstructorTablePtr_->find(frictionalStressModelType);
if (cstrIter == dictionaryConstructorTablePtr_->end())
if (!cstrIter.found())
{
FatalError
<< "frictionalStressModel::New(const dictionary&) : " << endl

View File

@ -41,7 +41,7 @@ Foam::kineticTheoryModels::granularPressureModel::New
dictionaryConstructorTable::iterator cstrIter =
dictionaryConstructorTablePtr_->find(granularPressureModelType);
if (cstrIter == dictionaryConstructorTablePtr_->end())
if (!cstrIter.found())
{
FatalError
<< "granularPressureModel::New(const dictionary&) : " << endl

View File

@ -41,7 +41,7 @@ Foam::kineticTheoryModels::radialModel::New
dictionaryConstructorTable::iterator cstrIter =
dictionaryConstructorTablePtr_->find(radialModelType);
if (cstrIter == dictionaryConstructorTablePtr_->end())
if (!cstrIter.found())
{
FatalError
<< "radialModel::New(const dictionary&) : " << endl

View File

@ -41,7 +41,7 @@ Foam::kineticTheoryModels::viscosityModel::New
dictionaryConstructorTable::iterator cstrIter =
dictionaryConstructorTablePtr_->find(viscosityModelType);
if (cstrIter == dictionaryConstructorTablePtr_->end())
if (!cstrIter.found())
{
FatalError
<< "viscosityModel::New(const dictionary&) : " << endl

View File

@ -41,7 +41,7 @@ Foam::autoPtr<Foam::blendingMethod> Foam::blendingMethod::New
dictionaryConstructorTable::iterator cstrIter =
dictionaryConstructorTablePtr_->find(blendingMethodType);
if (cstrIter == dictionaryConstructorTablePtr_->end())
if (!cstrIter.found())
{
FatalErrorInFunction
<< "Unknown blendingMethodType type "

View File

@ -54,7 +54,7 @@ Foam::diameterModels::IATEsource::New
dictionaryConstructorTable::iterator cstrIter =
dictionaryConstructorTablePtr_->find(type);
if (cstrIter == dictionaryConstructorTablePtr_->end())
if (!cstrIter.found())
{
FatalErrorInFunction
<< "Unknown IATE source type "

View File

@ -46,7 +46,7 @@ Foam::autoPtr<Foam::diameterModel> Foam::diameterModel::New
dictionaryConstructorTable::iterator cstrIter =
dictionaryConstructorTablePtr_->find(diameterModelType);
if (cstrIter == dictionaryConstructorTablePtr_->end())
if (!cstrIter.found())
{
FatalErrorInFunction
<< "Unknown diameterModelType type "