OpenLB 1.7
Loading...
Searching...
No Matches
Public Member Functions | List of all members
olb::Cuboid2D< T > Class Template Reference

A regular single 2D cuboid is the basic component of a 2D cuboid structure which defines the grid. More...

#include <cuboid2D.h>

+ Collaboration diagram for olb::Cuboid2D< T >:

Public Member Functions

 Cuboid2D (T globPosX, T globPosY, T delta, int nX, int nY)
 Construction of a cuboid.
 
 Cuboid2D (Vector< T, 2 > origin, T delta, Vector< int, 2 > extend)
 Construction of a cuboid vector version.
 
 Cuboid2D (Cuboid2D< T > const &rhs, int overlap=0)
 Copy constructor.
 
Cuboid2Doperator= (Cuboid2D const &rhs)
 Copy assignment.
 
void init (T globPosX, T globPosY, T delta, int nX, int nY)
 Initializes the cuboid.
 
get_globPosX () const
 Read access to left lower corner coordinates.
 
get_globPosY () const
 
Vector< T, 2 > const getOrigin () const
 Read only access to left lower corner coordinates.
 
getDeltaR () const
 Read access to the distance of cuboid nodes.
 
int getNx () const
 Read access to cuboid width.
 
int getNy () const
 Read access to cuboid height.
 
Vector< int, 2 > const getExtent () const
 Read only access to the number of voxels in every dimension.
 
getPhysVolume () const
 Returns the volume of the cuboid.
 
size_t getLatticeVolume () const
 Returns the number of Nodes in the volume.
 
getPhysPerimeter () const
 Returns the perimeter of the cuboid.
 
int getLatticePerimeter () const
 Returns the number of Nodes at the perimeter.
 
void print () const
 Prints cuboid details.
 
void getPhysR (T physR[2], const int latticeR[2]) const
 
void getPhysR (T physR[2], const int &iX, const int &iY) const
 
void getPhysR (T physR[3], LatticeR< 2 > latticeR) const
 
void getLatticeR (int latticeR[2], const T physR[2]) const
 
void getLatticeR (int latticeR[2], const Vector< T, 2 > &physR) const
 
void getFloorLatticeR (const std::vector< T > &physR, std::vector< int > &latticeR) const
 
void getFloorLatticeR (int latticeR[2], const T physR[2]) const
 
size_t getWeight () const
 Returns the number of full cells.
 
void setWeight (size_t fullCells)
 Sets the number of full cells.
 
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 overlap*delta.
 
bool checkPoint (Vector< T, 2 > &globXY, int overlap=0) const
 
bool checkPoint (T globX, T globY, int &locX, int &locY, int overlap=0) const
 Checks whether a point (globX/gloxY) is contained and is a node in the cuboid extended with an layer of size overlap*delta and returns the local active node.
 
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.
 
bool checkInters (T globX, T globY, int overlap=0) const
 Checks whether a given point intersects the cuboid extended by a layer of size overlap*delta.
 
bool checkInters (T globX0, T globX1, T globY0, T globY1, int &locX0, int &locX1, int &locY0, int &locY1, int overlap=0) const
 Checks whether there is an intersection and returns the local active node range which can be empty by means of locX0=1, locX1=0, locY0=1, locY1=0 of the cuboid extended with an layer of size overlap*delta.
 
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.
 
void divide (int p, std::vector< Cuboid2D< T > > &childrenC) const
 Divides the cuboid in p cuboids and add them to the given vector.
 
void resize (int X, int Y, int nX, int nY)
 resize the cuboid to the passed size
 

Detailed Description

template<typename T>
class olb::Cuboid2D< T >

A regular single 2D cuboid is the basic component of a 2D cuboid structure which defines the grid.

A cuboid is given with its left lower corner, the number of nodes in the direction x and y and the distance between two nodes. Among other useful methods, a cuboid can divide itself in a given number of disjoint subcuboids. The number of nodes at the boundary is minimized.

This class is not intended to be derived from.

Definition at line 54 of file cuboid2D.h.

Constructor & Destructor Documentation

◆ Cuboid2D() [1/3]

template<typename T >
olb::Cuboid2D< T >::Cuboid2D ( T globPosX,
T globPosY,
T delta,
int nX,
int nY )

Construction of a cuboid.

