From c60819b68d2713c3cfe273d020463780c64e74df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Del=20Pino?= <stephane.delpino44@gmail.com> Date: Mon, 2 Nov 2020 12:02:26 +0100 Subject: [PATCH] Remove dead code The considered code was an alternate strategy to define cell-cell connectivity: through nodes. --- src/mesh/Connectivity.hpp | 32 ++++++++------------------------ 1 file changed, 8 insertions(+), 24 deletions(-) diff --git a/src/mesh/Connectivity.hpp b/src/mesh/Connectivity.hpp index 3bf5cd420..7a3c77b71 100644 --- a/src/mesh/Connectivity.hpp +++ b/src/mesh/Connectivity.hpp @@ -546,32 +546,16 @@ class Connectivity final : public IConnectivity cellToCellGraph() const { std::vector<std::set<int>> cell_cells(this->numberOfCells()); - if constexpr (true) { - const auto& face_to_cell_matrix = this->faceToCellMatrix(); + const auto& face_to_cell_matrix = this->faceToCellMatrix(); - for (FaceId l = 0; l < this->numberOfFaces(); ++l) { - const auto& face_to_cell = face_to_cell_matrix[l]; - if (face_to_cell.size() > 1) { - const CellId cell_0 = face_to_cell[0]; - const CellId cell_1 = face_to_cell[1]; + for (FaceId l = 0; l < this->numberOfFaces(); ++l) { + const auto& face_to_cell = face_to_cell_matrix[l]; + if (face_to_cell.size() > 1) { + const CellId cell_0 = face_to_cell[0]; + const CellId cell_1 = face_to_cell[1]; - cell_cells[cell_0].insert(cell_1); - cell_cells[cell_1].insert(cell_0); - } - } - } else { - const auto& node_to_cell_matrix = this->nodeToCellMatrix(); - - for (NodeId l = 0; l < this->numberOfNodes(); ++l) { - const auto& node_to_cell = node_to_cell_matrix[l]; - for (size_t i_cell = 0; i_cell < node_to_cell.size(); ++i_cell) { - const CellId cell_0 = node_to_cell[i_cell]; - for (size_t j_cell = 0; j_cell < i_cell; ++j_cell) { - const CellId cell_1 = node_to_cell[j_cell]; - cell_cells[cell_0].insert(cell_1); - cell_cells[cell_1].insert(cell_0); - } - } + cell_cells[cell_0].insert(cell_1); + cell_cells[cell_1].insert(cell_0); } } -- GitLab