Go to the documentation of this file.
109 return this->first();
116 return this->first();
123 return this->second();
130 return this->second();
138 return (0.5 *
min()) + (0.5 *
max());
192 return (a.
min() <=
b.max() &&
b.min() <= a.
max());
205 else if (val <
min())
218 return (valid() && !compare(val));
231 else if (
max() < val)
251 else if (
max() < val)
283 for (
const T& val : vals)
296 return contains(val);
gmvFile<< "tracers "<< particles.size()<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().x()<< " ";}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().y()<< " ";}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().z()<< " ";}gmvFile<< nl;forAll(lagrangianScalarNames, i){ word name=lagrangianScalarNames[i];IOField< scalar > s(IOobject(name, runTime.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
bool inplaceClip(T &val) const
Inplace clip value by the min/max limits.
static constexpr const zero Zero
Global zero (0)
const T & max() const noexcept
The max value (second)
const T & min() const noexcept
The min value (first)
scalar mag() const
The magnitude of the min to max span. Zero if the range is invalid.
bool contains(const T &val) const
True if the value is within the range.
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
T centre() const
The min/max average value.
MinMax< T > & operator/=(const scalar &s)
Divide range by scalar factor.
const dimensionedScalar b
Wien displacement law constant: default SI units: [m.K].
bool overlaps(const MinMax< T > &b) const
Test if the ranges overlap.
T span() const
The min to max span. Zero if the range is invalid.
static MinMax< T > zero_one()
A 0-1 range corresponding to the pTraits zero, one.
bool operator()(const T &val) const
Identical to contains(), for use as a predicate.
MinMax< T > & operator+=(const MinMax< T > &b)
Extend min/max range to include other range.
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
const T & clip(const T &val) const
void add(FieldField< Field1, typename typeOfSum< Type1, Type2 >::type > &f, const FieldField< Field1, Type1 > &f1, const FieldField< Field2, Type2 > &f2)
static MinMax< T > le(const T &maxVal)
A semi-infinite range from type min to maxVal.
MinMax()
Construct inverted range.
bool intersect(const MinMax< T > &b)
Intersect (union) with the second range.
void clear()
Reset to an invalid, inverted range.
An ordered pair of two objects of type <T> with first() and second() elements.
static MinMax< T > ge(const T &minVal)
A semi-infinite range from minVal to the type max.
A traits class, which is primarily used for primitives.
MinMax< T > & add(const MinMax &other)
Extend the range to include the other min/max range.
MinMax< T > & operator*=(const scalar &s)
Multiply range by scalar factor.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
bool valid() const
Range is valid if it is not inverted.
bool empty() const
Range is empty if it is inverted.
A 2-tuple for storing two objects of dissimilar types. The container is similar in purpose to std::pa...
A min/max value pair with additional methods. In addition to conveniently storing values,...
int compare(const T &val) const
Compares the min/max range with the specified value.
A class representing the concept of 0 (zero) that can be used to avoid manipulating objects known to ...