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:
@ -374,11 +374,22 @@ Foam::wordList Foam::functionObjects::fieldAverage::fields() const
|
|||||||
|
|
||||||
|
|
||||||
bool Foam::functionObjects::fieldAverage::execute()
|
bool Foam::functionObjects::fieldAverage::execute()
|
||||||
|
{
|
||||||
|
if (functionObject::postProcess)
|
||||||
|
{
|
||||||
|
WarningInFunction
|
||||||
|
<< "fieldAverage is not supported with the foamPostProcess utility"
|
||||||
|
<< endl;
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
calcAverages();
|
calcAverages();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
bool Foam::functionObjects::fieldAverage::write()
|
bool Foam::functionObjects::fieldAverage::write()
|
||||||
|
|||||||
Reference in New Issue
Block a user