ENH: make op names unambiguous

* lessEqOp    -> lessEqualOp
  * greaterEqOp -> greaterEqualOp

  to avoid ambiguitity with other forms such as 'plusEqOp' where the
  'Eq' implies an assigment. The name change also aligns better with
  C++ <functional> names such as std::less_equal, std::greater_equal

ENH: simple labelRange predicates gt0/ge0/lt0/le0

- mirrors scalarRange tests.
  Lower overhead than using labelMinMax::ge(0) etc since it does not
  create an intermediate (is stateless) and can be used as a constexpr
This commit is contained in:
Mark Olesen
2022-04-21 16:17:54 +02:00
parent 4cbe0a81ac
commit 90ba706b06
21 changed files with 103 additions and 60 deletions

View File

@ -116,7 +116,7 @@ bool Foam::functionObjects::blendingFactor::read(const dictionary& dict)
(
"tolerance",
0.001,
[&](const scalar tol){ return (tol > 0) && (tol < 1); }
[](scalar tol){ return (tol > 0 && tol < 1); }
);
return true;

View File

@ -98,9 +98,9 @@ Description
The expressions are a (op scalar) pair that form a unary scalar
predicate. The \a op is one of the following:
- lt, less
- le, lessEq
- le, lessEqual, lessEq
- gt, greater
- ge, greaterEq
- ge, greaterEqual, greaterEq
- eq, equal
- neq, notEqual