Added Time::loop() to allow the

while(runTime.loop())
{
...
}

idiom.

Demonstrated in the shallowWaterFoam solver.
This commit is contained in:
henry
2009-02-17 22:00:59 +00:00
parent fcd4e88e0e
commit aa6710901e
3 changed files with 30 additions and 4 deletions

View File

@ -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_);