From abba5e60745acbdc4e4d4e1dba5bf0f9fdd4d5f0 Mon Sep 17 00:00:00 2001
From: Simon Praetorius <simon.praetorius@tu-dresden.de>
Date: Mon, 3 Sep 2018 15:58:07 +0200
Subject: [PATCH] removed variable template and cleanup of gitlab-ci file

---
 .gitlab-ci.yml          | 12 ++++++------
 dune.module             |  4 ++--
 dune/vtk/vtkfunction.hh |  6 +++---
 dune/vtk/vtktypes.hh    |  2 +-
 src/benchmark.cc        |  6 +-----
 src/pvdwriter.cc        |  8 --------
 6 files changed, 13 insertions(+), 25 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 0373c39..43cf69c 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -7,10 +7,10 @@ debian:10 clang-6-libcpp-17:
   image: registry.dune-project.org/docker/ci/dune:2.6-debian-10-clang-6-libcpp-17
   script: duneci-standard-test
 
-debian:9 gcc-6-14:
-  image: registry.dune-project.org/docker/ci/dune:2.6-debian-9-gcc-6-14
-  script: duneci-standard-test
+#debian:9 gcc-6-14:
+#  image: registry.dune-project.org/docker/ci/dune:2.6-debian-9-gcc-6-14
+#  script: duneci-standard-test
 
-ubuntu:18.04 clang-6-17:
-  image: registry.dune-project.org/docker/ci/dune:2.6-ubuntu-18.04-clang-6-17
-  script: duneci-standard-test
+#ubuntu:18.04 clang-6-17:
+#  image: registry.dune-project.org/docker/ci/dune:2.6-ubuntu-18.04-clang-6-17
+#  script: duneci-standard-test
diff --git a/dune.module b/dune.module
index 57ba738..747c6ad 100644
--- a/dune.module
+++ b/dune.module
@@ -7,5 +7,5 @@ Module: dune-vtk
 Version: 0.1
 Maintainer: simon.praetorius@tu-dresden.de
 #depending on
-Depends: dune-grid
-Suggests: dune-functions dune-spgrid dune-polygongrid
\ No newline at end of file
+Depends: dune-grid (>= 2.6)
+Suggests: dune-functions (>= 2.6) dune-spgrid dune-polygongrid
\ No newline at end of file
diff --git a/dune/vtk/vtkfunction.hh b/dune/vtk/vtkfunction.hh
index 148a065..c71d9f4 100644
--- a/dune/vtk/vtkfunction.hh
+++ b/dune/vtk/vtkfunction.hh
@@ -32,7 +32,7 @@ namespace Dune
   }
 
   template <class T>
-  constexpr int Size = Impl::SizeImpl<std::decay_t<T>>::value;
+  constexpr int sizeOf () { return Impl::SizeImpl<std::decay_t<T>>::value; }
 
 
   template <class GridView>
@@ -66,8 +66,8 @@ namespace Dune
     {
       using R = Range<decltype(localFunction(std::forward<F>(fct)))>;
 
-      ncomps_ = ncomps ? *ncomps : Size<R>;
-      type_ = type ? *type : Vtk::Map::type<R>;
+      ncomps_ = ncomps ? *ncomps : sizeOf<R>();
+      type_ = type ? *type : Vtk::Map::type<R>();
     }
 
     VtkFunction () = default;
diff --git a/dune/vtk/vtktypes.hh b/dune/vtk/vtktypes.hh
index 5e50c6a..435b75f 100644
--- a/dune/vtk/vtktypes.hh
+++ b/dune/vtk/vtktypes.hh
@@ -80,7 +80,7 @@ namespace Dune
       static constexpr DataTypes typeImpl (Type<long double>) { return FLOAT64; }
 
       template <class T>
-      static constexpr DataTypes type = typeImpl(Type<typename FieldTraits<T>::field_type>{});
+      static constexpr DataTypes type () { return typeImpl(Type<typename FieldTraits<T>::field_type>{}); }
     };
 
 
diff --git a/src/benchmark.cc b/src/benchmark.cc
index 2439c28..83e1200 100644
--- a/src/benchmark.cc
+++ b/src/benchmark.cc
@@ -12,7 +12,6 @@
 #include <dune/common/parallel/mpihelper.hh> // An initializer of MPI
 #include <dune/common/filledarray.hh>
 #include <dune/common/timer.hh>
-#include <dune/common/test/testsuite.hh>
 
 #include <dune/grid/uggrid.hh>
 #include <dune/grid/yaspgrid.hh>
@@ -76,12 +75,10 @@ int main (int argc, char** argv)
 {
   Dune::MPIHelper::instance(argc, argv);
 
-  TestSuite test{};
-
 #ifdef HAVE_UG
   // Test VtkWriter for UGGrid
   std::cout << "UGGrid\n";
-  Hybrid::forEach(std::make_tuple(int_<2>{}, int_<3>{}), [&test](auto dim)
+  Hybrid::forEach(std::make_tuple(int_<2>{}, int_<3>{}), [](auto dim)
   {
     using GridType = UGGrid<dim.value>;
     FieldVector<double,dim.value> lowerLeft; lowerLeft = 0.0;
@@ -109,5 +106,4 @@ int main (int argc, char** argv)
     writer_new(grid.leafGridView());
   });
 
-  return test.exit();
 }
diff --git a/src/pvdwriter.cc b/src/pvdwriter.cc
index 242b6cd..f415c7f 100644
--- a/src/pvdwriter.cc
+++ b/src/pvdwriter.cc
@@ -11,13 +11,8 @@
 #include <dune/common/parallel/mpihelper.hh> // An initializer of MPI
 #include <dune/common/exceptions.hh> // We use exceptions
 #include <dune/common/filledarray.hh>
-
-#include <dune/functions/functionspacebases/defaultglobalbasis.hh>
-#include <dune/functions/functionspacebases/lagrangebasis.hh>
 #include <dune/functions/gridfunctions/analyticgridviewfunction.hh>
-
 #include <dune/grid/yaspgrid.hh>
-
 #include <dune/vtk/pvdwriter.hh>
 #include <dune/vtk/writers/vtkunstructuredgridwriter.hh>
 
@@ -27,9 +22,6 @@ using namespace Dune::Functions;
 template <class GridView>
 void write (std::string prefix, GridView const& gridView)
 {
-  using namespace BasisFactory;
-  auto basis = makeBasis(gridView, lagrange<1>());
-
   FieldVector<double,GridView::dimensionworld> c;
   if (GridView::dimensionworld > 0) c[0] = 11.0;
   if (GridView::dimensionworld > 1) c[1] = 7.0;
-- 
GitLab