BUG: thermalBaffleModel::New from thermalBafflePropertiesDict fails

- retrieved value for the modelType was masked by a local variable
This commit is contained in:
Mark Olesen
2019-01-23 21:57:20 +01:00
parent aa4f81ff1b
commit 5b2300a8a1

View File

@ -38,9 +38,8 @@ namespace thermalBaffleModels
autoPtr<thermalBaffleModel> thermalBaffleModel::New(const fvMesh& mesh)
{
word modelType;
{
IOdictionary thermalBafflePropertiesDict
const word modelType =
IOdictionary
(
IOobject
(
@ -51,15 +50,7 @@ autoPtr<thermalBaffleModel> thermalBaffleModel::New(const fvMesh& mesh)
IOobject::NO_WRITE,
false
)
);
word modelType =
thermalBafflePropertiesDict.lookupOrDefault<word>
(
"thermalBaffleModel",
"thermalBaffle"
);
}
).lookupOrDefault<word>("thermalBaffleModel", "thermalBaffle");
auto cstrIter = meshConstructorTablePtr_->cfind(modelType);
@ -84,7 +75,7 @@ autoPtr<thermalBaffleModel> thermalBaffleModel::New
const dictionary& dict
)
{
word modelType =
const word modelType =
dict.lookupOrDefault<word>("thermalBaffleModel", "thermalBaffle");
auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType);