mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
STYLE: narrow represention for boundBox bits enums
- add boundBox::directionBit enum which contains the same values as the treeBoundBox::octantBit enum, but without the attached meaning
This commit is contained in:
committed by
Andrew Heather
parent
cdb36e08e9
commit
ace1491df3
@ -47,7 +47,7 @@ Note
|
|||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
|
|
||||||
// Forward declarations
|
// Forward Declarations
|
||||||
class boundBox;
|
class boundBox;
|
||||||
class plane;
|
class plane;
|
||||||
template<class T> class tmp;
|
template<class T> class tmp;
|
||||||
@ -69,7 +69,15 @@ class boundBox
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
// Static data members
|
// Static Data Members
|
||||||
|
|
||||||
|
//- Bits used for (x/y/z) direction encoding.
|
||||||
|
enum directionBit : direction
|
||||||
|
{
|
||||||
|
XDIR = 0x1, //!< 0: x-direction (vector component 0)
|
||||||
|
YDIR = 0x2, //!< 2: y-direction (vector component 1)
|
||||||
|
ZDIR = 0x4 //!< 4: z-direction (vector component 2)
|
||||||
|
};
|
||||||
|
|
||||||
//- A large boundBox: min/max == -/+ ROOTVGREAT
|
//- A large boundBox: min/max == -/+ ROOTVGREAT
|
||||||
static const boundBox greatBox;
|
static const boundBox greatBox;
|
||||||
|
|||||||
@ -2,7 +2,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) 2017 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2017-2019 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
| Copyright (C) 2011-2016 OpenFOAM Foundation
|
| Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
@ -73,7 +73,7 @@ SourceFiles
|
|||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
|
|
||||||
// Forward declarations
|
// Forward Declarations
|
||||||
class Random;
|
class Random;
|
||||||
class treeBoundBox;
|
class treeBoundBox;
|
||||||
Istream& operator>>(Istream& is, treeBoundBox& bb);
|
Istream& operator>>(Istream& is, treeBoundBox& bb);
|
||||||
@ -91,11 +91,11 @@ class treeBoundBox
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
// Static data members
|
// Static Data Members
|
||||||
|
|
||||||
//- Bits used for octant/point coding.
|
//- Bits used for octant/point encoding.
|
||||||
// Every octant/corner point is the combination of three faces.
|
// Every octant/corner point is the combination of three faces.
|
||||||
enum octantBit
|
enum octantBit : direction
|
||||||
{
|
{
|
||||||
RIGHTHALF = 0x1,
|
RIGHTHALF = 0x1,
|
||||||
TOPHALF = 0x2,
|
TOPHALF = 0x2,
|
||||||
@ -114,16 +114,16 @@ public:
|
|||||||
FRONT = 5 //!< 5: z-max, front
|
FRONT = 5 //!< 5: z-max, front
|
||||||
};
|
};
|
||||||
|
|
||||||
//- Bits used for face coding
|
//- Bits used for face encoding
|
||||||
enum faceBit
|
enum faceBit : direction
|
||||||
{
|
{
|
||||||
NOFACE = 0,
|
NOFACE = 0,
|
||||||
LEFTBIT = 0x1 << LEFT, //1
|
LEFTBIT = 0x1 << LEFT, //!< 1: x-min, left
|
||||||
RIGHTBIT = 0x1 << RIGHT, //2
|
RIGHTBIT = 0x1 << RIGHT, //!< 2: x-max, right
|
||||||
BOTTOMBIT = 0x1 << BOTTOM, //4
|
BOTTOMBIT = 0x1 << BOTTOM, //!< 4: y-min, bottom
|
||||||
TOPBIT = 0x1 << TOP, //8
|
TOPBIT = 0x1 << TOP, //!< 8: y-max, top
|
||||||
BACKBIT = 0x1 << BACK, //16
|
BACKBIT = 0x1 << BACK, //!< 16: z-min, back
|
||||||
FRONTBIT = 0x1 << FRONT, //32
|
FRONTBIT = 0x1 << FRONT //!< 32: z-max, front
|
||||||
};
|
};
|
||||||
|
|
||||||
//- Edges codes.
|
//- Edges codes.
|
||||||
|
|||||||
Reference in New Issue
Block a user