mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
BUG: thermalBaffleModel::New from thermalBafflePropertiesDict fails
- retrieved value for the modelType was masked by a local variable
This commit is contained in:
@ -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);
|
||||
|
||||
Reference in New Issue
Block a user