diff --git a/src/OpenFOAM/db/Time/Time.C b/src/OpenFOAM/db/Time/Time.C index 3252c8039f..cc2ba3a523 100644 --- a/src/OpenFOAM/db/Time/Time.C +++ b/src/OpenFOAM/db/Time/Time.C @@ -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(); } } diff --git a/src/OpenFOAM/db/functionObjects/functionObject/functionObject.C b/src/OpenFOAM/db/functionObjects/functionObject/functionObject.C index c0cd27a973..b0a92bc5c1 100644 --- a/src/OpenFOAM/db/functionObjects/functionObject/functionObject.C +++ b/src/OpenFOAM/db/functionObjects/functionObject/functionObject.C @@ -136,7 +136,7 @@ bool Foam::functionObject::read(const dictionary& dict) bool Foam::functionObject::end() { - return execute() && write(); + return true; }