mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
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:
@ -850,11 +850,9 @@ bool Foam::Time::run() const
|
|||||||
|
|
||||||
if (!subCycling_)
|
if (!subCycling_)
|
||||||
{
|
{
|
||||||
// only execute when the condition is no longer true
|
|
||||||
// ie, when exiting the control loop
|
|
||||||
if (!running && timeIndex_ != startTimeIndex_)
|
if (!running && timeIndex_ != startTimeIndex_)
|
||||||
{
|
{
|
||||||
// Note, end() also calls an indirect start() as required
|
functionObjects_.execute();
|
||||||
functionObjects_.end();
|
functionObjects_.end();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -136,7 +136,7 @@ bool Foam::functionObject::read(const dictionary& dict)
|
|||||||
|
|
||||||
bool Foam::functionObject::end()
|
bool Foam::functionObject::end()
|
||||||
{
|
{
|
||||||
return execute() && write();
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user