Definition at line 45 of file cuboid2D.hh.

46 : _weight(std::numeric_limits<size_t>::max()), clout(std::cout,"Cuboid2D")
47{
48 init(globPosX, globPosY, delta, nX, nY);
49}
void init(T globPosX, T globPosY, T delta, int nX, int nY)
Initializes the cuboid.
Definition cuboid2D.hh:77

References olb::Cuboid2D< T >::init().

+ Here is the call graph for this function:

◆ Cuboid2D() [2/3]

template<typename T >
olb::Cuboid2D< T >::Cuboid2D ( Vector< T, 2 > origin,
T delta,
Vector< int, 2 > extend )

Construction of a cuboid vector version.

Definition at line 52 of file cuboid2D.hh.

53 : _weight(std::numeric_limits<size_t>::max()), clout(std::cout,"Cuboid2D")
54{
55 this->init(origin[0], origin[1], delta, extend[0], extend[1]);
56}

References olb::Cuboid2D< T >::init().

+ Here is the call graph for this function:

◆ Cuboid2D() [3/3]

template<typename T >
olb::Cuboid2D< T >::Cuboid2D ( Cuboid2D< T > const & rhs,
int overlap = 0 )

Copy constructor.

Definition at line 60 of file cuboid2D.hh.

60 : clout(std::cout,"Cuboid2D")
61{
62 this->init(rhs._globPosX - rhs._delta*overlap, rhs._globPosY - rhs._delta*overlap,
63 rhs._delta, rhs._nX + 2*overlap, rhs._nY + 2*overlap);
64 _weight = rhs._weight;
65}

References olb::Cuboid2D< T >::init().

+ Here is the call graph for this function:

Member Function Documentation

◆ checkInters() [1/3]

template<typename T >
bool olb::Cuboid2D< T >::checkInters ( T globX,
T globY,
int overlap = 0 ) const

Checks whether a given point intersects the cuboid extended by a layer of size overlap*delta.

Definition at line 256 of file cuboid2D.hh.

257{
258 return checkInters(globX, globX, globY, globY, overlap);
259}
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.
Definition cuboid2D.hh:241

◆ checkInters() [2/3]

template<typename T >
bool olb::Cuboid2D< T >::checkInters ( T globX0,
T globX1,
T globY0,
T globY1,
int & locX0,
int & locX1,
int & locY0,
int & locY1,
int overlap = 0 ) const

Checks whether there is an intersection and returns the local active node range which can be empty by means of locX0=1, locX1=0, locY0=1, locY1=0 of the cuboid extended with an layer of size overlap*delta.

Definition at line 262 of file cuboid2D.hh.

264{
265 if (overlap!=0) {
266 Cuboid2D tmp(_globPosX - overlap*_delta, _globPosY - overlap*_delta, _delta, _nX + overlap*2, _nY + overlap*2);
267 return tmp.checkInters(globX0, globX1, globY0, globY1, locX0, locX1, locY0, locY1);
268 }
269 else if (!checkInters(globX0, globX1, globY0, globY1)) {
270 locX0 = 1;
271 locX1 = 0;
272 locY0 = 1;
273 locY1 = 0;
274 return false;
275 }
276 else {
277 locX0 = 0;
278 for (int i=0; _globPosX + i*_delta < globX0; i++) {
279 locX0 = i+1;
280 }
281 locX1 = _nX-1;
282 for (int i=_nX-1; _globPosX + i*_delta > globX1; i--) {
283 locX1 = i-1;
284 }
285 locY0 = 0;
286 for (int i=0; _globPosY + i*_delta < globY0; i++) {
287 locY0 = i+1;
288 }
289 locY1 = _nY-1;
290 for (int i=_nY-1; _globPosY + i*_delta > globY1; i--) {
291 locY1 = i-1;
292 }
293 return true;
294 }
295}
Cuboid2D(T globPosX, T globPosY, T delta, int nX, int nY)
Construction of a cuboid.
Definition cuboid2D.hh:45

References olb::Cuboid2D< T >::checkInters().

+ Here is the call graph for this function:

◆ checkInters() [3/3]

template<typename T >
bool olb::Cuboid2D< T >::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.

Definition at line 241 of file cuboid2D.hh.

