fvSolution: fields and equations entries in relaxationFactors are now individually optional

This commit is contained in:
Henry
2014-02-03 18:05:09 +00:00
parent a4fbc96d4a
commit cad94eb90e

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -60,11 +60,18 @@ void Foam::solution::read(const dictionary& dict)
if (dict.found("relaxationFactors"))
{
const dictionary& relaxDict(dict.subDict("relaxationFactors"));
if (relaxDict.found("fields") || relaxDict.found("equations"))
{
if (relaxDict.found("fields"))
{
fieldRelaxDict_ = relaxDict.subDict("fields");
}
if (relaxDict.found("equations"))
{
eqnRelaxDict_ = relaxDict.subDict("equations");
}
}
else
{
// backwards compatibility