mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
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:
@ -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();
|
||||
|
||||
@ -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
|
||||
|
||||
Reference in New Issue
Block a user