From 1da08bb11b0a59d6845507ed5e438d75a2a4b9f3 Mon Sep 17 00:00:00 2001
From: Oliver Sander <sander@igpm.rwth-aachen.de>
Date: Fri, 1 Apr 2011 14:13:03 +0000
Subject: [PATCH] rename method arguments a and b to p and q, to conform with
 the paper

[[Imported from SVN: r7052]]
---
 dune/gfe/unitvector.hh | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/dune/gfe/unitvector.hh b/dune/gfe/unitvector.hh
index 33bf719f..2beb276a 100644
--- a/dune/gfe/unitvector.hh
+++ b/dune/gfe/unitvector.hh
@@ -227,11 +227,11 @@ public:
 
     Unlike the distance itself the squared distance is differentiable at zero
      */
-    static Tensor3<double,N,N,N> thirdDerivativeOfDistanceSquaredWRTFirst1AndSecond2Argument(const UnitVector& a, const UnitVector& b) {
+    static Tensor3<double,N,N,N> thirdDerivativeOfDistanceSquaredWRTFirst1AndSecond2Argument(const UnitVector& p, const UnitVector& q) {
 
         Tensor3<double,N,N,N> result;
 
-        double sp = a.data_ * b.data_;
+        double sp = p.data_ * q.data_;
         
         // The identity matrix
         Dune::FieldMatrix<double,N,N> identity(0);
@@ -242,22 +242,22 @@ public:
         Dune::FieldMatrix<double,N,N> projection;
         for (int i=0; i<N; i++)
             for (int j=0; j<N; j++)
-                projection[i][j] = (i==j) - b.globalCoordinates()[i]*b.globalCoordinates()[j];
+                projection[i][j] = (i==j) - q.globalCoordinates()[i]*q.globalCoordinates()[j];
         
         // The derivative of the projection matrix at b with respect to b
         Dune::FieldMatrix<double,N,N> derivativeProjection;
         for (int i=0; i<N; i++)
             for (int j=0; j<N; j++)
-                derivativeProjection[i][j] = -sp*(i==j) - b.globalCoordinates()[i]*a.globalCoordinates()[j];
+                derivativeProjection[i][j] = -sp*(i==j) - q.globalCoordinates()[i]*p.globalCoordinates()[j];
 
-        Dune::FieldVector<double,N> aProjected = b.projectOntoTangentSpace(a.globalCoordinates());
+        Dune::FieldVector<double,N> pProjected = q.projectOntoTangentSpace(p.globalCoordinates());
         
-        result = thirdDerivativeOfArcCosSquared(sp)  * Tensor3<double,N,N,N>::product(b.globalCoordinates(),a.globalCoordinates(),aProjected)
-                + secondDerivativeOfArcCosSquared(sp) * (Tensor3<double,N,N,N>::product(identity,aProjected)
-                                                         + Tensor3<double,N,N,N>::product(a.globalCoordinates(),projection)
-                                                         + Tensor3<double,N,N,N>::product(b.globalCoordinates(),derivativeProjection))
-               - derivativeOfArcCosSquared(sp)       * Tensor3<double,N,N,N>::product(identity,b.globalCoordinates())
-               - derivativeOfArcCosSquared(sp)       * Tensor3<double,N,N,N>::product(b.globalCoordinates(),identity);
+        result = thirdDerivativeOfArcCosSquared(sp)  * Tensor3<double,N,N,N>::product(q.globalCoordinates(),p.globalCoordinates(),pProjected)
+                + secondDerivativeOfArcCosSquared(sp) * (Tensor3<double,N,N,N>::product(identity,pProjected)
+                                                         + Tensor3<double,N,N,N>::product(p.globalCoordinates(),projection)
+                                                         + Tensor3<double,N,N,N>::product(q.globalCoordinates(),derivativeProjection))
+               - derivativeOfArcCosSquared(sp)       * Tensor3<double,N,N,N>::product(identity,q.globalCoordinates())
+               - derivativeOfArcCosSquared(sp)       * Tensor3<double,N,N,N>::product(q.globalCoordinates(),identity);
                
         return result;
     }
-- 
GitLab