HGridCell.h
Go to the documentation of this file.
1 // This file is part of the MercuryDPM project (https://www.mercurydpm.org).
2 // Copyright (c), The MercuryDPM Developers Team. All rights reserved.
3 // License: BSD 3-Clause License; see the LICENSE file in the root directory.
4 
5 #ifndef MERCURYDPM_HGRIDCELL_H
6 #define MERCURYDPM_HGRIDCELL_H
7 
11 class HGridCell
12 {
13 public:
15  {}
16 
18  inline bool equals(int x, int y, int z, unsigned int level) const
19  {
20  return (x == hGridX_ && y == hGridY_ && z == hGridZ_ && level == hGridLevel_);
21  }
22 
24  inline bool equals(int x, int y, unsigned int level) const
25  {
26  return (x == hGridX_ && y == hGridY_ && level == hGridLevel_);
27  }
28 
30  inline bool operator==(const HGridCell& other) const
31  {
32  return equals(other.hGridX_, other.hGridY_, other.hGridZ_, other.hGridLevel_);
33  }
34 
35  inline int getHGridX() const
36  {
37  return hGridX_;
38  }
39 
40  inline void setHGridX(int HGridX)
41  {
42  hGridX_ = HGridX;
43  }
44 
45  inline int getHGridY() const
46  {
47  return hGridY_;
48  }
49 
50  inline void setHGridY(int HGridY)
51  {
52  hGridY_ = HGridY;
53  }
54 
55  inline int getHGridZ() const
56  {
57  return hGridZ_;
58  }
59 
60  inline void setHGridZ(int HGridZ)
61  {
62  hGridZ_ = HGridZ;
63  }
64 
65  inline unsigned int getHGridLevel() const
66  {
67  return hGridLevel_;
68  }
69 
70  inline void setHGridLevel(unsigned int HGridLevel)
71  {
72  hGridLevel_ = HGridLevel;
73  }
74 
75 private:
76 
80  unsigned int hGridLevel_;
81 
82 };
83 
84 
85 #endif //MERCURYDPM_HGRIDCELL_H
Definition: HGridCell.h:12
unsigned int getHGridLevel() const
Definition: HGridCell.h:65
unsigned int hGridLevel_
HGrid-level of the particle containing this cell.
Definition: HGridCell.h:80
bool equals(int x, int y, int z, unsigned int level) const
Checks if the given (x,y,z,level) is the same as the ones in this cell.
Definition: HGridCell.h:18
bool operator==(const HGridCell &other) const
Checks if the given cell is the same as the given cell.
Definition: HGridCell.h:30
int hGridY_
Definition: HGridCell.h:78
bool equals(int x, int y, unsigned int level) const
Checks if the given (x,y,z,level) is the same as the ones in this cell, 2D version.
Definition: HGridCell.h:24
int hGridZ_
Definition: HGridCell.h:78
void setHGridZ(int HGridZ)
Definition: HGridCell.h:60
HGridCell()
Definition: HGridCell.h:14
int getHGridX() const
Definition: HGridCell.h:35
void setHGridX(int HGridX)
Definition: HGridCell.h:40
int getHGridZ() const
Definition: HGridCell.h:55
void setHGridY(int HGridY)
Definition: HGridCell.h:50
int hGridX_
Cell position in the grid.
Definition: HGridCell.h:78
void setHGridLevel(unsigned int HGridLevel)
Definition: HGridCell.h:70
int getHGridY() const
Definition: HGridCell.h:45
Scalar * y
Definition: level1_cplx_impl.h:128
list x
Definition: plotDoE.py:28