mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Added Time::loop() to allow the
while(runTime.loop())
{
...
}
idiom.
Demonstrated in the shallowWaterFoam solver.
This commit is contained in:
@ -507,6 +507,19 @@ bool Foam::Time::run() const
|
||||
}
|
||||
|
||||
|
||||
bool Foam::Time::loop()
|
||||
{
|
||||
bool running = run();
|
||||
|
||||
if (running)
|
||||
{
|
||||
operator++();
|
||||
}
|
||||
|
||||
return running;
|
||||
}
|
||||
|
||||
|
||||
bool Foam::Time::end() const
|
||||
{
|
||||
return value() > (endTime_ + 0.5*deltaT_);
|
||||
|
||||
Reference in New Issue
Block a user