Commit d07a0f93 authored by Andrew Heather's avatar Andrew Heather
Browse files

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

parent a6184087
......@@ -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;
......
Markdown is supported
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