ENH: streamLine: 'UName' instead of 'U'

This commit is contained in:
mattijs
2011-10-19 18:26:37 +01:00
parent 09247dd122
commit 9914c941da
5 changed files with 20 additions and 5 deletions

View File

@ -318,7 +318,22 @@ void Foam::streamLine::read(const dictionary& dict)
{
//dict_ = dict;
dict.lookup("fields") >> fields_;
UName_ = dict.lookupOrDefault<word>("U", "U");
if (dict.found("UName"))
{
dict.lookup("UName") >> UName_;
}
else
{
UName_ = "U";
if (dict.found("U"))
{
IOWarningIn("streamLine::read(const dictionary&)", dict)
<< "Using deprecated entry \"U\"."
<< " Please use \"UName\" instead."
<< endl;
dict.lookup("U") >> UName_;
}
}
dict.lookup("trackForward") >> trackForward_;
dict.lookup("lifeTime") >> lifeTime_;
if (lifeTime_ < 1)