Skip to content
Snippets Groups Projects
Commit 2b501b7e authored by Henry Weller's avatar Henry Weller
Browse files

timeControlFunctionObject: Updated the control logic in the 'end' function

to correspond to the new default behavior of the 'end' function in
functionObject which now calls 'execute' then 'write'.
parent 195b73e0
No related branches found
No related tags found
No related merge requests found
......@@ -87,12 +87,9 @@ Foam::functionObjects::timeControl::timeControl
bool Foam::functionObjects::timeControl::execute(const bool postProcess)
{
if (active())
if (active() && (postProcess || executeControl_.execute()))
{
if (postProcess || executeControl_.execute())
{
foPtr_->execute();
}
foPtr_->execute();
}
return true;
......@@ -101,12 +98,9 @@ bool Foam::functionObjects::timeControl::execute(const bool postProcess)
bool Foam::functionObjects::timeControl::write(const bool postProcess)
{
if (active())
if (active() && (postProcess || writeControl_.execute()))
{
if (postProcess || writeControl_.execute())
{
foPtr_->write();
}
foPtr_->write();
}
return true;
......@@ -115,11 +109,9 @@ bool Foam::functionObjects::timeControl::write(const bool postProcess)
bool Foam::functionObjects::timeControl::end()
{
foPtr_->end();
if (writeControl_.execute())
if (active() && (executeControl_.execute() || writeControl_.execute()))
{
foPtr_->write();
foPtr_->end();
}
return true;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment