mirror of
https://github.com/OpenFOAM/OpenFOAM-6.git
synced 2025-12-08 06:57:46 +00:00
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'.
This commit is contained in:
@ -87,13 +87,10 @@ Foam::functionObjects::timeControl::timeControl
|
|||||||
|
|
||||||
bool Foam::functionObjects::timeControl::execute(const bool postProcess)
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
@ -101,13 +98,10 @@ bool Foam::functionObjects::timeControl::execute(const bool postProcess)
|
|||||||
|
|
||||||
bool Foam::functionObjects::timeControl::write(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;
|
return true;
|
||||||
}
|
}
|
||||||
@ -115,11 +109,9 @@ bool Foam::functionObjects::timeControl::write(const bool postProcess)
|
|||||||
|
|
||||||
bool Foam::functionObjects::timeControl::end()
|
bool Foam::functionObjects::timeControl::end()
|
||||||
{
|
{
|
||||||
foPtr_->end();
|
if (active() && (executeControl_.execute() || writeControl_.execute()))
|
||||||
|
|
||||||
if (writeControl_.execute())
|
|
||||||
{
|
{
|
||||||
foPtr_->write();
|
foPtr_->end();
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
Reference in New Issue
Block a user