mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
BUG: using Time::run() as a loop construct was not doing the functionObjects.
This commit is contained in:
@ -508,19 +508,11 @@ bool Foam::Time::run() const
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return running;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
bool Foam::Time::loop()
|
|
||||||
{
|
|
||||||
bool running = run();
|
|
||||||
|
|
||||||
if (running)
|
if (running)
|
||||||
{
|
{
|
||||||
if (!subCycling_)
|
if (!subCycling_)
|
||||||
{
|
{
|
||||||
readModifiedObjects();
|
const_cast<Time&>(*this).readModifiedObjects();
|
||||||
|
|
||||||
if (timeIndex_ == startTimeIndex_)
|
if (timeIndex_ == startTimeIndex_)
|
||||||
{
|
{
|
||||||
@ -532,15 +524,23 @@ bool Foam::Time::loop()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check update the "running" status following the "++" operation
|
// Update the "running" status following the
|
||||||
// to take into account possible side-effects from functionObjects
|
// possible side-effects from functionObjects
|
||||||
running = run();
|
running = value() < (endTime_ - 0.5*deltaT_);
|
||||||
|
}
|
||||||
|
|
||||||
|
return running;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool Foam::Time::loop()
|
||||||
|
{
|
||||||
|
bool running = run();
|
||||||
|
|
||||||
if (running)
|
if (running)
|
||||||
{
|
{
|
||||||
operator++();
|
operator++();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
return running;
|
return running;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user