diff --git a/src/OpenFOAM/expressions/exprResult/exprResultDelayed.C b/src/OpenFOAM/expressions/exprResult/exprResultDelayed.C index 2772997afe..4adda6a125 100644 --- a/src/OpenFOAM/expressions/exprResult/exprResultDelayed.C +++ b/src/OpenFOAM/expressions/exprResult/exprResultDelayed.C @@ -99,9 +99,9 @@ Foam::expressions::exprResultDelayed::exprResultDelayed storeInterval_(dict.get("storeInterval")), delay_(dict.get("delay")) { - const entry *eptr = dict.findEntry("storedValues"); + const entry *eptr = dict.findEntry("storedValues", keyType::LITERAL); - if (eptr) + if (eptr && eptr->isStream()) { storedValues_ = DLList(eptr->stream()); } diff --git a/src/finiteVolume/fvMesh/fvGeometryScheme/fvGeometryScheme/fvGeometryScheme.C b/src/finiteVolume/fvMesh/fvGeometryScheme/fvGeometryScheme/fvGeometryScheme.C index 88686584c0..fb47050156 100644 --- a/src/finiteVolume/fvMesh/fvGeometryScheme/fvGeometryScheme/fvGeometryScheme.C +++ b/src/finiteVolume/fvMesh/fvGeometryScheme/fvGeometryScheme/fvGeometryScheme.C @@ -106,11 +106,11 @@ Foam::tmp Foam::fvGeometryScheme::New const word& defaultScheme ) { - const entry* ePtr = dict.findEntry("method"); + const entry* eptr = dict.findEntry("method", keyType::LITERAL); const word schemeName ( - ePtr - ? word(ePtr->stream()) + eptr + ? word(eptr->stream()) : dict.getOrDefault("type", defaultScheme) ); diff --git a/src/sampling/sampledSet/sampledSets/sampledSets.C b/src/sampling/sampledSet/sampledSets/sampledSets.C index b1e31b816b..12242b7421 100644 --- a/src/sampling/sampledSet/sampledSets/sampledSets.C +++ b/src/sampling/sampledSet/sampledSets/sampledSets.C @@ -292,7 +292,7 @@ void Foam::sampledSets::initDict(const dictionary& dict, const bool initial) writers_.clear(); } - const entry* eptr = dict.findEntry("sets"); + const entry* eptr = dict.findEntry("sets", keyType::LITERAL); if (eptr && eptr->isDict()) { @@ -529,7 +529,7 @@ bool Foam::sampledSets::read(const dictionary& dict) samplePointScheme_ = dict.getOrDefault("interpolationScheme", "cellPoint"); - const entry* eptr = dict.findEntry("sets"); + const entry* eptr = dict.findEntry("sets", keyType::LITERAL); if (eptr) { diff --git a/src/sampling/sampledSurface/sampledSurfaces/sampledSurfaces.C b/src/sampling/sampledSurface/sampledSurfaces/sampledSurfaces.C index 9a1a9524b6..d7de7db89d 100644 --- a/src/sampling/sampledSurface/sampledSurfaces/sampledSurfaces.C +++ b/src/sampling/sampledSurface/sampledSurfaces/sampledSurfaces.C @@ -297,7 +297,7 @@ bool Foam::sampledSurfaces::read(const dictionary& dict) sampleNodeScheme_ = dict.getOrDefault("interpolationScheme", "cellPoint"); - const entry* eptr = dict.findEntry("surfaces"); + const entry* eptr = dict.findEntry("surfaces", keyType::LITERAL); // Surface writer type and format options const word writerType = diff --git a/src/thermoTools/derivedFvPatchFields/turbulentTemperatureRadCoupledMixed/turbulentTemperatureRadCoupledMixedFvPatchScalarField.C b/src/thermoTools/derivedFvPatchFields/turbulentTemperatureRadCoupledMixed/turbulentTemperatureRadCoupledMixedFvPatchScalarField.C index ad59b17622..9794da70ff 100644 --- a/src/thermoTools/derivedFvPatchFields/turbulentTemperatureRadCoupledMixed/turbulentTemperatureRadCoupledMixedFvPatchScalarField.C +++ b/src/thermoTools/derivedFvPatchFields/turbulentTemperatureRadCoupledMixed/turbulentTemperatureRadCoupledMixedFvPatchScalarField.C @@ -128,7 +128,7 @@ turbulentTemperatureRadCoupledMixedFvPatchScalarField << exit(FatalError); } - //const auto* eptr = dict.findEntry("thicknessLayers"); + //const auto* eptr = dict.findEntry("thicknessLayers", keyType::LITERAL); //if (eptr) //{ // // Detect either a list (parsed as a scalarList) or diff --git a/src/thermophysicalModels/radiation/submodels/boundaryRadiationProperties/boundaryRadiationProperties.C b/src/thermophysicalModels/radiation/submodels/boundaryRadiationProperties/boundaryRadiationProperties.C index ee564a3421..c77ec73321 100644 --- a/src/thermophysicalModels/radiation/submodels/boundaryRadiationProperties/boundaryRadiationProperties.C +++ b/src/thermophysicalModels/radiation/submodels/boundaryRadiationProperties/boundaryRadiationProperties.C @@ -89,14 +89,16 @@ Foam::radiation::boundaryRadiationProperties::boundaryRadiationProperties { const label patchi = pp.index(); - const auto* ePtr = radiationDict.findEntry(pp.name()); + // Allow wildcard matches + const auto* eptr = + radiationDict.findEntry(pp.name(), keyType::REGEX); - if (ePtr && ePtr->isDict()) + if (eptr && eptr->isDict()) { radBoundaryPropertiesPtrList_.set ( patchi, - boundaryRadiationPropertiesPatch::New(ePtr->dict(), pp) + boundaryRadiationPropertiesPatch::New(eptr->dict(), pp) ); matchedEntries.insert(pp.name()); @@ -132,32 +134,25 @@ Foam::radiation::boundaryRadiationProperties::boundaryRadiationProperties { const label zonei = fz.index(); - if (!matchedEntries.found(fz.name())) + if (!matchedEntries.contains(fz.name())) { // Note: avoid wildcard matches. Assume user explicitly // provided information for faceZones. - const auto* ePtr = radiationDict.findEntry + + const auto* eptr = radiationDict.findEntry ( fz.name(), keyType::LITERAL ); - // Skip face zones that are not used in boundary radiation - if (!ePtr) + if (eptr && eptr->isDict()) { - continue; - } - - if (ePtr->isDict()) - { - const dictionary& dict = ePtr->dict(); - radZonePropertiesPtrList_.set ( zonei, boundaryRadiationPropertiesPatch::New ( - dict, + eptr->dict(), dummyRef ) );