BUG: dimensioned<Type> - corrected handling of lookupOrDefault. Closes #1116

This commit is contained in:
Andrew Heather
2018-12-07 11:45:47 +00:00
parent 31642a7d88
commit afc373d683

View File

@ -212,13 +212,14 @@ Foam::dimensioned<Type> Foam::dimensioned<Type>::lookupOrDefault
const Type& defaultValue
)
{
return
dimensioned<Type>
(
name,
dims,
dict.lookupOrDefault<Type>(name, defaultValue)
);
if (dict.found(name))
{
return dimensioned<Type>(name, dims, dict);
}
else
{
return dimensioned<Type>(name, dims, defaultValue);
}
}