Utilities patchAverage and patchIntegrate replaced by postProcess

e.g.
    postProcess -func 'patchAverage(name=inlet,p)'
    postProcess -func 'patchIntegrate(name=inlet,p)'
This commit is contained in:
Henry Weller
2016-06-12 22:32:15 +01:00
parent 6656aff301
commit 18b632e71d
16 changed files with 106 additions and 441 deletions

View File

@ -36,12 +36,15 @@ namespace Foam
defineRunTimeSelectionTable(functionObject, dictionary);
}
bool Foam::functionObject::postProcess(false);
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::functionObject::functionObject(const word& name)
:
name_(name)
name_(name),
log(postProcess)
{}
@ -120,6 +123,17 @@ const Foam::word& Foam::functionObject::name() const
}
bool Foam::functionObject::read(const dictionary& dict)
{
if (!postProcess)
{
log = dict.lookupOrDefault<Switch>("log", true);
}
return true;
}
bool Foam::functionObject::end()
{
return execute() && write();

View File

@ -112,6 +112,7 @@ SourceFiles
#include "typeInfo.H"
#include "autoPtr.H"
#include "Switch.H"
#include "runTimeSelectionTables.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -152,6 +153,12 @@ public:
static int debug;
//- Global post-processing mode switch
static bool postProcess;
//- Switch write log to Info
Switch log;
// Declare run-time constructor selection tables
@ -199,7 +206,7 @@ public:
const word& name() const;
//- Read and set the function object if its data have changed
virtual bool read(const dictionary&) = 0;
virtual bool read(const dictionary&);
//- Called at each ++ or += of the time-loop.
// postProcess overrides the usual executeControl behaviour and