Commit 27f9a090 authored by Quentin Khan's avatar Quentin Khan
Browse files

Group tree : add level information in the Group Tree cells

parent 9269711c
...@@ -51,6 +51,16 @@ public: ...@@ -51,6 +51,16 @@ public:
symb->mortonIndex = inMortonIndex; symb->mortonIndex = inMortonIndex;
} }
/** To get the cell level */
int getLevel() const {
return symb->level;
}
/** To set the cell level */
void setLevel(const int level) {
symb->level = level;
}
/** To get the position */ /** To get the position */
FTreeCoordinate getCoordinate() const { FTreeCoordinate getCoordinate() const {
return FTreeCoordinate(symb->coordinates[0], return FTreeCoordinate(symb->coordinates[0],
...@@ -103,4 +113,3 @@ public: ...@@ -103,4 +113,3 @@ public:
#endif // FCHEBCELLPOD_HPP #endif // FCHEBCELLPOD_HPP
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
struct alignas(FStarPUDefaultAlign::StructAlign) FBasicCellPOD { struct alignas(FStarPUDefaultAlign::StructAlign) FBasicCellPOD {
MortonIndex mortonIndex; MortonIndex mortonIndex;
int coordinates[3]; int coordinates[3];
int level;
}; };
#endif // FBASICCELLPOD_HPP #endif // FBASICCELLPOD_HPP
...@@ -99,6 +99,7 @@ public: ...@@ -99,6 +99,7 @@ public:
CompositeCellClass newNode = newBlock->getCompleteCell(cellIdInBlock); CompositeCellClass newNode = newBlock->getCompleteCell(cellIdInBlock);
newNode.setMortonIndex(newNodeIndex); newNode.setMortonIndex(newNodeIndex);
newNode.setCoordinate(newNodeCoordinate); newNode.setCoordinate(newNodeCoordinate);
newNode.setLevel(idxLevel);
// Add leaf // Add leaf
nbParticlesOffsetBeforeLeaf = newParticleBlock->newLeaf(newNodeIndex, cellIdInBlock, nbParticlesOffsetBeforeLeaf = newParticleBlock->newLeaf(newNodeIndex, cellIdInBlock,
...@@ -149,6 +150,7 @@ public: ...@@ -149,6 +150,7 @@ public:
CompositeCellClass newNode = newBlock->getCompleteCell(cellIdInBlock); CompositeCellClass newNode = newBlock->getCompleteCell(cellIdInBlock);
newNode.setMortonIndex(newNodeIndex); newNode.setMortonIndex(newNodeIndex);
newNode.setCoordinate(newNodeCoordinate); newNode.setCoordinate(newNodeCoordinate);
newNode.setLevel(idxLevel);
cellIdInBlock += 1; cellIdInBlock += 1;
blockIteratorInOctree.moveRight(); blockIteratorInOctree.moveRight();
......
...@@ -53,6 +53,16 @@ public: ...@@ -53,6 +53,16 @@ public:
symb->mortonIndex = inMortonIndex; symb->mortonIndex = inMortonIndex;
} }
/** To get the cell level */
int getLevel() const {
return symb->level;
}
/** To set the cell level */
void setLevel(const int level) {
symb->level = level;
}
/** To get the position */ /** To get the position */
FTreeCoordinate getCoordinate() const { FTreeCoordinate getCoordinate() const {
return FTreeCoordinate(symb->coordinates[0], return FTreeCoordinate(symb->coordinates[0],
...@@ -109,4 +119,3 @@ public: ...@@ -109,4 +119,3 @@ public:
#endif // FROTATIONCELLPOD_HPP #endif // FROTATIONCELLPOD_HPP
...@@ -51,6 +51,16 @@ public: ...@@ -51,6 +51,16 @@ public:
symb->mortonIndex = inMortonIndex; symb->mortonIndex = inMortonIndex;
} }
/** To get the cell level */
int getLevel() const {
return symb->level;
}
/** To set the cell level */
void setLevel(const int level) {
symb->level = level;
}
/** To get the position */ /** To get the position */
FTreeCoordinate getCoordinate() const { FTreeCoordinate getCoordinate() const {
return FTreeCoordinate(symb->coordinates[0], return FTreeCoordinate(symb->coordinates[0],
...@@ -102,4 +112,3 @@ public: ...@@ -102,4 +112,3 @@ public:
}; };
#endif // FTAYLORCELLPOD_HPP #endif // FTAYLORCELLPOD_HPP
...@@ -34,6 +34,16 @@ public: ...@@ -34,6 +34,16 @@ public:
symb->mortonIndex = inMortonIndex; symb->mortonIndex = inMortonIndex;
} }
/** To get the cell level */
int getLevel() const {
return symb->level;
}
/** To set the cell level */
void setLevel(const int level) {
symb->level = level;
}
/** To get the position */ /** To get the position */
FTreeCoordinate getCoordinate() const { FTreeCoordinate getCoordinate() const {
return FTreeCoordinate(symb->coordinates[0], return FTreeCoordinate(symb->coordinates[0],
...@@ -81,4 +91,3 @@ public: ...@@ -81,4 +91,3 @@ public:
#endif // FTESTCELLPOD_HPP #endif // FTESTCELLPOD_HPP
...@@ -51,6 +51,16 @@ public: ...@@ -51,6 +51,16 @@ public:
symb->mortonIndex = inMortonIndex; symb->mortonIndex = inMortonIndex;
} }
/** To get the cell level */
int getLevel() const {
return symb->level;
}
/** To set the cell level */
void setLevel(const int level) {
symb->level = level;
}
/** To get the position */ /** To get the position */
FTreeCoordinate getCoordinate() const { FTreeCoordinate getCoordinate() const {
return FTreeCoordinate(symb->coordinates[0], return FTreeCoordinate(symb->coordinates[0],
...@@ -129,4 +139,3 @@ public: ...@@ -129,4 +139,3 @@ public:
}; };
#endif // FUNIFCELLPOD_HPP #endif // FUNIFCELLPOD_HPP
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