From 1bb731cb737dbca0ee12be6e2c75b93e10a8cab4 Mon Sep 17 00:00:00 2001
From: Thomas Fischer <thomas.fischer@ufz.de>
Date: Fri, 17 Jun 2016 10:55:04 +0200
Subject: [PATCH] [MeL] Remove unused Element::getNumberOfFaceNodes.

---
 MeshLib/Elements/EdgeRule.h        |  3 ---
 MeshLib/Elements/Element.h         |  3 ---
 MeshLib/Elements/FaceRule.h        |  3 ---
 MeshLib/Elements/HexRule20.h       |  3 ---
 MeshLib/Elements/HexRule8.h        |  3 ---
 MeshLib/Elements/PrismRule15.cpp   | 10 +---------
 MeshLib/Elements/PrismRule15.h     |  3 ---
 MeshLib/Elements/PrismRule6.cpp    | 10 +---------
 MeshLib/Elements/PrismRule6.h      |  3 ---
 MeshLib/Elements/PyramidRule13.cpp | 10 +---------
 MeshLib/Elements/PyramidRule13.h   |  3 ---
 MeshLib/Elements/PyramidRule5.cpp  | 10 +---------
 MeshLib/Elements/PyramidRule5.h    |  3 ---
 MeshLib/Elements/TemplateElement.h |  3 ---
 MeshLib/Elements/TetRule10.h       |  3 ---
 MeshLib/Elements/TetRule4.h        |  3 ---
 MeshLib/Elements/VertexRule.h      |  6 ------
 17 files changed, 4 insertions(+), 78 deletions(-)

diff --git a/MeshLib/Elements/EdgeRule.h b/MeshLib/Elements/EdgeRule.h
index e7cd1e02598..4cc0c48fecf 100644
--- a/MeshLib/Elements/EdgeRule.h
+++ b/MeshLib/Elements/EdgeRule.h
@@ -27,9 +27,6 @@ public:
     /// Constant: The number of edges
     static const unsigned n_edges = 0;
 
-    /// Get the number of nodes for face i.
-    static unsigned getNumberOfFaceNodes(unsigned /*i*/) { return 0; }
-
     /// Returns the i-th face of the element.
     static const Element* getFace(const Element* /*e*/, unsigned /*i*/) { return nullptr; }
 
diff --git a/MeshLib/Elements/Element.h b/MeshLib/Elements/Element.h
index ec6ce23d86f..c72f2809f6a 100644
--- a/MeshLib/Elements/Element.h
+++ b/MeshLib/Elements/Element.h
@@ -94,9 +94,6 @@ public:
     /// Get the number of edges for this element.
     virtual unsigned getNumberOfEdges() const = 0;
 
-    /// Get the number of nodes for face i.
-    virtual unsigned getNumberOfFaceNodes(unsigned i) const = 0;
-
     /// Get the number of faces for this element.
     virtual unsigned getNumberOfFaces() const = 0;
 
diff --git a/MeshLib/Elements/FaceRule.h b/MeshLib/Elements/FaceRule.h
index fec27ce9315..2b612af0409 100644
--- a/MeshLib/Elements/FaceRule.h
+++ b/MeshLib/Elements/FaceRule.h
@@ -25,9 +25,6 @@ public:
     /// Returns the face i of the element.
     static const Element* getFace(const Element* e, unsigned i) { return e->getEdge(i); }
 
-    /// Get the number of nodes for face i.
-    static unsigned getNumberOfFaceNodes(unsigned /*i*/) { return 2; }
-
     /// Constant: The number of faces
     static const unsigned n_faces = 0;
 
diff --git a/MeshLib/Elements/HexRule20.h b/MeshLib/Elements/HexRule20.h
index b3a46bfb7f4..92045b17aa6 100644
--- a/MeshLib/Elements/HexRule20.h
+++ b/MeshLib/Elements/HexRule20.h
@@ -61,9 +61,6 @@ public:
     /// Returns the i-th edge of the element.
     typedef QuadraticEdgeReturn EdgeReturn;
 
