From d8613ba7197dc91d4c54734294682a27bf8d70dd Mon Sep 17 00:00:00 2001
From: Stephane Del Pino <stephane.delpino44@gmail.com>
Date: Wed, 8 Aug 2018 16:16:43 +0200
Subject: [PATCH] Remove unused members and their initialization

- m_node_faces
- m_node_nb_faces
---
 src/mesh/Connectivity.cpp | 29 -----------------------------
 src/mesh/Connectivity.hpp |  3 ---
 2 files changed, 32 deletions(-)

diff --git a/src/mesh/Connectivity.cpp b/src/mesh/Connectivity.cpp
index b588f30c5..f53b58574 100644
--- a/src/mesh/Connectivity.cpp
+++ b/src/mesh/Connectivity.cpp
@@ -161,36 +161,7 @@ void Connectivity<3>::_computeFaceCellConnectivities()
   m_face_local_numbers_in_their_cells
       = m_connectivity_computer.computeLocalItemNumberInChildItem<ItemType::face,
                                                                   ItemType::cell>(*this);
-
-  const auto& face_to_node_matrix
-      = m_item_to_item_matrix[itemId(ItemType::face)][itemId(ItemType::node)];
-
 #warning check that the number of cell per faces is <=2
-  std::unordered_map<unsigned int, std::vector<unsigned int>> node_faces_map;
-  for (size_t l=0; l<face_to_node_matrix.numRows(); ++l) {
-    const auto& face_nodes = face_to_node_matrix.rowConst(l);
-    for (size_t lr=0; lr<face_nodes.length; ++lr) {
-      const unsigned int r = face_nodes(lr);
-      node_faces_map[r].emplace_back(l);
-    }
-  }
-  Kokkos::View<unsigned short*> node_nb_faces("node_nb_faces", this->numberOfNodes());
-  size_t max_nb_face_per_node = 0;
-  for (auto node_faces : node_faces_map) {
-    max_nb_face_per_node = std::max(node_faces.second.size(), max_nb_face_per_node);
-    node_nb_faces[node_faces.first] = node_faces.second.size();
-  }
-  m_node_nb_faces = node_nb_faces;
-
-  Kokkos::View<unsigned int**> node_faces("node_faces", this->numberOfNodes(), max_nb_face_per_node);
-  for (auto node_faces_vector : node_faces_map) {
-    const unsigned int r = node_faces_vector.first;
-    const std::vector<unsigned int>&  faces_vector = node_faces_vector.second;
-    for (size_t l=0; l < faces_vector.size(); ++l) {
-      node_faces(r, l) = faces_vector[l];
-    }
-  }
-  m_node_faces = node_faces;
 }
 
 template<>
diff --git a/src/mesh/Connectivity.hpp b/src/mesh/Connectivity.hpp
index b40c1ec18..0c2a52fba 100644
--- a/src/mesh/Connectivity.hpp
+++ b/src/mesh/Connectivity.hpp
@@ -297,9 +297,6 @@ private:
 
   Kokkos::View<double*> m_inv_cell_nb_nodes;
 
-  Kokkos::View<const unsigned short*> m_node_nb_faces;
-  Kokkos::View<const unsigned int**> m_node_faces;
-
   using Face = ConnectivityFace<Dimension>;
 
   std::unordered_map<Face, unsigned int, typename Face::Hash> m_face_number_map;
-- 
GitLab