STYLE: remove unused timeSelector::select static method

- this also removes the '-newTimes' option cruft from appearing
  everywhere. reconstructPar and redistributePar are unaffected by this
  since they define their own -newTimes option independently.
This commit is contained in:
Mark Olesen
2018-10-09 19:39:02 +02:00
parent edd93728e2
commit c006a10bd8
3 changed files with 35 additions and 87 deletions

View File

@ -70,12 +70,8 @@ Foam::List<bool> Foam::timeSelector::selected(const instantList& times) const
{
const scalar target = range.value();
int nearestIndex =
TimePaths::findClosestTimeIndex
(
times,
target
);
const label nearestIndex =
TimePaths::findClosestTimeIndex(times, target);
// Note could also test if the index is too far away.
// Eg, for times (0 10 20 30 40) selecting 100 will currently
@ -142,11 +138,6 @@ void Foam::timeSelector::addOptions
"latestTime",
"Select the latest time"
);
argList::addBoolOption
(
"newTimes",
"Select the new times"
);
argList::addOption
(
"time",
@ -297,37 +288,4 @@ Foam::instantList Foam::timeSelector::selectIfPresent
}
Foam::instantList Foam::timeSelector::select
(
Time& runTime,
const argList& args,
const word& fName
)
{
instantList times(timeSelector::select0(runTime, args));
const label nTimes = times.size();
if (nTimes && args.found("newTimes"))
{
List<bool> selectTimes(nTimes, true);
for (label timei=0; timei < nTimes; ++timei)
{
selectTimes[timei] =
!fileHandler().exists
(
runTime.path()
/ times[timei].name()
/ fName
);
}
return subset(selectTimes, times);
}
return times;
}
// ************************************************************************* //

View File

@ -163,17 +163,6 @@ public:
const argList& args
);
//- Return the set of times selected based on the argList options
//- including support for \b -newTimes in which times are selected
//- if the file 'fName' does not exist in the time directory.
// Also set the runTime to the first instance or the
// \c constant/ directory if no instances are specified or available
static instantList select
(
Time& runTime,
const argList& args,
const word& fName
);
};