-    /// Get the number of nodes for face i.
-    static unsigned getNumberOfFaceNodes(unsigned /*i*/) { return 8; }
-
     /// Returns the i-th face of the element.
     static const Element* getFace(const Element* e, unsigned i);
 
diff --git a/MeshLib/Elements/HexRule8.h b/MeshLib/Elements/HexRule8.h
index dd8c40619bb..9c6bbf64ca8 100644
--- a/MeshLib/Elements/HexRule8.h
+++ b/MeshLib/Elements/HexRule8.h
@@ -76,9 +76,6 @@ public:
     /// Returns the i-th edge of the element.
     typedef LinearEdgeReturn EdgeReturn;
 
-    /// Get the number of nodes for face i.
-    static unsigned getNumberOfFaceNodes(unsigned /*i*/) { return 4; }
-
     /// Returns the i-th face of the element.
     static const Element* getFace(const Element* e, unsigned i);
 
diff --git a/MeshLib/Elements/PrismRule15.cpp b/MeshLib/Elements/PrismRule15.cpp
index 80e24a8b474..4031802c356 100644
--- a/MeshLib/Elements/PrismRule15.cpp
+++ b/MeshLib/Elements/PrismRule15.cpp
@@ -41,19 +41,11 @@ const unsigned PrismRule15::edge_nodes[9][3] =
 
 const unsigned PrismRule15::n_face_nodes[5] = { 6, 8, 8, 8, 6 };
 
