From 0294ce64b333d3491e8606551c1fcd88b8e43ab0 Mon Sep 17 00:00:00 2001 From: Andreas Lauser <and@poware.org> Date: Mon, 20 Jun 2011 17:09:40 +0000 Subject: [PATCH] VtkMultWriter: remove yet another DUNE-2.1 ism git-svn-id: svn://svn.iws.uni-stuttgart.de/DUMUX/dumux/trunk@6033 2fb0f335-1f38-0410-981e-8018bf24f1b0 --- dumux/io/vtkmultiwriter.hh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/dumux/io/vtkmultiwriter.hh b/dumux/io/vtkmultiwriter.hh index 28942d833c..03bd61e008 100644 --- a/dumux/io/vtkmultiwriter.hh +++ b/dumux/io/vtkmultiwriter.hh @@ -59,8 +59,24 @@ class VtkMultiWriter typedef typename GridView::Grid Grid; enum { dim = GridView::dimension }; +#if DUNE_VERSION_NEWER_REV(GRID, 2, 0, 99) + // DUNE 2.1 and above typedef Dune::MultipleCodimMultipleGeomTypeMapper<GridView, Dune::MCMGVertexLayout> VertexMapper; typedef Dune::MultipleCodimMultipleGeomTypeMapper<GridView, Dune::MCMGElementLayout> ElementMapper; +#else + // DUNE 2.0 and below + template<int dim> + struct VertexLayout { + bool contains (Dune::GeometryType gt) const + { return gt.dim() == 0; } }; + template<int dim> + struct ElementLayout { + bool contains (Dune::GeometryType gt) const + { return gt.dim() == dim; } }; + + typedef Dune::MultipleCodimMultipleGeomTypeMapper<GridView, VertexLayout> VertexMapper; + typedef Dune::MultipleCodimMultipleGeomTypeMapper<GridView, ElementLayout> ElementMapper; +#endif // this constructor won't work anymore. Please use the variant // below which also includes the GridView as an argument. -- GitLab