From e775bd9f1552bd11fdbb3e8ce24b9c6c93cbb087 Mon Sep 17 00:00:00 2001
From: Stephane Del Pino <stephane.delpino44@gmail.com>
Date: Mon, 3 Sep 2018 18:42:15 +0200
Subject: [PATCH] Use m_cell_type to compute faces

---
 src/mesh/Connectivity.cpp | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/mesh/Connectivity.cpp b/src/mesh/Connectivity.cpp
index 5ea412812..48db775eb 100644
--- a/src/mesh/Connectivity.cpp
+++ b/src/mesh/Connectivity.cpp
@@ -14,8 +14,8 @@ void Connectivity<3>::_computeFaceCellConnectivities()
   for (unsigned int j=0; j<this->numberOfCells(); ++j) {
     const auto& cell_nodes = cell_to_node_matrix.rowConst(j);
 
-    switch (cell_nodes.length) {
-      case 4: { // tetrahedron
+    switch (m_cell_type[j]) {
+      case CellType::Tetrahedron: {
         cell_nb_faces[j] = 4;
         // face 0
         Face f0({cell_nodes(1),
@@ -42,7 +42,7 @@ void Connectivity<3>::_computeFaceCellConnectivities()
         face_cells_map[f3].emplace_back(std::make_tuple(j, 3, f3.reversed()));
         break;
       }
-      case 8: { // hexahedron
+      case CellType::Hexahedron: {
         // face 0
         Face f0({cell_nodes(3),
                  cell_nodes(2),
-- 
GitLab