From 87dd91f0f60dae4030e1841c70f50d94f9f64d3e Mon Sep 17 00:00:00 2001
From: Thomas Fischer <thomas.fischer@ufz.de>
Date: Wed, 15 Mar 2017 06:15:28 +0100
Subject: [PATCH] [A/U/MP] Readability: element_status -> is_regular_element

---
 .../PartitionMesh/NodeWiseMeshPartitioner.cpp               | 6 ++++--
 .../PartitionMesh/NodeWiseMeshPartitioner.h                 | 6 +-----
 2 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/Applications/Utils/ModelPreparation/PartitionMesh/NodeWiseMeshPartitioner.cpp b/Applications/Utils/ModelPreparation/PartitionMesh/NodeWiseMeshPartitioner.cpp
index 4cf92f0ecfc..9fc76aac8b3 100644
--- a/Applications/Utils/ModelPreparation/PartitionMesh/NodeWiseMeshPartitioner.cpp
+++ b/Applications/Utils/ModelPreparation/PartitionMesh/NodeWiseMeshPartitioner.cpp
@@ -110,10 +110,12 @@ void NodeWiseMeshPartitioner::findElementsInPartition(
 {
     auto& partition = _partitions[part_id];
     std::vector<MeshLib::Element*> const& elements = _mesh->getElements();
+    std::vector<bool> _is_regular_element(elements.size(), false);
+
     for (std::size_t elem_id = 0; elem_id < elements.size(); elem_id++)
     {
         const auto* elem = elements[elem_id];
-        if (_elements_status[elem_id])
+        if (_is_regular_element[elem_id])
             continue;
 
         std::size_t non_ghost_node_number = 0;
@@ -131,7 +133,7 @@ void NodeWiseMeshPartitioner::findElementsInPartition(
         if (non_ghost_node_number == elem->getNumberOfNodes())
         {
             partition.regular_elements.push_back(elem);
-            _elements_status[elem_id] = true;
+            _is_regular_element[elem_id] = true;
         }
         else
         {
diff --git a/Applications/Utils/ModelPreparation/PartitionMesh/NodeWiseMeshPartitioner.h b/Applications/Utils/ModelPreparation/PartitionMesh/NodeWiseMeshPartitioner.h
index 3ddd8f5288e..db7fb985b15 100644
--- a/Applications/Utils/ModelPreparation/PartitionMesh/NodeWiseMeshPartitioner.h
+++ b/Applications/Utils/ModelPreparation/PartitionMesh/NodeWiseMeshPartitioner.h
@@ -56,8 +56,7 @@ public:
           _partitioned_properties(),
           _mesh(std::move(mesh)),
           _nodes_global_ids(_mesh->getNumberOfNodes()),
-          _nodes_partition_ids(_mesh->getNumberOfNodes()),
-          _elements_status(_mesh->getNumberOfElements(), false)
+          _nodes_partition_ids(_mesh->getNumberOfNodes())
     {
     }
 
@@ -102,9 +101,6 @@ private:
     /// Partition IDs of each nodes.
     std::vector<std::size_t> _nodes_partition_ids;
 
-    /// Flags to indicate that whether elements are processed or not.
-    std::vector<bool> _elements_status;
-
     // Renumber the global indices of nodes,
     /// \param is_mixed_high_order_linear_elems Flag to indicate whether the
     /// elements of a mesh can be used for both linear and high order
-- 
GitLab