35 #ifndef Foam_MinMaxOps_H 36 #define Foam_MinMaxOps_H 40 #include <type_traits> 61 return range.clip(val);
72 return range.clip(val);
90 inline MinMax<T>
minMax(
const UList<T>& vals)
92 return MinMax<T>(vals);
167 template<
class Form,
class Cmpt, direction nCmpt>
179 for (
const T& val : vals)
222 template<
class T1,
class T2>
243 template<
class T1,
class T2>
277 for (
const T& val :
y)
315 template<
class T,
class U>
316 inline typename std::enable_if<std::is_convertible<U, T>::value,
bool>
::type 317 operator<(const MinMax<T>&
range,
const U& val)
319 return (
range.compare(val) < 0);
322 template<
class T,
class U>
323 inline typename std::enable_if<std::is_convertible<U, T>::value,
bool>
::type 324 operator<=(const MinMax<T>&
range,
const U& val)
326 return (
range.compare(val) <= 0);
329 template<
class T,
class U>
330 inline typename std::enable_if<std::is_convertible<U, T>::value,
bool>
::type 336 template<
class T,
class U>
337 inline typename std::enable_if<std::is_convertible<U, T>::value,
bool>
::type 340 return (
range.compare(val) >= 0);
344 template<
class T,
class U>
345 inline typename std::enable_if<std::is_convertible<U, T>::value,
bool>
::type 346 operator<(const U& val, const MinMax<T>&
range)
348 return (
range.compare(val) > 0);
351 template<
class T,
class U>
352 inline typename std::enable_if<std::is_convertible<U, T>::value,
bool>
::type 353 operator<=(const U& val, const MinMax<T>&
range)
355 return (
range.compare(val) >= 0);
358 template<
class T,
class U>
359 inline typename std::enable_if<std::is_convertible<U, T>::value,
bool>
::type 362 return (
range.compare(val) < 0);
365 template<
class T,
class U>
366 inline typename std::enable_if<std::is_convertible<U, T>::value,
bool>
::type 369 return (
range.compare(val) <= 0);
MinMax< scalar > scalarMinMax
A scalar min/max range.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
A min/max value pair with additional methods. In addition to conveniently storing values...
bool operator>(const IOstreamOption::versionNumber &a, const IOstreamOption::versionNumber &b) noexcept
Version A newer than B.
dimensionedScalar operator/(const scalar s1, const dimensionedScalar &ds2)
tmp< faMatrix< Type > > operator+(const faMatrix< Type > &, const faMatrix< Type > &)
bool operator>=(const IOstreamOption::versionNumber &a, const IOstreamOption::versionNumber &b) noexcept
Version A same or newer than B.
T operator()(T &val, const MinMax< T > &range) const
MinMax< label > minMax(const labelHashSet &set)
Find the min/max values of labelHashSet.
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
tmp< faMatrix< Type > > operator*(const areaScalarField::Internal &, const faMatrix< Type > &)
dimensionSet clip(const dimensionSet &ds1, const dimensionSet &ds2)
Return the value after clipping by the min/max limiter.
scalarMinMax operator()(const scalarMinMax &x, const T &y) const
MinMax< T > & operator()(MinMax< T > &x, const T &y) const
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
void add(FieldField< Field1, typename typeOfSum< Type1, Type2 >::type > &f, const FieldField< Field1, Type1 > &f1, const FieldField< Field2, Type2 > &f2)
MinMax< T > & add(const MinMax &other)
Extend the range to include the other min/max range.
MinMax< T > operator()(const T &x, const T &y) const
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
Scalar combine the magitude of a value.
Combine assignment for MinMax range.
scalarMinMax & operator()(scalarMinMax &x, const T &y) const
bool operator()(T &val, const MinMax< T > &range) const
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))
Combine assignment for MinMax range.
Combine values and/or MinMax ranges.
dimensioned< scalarMinMax > minMaxMag(const DimensionedField< Type, GeoMesh > &df)
MinMax< T > operator()(const MinMax< T > &x, const T &y) const