57 T _globPosX, _globPosY;
70 Cuboid2D(T globPosX, T globPosY, T delta,
int nX,
int nY);
78 void init(T globPosX, T globPosY, T delta,
int nX,
int nY);
104 void getPhysR(T physR[2],
const int latticeR[2])
const;
105 void getPhysR(T physR[2],
const int& iX,
const int& iY)
const;
108 void getLatticeR(
int latticeR[2],
const T physR[2])
const;
118 latticeR[0] = (int)
util::floor( (physR[0] - _globPosX)/_delta);
119 latticeR[1] = (int)
util::floor( (physR[1] - _globPosY)/_delta);
129 bool checkPoint(T globX, T globY,
int overlap = 0)
const;
135 [[deprecated]]
bool checkPoint(T globX, T globY,
int &locX,
int &locY,
int overlap = 0)
const;
138 bool checkInters(T globX0, T globX1, T globY0, T globY1,
int overlap = 0)
const;
141 bool checkInters(T globX, T globY,
int overlap = 0)
const;
146 bool checkInters(T globX0, T globX1, T globY0, T globY1,
147 int &locX0,
int &locX1,
int &locY0,
int &locY1,
148 int overlap = 0)
const;
155 void resize(
int X,
int Y,
int nX,
int nY);
A regular single 2D cuboid is the basic component of a 2D cuboid structure which defines the grid.
size_t getLatticeVolume() const
Returns the number of Nodes in the volume.
void print() const
Prints cuboid details.
T getPhysVolume() const
Returns the volume of the cuboid.
int getLatticePerimeter() const
Returns the number of Nodes at the perimeter.
void getFloorLatticeR(const std::vector< T > &physR, std::vector< int > &latticeR) const
Cuboid2D(T globPosX, T globPosY, T delta, int nX, int nY)
Construction of a cuboid.
void setWeight(size_t fullCells)
Sets the number of full cells.
void getLatticeR(int latticeR[2], const T physR[2]) const
bool checkInters(T globX0, T globX1, T globY0, T globY1, int overlap=0) const
Checks whether there is an intersection with the cuboid extended with an layer of size overlap*delta.
size_t getWeight() const
Returns the number of full cells.
void divide(int p, int q, std::vector< Cuboid2D< T > > &childrenC) const
Divides the cuboid in p*q cuboids and adds them to the given vector.
Vector< int, 2 > const getExtent() const
Read only access to the number of voxels in every dimension.
T getDeltaR() const
Read access to the distance of cuboid nodes.
bool checkPoint(T globX, T globY, int overlap=0) const
Checks whether a point (globX/globY) is contained in the cuboid extended with an layer of size overla...
void getPhysR(T physR[3], LatticeR< 2 > latticeR) const
void resize(int X, int Y, int nX, int nY)
resize the cuboid to the passed size
void getFloorLatticeR(int latticeR[2], const T physR[2]) const
void getPhysR(T physR[2], const int latticeR[2]) const
Vector< T, 2 > const getOrigin() const
Read only access to left lower corner coordinates.
int getNx() const
Read access to cuboid width.
int getNy() const
Read access to cuboid height.
T get_globPosX() const
Read access to left lower corner coordinates.
T getPhysPerimeter() const
Returns the perimeter of the cuboid.
Cuboid2D & operator=(Cuboid2D const &rhs)
Copy assignment.
void init(T globPosX, T globPosY, T delta, int nX, int nY)
Initializes the cuboid.
class for marking output with some text
ADf< T, DIM > floor(const ADf< T, DIM > &a)
Top level namespace for all of OpenLB.
efficient implementation of a vector class