Time: Added running method to check running state without side effects
chtMultiRegionSimpleFoam needs to check whether or not the simulation is at the end. To facilitate this, a Time::running method has been added. The Time::run method was being used for this purpose, but this lead to function objects being executed multiple times. This resolves bug report https://bugs.openfoam.org/view.php?id=2804
This commit is contained in:
@ -53,12 +53,12 @@ if (resControlUsed)
|
||||
}
|
||||
}
|
||||
|
||||
if (!runTime.run())
|
||||
if (!runTime.running())
|
||||
{
|
||||
Info<< "\nRegions not converged after " << runTime.timeName()
|
||||
<< " iterations" << endl;
|
||||
}
|
||||
else if (runTime.run() && resControlUsed && allRegionsConverged)
|
||||
else if (runTime.running() && resControlUsed && allRegionsConverged)
|
||||
{
|
||||
Info<< "\nRegions converged after " << runTime.timeName()
|
||||
<< " iterations" << endl;
|
||||
|
||||
Reference in New Issue
Block a user