From 9a2425085672a4dfabeab48f27aec2ee82e31e71 Mon Sep 17 00:00:00 2001
From: Dmitri Naumov <github@naumov.de>
Date: Wed, 22 Sep 2021 22:21:56 +0200
Subject: [PATCH] [MeL] Remove unused getNumberOfGlobalBaseNodes().

---
 MeshLib/IO/MPI_IO/NodePartitionedMeshReader.cpp |  4 ++--
 MeshLib/IO/MPI_IO/NodePartitionedMeshReader.h   |  5 +++--
 MeshLib/NodePartitionedMesh.h                   | 13 -------------
 3 files changed, 5 insertions(+), 17 deletions(-)

diff --git a/MeshLib/IO/MPI_IO/NodePartitionedMeshReader.cpp b/MeshLib/IO/MPI_IO/NodePartitionedMeshReader.cpp
index 10a4c50e038..7f40beda4ec 100644
--- a/MeshLib/IO/MPI_IO/NodePartitionedMeshReader.cpp
+++ b/MeshLib/IO/MPI_IO/NodePartitionedMeshReader.cpp
@@ -383,8 +383,8 @@ MeshLib::NodePartitionedMesh* NodePartitionedMeshReader::newMesh(
 {
     return new MeshLib::NodePartitionedMesh(
         mesh_name, mesh_nodes, glb_node_ids, mesh_elems, properties,
-        _mesh_info.global_base_nodes, _mesh_info.global_nodes,
-        _mesh_info.active_base_nodes, _mesh_info.active_nodes);
+        _mesh_info.global_nodes, _mesh_info.active_base_nodes,
+        _mesh_info.active_nodes);
 }
 
 void NodePartitionedMeshReader::setNodes(
diff --git a/MeshLib/IO/MPI_IO/NodePartitionedMeshReader.h b/MeshLib/IO/MPI_IO/NodePartitionedMeshReader.h
index 4a011385151..4930cc3204e 100644
--- a/MeshLib/IO/MPI_IO/NodePartitionedMeshReader.h
+++ b/MeshLib/IO/MPI_IO/NodePartitionedMeshReader.h
@@ -89,8 +89,9 @@ private:
                                           /// linear element of a partition,
         unsigned long
             active_nodes;  ///< 5: Number of all active nodes a partition,
-        unsigned long global_base_nodes;  ///< 6: Number of nodes for linear
-                                          /// element of global mesh,
+        unsigned long global_base_nodes;  ///< 6: unused, previously number of
+                                          /// nodes for linear element of global
+                                          /// mesh,
         unsigned long global_nodes;  ///< 7: Number of all nodes of global mesh,
         unsigned long offset[5];   ///< 8~12: Offsets of positions of partitions
                                    /// in the data arrays.
diff --git a/MeshLib/NodePartitionedMesh.h b/MeshLib/NodePartitionedMesh.h
index 8080bd0a7b0..7e83b7f9fc0 100644
--- a/MeshLib/NodePartitionedMesh.h
+++ b/MeshLib/NodePartitionedMesh.h
@@ -34,7 +34,6 @@ public:
     explicit NodePartitionedMesh(const Mesh& mesh)
         : Mesh(mesh),
           _global_node_ids(mesh.getNumberOfNodes()),
-          _n_global_base_nodes(mesh.getNumberOfBaseNodes()),
           _n_global_nodes(mesh.getNumberOfNodes()),
           _n_active_base_nodes(mesh.getNumberOfBaseNodes()),
           _n_active_nodes(mesh.getNumberOfNodes()),
@@ -57,7 +56,6 @@ public:
         \param elements      Vector for elements. Ghost elements are stored
                              after regular (non-ghost) elements.
         \param properties    Mesh property.
-        \param n_global_base_nodes Number of the base nodes of the global mesh.
         \param n_global_nodes      Number of all nodes of the global mesh.
         \param n_active_base_nodes Number of the active base nodes.
         \param n_active_nodes      Number of all active nodes.
@@ -67,13 +65,11 @@ public:
                         const std::vector<std::size_t>& glb_node_ids,
                         const std::vector<Element*>& elements,
                         Properties properties,
-                        const std::size_t n_global_base_nodes,
                         const std::size_t n_global_nodes,
                         const std::size_t n_active_base_nodes,
                         const std::size_t n_active_nodes)
         : Mesh(name, nodes, elements, properties),
           _global_node_ids(glb_node_ids),
-          _n_global_base_nodes(n_global_base_nodes),
           _n_global_nodes(n_global_nodes),
           _n_active_base_nodes(n_active_base_nodes),
           _n_active_nodes(n_active_nodes),
@@ -81,12 +77,6 @@ public:
     {
     }
 
-    /// Get the number of nodes of the global mesh for linear elements.
-    std::size_t getNumberOfGlobalBaseNodes() const
-    {
-        return _n_global_base_nodes;
-    }
-
     /// Get the number of all nodes of the global mesh.
     std::size_t getNumberOfGlobalNodes() const { return _n_global_nodes; }
     /// Get the global node ID of a node with its local ID.
@@ -147,9 +137,6 @@ private:
     /// Global IDs of nodes of a partition
     std::vector<std::size_t> _global_node_ids;
 
-    /// Number of the nodes of the global mesh linear interpolations.
-    std::size_t _n_global_base_nodes;
-
     /// Number of all nodes of the global mesh.
     std::size_t _n_global_nodes;
 
-- 
GitLab