functionObject: change default behavior of 'end()' to do nothing rather than calling execute and write

Time: call functionObject 'execute()' and 'end()' for last time-step

Now the operation of functionObject 'end()' call is consistent between running and post-processing
This commit is contained in:
Henry Weller
2016-08-12 21:46:21 +01:00
parent 0f36cce1b5
commit ddd4f9f2ef
2 changed files with 2 additions and 4 deletions

View File

@ -850,11 +850,9 @@ bool Foam::Time::run() const
if (!subCycling_)
{
// only execute when the condition is no longer true
// ie, when exiting the control loop
if (!running && timeIndex_ != startTimeIndex_)
{
// Note, end() also calls an indirect start() as required
functionObjects_.execute();
functionObjects_.end();
}
}

View File

@ -136,7 +136,7 @@ bool Foam::functionObject::read(const dictionary& dict)
bool Foam::functionObject::end()
{
return execute() && write();
return true;
}