From 3371f78e4a141f19ece47ea5e2d27238e8ba43d8 Mon Sep 17 00:00:00 2001
From: Oliver Sander <oliver.sander@tu-dresden.de>
Date: Tue, 22 Mar 2016 16:00:03 +0100
Subject: [PATCH] Stop using vtkadapter.hh, it is not needed with dune-grid
 2.4.1 and later

---
 src/gradient-flow.cc | 11 -----------
 1 file changed, 11 deletions(-)

diff --git a/src/gradient-flow.cc b/src/gradient-flow.cc
index b461b658..c0f57032 100644
--- a/src/gradient-flow.cc
+++ b/src/gradient-flow.cc
@@ -19,9 +19,6 @@
 #include <dune/grid/io/file/gmshreader.hh>
 #include <dune/grid/io/file/vtk.hh>
 
-#if ! DUNE_VERSION_NEWER(DUNE_FUNCTIONS, 2, 5)
-#include <dune/functions/common/vtkadapter.hh>
-#endif
 #include <dune/functions/gridfunctions/discreteglobalbasisfunction.hh>
 #include <dune/functions/functionspacebases/pqknodalbasis.hh>
 
@@ -246,11 +243,7 @@ int main (int argc, char *argv[]) try
                                                                                                  xEmbedded);
 
   SubsamplingVTKWriter<GridType::LeafGridView> vtkWriter(grid->leafGridView(),0);
-#if DUNE_VERSION_NEWER(DUNE_FUNCTIONS, 2, 5)
   vtkWriter.addVertexData(xFunction, VTK::FieldInfo("orientation", VTK::FieldInfo::Type::scalar, xEmbedded[0].size()));
-#else
-  vtkWriter.addVertexData(vtkFunction(xFunction), VTK::FieldInfo("orientation", VTK::FieldInfo::Type::scalar, xEmbedded[0].size()));
-#endif
   vtkWriter.write("gradientflow_result_0");
 
   // Write the corresponding coefficient vector: verbatim in binary, to be completely lossless
@@ -290,11 +283,7 @@ int main (int argc, char *argv[]) try
                                                                                                    xEmbedded);
 
     SubsamplingVTKWriter<GridType::LeafGridView> vtkWriter(grid->leafGridView(),0);
-#if DUNE_VERSION_NEWER(DUNE_FUNCTIONS, 2, 5)
     vtkWriter.addVertexData(xFunction, VTK::FieldInfo("orientation", VTK::FieldInfo::Type::scalar, xEmbedded[0].size()));
-#else
-    vtkWriter.addVertexData(vtkFunction(xFunction), VTK::FieldInfo("orientation", VTK::FieldInfo::Type::scalar, xEmbedded[0].size()));
-#endif
     vtkWriter.write("gradientflow_result_" + std::to_string(i+1));
 
     // Write the corresponding coefficient vector: verbatim in binary, to be completely lossless
-- 
GitLab