mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
cleanup of time handling (cosmetic changes), used timeSelector in more places
This commit is contained in:
@ -113,11 +113,9 @@ int Foam::vtkPV3Foam::setTime(int nRequest, const double requestTimes[])
|
||||
instantList Times = runTime.times();
|
||||
|
||||
int nearestIndex = timeIndex_;
|
||||
|
||||
for (int requestI = 0; requestI < nRequest; ++requestI)
|
||||
{
|
||||
int index = Time::findClosestTimeIndex(Times, requestTimes[requestI]);
|
||||
|
||||
if (index >= 0 && index != timeIndex_)
|
||||
{
|
||||
nearestIndex = index;
|
||||
@ -125,7 +123,6 @@ int Foam::vtkPV3Foam::setTime(int nRequest, const double requestTimes[])
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (nearestIndex < 0)
|
||||
{
|
||||
nearestIndex = 0;
|
||||
|
||||
Reference in New Issue
Block a user