From 2ea31ce8d3e8fc2f5f616ebab60fe721366bff74 Mon Sep 17 00:00:00 2001
From: Oliver Sander <oliver.sander@tu-dresden.de>
Date: Thu, 10 Oct 2019 22:10:14 +0200
Subject: [PATCH] Remove method testDerivativeTangentiality

There is really no point in having this method.  Before it is called,
localgeodesicfefunctiontest already checks whether the derivative
is correct (by comparing with an FD approximation).  If a derivative
passes this test it MUST be tangential.  No need to check that
explicitly.
---
 test/localgeodesicfefunctiontest.cc | 47 -----------------------------
 1 file changed, 47 deletions(-)

diff --git a/test/localgeodesicfefunctiontest.cc b/test/localgeodesicfefunctiontest.cc
index 37f874f4..30ec726b 100644
--- a/test/localgeodesicfefunctiontest.cc
+++ b/test/localgeodesicfefunctiontest.cc
@@ -63,47 +63,6 @@ evaluateDerivativeFD(const LocalFunction& f, const Dune::FieldVector<ctype, dim>
 }
 
 
-template <int domainDim>
-void testDerivativeTangentiality(const RealTuple<double,1>& x,
-                                 const FieldMatrix<double,1,domainDim>& derivative)
-{
-    // By construction, derivatives of RealTuples are always tangent
-}
-
-// the columns of the derivative must be tangential to the manifold
-template <int domainDim, int vectorDim>
-void testDerivativeTangentiality(const UnitVector<double,vectorDim>& x,
-                                 const FieldMatrix<double,vectorDim,domainDim>& derivative)
-{
-    for (int i=0; i<domainDim; i++) {
-
-        // The i-th column is a tangent vector if its scalar product with the global coordinates
-        // of x vanishes.
-        double sp = 0;
-        for (int j=0; j<vectorDim; j++)
-            sp += x.globalCoordinates()[j] * derivative[j][i];
-
-        if (std::fabs(sp) > 1e-8)
-            DUNE_THROW(Dune::Exception, "Derivative is not tangential: Column: " << i << ",  product: " << sp);
-
-    }
-
-}
-
-// the columns of the derivative must be tangential to the manifold
-template <int domainDim, int vectorDim>
-void testDerivativeTangentiality(const Rotation<double,vectorDim-1>& x,
-                                 const FieldMatrix<double,vectorDim,domainDim>& derivative)
-{
-}
-
-// the columns of the derivative must be tangential to the manifold
-template <int domainDim, int vectorDim>
-void testDerivativeTangentiality(const RigidBodyMotion<double,3>& x,
-                                 const FieldMatrix<double,vectorDim,domainDim>& derivative)
-{
-}
-
 /** \brief Test whether interpolation is invariant under permutation of the simplex vertices
  * \todo Implement this for all dimensions
  */
@@ -194,8 +153,6 @@ void testDerivative(const LocalGeodesicFEFunction<domainDim,double,typename PQkL
             std::cout << "FD        : " << fdDerivative << std::endl;
         }
 
-        testDerivativeTangentiality(f.evaluate(quadPos), derivative);
-
     }
 }
 
@@ -239,8 +196,6 @@ void testDerivativeOfValueWRTCoefficients(const LocalGeodesicFEFunction<domainDi
                 assert(false);
             }
 
-            //testDerivativeTangentiality(f.evaluate(quadPos), derivative);
-
         }
         
     }
@@ -285,8 +240,6 @@ void testDerivativeOfGradientWRTCoefficients(const LocalGeodesicFEFunction<domai
                 assert(false);
             }
 
-            //testDerivativeTangentiality(f.evaluate(quadPos), derivative);
-
         }
         
     }
-- 
GitLab