Skip to content
Snippets Groups Projects
Commit 11ce375a authored by Mark OLESEN's avatar Mark OLESEN
Browse files

BUG: thermalBaffleModel::New from thermalBafflePropertiesDict fails

- retrieved value for the modelType was masked by a local variable
parent e2e29e2d
Branches
Tags
No related merge requests found
......@@ -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);
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment