Commit 4eef0795 authored by Mark Olesen's avatar Mark Olesen

ENH: add bitwise and/or ops

parent 36492f48
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2018 OpenCFD Ltd. \\/ M anipulation | Copyright (C) 2018-2019 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
...@@ -78,8 +78,11 @@ EqOp(maxEq, x = max(x, y)) ...@@ -78,8 +78,11 @@ EqOp(maxEq, x = max(x, y))
EqOp(minEq, x = min(x, y)) EqOp(minEq, x = min(x, y))
EqOp(minMagSqrEq, x = (magSqr(x) <= magSqr(y) ? x : y)) EqOp(minMagSqrEq, x = (magSqr(x) <= magSqr(y) ? x : y))
EqOp(maxMagSqrEq, x = (magSqr(x) >= magSqr(y) ? x : y)) EqOp(maxMagSqrEq, x = (magSqr(x) >= magSqr(y) ? x : y))
EqOp(andEq, x = (x && y)) EqOp(andEq, x = (x && y))
EqOp(orEq, x = (x || y)) EqOp(orEq, x = (x || y))
EqOp(bitAndEq, x = (x & y))
EqOp(bitOrEq, x = (x | y))
EqOp(eqMinus, x = -y) EqOp(eqMinus, x = -y)
...@@ -199,6 +202,9 @@ Op(minMagSqr, (magSqr(x)<=magSqr(y) ? x : y)) ...@@ -199,6 +202,9 @@ Op(minMagSqr, (magSqr(x)<=magSqr(y) ? x : y))
Op(maxMagSqr, (magSqr(x)>=magSqr(y) ? x : y)) Op(maxMagSqr, (magSqr(x)>=magSqr(y) ? x : y))
Op(minMod, minMod(x, y)) Op(minMod, minMod(x, y))
Op(bitOr, (x | y))
Op(bitAnd, (x & y))
BoolOp(and, x && y) BoolOp(and, x && y)
BoolOp(or, x || y) BoolOp(or, x || y)
BoolOp(equal, x == y) BoolOp(equal, x == y)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment