From 22717f323ff24f346e1c974baf3cf5f891646fe3 Mon Sep 17 00:00:00 2001
From: henry <Henry Weller h.weller@opencfd.co.uk>
Date: Thu, 8 Apr 2010 13:01:28 +0100
Subject: [PATCH] Time: Handle side-effects from functionObjects when checking
 the "running" status.

---
 src/OpenFOAM/db/Time/Time.C | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/OpenFOAM/db/Time/Time.C b/src/OpenFOAM/db/Time/Time.C
index dd0c02ddbc9..8e18dc78611 100644
--- a/src/OpenFOAM/db/Time/Time.C
+++ b/src/OpenFOAM/db/Time/Time.C
@@ -519,6 +519,10 @@ bool Foam::Time::loop()
     if (running)
     {
         operator++();
+
+        // Check update the "running" status following the "++" operation
+        // to take into account possible side-effects from functionObjects
+        running = run();
     }
 
     return running;
-- 
GitLab