ENH: averageCondition - result now 'false' if no fields were processed

This commit is contained in:
Andrew Heather
2019-06-20 12:10:12 +01:00
parent 8e3df10069
commit 5215aab719

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2015-2016 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2015-2019 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
| Copyright (C) 2015 OpenFOAM Foundation
@ -118,7 +118,7 @@ bool Foam::functionObjects::runTimeControls::averageCondition::apply()
return true;
}
bool satisfied = iter_ > nIterStartUp_ ? true : false;
bool satisfied = iter_ > nIterStartUp_;
++iter_;
@ -155,6 +155,11 @@ bool Foam::functionObjects::runTimeControls::averageCondition::apply()
{
Info<< " " << fieldNames_[fieldi] << nl;
}
if (unprocessedFields.size() == fieldNames_.size())
{
satisfied = false;
}
}
Log << endl;