242{
243
244 T locX0d = util::max(_globPosX-overlap*_delta,globX0);
245 T locY0d = util::max(_globPosY-overlap*_delta,globY0);
246 T locX1d = util::min(_globPosX+(_nX+overlap-1)*_delta,globX1);
247 T locY1d = util::min(_globPosY+(_nY+overlap-1)*_delta,globY1);
248
249 if (!(locX1d>=locX0d && locY1d>=locY0d)) {
250 return false;
251 }
252 return true;
253}
cpu::simd::Pack< T > min(cpu::simd::Pack< T > rhs, cpu::simd::Pack< T > lhs)
Definition pack.h:124
cpu::simd::Pack< T > max(cpu::simd::Pack< T > rhs, cpu::simd::Pack< T > lhs)
Definition pack.h:130

References olb::util::max(), and olb::util::min().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ checkPoint() [1/3]

template<typename T >
bool olb::Cuboid2D< T >::checkPoint ( T globX,
T globY,
int & locX,
int & locY,
int overlap = 0 ) const

Checks whether a point (globX/gloxY) is contained and is a node in the cuboid extended with an layer of size overlap*delta and returns the local active node.

Definition at line 224 of file cuboid2D.hh.

225{
226 if (overlap!=0) {
227 Cuboid2D tmp(_globPosX - overlap*_delta, _globPosY - overlap*_delta, _delta, _nX + overlap*2, _nY + overlap*2);
228 return tmp.checkPoint(globX, globY, locX, locY);
229 }
230 else if (!checkPoint(globX, globY)) {
231 return false;
232 }
233 else {
234 locX = (int)util::floor((globX - (T)_globPosX)/_delta + .5);
235 locY = (int)util::floor((globY - (T)_globPosY)/_delta + .5);
236 return true;
237 }
238}
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...
Definition cuboid2D.hh:203
ADf< T, DIM > floor(const ADf< T, DIM > &a)
Definition aDiff.h:869

References olb::Cuboid2D< T >::checkPoint(), and olb::util::floor().

+ Here is the call graph for this function:

◆ checkPoint() [2/3]

template<typename T >
bool olb::Cuboid2D< T >::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 overlap*delta.

Definition at line 203 of file cuboid2D.hh.

204{
205
206 if (_globPosX <= globX + T(0.5 + overlap)*_delta &&
207 _globPosX + T(_nX+overlap)*_delta > globX + 0.5*_delta &&
208 _globPosY <= globY + T(0.5 + overlap)*_delta &&
209 _globPosY + T(_nY+overlap)*_delta > globY + 0.5*_delta ) {
210 return true;
211 }
212 else {
213 return false;
214 }
215}
+ Here is the caller graph for this function:

◆ checkPoint() [3/3]

template<typename T >
bool olb::Cuboid2D< T >::checkPoint ( Vector< T, 2 > & globXY,
int overlap = 0 ) const

Definition at line 218 of file cuboid2D.hh.

219{
220 return checkPoint(globXY[0], globXY[1], overlap);
221}

◆ divide() [1/2]

template<typename T >
void olb::Cuboid2D< T >::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.

Definition at line 298 of file cuboid2D.hh.

299{
300 T globPosX_child, globPosY_child;
301 int xN_child = 0;
302 int yN_child = 0;
303
304 globPosX_child = _globPosX;
305 globPosY_child = _globPosY;
306
307 for (int iX=0; iX<nX; iX++) {
308 for (int iY=0; iY<nY; iY++) {
309 xN_child = (_nX+nX-iX-1)/nX;
310 yN_child = (_nY+nY-iY-1)/nY;
311 Cuboid2D<T> child(globPosX_child, globPosY_child, _delta, xN_child, yN_child);
312 childrenC.push_back(child);
313 globPosY_child += yN_child*_delta;
314 }
315 globPosY_child = _globPosY;
316 globPosX_child += xN_child*_delta;
317 }
318}
+ Here is the caller graph for this function:

◆ divide() [2/2]

template<typename T >
void olb::Cuboid2D< T >::divide ( int p,
std::vector< Cuboid2D< T > > & childrenC ) const

Divides the cuboid in p cuboids and add them to the given vector.

Definition at line 321 of file cuboid2D.hh.

