Skip to content
Snippets Groups Projects
Commit 5215aab7 authored by Andrew Heather's avatar Andrew Heather
Browse files

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

parent 8e3df100
No related branches found
No related tags found
No related merge requests found
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2015-2016 OpenCFD Ltd. \\ / A nd | Copyright (C) 2015-2019 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
| Copyright (C) 2015 OpenFOAM Foundation | Copyright (C) 2015 OpenFOAM Foundation
...@@ -118,7 +118,7 @@ bool Foam::functionObjects::runTimeControls::averageCondition::apply() ...@@ -118,7 +118,7 @@ bool Foam::functionObjects::runTimeControls::averageCondition::apply()
return true; return true;
} }
bool satisfied = iter_ > nIterStartUp_ ? true : false; bool satisfied = iter_ > nIterStartUp_;
++iter_; ++iter_;
...@@ -155,6 +155,11 @@ bool Foam::functionObjects::runTimeControls::averageCondition::apply() ...@@ -155,6 +155,11 @@ bool Foam::functionObjects::runTimeControls::averageCondition::apply()
{ {
Info<< " " << fieldNames_[fieldi] << nl; Info<< " " << fieldNames_[fieldi] << nl;
} }
if (unprocessedFields.size() == fieldNames_.size())
{
satisfied = false;
}
} }
Log << endl; Log << endl;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment