49 for (label i = 0; i < times.
size(); ++i)
51 if (timeVal <= times[i].
value())
69 for (label i = start+1; i < times.size(); ++i)
71 if (timeVal < times[i].value())
81 if (
range.first() < 0 ||
range.first() >= times.size())
87 if (
range.first() < times.size()-1)
A tuple of scalar value and key. The value often corresponds to a time value, thus the naming of the ...
Instant(const Instant &)=default
scalar value() const noexcept
const word & name() const noexcept
An ordered pair of two objects of type <T> with first() and second() elements.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
void size(const label n)
Older name for setAddressableSize.
instant()=default
Default construct, with value = 0 and empty name.
static label findStart(const UList< instant > ×, const scalar timeVal)
Find and return index of given start time (linear search).
static Pair< label > findRange(const UList< instant > ×, const scalar timeVal, const label start=-1)
Find lower/upper indices for given time value in list of instances (linear search) continuing after t...
static const char *const typeName
The type name (eg, for pTraits).
A class for handling words, derived from Foam::string.