322{
323
324 OLB_PRECONDITION(p>0);
325 int nX = 0;
326 int nY = 0;
327 T ratio;
328 T bestRatio = (T)_nX/(T)_nY;
329 T difRatio = util::fabs(bestRatio - 1) + 1;
330 for (int i=1; i<= p; i++) {
331 int j = p / i;
332 if (i*j<=p) {
333 if ( util::fabs(bestRatio - (T)i/(T)j) <= difRatio) {
334 difRatio = util::fabs(bestRatio - (T)i/(T)j);
335 nX = i;
336 nY = j;
337 }
338 }
339 }
340
341 ratio = T(nX)/(T)nY;
342 int rest = p - nX*nY;
343
344 if (rest==0) {
345 divide(nX,nY,childrenC);
346 return;
347 }
348
349 if (ratio < bestRatio && (nY-rest) >= 0) {
350 int n_QNoInsertions = nX*(nY-rest);
351 T bestVolume_QNoInsertions = (T)_nX*_nY * n_QNoInsertions/(T)p;
352 int yN_QNoInsertions = (int)(bestVolume_QNoInsertions / (T)_nX);
353 int xN_QNoInsertions = _nX;
354 int yN_QInsertions = _nY-yN_QNoInsertions;
355 int xN_QInsertions = _nX;
356 Cuboid2D<T> firstChildQ(_globPosX, _globPosY, _delta, xN_QNoInsertions, yN_QNoInsertions);
357 Cuboid2D<T> secondChildQ(_globPosX, _globPosY+yN_QNoInsertions*_delta, _delta, xN_QInsertions, yN_QInsertions);
358 firstChildQ.divide(nX, nY-rest, childrenC);
359 secondChildQ.divide(nX+1,rest, childrenC);
360 }
361 else {
362 int n_QNoInsertions = nY*(nX-rest);
363 T bestVolume_QNoInsertions = (T)_nX*_nY * n_QNoInsertions/(T)p;
364 int xN_QNoInsertions = (int)(bestVolume_QNoInsertions / (T)_nY + 0.9999);
365 int yN_QNoInsertions = _nY;
366 int xN_QInsertions = _nX-xN_QNoInsertions;
367 int yN_QInsertions = _nY;
368 Cuboid2D<T> firstChildQ(_globPosX, _globPosY, _delta, xN_QNoInsertions, yN_QNoInsertions);
369 Cuboid2D<T> secondChildQ(_globPosX+xN_QNoInsertions*_delta, _globPosY, _delta, xN_QInsertions, yN_QInsertions);
370 firstChildQ.divide(nX-rest, nY, childrenC);
371 secondChildQ.divide(rest,nY+1, childrenC);
372 }
373}
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.
Definition cuboid2D.hh:298
cpu::simd::Pack< T > fabs(cpu::simd::Pack< T > value)
Definition pack.h:106
#define OLB_PRECONDITION(COND)
Definition olbDebug.h:46

References olb::Cuboid2D< T >::divide(), olb::util::fabs(), and OLB_PRECONDITION.

+ Here is the call graph for this function:

◆ get_globPosX()

template<typename T >
T olb::Cuboid2D< T >::get_globPosX ( ) const

Read access to left lower corner coordinates.

Definition at line 88 of file cuboid2D.hh.

89{
90 return _globPosX;
91}

◆ get_globPosY()

template<typename T >
T olb::Cuboid2D< T >::get_globPosY ( ) const

Definition at line 94 of file cuboid2D.hh.

95{
96 return _globPosY;
97}

◆ getDeltaR()

template<typename T >
T olb::Cuboid2D< T >::getDeltaR ( ) const

Read access to the distance of cuboid nodes.

Definition at line 106 of file cuboid2D.hh.

107{
108 return _delta;
109}
+ Here is the caller graph for this function:

◆ getExtent()

template<typename T >
Vector< int, 2 > const olb::Cuboid2D< T >::getExtent ( ) const

Read only access to the number of voxels in every dimension.

Definition at line 124 of file cuboid2D.hh.

125{
126 return Vector<int,2> (_nX, _nY);
127}
+ Here is the caller graph for this function:

◆ getFloorLatticeR() [1/2]

template<typename T >
void olb::Cuboid2D< T >::getFloorLatticeR ( const std::vector< T > & physR,
std::vector< int > & latticeR ) const
inline

Definition at line 111 of file cuboid2D.h.

