Skip to content
Snippets Groups Projects
Commit 806f1e71 authored by andy's avatar andy Committed by Andrew Heather
Browse files

BUG: liquidProperties - updated run-time selection when defaultCoeffs=no

parent 945e4fe9
Branches
Tags
No related merge requests found
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -187,7 +187,7 @@ Foam::autoPtr<Foam::liquidProperties> Foam::liquidProperties::New
{
FatalErrorIn
(
"liquidProperties::New(const dictionary&, const word&)"
"liquidProperties::New(const dictionary&)"
) << "Unknown liquidProperties type "
<< liquidPropertiesTypeName << nl << nl
<< "Valid liquidProperties types are:" << nl
......@@ -199,12 +199,24 @@ Foam::autoPtr<Foam::liquidProperties> Foam::liquidProperties::New
}
else
{
dictionaryConstructorTable::iterator cstrIter =
dictionaryConstructorTablePtr_->find(liquidPropertiesTypeName);
if (cstrIter == dictionaryConstructorTablePtr_->end())
{
FatalErrorIn
(
"liquidProperties::New(const dictionary&)"
) << "Unknown liquidProperties type "
<< liquidPropertiesTypeName << nl << nl
<< "Valid liquidProperties types are:" << nl
<< dictionaryConstructorTablePtr_->sortedToc()
<< abort(FatalError);
}
return autoPtr<liquidProperties>
(
new liquidProperties
(
dict.subDict(liquidPropertiesTypeName + "Coeffs")
)
cstrIter()(dict.subDict(liquidPropertiesTypeName + "Coeffs"))
);
}
}
......
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