getfem-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Getfem-commits] (no subject)


From: Markus Bürg
Subject: [Getfem-commits] (no subject)
Date: Fri, 24 May 2019 07:27:36 -0400 (EDT)

branch: mb-Use_rtree_in_poly_composite
commit 8981c17b0daab4a3d84e4875c605fd35389e40ce
Author: mb <address@hidden>
Date:   Fri May 24 13:26:48 2019 +0200

    Have to clear node_tab as well.
---
 src/bgeot_rtree.cc       | 6 ++++++
 src/getfem/bgeot_rtree.h | 2 +-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/src/bgeot_rtree.cc b/src/bgeot_rtree.cc
index 36a86dd..2ba9aa9 100644
--- a/src/bgeot_rtree.cc
+++ b/src/bgeot_rtree.cc
@@ -185,6 +185,12 @@ namespace bgeot {
   rtree::rtree(scalar_type EPS) : EPS{EPS}
   {}
 
+  void rtree::clear() {
+    root = std::unique_ptr<rtree_elt_base>();
+    boxes.clear();
+    nodes.clear();
+  }
+
   template <typename Predicate>
   static void find_matching_boxes_(rtree_elt_base *n, rtree::pbox_set& boxlst,
                                    const Predicate &p) {
diff --git a/src/getfem/bgeot_rtree.h b/src/getfem/bgeot_rtree.h
index c481b13..c996c8e 100644
--- a/src/getfem/bgeot_rtree.h
+++ b/src/getfem/bgeot_rtree.h
@@ -105,7 +105,7 @@ namespace bgeot {
       return boxes.emplace(std::move(bi)).first->id;
     }
     size_type nb_boxes() const { return boxes.size(); }
-    void clear() { root = std::unique_ptr<rtree_elt_base>(); boxes.clear(); }
+    void clear();
 
     void find_intersecting_boxes(const base_node& bmin, const base_node& bmax,
                                  pbox_set& boxlst) const;



reply via email to

[Prev in Thread] Current Thread [Next in Thread]