112 {
113 getFloorLatticeR(&latticeR[0], &physR[0]);
114 }
void getFloorLatticeR(const std::vector< T > &physR, std::vector< int > &latticeR) const
Definition cuboid2D.h:111

References olb::Cuboid2D< T >::getFloorLatticeR().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getFloorLatticeR() [2/2]

template<typename T >
void olb::Cuboid2D< T >::getFloorLatticeR ( int latticeR[2],
const T physR[2] ) const
inline

Definition at line 116 of file cuboid2D.h.

117 {
118 latticeR[0] = (int)util::floor( (physR[0] - _globPosX)/_delta);
119 latticeR[1] = (int)util::floor( (physR[1] - _globPosY)/_delta);
120 }

References olb::util::floor().

+ Here is the call graph for this function:

◆ getLatticePerimeter()

template<typename T >
int olb::Cuboid2D< T >::getLatticePerimeter ( ) const

Returns the number of Nodes at the perimeter.

Definition at line 148 of file cuboid2D.hh.

149{
150 return 2*_nY + 2*_nX -4;
151}

◆ getLatticeR() [1/2]

template<typename T >
void olb::Cuboid2D< T >::getLatticeR ( int latticeR[2],
const T physR[2] ) const

Definition at line 189 of file cuboid2D.hh.

190{
191 latticeR[0] = (int)util::floor( (physR[0] - _globPosX )/_delta +.5);
192 latticeR[1] = (int)util::floor( (physR[1] - _globPosY )/_delta +.5);
193}

References olb::util::floor().

+ Here is the call graph for this function:

◆ getLatticeR() [2/2]

template<typename T >
void olb::Cuboid2D< T >::getLatticeR ( int latticeR[2],
const Vector< T, 2 > & physR ) const

Definition at line 196 of file cuboid2D.hh.

197{
198 latticeR[0] = (int)util::floor( (physR[0] - _globPosX )/_delta +.5);
199 latticeR[1] = (int)util::floor( (physR[1] - _globPosY )/_delta +.5);
200}

References olb::util::floor().

+ Here is the call graph for this function:

◆ getLatticeVolume()

template<typename T >
size_t olb::Cuboid2D< T >::getLatticeVolume ( ) const

Returns the number of Nodes in the volume.

Definition at line 136 of file cuboid2D.hh.

137{
138 return static_cast<size_t>(_nY)*static_cast<size_t>(_nX);
139}

◆ getNx()

template<typename T >
int olb::Cuboid2D< T >::getNx ( ) const

Read access to cuboid width.

Definition at line 112 of file cuboid2D.hh.

113{
114 return _nX;
115}
+ Here is the caller graph for this function:

◆ getNy()

template<typename T >
int olb::Cuboid2D< T >::getNy ( ) const

Read access to cuboid height.

Definition at line 118 of file cuboid2D.hh.

119{
120 return _nY;
121}
+ Here is the caller graph for this function:

◆ getOrigin()

template<typename T >
Vector< T, 2 > const olb::Cuboid2D< T >::getOrigin ( ) const

Read only access to left lower corner coordinates.

Definition at line 100 of file cuboid2D.hh.

101{
102 return Vector<T,2> (_globPosX,_globPosY);
103}
+ Here is the caller graph for this function:

◆ getPhysPerimeter()

template<typename T >
T olb::Cuboid2D< T >::getPhysPerimeter ( ) const

Returns the perimeter of the cuboid.

Definition at line 142 of file cuboid2D.hh.

143{
144 return 2*_nY*_delta + 2*_nX*_delta;
145}

◆ getPhysR() [1/3]

template<typename T >
void olb::Cuboid2D< T >::getPhysR ( T physR[2],
const int & iX,
const int & iY ) const

Definition at line 175 of file cuboid2D.hh.

176{
177 physR[0] = _globPosX + iX*_delta;
178 physR[1] = _globPosY + iY*_delta;
179}

◆ getPhysR() [2/3]

template<typename T >
void olb::Cuboid2D< T >::getPhysR ( T physR[2],
const int latticeR[2] ) const

Definition at line 168 of file cuboid2D.hh.

169{
170 physR[0] = _globPosX + latticeR[0]*_delta;
171 physR[1] = _globPosY + latticeR[1]*_delta;
172}

◆ getPhysR() [3/3]

