mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
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:
@ -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;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -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
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user