diff --git a/src/engine/engineTime/engineTime/engineTimeNew.C b/src/engine/engineTime/engineTime/engineTimeNew.C index a196c2cada..91f53d862f 100644 --- a/src/engine/engineTime/engineTime/engineTimeNew.C +++ b/src/engine/engineTime/engineTime/engineTimeNew.C @@ -49,10 +49,9 @@ Foam::autoPtr Foam::engineTime::New Info<< "Selecting engine type " << engineType << endl; - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(engineType); + auto cstrIter = dictionaryConstructorTablePtr_->cfind(engineType); - if (cstrIter == dictionaryConstructorTablePtr_->end()) + if (!cstrIter.found()) { FatalErrorInFunction << "Unknown engine type " diff --git a/src/finiteArea/fields/faPatchFields/basic/calculated/calculatedFaPatchField.C b/src/finiteArea/fields/faPatchFields/basic/calculated/calculatedFaPatchField.C index 50c6a626e2..0243b28eba 100644 --- a/src/finiteArea/fields/faPatchFields/basic/calculated/calculatedFaPatchField.C +++ b/src/finiteArea/fields/faPatchFields/basic/calculated/calculatedFaPatchField.C @@ -103,8 +103,8 @@ Foam::tmp> Foam::faPatchField::NewCalculatedType const faPatchField& pf ) { - typename patchConstructorTable::iterator patchTypeCstrIter = - patchConstructorTablePtr_->find(pf.patch().type()); + auto patchTypeCstrIter = + patchConstructorTablePtr_->cfind(pf.patch().type()); if (patchTypeCstrIter.found()) { diff --git a/src/finiteArea/fields/faPatchFields/faPatchField/faPatchFieldNew.C b/src/finiteArea/fields/faPatchFields/faPatchField/faPatchFieldNew.C index 238dda6a63..87cde332c3 100644 --- a/src/finiteArea/fields/faPatchFields/faPatchField/faPatchFieldNew.C +++ b/src/finiteArea/fields/faPatchFields/faPatchField/faPatchFieldNew.C @@ -39,7 +39,7 @@ Foam::tmp> Foam::faPatchField::New << "constructing faPatchField" << endl; - auto cstrIter = patchConstructorTablePtr_->cfind(patchFieldType); + auto cstrIter = patchConstructorTablePtr_->cfind(patchFieldType); if (!cstrIter.found()) { @@ -83,7 +83,7 @@ Foam::tmp> Foam::faPatchField::New { if (!disallowGenericFaPatchField) { - cstrIter = dictionaryConstructorTablePtr_->find("generic"); + cstrIter = dictionaryConstructorTablePtr_->cfind("generic"); } if (!cstrIter.found()) diff --git a/src/finiteArea/fields/faePatchFields/basic/calculated/calculatedFaePatchField.C b/src/finiteArea/fields/faePatchFields/basic/calculated/calculatedFaePatchField.C index 4c57067977..ae54d422d4 100644 --- a/src/finiteArea/fields/faePatchFields/basic/calculated/calculatedFaePatchField.C +++ b/src/finiteArea/fields/faePatchFields/basic/calculated/calculatedFaePatchField.C @@ -103,8 +103,8 @@ Foam::faePatchField::NewCalculatedType const faePatchField& pf ) { - typename patchConstructorTable::iterator patchTypeCstrIter = - patchConstructorTablePtr_->find(pf.patch().type()); + auto patchTypeCstrIter = + patchConstructorTablePtr_->cfind(pf.patch().type()); if (patchTypeCstrIter.found()) { diff --git a/src/finiteArea/fields/faePatchFields/faePatchField/faePatchFieldNew.C b/src/finiteArea/fields/faePatchFields/faePatchField/faePatchFieldNew.C index 3ecb6b4782..5cf2f24240 100644 --- a/src/finiteArea/fields/faePatchFields/faePatchField/faePatchFieldNew.C +++ b/src/finiteArea/fields/faePatchFields/faePatchField/faePatchFieldNew.C @@ -83,7 +83,7 @@ Foam::tmp> Foam::faePatchField::New { if (!disallowGenericFaePatchField) { - cstrIter = dictionaryConstructorTablePtr_->find("generic"); + cstrIter = dictionaryConstructorTablePtr_->cfind("generic"); } if (!cstrIter.found()) @@ -136,8 +136,7 @@ Foam::tmp> Foam::faePatchField::New << exit(FatalError); } - typename patchMapperConstructorTable::iterator - patchTypeCstrIter = patchMapperConstructorTablePtr_->find(p.type()); + auto patchTypeCstrIter = patchMapperConstructorTablePtr_->cfind(p.type()); if (patchTypeCstrIter.found()) { diff --git a/src/finiteArea/finiteArea/lnGradSchemes/lnGradScheme/lnGradScheme.C b/src/finiteArea/finiteArea/lnGradSchemes/lnGradScheme/lnGradScheme.C index 741981f5f0..ffa1cabd23 100644 --- a/src/finiteArea/finiteArea/lnGradSchemes/lnGradScheme/lnGradScheme.C +++ b/src/finiteArea/finiteArea/lnGradSchemes/lnGradScheme/lnGradScheme.C @@ -68,10 +68,9 @@ tmp> lnGradScheme::New const word schemeName(schemeData); - typename MeshConstructorTable::iterator constructorIter = - MeshConstructorTablePtr_->find(schemeName); + auto cstrIter = MeshConstructorTablePtr_->cfind(schemeName); - if (!constructorIter.found()) + if (!cstrIter.found()) { FatalIOErrorInFunction(schemeData) << "Unknown discretisation scheme " @@ -81,7 +80,7 @@ tmp> lnGradScheme::New << exit(FatalIOError); } - return constructorIter()(mesh, schemeData); + return cstrIter()(mesh, schemeData); } diff --git a/src/finiteArea/interpolation/edgeInterpolation/edgeInterpolationScheme/edgeInterpolationScheme.C b/src/finiteArea/interpolation/edgeInterpolation/edgeInterpolationScheme/edgeInterpolationScheme.C index 072bcddbdc..334296e911 100644 --- a/src/finiteArea/interpolation/edgeInterpolation/edgeInterpolationScheme/edgeInterpolationScheme.C +++ b/src/finiteArea/interpolation/edgeInterpolation/edgeInterpolationScheme/edgeInterpolationScheme.C @@ -60,10 +60,9 @@ Foam::edgeInterpolationScheme::New const word schemeName(schemeData); - typename MeshConstructorTable::iterator constructorIter = - MeshConstructorTablePtr_->find(schemeName); + auto cstrIter = MeshConstructorTablePtr_->cfind(schemeName); - if (!constructorIter.found()) + if (!cstrIter.found()) { FatalIOErrorInFunction(schemeData) << "Unknown discretisation scheme " @@ -73,7 +72,7 @@ Foam::edgeInterpolationScheme::New << exit(FatalIOError); } - return constructorIter()(mesh, schemeData); + return cstrIter()(mesh, schemeData); } @@ -105,10 +104,9 @@ Foam::edgeInterpolationScheme::New const word schemeName(schemeData); - typename MeshFluxConstructorTable::iterator constructorIter = - MeshFluxConstructorTablePtr_->find(schemeName); + auto cstrIter = MeshFluxConstructorTablePtr_->cfind(schemeName); - if (!constructorIter.found()) + if (!cstrIter.found()) { FatalIOErrorInFunction(schemeData) << "Unknown discretisation scheme " @@ -118,7 +116,7 @@ Foam::edgeInterpolationScheme::New << exit(FatalIOError); } - return constructorIter()(mesh, faceFlux, schemeData); + return cstrIter()(mesh, faceFlux, schemeData); } diff --git a/src/functionObjects/utilities/runTimeControl/runTimeControl.C b/src/functionObjects/utilities/runTimeControl/runTimeControl.C index e4c0d89095..96e040c5b4 100644 --- a/src/functionObjects/utilities/runTimeControl/runTimeControl.C +++ b/src/functionObjects/utilities/runTimeControl/runTimeControl.C @@ -158,9 +158,9 @@ bool Foam::functionObjects::runTimeControls::runTimeControl::execute() label groupi = condition.groupID(); - Map