diff --git a/src/functionObjects/utilities/runTimeControl/runTimeControl.C b/src/functionObjects/utilities/runTimeControl/runTimeControl.C index 0e263e8fff..92e26b989c 100644 --- a/src/functionObjects/utilities/runTimeControl/runTimeControl.C +++ b/src/functionObjects/utilities/runTimeControl/runTimeControl.C @@ -250,6 +250,7 @@ bool Foam::functionObjects::runTimeControls::runTimeControl::execute() { Info<< " Stopping calculation" << nl << " Writing fields"; + if (nWriteStep_ != 0) { Info<< " - final step" << nl; @@ -259,7 +260,14 @@ bool Foam::functionObjects::runTimeControls::runTimeControl::execute() Info<< nl; } + Info<< endl; + active_ = false; + + // Write any registered objects and set the end-time time.writeAndEnd(); + + // Trigger any function objects + time.run(); } break; }