[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Getfem-commits] (no subject)
From: |
Yves Renard |
Subject: |
[Getfem-commits] (no subject) |
Date: |
Tue, 4 Jun 2019 09:22:54 -0400 (EDT) |
branch: mb-Use_rtree_in_poly_composite
commit a025dda32b328856530ba7573442b1a3d32e54dd
Author: Yves Renard <address@hidden>
Date: Tue Jun 4 15:22:44 2019 +0200
No deletion of boxes for EPS=0
---
src/getfem/bgeot_rtree.h | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/src/getfem/bgeot_rtree.h b/src/getfem/bgeot_rtree.h
index 8010ec9..c655402 100644
--- a/src/getfem/bgeot_rtree.h
+++ b/src/getfem/bgeot_rtree.h
@@ -69,8 +69,11 @@ namespace bgeot {
box_index_topology_compare(scalar_type EPS_) : EPS{EPS_} {}
bool operator()(const box_index &lhs, const box_index &rhs) const {
- return is_less(*lhs.min, *rhs.min) ||
- (!is_less(*rhs.min, *lhs.min) && is_less(*lhs.max, *rhs.max));
+ if (EPS == scalar_type(0))
+ return lhs.id < rhs.id;
+ else
+ return is_less(*lhs.min, *rhs.min) ||
+ (!is_less(*rhs.min, *lhs.min) && is_less(*lhs.max, *rhs.max));
}
};
@@ -88,6 +91,9 @@ namespace bgeot {
*
* This is not a dynamic structure. Once a query has been made on the
* tree, new boxes should not be added.
+ *
+ * CAUTION : For EPS > 0, nearly identically boxes are eliminated
+ * For EPS = 0 all boxes are stored.
*/
class rtree {
public: