diff --git a/dumux/common/start.hh b/dumux/common/start.hh index 09d29d5c4c7d53e5f5cb0f66338359d242174914..27d06f066ccefbbade845cc0c9f9006068bb5054 100644 --- a/dumux/common/start.hh +++ b/dumux/common/start.hh @@ -29,7 +29,16 @@ #include <dune/grid/io/file/dgfparser.hh> #include <dune/common/mpihelper.hh> #include <iostream> -//#include <dune/common/parametertreeparser.hh> + +#include <dune/common/version.hh> + +#define HAVE_DUNE21 \ + (DUNE_COMMON_VERSION_MAJOR > 2 \ + || (DUNE_COMMON_VERSION_MAJOR == 2 && DUNE_COMMON_VERSION_MINOR >= 1)) + +#if HAVE_DUNE21 //DUNE_VERSION_NEWER_REV(COMMON, 2, 0, 99) +#include <dune/common/parametertreeparser.hh> +#endif // DUNE_VERSION_NEWER_REV(COMMON, 2, 0, 99) namespace Dumux @@ -229,10 +238,7 @@ int startWithGrid(const typename GET_PROP_TYPE(TypeTag, PTAG(Grid)) &grid, return 3; }; -/////// -// commented out, because it does not work with dune 2.0 -/////// -#if DUNE_VERSION_NEWER_REV(GRID, 2, 0, 99) +#if HAVE_DUNE21 //DUNE_VERSION_NEWER_REV(COMMON, 2, 0, 99) // requires DUNE 2.1 and above /*! @@ -329,7 +335,7 @@ int startFromInputFile(int argc, char **argv) return 3; } -#endif // DUNE_VERSION_NEWER_REV(GRID, 2, 0, 99) +#endif // DUNE_VERSION_NEWER_REV(COMMON, 2, 0, 99) } diff --git a/dumux/io/vtkmultiwriter.hh b/dumux/io/vtkmultiwriter.hh index 8501f3b0f54df6d7fa4ddcf5cd853bbde201dfa0..ac3b9c9b9b66fe711e2deb8161fdcd81cb6f0ab3 100644 --- a/dumux/io/vtkmultiwriter.hh +++ b/dumux/io/vtkmultiwriter.hh @@ -59,7 +59,7 @@ class VtkMultiWriter typedef typename GridView::Grid Grid; enum { dim = GridView::dimension }; -#if DUNE_VERSION_NEWER_REV(GRID, 2, 0, 99) +#if DUNE_VERSION_NEWER_REV(GRID, 2, 1, 0) // DUNE 2.1 and above typedef Dune::MultipleCodimMultipleGeomTypeMapper<GridView, Dune::MCMGVertexLayout> VertexMapper; typedef Dune::MultipleCodimMultipleGeomTypeMapper<GridView, Dune::MCMGElementLayout> ElementMapper; diff --git a/dumux/io/vtknestedfunction.hh b/dumux/io/vtknestedfunction.hh index 551f6cc7c32cbbd22c82d6f008d964c3b69052bb..98c50d1db74345cee7f155c8410c1380aae8fcf8 100644 --- a/dumux/io/vtknestedfunction.hh +++ b/dumux/io/vtknestedfunction.hh @@ -29,7 +29,7 @@ #include <dune/istl/bvector.hh> #include <dune/common/version.hh> -#if DUNE_VERSION_NEWER_REV(GRID, 2, 0, 99) +#if DUNE_VERSION_NEWER_REV(GRID, 2, 1, 0) // DUNE 2.1 and above #include <dune/grid/io/file/vtk/function.hh> #else