functionObjects: Separated 'execute' and 'write' functions to simplify support for post-processing

This commit is contained in:
Henry Weller
2016-05-13 09:05:29 +01:00
parent 6164c2f262
commit ded5f35dd6
19 changed files with 599 additions and 64 deletions

View File

@ -185,7 +185,7 @@ bool Foam::functionObjectList::start()
}
bool Foam::functionObjectList::execute(const bool forceWrite)
bool Foam::functionObjectList::execute(const bool postProcess)
{
bool ok = true;
@ -198,7 +198,8 @@ bool Foam::functionObjectList::execute(const bool forceWrite)
forAll(*this, objectI)
{
ok = operator[](objectI).execute(forceWrite) && ok;
ok = operator[](objectI).execute(postProcess) && ok;
ok = operator[](objectI).write(postProcess) && ok;
}
}

View File

@ -170,10 +170,10 @@ public:
//- Called at the start of the time-loop
bool start();
//- Called at each ++ or += of the time-loop. forceWrite overrides
// the usual writeControl behaviour and forces writing always
// (used in post-processing mode)
bool execute(const bool forceWrite = false);
//- Called at each ++ or += of the time-loop.
// postProcess overrides the usual executeControl behaviour and
// forces execution (used in post-processing mode)
bool execute(const bool postProcess = false);
//- Called when Time::run() determines that the time-loop exits
bool end();