diff --git a/src/foam/primitives/ops/ops.H b/src/foam/primitives/ops/ops.H index 1a72b73d0..0bb6f6cff 100644 --- a/src/foam/primitives/ops/ops.H +++ b/src/foam/primitives/ops/ops.H @@ -377,6 +377,20 @@ template class greaterEqOp { public: T operator()(const T& x, const T& y) const { return x >= y; } }; +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +template +class ifEqEqAssignFirstOp +{ +public: + + void operator()(T& x, const T& y) const + { + x = (x == y) ? x : defaultValue; + } +}; + + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // } // End namespace Foam