From a18108b625a2b38153a97f2374160a864d254f29 Mon Sep 17 00:00:00 2001
From: Oliver Sander <sander@igpm.rwth-aachen.de>
Date: Wed, 21 Apr 2010 21:20:24 +0000
Subject: [PATCH] test a constant function as well

[[Imported from SVN: r5918]]
---
 test/localgeodesicfefunctiontest.cc | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/test/localgeodesicfefunctiontest.cc b/test/localgeodesicfefunctiontest.cc
index b3ab0d3e..a7605dea 100644
--- a/test/localgeodesicfefunctiontest.cc
+++ b/test/localgeodesicfefunctiontest.cc
@@ -143,6 +143,7 @@ void testUnitVectors()
 
     std::vector<TargetSpace> corners(dim+1);
 
+    // test some simplex
     FieldVector<double,3> input;
     input[0] = 1;  input[1] = 0;  input[2] = 0;
     corners[0] = input;
@@ -153,6 +154,15 @@ void testUnitVectors()
 
     testPermutationInvariance(corners);
     testDerivative(corners);
+
+    // test the constant function, i.e., everything is mapped onto a single point
+    input[0] = 1;  input[1] = 0;  input[2] = 0;
+    corners[0] = input;
+    corners[1] = input;
+    corners[2] = input;
+
+    testPermutationInvariance(corners);
+    testDerivative(corners);
 }
 
 void testUnitVectors2()
-- 
GitLab