-unsigned PrismRule15::getNumberOfFaceNodes(unsigned i)
-{
-    if (i<5)
-        return n_face_nodes[i];
-    ERR("Error in MeshLib::Element::getNumberOfFaceNodes() - Index %d does not exist.", i);
-    return 0;
-}
-
 const Element* PrismRule15::getFace(const Element* e, unsigned i)
 {
     if (i < n_faces)
     {
-        unsigned nFaceNodes (e->getNumberOfFaceNodes(i));
+        unsigned nFaceNodes(PrismRule15::n_face_nodes[i]);
         Node** nodes = new Node*[nFaceNodes];
         for (unsigned j=0; j<nFaceNodes; j++)
             nodes[j] = const_cast<Node*>(e->getNode(face_nodes[i][j]));
diff --git a/MeshLib/Elements/PrismRule15.h b/MeshLib/Elements/PrismRule15.h
index 740cd0d4fba..6eed3e97a4e 100644
--- a/MeshLib/Elements/PrismRule15.h
+++ b/MeshLib/Elements/PrismRule15.h
@@ -62,9 +62,6 @@ public:
     /// Returns the i-th edge of the element.
     typedef QuadraticEdgeReturn EdgeReturn;
 
-    /// Get the number of nodes for face i.
-    static unsigned getNumberOfFaceNodes(unsigned i);
-
     /// Returns the i-th face of the element.
     static const Element* getFace(const Element* e, unsigned i);
 
diff --git a/MeshLib/Elements/PrismRule6.cpp b/MeshLib/Elements/PrismRule6.cpp
index 33dcd368860..46e227b2360 100644
--- a/MeshLib/Elements/PrismRule6.cpp
+++ b/MeshLib/Elements/PrismRule6.cpp
@@ -43,19 +43,11 @@ const unsigned PrismRule6::edge_nodes[9][2] =
 
 const unsigned PrismRule6::n_face_nodes[5] = { 3, 4, 4, 4, 3 };
 
-unsigned PrismRule6::getNumberOfFaceNodes(unsigned i)
-{
-    if (i<5)
-        return n_face_nodes[i];
-    ERR("Error in MeshLib::Element::getNumberOfFaceNodes() - Index %d does not exist.", i);
-    return 0;
-}
-
 const Element* PrismRule6::getFace(const Element* e, unsigned i)
 {
     if (i < n_faces)
     {
-        unsigned nFaceNodes (e->getNumberOfFaceNodes(i));
+        unsigned nFaceNodes(PrismRule6::n_face_nodes[i]);
         Node** nodes = new Node*[nFaceNodes];
         for (unsigned j=0; j<nFaceNodes; j++)
             nodes[j] = const_cast<Node*>(e->getNode(face_nodes[i][j]));
diff --git a/MeshLib/Elements/PrismRule6.h b/MeshLib/Elements/PrismRule6.h
index 08ab94f4802..0630d52ecfe 100644
--- a/MeshLib/Elements/PrismRule6.h
+++ b/MeshLib/Elements/PrismRule6.h
@@ -77,9 +77,6 @@ public:
     /// Returns the i-th edge of the element.
     typedef LinearEdgeReturn EdgeReturn;
 
-    /// Get the number of nodes for face i.
-    static unsigned getNumberOfFaceNodes(unsigned i);
-
     /// Returns the i-th face of the element.
     static const Element* getFace(const Element* e, unsigned i);
 
diff --git a/MeshLib/Elements/PyramidRule13.cpp b/MeshLib/Elements/PyramidRule13.cpp
index 03329440a83..941f693ca45 100644
--- a/MeshLib/Elements/PyramidRule13.cpp
+++ b/MeshLib/Elements/PyramidRule13.cpp
@@ -40,19 +40,11 @@ const unsigned PyramidRule13::edge_nodes[8][3] =
 
 const unsigned PyramidRule13::n_face_nodes[5] = { 6, 6, 6, 6, 8 };
 
-unsigned PyramidRule13::getNumberOfFaceNodes(unsigned i)
-{
-    if (i<5)
-        return n_face_nodes[i];
-    ERR("Error in MeshLib::Element::getNumberOfFaceNodes() - Index %d does not exist.", i);
-    return 0;
-}
-
 const Element* PyramidRule13::getFace(const Element* e, unsigned i)
 {
     if (i<e->getNumberOfFaces())
     {
-        unsigned nFaceNodes (e->getNumberOfFaceNodes(i));
+        unsigned nFaceNodes(PyramidRule13::n_face_nodes[i]);
         Node** nodes = new Node*[nFaceNodes];
         for (unsigned j=0; j<nFaceNodes; j++)
             nodes[j] = const_cast<Node*>(e->getNode(face_nodes[i][j]));
diff --git a/MeshLib/Elements/PyramidRule13.h b/MeshLib/Elements/PyramidRule13.h
index b5bf9c2bccb..b9230293730 100644
--- a/MeshLib/Elements/PyramidRule13.h
+++ b/MeshLib/Elements/PyramidRule13.h
@@ -61,9 +61,6 @@ public:
     /// Returns the i-th edge of the element.
     typedef QuadraticEdgeReturn EdgeReturn;
 
-    /// Get the number of nodes for face i.
-    static unsigned getNumberOfFaceNodes(unsigned i);
-
     /// Returns the i-th face of the element.
     static const Element* getFace(const Element* e, unsigned i);
 
diff --git a/MeshLib/Elements/PyramidRule5.cpp b/MeshLib/Elements/PyramidRule5.cpp
index 476aad78092..2ee24c2cfd5 100644
--- a/MeshLib/Elements/PyramidRule5.cpp
+++ b/MeshLib/Elements/PyramidRule5.cpp
@@ -42,19 +42,11 @@ const unsigned PyramidRule5::edge_nodes[8][2] =
 
 const unsigned PyramidRule5::n_face_nodes[5] = { 3, 3, 3, 3, 4 };
 
-unsigned PyramidRule5::getNumberOfFaceNodes(unsigned i)
-{
-    if (i<5)
-        return n_face_nodes[i];
-    ERR("Error in MeshLib::Element::getNumberOfFaceNodes() - Index %d does not exist.", i);
-    return 0;
-}
-
 const Element* PyramidRule5::getFace(const Element* e, unsigned i)
 {
     if (i<e->getNumberOfFaces())
     {
-        unsigned nFaceNodes (e->getNumberOfFaceNodes(i));
+        unsigned nFaceNodes(PyramidRule5::n_face_nodes[i]);
         Node** nodes = new Node*[nFaceNodes];
         for (unsigned j=0; j<nFaceNodes; j++)
             nodes[j] = const_cast<Node*>(e->getNode(face_nodes[i][j]));
diff --git a/MeshLib/Elements/PyramidRule5.h b/MeshLib/Elements/PyramidRule5.h
index 6e268e55de5..803723984e0 100644
--- a/MeshLib/Elements/PyramidRule5.h
+++ b/MeshLib/Elements/PyramidRule5.h
@@ -76,9 +76,6 @@ public:
     /// Returns the i-th edge of the element.
     typedef LinearEdgeReturn EdgeReturn;
 
-    /// Get the number of nodes for face i.
-    static unsigned getNumberOfFaceNodes(unsigned i);
-
     /// Returns the i-th face of the element.
     static const Element* getFace(const Element* e, unsigned i);
 
diff --git a/MeshLib/Elements/TemplateElement.h b/MeshLib/Elements/TemplateElement.h
index 98e4ed3c576..cf178cbf7b3 100644
--- a/MeshLib/Elements/TemplateElement.h
+++ b/MeshLib/Elements/TemplateElement.h
@@ -81,9 +81,6 @@ public:
     /// Get the number of edges for this element.
     unsigned getNumberOfEdges() const { return ELEMENT_RULE::n_edges; }
 
-    /// Get the number of nodes for face i.
-    unsigned getNumberOfFaceNodes(unsigned i) const { return ELEMENT_RULE::getNumberOfFaceNodes(i); }
-
     /// Get the number of faces for this element.
     unsigned getNumberOfFaces() const { return ELEMENT_RULE::n_faces; }
 
diff --git a/MeshLib/Elements/TetRule10.h b/MeshLib/Elements/TetRule10.h
index dcd7ede8087..2657fa3b53e 100644
--- a/MeshLib/Elements/TetRule10.h
+++ b/MeshLib/Elements/TetRule10.h
@@ -56,9 +56,6 @@ public:
     /// Returns the i-th edge of the element.
     typedef QuadraticEdgeReturn EdgeReturn;
 
-    /// Get the number of nodes for face i.
-    static unsigned getNumberOfFaceNodes(unsigned /*i*/) { return 6; }
-
     /// Returns the i-th face of the element.
     static const Element* getFace(const Element* e, unsigned i);
 
diff --git a/MeshLib/Elements/TetRule4.h b/MeshLib/Elements/TetRule4.h
index ddee10f6122..53927c6272d 100644
--- a/MeshLib/Elements/TetRule4.h
+++ b/MeshLib/Elements/TetRule4.h
@@ -71,9 +71,6 @@ public:
     /// Returns the i-th edge of the element.
     typedef LinearEdgeReturn EdgeReturn;
 
-    /// Get the number of nodes for face i.
-    static unsigned getNumberOfFaceNodes(unsigned /*i*/) { return 3; }
-
     /// Returns the i-th face of the element.
     static const Element* getFace(const Element* e, unsigned i);
 
diff --git a/MeshLib/Elements/VertexRule.h b/MeshLib/Elements/VertexRule.h
index d609015f594..e4c894d5558 100644
--- a/MeshLib/Elements/VertexRule.h
+++ b/MeshLib/Elements/VertexRule.h
@@ -27,12 +27,6 @@ public:
     /// Constant: The number of edges
     static const unsigned n_edges = 0;
 
-    /// Get the number of nodes for face i.
-    static unsigned getNumberOfFaceNodes(unsigned /*i*/)
-    {
-        return 0;
-    }
-
     /// Returns the i-th face of the element.
     static const Element* getFace(const Element* /*e*/, unsigned /*i*/)
     {
-- 
GitLab