getfem-commits
[Top][All Lists]
Advanced

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

[Getfem-commits] (no subject)


From: Andriy Andreykiv
Subject: [Getfem-commits] (no subject)
Date: Mon, 30 Jul 2018 21:54:37 -0400 (EDT)

branch: comparing_stored_objects_by_key
commit 7e0a80acd34c4a79ccaa223abb589b1cd3ebd4cd
Author: aa <address@hidden>
Date:   Tue Jul 31 03:54:03 2018 +0200

    not comparing the addresses of stored objects but their keys
---
 src/getfem_integration.cc | 3 ++-
 src/getfem_mesh_im.cc     | 6 +++---
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/src/getfem_integration.cc b/src/getfem_integration.cc
index 7131cc4..911a2b0 100644
--- a/src/getfem_integration.cc
+++ b/src/getfem_integration.cc
@@ -322,7 +322,8 @@ namespace getfem {
                                               short_type f) {
     papprox_integration pai = ppi->approx_method();
     GMM_ASSERT1(!valid, "Impossible to modify a valid integration method.");
-    GMM_ASSERT1(pai->structure() == structure()->faces_structure()[f],
+    GMM_ASSERT1(*key_of_stored_object(pai->structure())
+                == *key_of_stored_object(structure()->faces_structure()[f]),
                 "structures missmatch");
     GMM_ASSERT1(ppi->type() == IM_APPROX, "Impossible with an exact method.");
 
diff --git a/src/getfem_mesh_im.cc b/src/getfem_mesh_im.cc
index 1e4990c..14a3f3b 100644
--- a/src/getfem_mesh_im.cc
+++ b/src/getfem_mesh_im.cc
@@ -54,9 +54,9 @@ namespace getfem {
          { im_convexes.sup(cv); touch(); v_num = act_counter(); } }
     else if (!im_convexes.is_in(cv) || ims[cv] != pim) {
       GMM_ASSERT1
-       (pim->type() == IM_NONE || 
-        basic_structure(linked_mesh_->structure_of_convex(cv))
-        == pim->structure(),
+       (pim->type() == IM_NONE ||
+        
*key_of_stored_object(basic_structure(linked_mesh_->structure_of_convex(cv)))
+        == *key_of_stored_object(pim->structure()),
         "Incompatibility between integration method "
         << getfem::name_of_int_method(pim) << " and mesh element " <<
         bgeot::name_of_geometric_trans(linked_mesh_->trans_of_convex(cv)));



reply via email to

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