template<typename T >
void olb::Cuboid2D< T >::getPhysR ( T physR[3],
LatticeR< 2 > latticeR ) const

◆ getPhysVolume()

template<typename T >
T olb::Cuboid2D< T >::getPhysVolume ( ) const

Returns the volume of the cuboid.

Definition at line 130 of file cuboid2D.hh.

131{
132 return _nY*_nX*_delta*_delta;
133}

◆ getWeight()

template<typename T >
size_t olb::Cuboid2D< T >::getWeight ( ) const

Returns the number of full cells.

Definition at line 386 of file cuboid2D.hh.

387{
388 if (_weight == std::numeric_limits<size_t>::max()) {
389 return getLatticeVolume();
390 }
391 else {
392 return _weight;
393 }
394}
size_t getLatticeVolume() const
Returns the number of Nodes in the volume.
Definition cuboid2D.hh:136

◆ init()

template<typename T >
void olb::Cuboid2D< T >::init ( T globPosX,
T globPosY,
T delta,
int nX,
int nY )

Initializes the cuboid.

Definition at line 77 of file cuboid2D.hh.

78{
79 _globPosX = globPosX;
80 _globPosY = globPosY;
81 _delta = delta;
82 _nX = nX;
83 _nY = nY;
84}
+ Here is the caller graph for this function:

◆ operator=()

template<typename T >
Cuboid2D< T > & olb::Cuboid2D< T >::operator= ( Cuboid2D< T > const & rhs)

Copy assignment.

Definition at line 69 of file cuboid2D.hh.

70{
71 this->init(rhs._globPosX, rhs._globPosY, rhs._delta, rhs._nX, rhs._nY);
72 _weight = rhs._weight;
73 return *this;
74}

◆ print()

template<typename T >
void olb::Cuboid2D< T >::print ( ) const

Prints cuboid details.

Definition at line 154 of file cuboid2D.hh.

155{
156 clout << "--------Cuboid Details----------" << std::endl;
157 clout << " Left Corner (x/y): " << "\t" << "(" << this->get_globPosX() << "/" << this->get_globPosY() << ")" << std::endl;
158 clout << " Delta: " << "\t" << "\t" << this->getDeltaR() << std::endl;
159 clout << " Perimeter: " << "\t" << "\t" << this->getPhysPerimeter() << std::endl;
160 clout << " Volume: " << "\t" << "\t" << this->getPhysVolume() << std::endl;
161 clout << " Extent (x/y): " << "\t" << "\t" << "(" << this->getNx() << "/" << this->getNy() << ")" << std::endl;
162 clout << " Nodes at Perimeter: " << "\t" << this->getLatticePerimeter() << std::endl;
163 clout << " Nodes in Volume: " << "\t" << this->getLatticeVolume() << std::endl;
164 clout << "--------------------------------" << std::endl;
165}
T getPhysVolume() const
Returns the volume of the cuboid.
Definition cuboid2D.hh:130
int getLatticePerimeter() const
Returns the number of Nodes at the perimeter.
Definition cuboid2D.hh:148
T get_globPosY() const
Definition cuboid2D.hh:94
T getDeltaR() const
Read access to the distance of cuboid nodes.
Definition cuboid2D.hh:106
int getNx() const
Read access to cuboid width.
Definition cuboid2D.hh:112
int getNy() const
Read access to cuboid height.
Definition cuboid2D.hh:118
T get_globPosX() const
Read access to left lower corner coordinates.
Definition cuboid2D.hh:88
T getPhysPerimeter() const
Returns the perimeter of the cuboid.
Definition cuboid2D.hh:142

◆ resize()

template<typename T >
void olb::Cuboid2D< T >::resize ( int X,
int Y,
int nX,
int nY )

resize the cuboid to the passed size

Definition at line 377 of file cuboid2D.hh.

378{
379 _globPosX = _globPosX+iX*_delta;
380 _globPosY = _globPosY+iY*_delta;
381 _nX = nX;
382 _nY = nY;
383}
+ Here is the caller graph for this function:

◆ setWeight()

template<typename T >
void olb::Cuboid2D< T >::setWeight ( size_t fullCells)

Sets the number of full cells.

Definition at line 397 of file cuboid2D.hh.

398{
399 _weight = fullCells;
400}

The documentation for this class was generated from the following files: