diff --git a/test/localgeodesicfestiffnesstest.cc b/test/localgeodesicfestiffnesstest.cc index 59115871f7d8ba5d6cfd3d234016f2cf8233fe95..dfef341857585afa6d55143311abfdcf9bba5574 100644 --- a/test/localgeodesicfestiffnesstest.cc +++ b/test/localgeodesicfestiffnesstest.cc @@ -11,10 +11,14 @@ #include "multiindex.hh" #include "valuefactory.hh" -typedef UnitVector<3> TargetSpace; using namespace Dune; +//typedef std::conditional<domainDim==1,OneDGrid,UGGrid<domainDim> >::type GridType; +typedef OneDGrid GridType; + + + @@ -55,26 +59,13 @@ energy(const Entity& element, } - - - - - - - - - - template <int domainDim> -void testUnitVector3d() +GridType* makeTestGrid() { // //////////////////////////////////////////////////////// // Make a test grid consisting of a single simplex // //////////////////////////////////////////////////////// - //typedef std::conditional<domainDim==1,OneDGrid,UGGrid<domainDim> >::type GridType; - typedef OneDGrid GridType; - GridFactory<GridType> factory; FieldVector<double,domainDim> pos(0); @@ -91,8 +82,21 @@ void testUnitVector3d() v[i] = i; factory.insertElement(GeometryType(GeometryType::simplex,domainDim), v); - const GridType* grid = factory.createGrid(); - + return factory.createGrid(); +} + + + + + + + + + +template <class TargetSpace, int domainDim> +void testHessian() +{ + const GridType* grid = makeTestGrid<domainDim>(); // ////////////////////////////////////////////////////////// // Test whether the energy is invariant under isometries @@ -180,5 +184,5 @@ void testUnitVector3d() int main(int argc, char** argv) { - testUnitVector3d<1>(); + testHessian<UnitVector<3>, 1>(); }