ENH: add pTraits and IO for std::int8_t
STYLE: cull some implicitly available includes
- pTraits.H is included by label/scalar etc
- zero.H is included by UList
STYLE: cull redundant forward declarations for Istream/Ostream
- this is slightly longer to write (but consistent with clamp_min
etc). The main reason is that this allows easier use of the clamp()
free function.
STYLE: skip checks for bad/invalid clamping ranges
- ranges are either already validated before calling, the caller logic
has already made the branching decision.
- proper component-wise clamping for MinMax clamp().
- construct clampOp from components
- propagate clamp() method from GeometricField to FieldField and Field
- clamp_min() and clamp_max() for one-sided clamping,
as explicit alternative to min/max free functions which can
be less intuitive and often involve additional field copies.
- top-level checks to skip applying invalid min/max ranges
and bypass the internal checks of MinMax::clamp() etc.
- resets min/max to be identical to the specified value,
which can be more convenient (and slightly more efficient) than doing
a full reset followed by add()
- additional MinMax intersects() query, which works like overlaps()
but with exclusive checks at the ends
- provide MinMax::operator&=() to replace (unused) intersect() method
ENH: single/double value reset method for boundBox
- boundBox::operator&=() to replace (rarely used) intersect() method.
Deprecate boundBox::intersect() to avoid confusion with various
intersects() method
COMP: provide triangleFwd.H
- Global functions are unary or combining binary functions, which are
defined in MinMax.H (MinMaxOps.H).
There are also global reduction functions (gMinMax, gMinMaxMag)
as well as supporting 'Op' classes:
- minMaxOp, minMaxEqOp, minMaxMagOp, minMaxMagEqOp
Since the result of the functions represents a content reduction
into a single MinMax<T> value (a min/max pair), field operations
returning a field simply do not make sense.
- Implemented for lists, fields, field-fields, DimensionedField,
GeometricField (parallel reducing, with boundaries).
- Since the minMax evaluates during its operation, this makes it more
efficient for cases where both min/max values are required since it
avoids looping twice through the data.
* Changed GeometricField writeMinMax accordingly.
ENH: clip as field function
- clipping provides a more efficient, single-pass operation to apply
lower/upper limits on single or multiple values.
Examples,
scalarMinMax limiter(0, 1);
limiter.clip(value)
-> returns a const-ref to the value if within the range, or else
returns the appropriate lower/upper limit
limiter.inplaceClip(value)
-> Modifies the value if necessary to be within lower/upper limit
Function calls
clip(value, limiter)
-> returns a copy after applying lower/upper limit
clip(values, limiter)
-> returns a tmp<Field> of clipped values