getfem-commits
[Top][All Lists]
Advanced

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

[Getfem-commits] (no subject)


From: Konstantinos Poulios
Subject: [Getfem-commits] (no subject)
Date: Tue, 5 Jun 2018 09:20:33 -0400 (EDT)

branch: code-cleanup
commit 7328044c3602778db98e108c4ad881d4bbb4ac02
Author: Konstantinos Poulios <address@hidden>
Date:   Tue Jun 5 15:19:40 2018 +0200

    Remove unused mesh_region option
---
 src/getfem/getfem_mesh_region.h | 11 +++--------
 src/getfem_mesh_region.cc       | 22 +++++++++-------------
 2 files changed, 12 insertions(+), 21 deletions(-)

diff --git a/src/getfem/getfem_mesh_region.h b/src/getfem/getfem_mesh_region.h
index d930a7d..abbee46 100644
--- a/src/getfem/getfem_mesh_region.h
+++ b/src/getfem/getfem_mesh_region.h
@@ -92,10 +92,9 @@ namespace getfem {
     std::shared_ptr<impl> p;  /* the real region data */
     // #endif
 
-    size_type id_;            /* used temporarily when the 
-                                mesh_region(size_type) constructor is used */
+    size_type id_;     /* used temporarily when the 
+                          mesh_region(size_type) constructor is used */
 
-    size_type type_; //optional type of the region
     omp_distribute<bool> partitioning_allowed; /** specifies that in
                           multithreaded code only a partition of the
                           region is visible in index() and size() methods,
@@ -145,7 +144,7 @@ namespace getfem {
     mesh_region(size_type id__);
 
     /** internal constructor. You should used m.region(id) instead. */
-    mesh_region(mesh& m, size_type id__, size_type type = size_type(-1));
+    mesh_region(mesh& m, size_type id__);
     /** build a mesh_region from a convex list stored in a bit_vector. */
     mesh_region(const dal::bit_vector &bv);
 
@@ -172,10 +171,6 @@ namespace getfem {
 
     size_type id() const { return id_; }
 
-    size_type get_type() const { return type_; }
-
-    void  set_type(size_type type)  { type_ = type; }
-
     /** In multithreaded part of the program makes only a partition of the 
     region visible in the index() and size() operations, as well as during 
     iterations with mr_visitor. This is a default behaviour*/
diff --git a/src/getfem_mesh_region.cc b/src/getfem_mesh_region.cc
index 11ebfdc..15c3590 100644
--- a/src/getfem_mesh_region.cc
+++ b/src/getfem_mesh_region.cc
@@ -34,26 +34,26 @@ namespace getfem {
   }
 
 
-  mesh_region::mesh_region() : p(std::make_shared<impl>()), id_(size_type(-2)),
-                              type_(size_type(-1)),
-    partitioning_allowed(true), parent_mesh(0), index_updated(false)
+  mesh_region::mesh_region()
+    : p(std::make_shared<impl>()), id_(size_type(-2)),
+      partitioning_allowed(true), parent_mesh(0), index_updated(false)
   { 
     if (me_is_multithreaded_now()) prohibit_partitioning();
   }
 
-  mesh_region::mesh_region(size_type id__) : id_(id__), type_(size_type(-1)),
-    partitioning_allowed(true), parent_mesh(0), index_updated(false)
+  mesh_region::mesh_region(size_type id__)
+    : id_(id__), partitioning_allowed(true), parent_mesh(0), 
index_updated(false)
   { }
 
-  mesh_region::mesh_region(mesh& m, size_type id__, size_type type) : 
-    p(std::make_shared<impl>()), id_(id__), type_(type), 
partitioning_allowed(true), parent_mesh(&m),
-    index_updated(false)
+  mesh_region::mesh_region(mesh& m, size_type id__)
+    : p(std::make_shared<impl>()), id_(id__), partitioning_allowed(true),
+      parent_mesh(&m), index_updated(false)
   { 
     if (me_is_multithreaded_now()) prohibit_partitioning();  
   }
 
   mesh_region::mesh_region(const dal::bit_vector &bv) : 
-    p(std::make_shared<impl>()), id_(size_type(-2)), type_(size_type(-1)),
+    p(std::make_shared<impl>()), id_(size_type(-2)),
     partitioning_allowed(true), parent_mesh(0), index_updated(false)
   { 
     if (me_is_multithreaded_now()) prohibit_partitioning();  
@@ -89,7 +89,6 @@ namespace getfem {
     if (!this->parent_mesh && !from.parent_mesh)
     {
       this->id_ = from.id_;
-      this->type_ = from.type_;
       this->partitioning_allowed = from.partitioning_allowed;
       if (from.p.get()) {
         if (!this->p.get()) this->p = std::make_shared<impl>();
@@ -101,7 +100,6 @@ namespace getfem {
     else if (!this->parent_mesh) {
       this->p = from.p;
       this->id_ = from.id_;
-      this->type_ = from.type_;
       this->parent_mesh = from.parent_mesh;
       this->partitioning_allowed = from.partitioning_allowed;
     }
@@ -109,13 +107,11 @@ namespace getfem {
       if (from.p.get())
       {
         this->wp() = from.rp();
-        this->type_= from.get_type();
         this->partitioning_allowed = from.partitioning_allowed;
       }
       else if (from.id_ == size_type(-1)) {
         this->clear();
         this->add(this->parent_mesh->convex_index());
-        this->type_ = size_type(-1);
         this->partitioning_allowed = true;
       }
       touch_parent_mesh();



reply via email to

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