From acc66c217bf78c8f995bcd9c2ae77649a4b4930c Mon Sep 17 00:00:00 2001 From: Mark Olesen <Mark.Olesen@esi-group.com> Date: Thu, 31 Jan 2019 12:35:34 +0100 Subject: [PATCH] ENH: add bitwise and/or ops --- src/OpenFOAM/primitives/ops/ops.H | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/OpenFOAM/primitives/ops/ops.H b/src/OpenFOAM/primitives/ops/ops.H index fd069ad4b06..07037a0226a 100644 --- a/src/OpenFOAM/primitives/ops/ops.H +++ b/src/OpenFOAM/primitives/ops/ops.H @@ -3,7 +3,7 @@ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation - \\/ M anipulation | Copyright (C) 2018 OpenCFD Ltd. + \\/ M anipulation | Copyright (C) 2018-2019 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -78,8 +78,11 @@ EqOp(maxEq, x = max(x, y)) EqOp(minEq, x = min(x, y)) EqOp(minMagSqrEq, x = (magSqr(x) <= magSqr(y) ? x : y)) EqOp(maxMagSqrEq, x = (magSqr(x) >= magSqr(y) ? x : y)) + EqOp(andEq, x = (x && y)) EqOp(orEq, x = (x || y)) +EqOp(bitAndEq, x = (x & y)) +EqOp(bitOrEq, x = (x | y)) EqOp(eqMinus, x = -y) @@ -199,6 +202,9 @@ Op(minMagSqr, (magSqr(x)<=magSqr(y) ? x : y)) Op(maxMagSqr, (magSqr(x)>=magSqr(y) ? x : y)) Op(minMod, minMod(x, y)) +Op(bitOr, (x | y)) +Op(bitAnd, (x & y)) + BoolOp(and, x && y) BoolOp(or, x || y) BoolOp(equal, x == y) -- GitLab