From 3402591210070bd1d323b730b2c04818813dfa7e Mon Sep 17 00:00:00 2001
From: Oliver Sander <oliver.sander@tu-dresden.de>
Date: Fri, 11 Oct 2019 21:54:54 +0200
Subject: [PATCH] Generalize for different target spaces

---
 test/harmonicenergytest.cc | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/test/harmonicenergytest.cc b/test/harmonicenergytest.cc
index 21e418a1..c73e15e1 100644
--- a/test/harmonicenergytest.cc
+++ b/test/harmonicenergytest.cc
@@ -13,7 +13,6 @@
 
 const int dim = 2;
 
-typedef UnitVector<double,3> TargetSpace;
 
 using namespace Dune;
 
@@ -28,7 +27,7 @@ double diameter(const std::vector<TargetSpace>& v)
     return d;
 }
 
-template <class Basis>
+template <class Basis, class TargetSpace>
 void testEnergy(const Basis& basis, const std::vector<TargetSpace>& coefficients)
 {
     using GridView = typename Basis::GridView;
@@ -62,8 +61,8 @@ void testEnergy(const Basis& basis, const std::vector<TargetSpace>& coefficients
 }
 
 
-template <int domainDim>
-void testUnitVector3d()
+template <int domainDim, class TargetSpace>
+void test()
 {
     // ////////////////////////////////////////////////////////
     //   Make a test grid consisting of a single simplex
@@ -128,5 +127,5 @@ int main(int argc, char** argv)
 {
     MPIHelper::instance(argc, argv);
 
-    testUnitVector3d<2>();
+    test<2,UnitVector<double,3> >();
 }
-- 
GitLab