From 0411e3206f6d95664f37233f6a09034daaae026e Mon Sep 17 00:00:00 2001
From: Stephane Del Pino <stephane.delpino44@gmail.com>
Date: Mon, 18 Jun 2018 12:10:02 +0200
Subject: [PATCH] Removed obsolete EntityListManager.

- Node groups are not managed anymore
---
 src/mesh/Connectivity2D.hpp | 103 ------------------------------------
 src/mesh/GmshReader.cpp     |  29 +---------
 2 files changed, 1 insertion(+), 131 deletions(-)

diff --git a/src/mesh/Connectivity2D.hpp b/src/mesh/Connectivity2D.hpp
index 3a6a29910..a8e703058 100644
--- a/src/mesh/Connectivity2D.hpp
+++ b/src/mesh/Connectivity2D.hpp
@@ -13,84 +13,11 @@
 #include <RefId.hpp>
 #include <Boundary.hpp>
 
-class [[deprecated]] EntityListManager
-{
- public:
-  typedef Kokkos::View<const unsigned int*> CellIdArray;
-  typedef Kokkos::View<const unsigned int*> FaceIdArray;
-  typedef Kokkos::View<const unsigned int*> EdgeIdArray;
-  typedef Kokkos::View<const unsigned int*> NodeIdArray;
-
-  typedef std::map<RefId, CellIdArray> CellIdArraySet;
-  typedef std::map<RefId, FaceIdArray> FaceIdArraySet;
-  typedef std::map<RefId, EdgeIdArray> EdgeIdArraySet;
-  typedef std::map<RefId, NodeIdArray> NodeIdArraySet;
-
- private:
-  CellIdArraySet m_cell_id_array_set;
-  FaceIdArraySet m_face_id_array_set;
-  EdgeIdArraySet m_edge_id_array_set;
-  NodeIdArraySet m_node_id_array_set;
-
- public:
-
-  void addCellIdArray(const RefId& set_id, const CellIdArray& cell_id_array)
-  {
-    m_cell_id_array_set.insert(std::make_pair(set_id, cell_id_array));
-  }
-
-  void addFaceIdArray(const RefId& set_id, const FaceIdArray& face_id_array)
-  {
-    m_face_id_array_set.insert(std::make_pair(set_id, face_id_array));
-  }
-
-  void addEdgeIdArray(const RefId& set_id, const EdgeIdArray& edge_id_array)
-  {
-    m_edge_id_array_set.insert(std::make_pair(set_id, edge_id_array));
-  }
-
-  void addNodeIdArray(const RefId& set_id, const NodeIdArray& node_id_array)
-  {
-    m_node_id_array_set.insert(std::make_pair(set_id, node_id_array));
-  }
-
-  const CellIdArraySet& getCellIdArraySet() const
-  {
-    return m_cell_id_array_set;
-  }
-
-  const FaceIdArraySet& getFaceIdArraySet() const
-  {
-    return m_face_id_array_set;
-  }
-
-  const EdgeIdArraySet& getEdgeIdArraySet() const
-  {
-    return m_edge_id_array_set;
-  }
-
-  const NodeIdArraySet& getNodeIdArraySet() const
-  {
-    return m_node_id_array_set;
-  }
-
-  EntityListManager& operator=(const EntityListManager&) = delete;
-  EntityListManager() = default;
-  EntityListManager(const EntityListManager&) = delete;
-  ~EntityListManager() = default;
-};
-
 class Connectivity2D
 {
 public:
   static constexpr size_t dimension = 2;
 
-  typedef std::pair<unsigned int, Kokkos::View<const unsigned int*>> FacesBoundary;
-  typedef std::pair<RefId, Kokkos::View<const unsigned int*>> NodesBoundary;
-  typedef std::vector<FacesBoundary> FacesBoundaryList;
-  typedef std::vector<NodesBoundary> NodesBoundaryList;
-
-  EntityListManager m_entity_list_manager;
   std::vector<Boundary> m_boundary_list;
 
 private:
@@ -119,9 +46,6 @@ private:
 
   size_t  m_max_nb_node_per_cell;
 
-  FacesBoundaryList m_faces_boundary_list;
-  NodesBoundaryList m_nodes_boundary_list;
-
   struct Face
   {
     const unsigned int m_node0_id;
@@ -367,32 +291,6 @@ private:
     return 0;
   }
 
-  EntityListManager& entityListManager()
-  {
-    return m_entity_list_manager;
-  }
-
-  const EntityListManager& entityListManager() const
-  {
-    return m_entity_list_manager;
-  }
-
-size_t numberOfNodeBoundaries() const
-  {
-    return m_nodes_boundary_list.size();
-  }
-
-  const NodesBoundary& nodesBoundary(const size_t& i) const
-  {
-    return m_nodes_boundary_list[i];
-  }
-
-  void addNodeBoundary(const RefId& ref,
-                       const Kokkos::View<const unsigned int*> nodes_boundary)
-  {
-    m_nodes_boundary_list.push_back(std::make_pair(ref, nodes_boundary));
-  }
-
   Connectivity2D(const Connectivity2D&) = delete;
 
   Connectivity2D(const Kokkos::View<const unsigned short*> cell_nb_nodes,
@@ -421,7 +319,6 @@ size_t numberOfNodeBoundaries() const
                                       m_node_cell_local_node);
 
     this->_computeFaceCellConnectivities();
-    //this->_computeNodeFaceConnectivities();
   }
 
   ~Connectivity2D()
