[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: |
Thu, 23 May 2019 10:24:01 -0400 (EDT) |
branch: mb-Use_rtree_in_poly_composite
commit 32939cf118d62ff956354f9181f52052b8178ade
Author: mb <address@hidden>
Date: Thu May 23 16:21:41 2019 +0200
Provide comparator to make ordering deterministic.
---
src/getfem_generic_assembly_interpolation.cc | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/src/getfem_generic_assembly_interpolation.cc
b/src/getfem_generic_assembly_interpolation.cc
index dedaa01..561b788 100644
--- a/src/getfem_generic_assembly_interpolation.cc
+++ b/src/getfem_generic_assembly_interpolation.cc
@@ -479,6 +479,16 @@ namespace getfem {
// Interpolate transformation with an expression
//=========================================================================
+ struct rated_box_index_compare {
+ bool operator()(
+ const std::pair<scalar_type, const bgeot::box_index*> &x,
+ const std::pair<scalar_type, const bgeot::box_index*> &y) const {
+ GMM_ASSERT2(x.second != nullptr, "x contains nullptr");
+ GMM_ASSERT2(y.second != nullptr, "y contains nullptr");
+ return (x.first < y.first) || (!(y.first < x.first) && (x.second->id <
y.second->id));
+ }
+ };
+
class interpolate_transformation_expression
: public virtual_interpolate_transformation, public context_dependencies {
@@ -668,7 +678,8 @@ namespace getfem {
element_boxes.find_boxes_at_point(P, bset);
// using a std::set as a sorter
- std::set<std::pair<scalar_type, const bgeot::box_index*> > rated_boxes;
+ std::set<std::pair<scalar_type, const bgeot::box_index*>,
rated_box_index_compare>
+ rated_boxes;
for (const auto &box : bset) {
scalar_type rating = scalar_type(1);
for (size_type i = 0; i < m.dim(); ++i) {
- [Getfem-commits] [getfem-commits] branch mb-Use_rtree_in_poly_composite created (now 22cd69d), Markus Bürg, 2019/05/23
- [Getfem-commits] (no subject), Markus Bürg, 2019/05/23
- [Getfem-commits] (no subject), Markus Bürg, 2019/05/23
- [Getfem-commits] (no subject), Markus Bürg, 2019/05/23
- [Getfem-commits] (no subject), Markus Bürg, 2019/05/23
- [Getfem-commits] (no subject),
Markus Bürg <=
- [Getfem-commits] (no subject), Markus Bürg, 2019/05/23
- [Getfem-commits] (no subject), Markus Bürg, 2019/05/23
- [Getfem-commits] (no subject), Markus Bürg, 2019/05/23
- [Getfem-commits] (no subject), Markus Bürg, 2019/05/23
- [Getfem-commits] (no subject), Markus Bürg, 2019/05/23