From 93b5559c870a0f555e7ab1a75ce24f728212a6ab Mon Sep 17 00:00:00 2001 From: Andrew Heather <> Date: Tue, 4 Dec 2018 14:39:40 +0000 Subject: [PATCH] ENH: runTimeControl - execute function objects on end --- .../utilities/runTimeControl/runTimeControl.C | 8 ++++++++ 1 file changed, 8 insertions(+) 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; }