diff --git a/src/mesh/GmshReader.cpp b/src/mesh/GmshReader.cpp
index 816ab2cef..4ea576113 100644
--- a/src/mesh/GmshReader.cpp
+++ b/src/mesh/GmshReader.cpp
@@ -838,39 +838,12 @@ GmshReader::__proceedData()
         face_list[j]=ref_face_list.second[j];
       }
       const PhysicalRefId& physical_ref_id = m_physical_ref_map.at(ref_face_list.first);
-      connectivity.entityListManager().addFaceIdArray(physical_ref_id.refId(), face_list);
       Boundary boundary(connectivity, physical_ref_id.refId(), face_list);
       connectivity.addBoundary(boundary);
     }
 
     const Kokkos::View<const unsigned int**> face_nodes = connectivity.faceNodes();
 
-    std::cout << rang::fgB::red << "Creating nodes from faces for BC should not change connectivity definition" << rang::style::reset << '\n';
-
-    const EntityListManager& entity_list_manager = connectivity.entityListManager();
-    for (const auto& id_face_array : entity_list_manager.getFaceIdArraySet()) {
-      const RefId& ref = id_face_array.first;
-      const auto& face_ids = id_face_array.second;
-
-      std::set<unsigned int> node_id_set;
-
-      for (unsigned int l=0; l<face_ids.extent(0); ++l) {
-        for (unsigned short r=0; r<2; ++r) {
-          node_id_set.insert(face_nodes(face_ids[l],r));
-        }
-      }
-
-      Kokkos::View<unsigned int*> node_id_list("node_ids", node_id_set.size());
-      {
-        int r=0;
-        for (auto node_id : node_id_set) {
-          node_id_list[r] = node_id;
-          ++r;
-        }
-      }
-      connectivity.addNodeBoundary(ref, node_id_list);
-    }
-
     std::map<unsigned int, std::vector<unsigned int>> ref_points_map;
     for (unsigned int r=0; r<__points.extent(0); ++r) {
       const unsigned int point_number = __points[r];
@@ -884,7 +857,7 @@ GmshReader::__proceedData()
         point_list[j]=ref_point_list.second[j];
       }
       const PhysicalRefId& physical_ref_id = m_physical_ref_map.at(ref_point_list.first);
-      connectivity.entityListManager().addNodeIdArray(physical_ref_id.refId(), point_list);
+      std::cout << rang::fgB::red << "point list (corners?) not handled anymore" << rang::style::reset << '\n';
     }
 
     typedef Mesh<Connectivity2D> MeshType;
-- 
GitLab