From 0c2d25679d7c58c13a0ffab5db2794f227bdeaf3 Mon Sep 17 00:00:00 2001
From: Bernd Flemisch <bernd@iws.uni-stuttgart.de>
Date: Tue, 10 Sep 2013 15:44:58 +0000
Subject: [PATCH] implicit models: get rid of more DUNE 2.3 warnings for using
 GenericReferenceElement(s)

git-svn-id: svn://svn.iws.uni-stuttgart.de/DUMUX/dumux/trunk@11449 2fb0f335-1f38-0410-981e-8018bf24f1b0
---
 dumux/implicit/2pdfm/2pdfmvolumevariables.hh | 12 ++++++++++--
 dumux/implicit/box/intersectiontovertexbc.hh |  5 +++++
 2 files changed, 15 insertions(+), 2 deletions(-)

diff --git a/dumux/implicit/2pdfm/2pdfmvolumevariables.hh b/dumux/implicit/2pdfm/2pdfmvolumevariables.hh
index 43c15d7322..bda625538a 100644
--- a/dumux/implicit/2pdfm/2pdfmvolumevariables.hh
+++ b/dumux/implicit/2pdfm/2pdfmvolumevariables.hh
@@ -66,6 +66,15 @@ class TwoPDFMVolumeVariables : public TwoPVolumeVariables<TypeTag>
     typedef typename GridView::template Codim<0>::Entity Element;
     typedef typename GET_PROP_TYPE(TypeTag, Grid) GridType;
     typedef typename GridType::ctype DT;
+
+#if DUNE_VERSION_NEWER(DUNE_GRID, 2, 3)
+    typedef typename Dune::ReferenceElements<DT, dim> ReferenceElements;
+    typedef typename Dune::ReferenceElement<DT, dim> ReferenceElement;
+#else
+    typedef typename Dune::GenericReferenceElements<DT, dim> ReferenceElements;
+    typedef typename Dune::GenericReferenceElement<DT, dim> ReferenceElement;
+#endif
+
     enum {
             dim = GridView::dimension,
             dimWorld = GridView::dimensionworld
@@ -255,8 +264,7 @@ public:
     {
         Scalar volSCVFracture;
         Dune::GeometryType gt = element.geometry().type();
-        const typename Dune::GenericReferenceElementContainer<DT,dim>::value_type&
-            refElement = Dune::GenericReferenceElements<DT,dim>::general(gt);
+        const ReferenceElement &refElement = ReferenceElements::general(gt);
 
         for (int faceIdx=0; faceIdx<refElement.size(1); faceIdx++)
         {
diff --git a/dumux/implicit/box/intersectiontovertexbc.hh b/dumux/implicit/box/intersectiontovertexbc.hh
index 8f086f622a..a4f3231e54 100644
--- a/dumux/implicit/box/intersectiontovertexbc.hh
+++ b/dumux/implicit/box/intersectiontovertexbc.hh
@@ -49,8 +49,13 @@ class IntersectionToVertexBC
     typedef typename GridView::IntersectionIterator IntersectionIterator;
     typedef typename GridView::template Codim<dim>::Entity Vertex;
 
+#if DUNE_VERSION_NEWER(DUNE_GRID, 2, 3)
+    typedef typename Dune::ReferenceElements<Scalar, dim> ReferenceElements;
+    typedef typename Dune::ReferenceElement<Scalar, dim> ReferenceElement;
+#else
     typedef typename Dune::GenericReferenceElements<Scalar, dim> ReferenceElements;
     typedef typename Dune::GenericReferenceElement<Scalar, dim> ReferenceElement;
+#endif
 
 public:
     IntersectionToVertexBC(const Problem& problem)
-- 
GitLab