diff --git a/Src/Containers/FOctree.hpp b/Src/Containers/FOctree.hpp index 0ce24b3a89d3619882faadb1d6ce77256fc65437..4105f608ae07788bade32245e987576ae9cae0df 100644 --- a/Src/Containers/FOctree.hpp +++ b/Src/Containers/FOctree.hpp @@ -513,6 +513,13 @@ public: return this->currentLocalLevel + this->current.tree->getSubOctreePosition(); } + /** Get the current pointed leaf + * @return current leaf element + */ + LeafClass* getCurrentLeaf() { + return this->current.leafTree->getLeaf(this->currentLocalIndex); + } + /** To access the current particles list * You have to be at the leaf level to call this function! * @return current element list diff --git a/Src/Containers/FSubOctree.hpp b/Src/Containers/FSubOctree.hpp index 65100aac0d9c48f2b16619325bba7a4511c14e82..a0f8d1065b76303f2b16e4e999227090021d49dc 100644 --- a/Src/Containers/FSubOctree.hpp +++ b/Src/Containers/FSubOctree.hpp @@ -362,6 +362,9 @@ public: return (leaf ? leaf->getTargets() : 0); } + LeafClass* getLeaf(const int index){ + return this->leafs[index]; + } };