functionObjects::fieldAverage: Print warning if used with foamPostProcess

Field averaging can only be performed during the run as the averaging is
performed every time-step.

Resolves bug-report https://bugs.openfoam.org/view.php?id=3922
This commit is contained in:
Henry Weller
2022-11-03 15:54:50 +00:00
parent 488ffd9fd1
commit ee4f05411d

View File

@ -375,9 +375,20 @@ Foam::wordList Foam::functionObjects::fieldAverage::fields() const
bool Foam::functionObjects::fieldAverage::execute() bool Foam::functionObjects::fieldAverage::execute()
{ {
calcAverages(); if (functionObject::postProcess)
{
WarningInFunction
<< "fieldAverage is not supported with the foamPostProcess utility"
<< endl;
return true; return false;
}
else
{
calcAverages();
return true;
}
} }