From 5266c28bfe3f861eb1b238f7a90086984ae3a750 Mon Sep 17 00:00:00 2001
From: Christoph Grueninger <christoph.grueninger@iws.uni-stuttgart.de>
Date: Tue, 22 Jan 2013 08:38:22 +0000
Subject: [PATCH] [2pdfm] Make compile without UG. (reviewed by bernd)

git-svn-id: svn://svn.iws.uni-stuttgart.de/DUMUX/dumux/trunk@10056 2fb0f335-1f38-0410-981e-8018bf24f1b0
---
 dumux/implicit/2pdfm/2pdfmlocalresidual.hh   | 2 +-
 dumux/implicit/2pdfm/2pdfmvolumevariables.hh | 2 +-
 test/implicit/2pdfm/2pdfmtestproblem.hh      | 1 +
 3 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/dumux/implicit/2pdfm/2pdfmlocalresidual.hh b/dumux/implicit/2pdfm/2pdfmlocalresidual.hh
index 2204ea0180..68c006bd84 100644
--- a/dumux/implicit/2pdfm/2pdfmlocalresidual.hh
+++ b/dumux/implicit/2pdfm/2pdfmlocalresidual.hh
@@ -55,7 +55,7 @@ protected:
         numPhases = GET_PROP_VALUE(TypeTag, NumPhases)
     };
     typedef typename GET_PROP_TYPE(TypeTag, GridView) GridView;
-    typedef Dune::UGGrid<2> GridType;
+    typedef typename GET_PROP_TYPE(TypeTag, Grid) GridType;
     typedef typename GridType::ctype DT;
     enum {
         dim = GridView::dimension,
diff --git a/dumux/implicit/2pdfm/2pdfmvolumevariables.hh b/dumux/implicit/2pdfm/2pdfmvolumevariables.hh
index a3911de2e8..22605f37ea 100644
--- a/dumux/implicit/2pdfm/2pdfmvolumevariables.hh
+++ b/dumux/implicit/2pdfm/2pdfmvolumevariables.hh
@@ -67,7 +67,7 @@ class TwoPDFMVolumeVariables : public TwoPVolumeVariables<TypeTag>
 
     typedef typename GET_PROP_TYPE(TypeTag, GridView) GridView;
     typedef typename GridView::template Codim<0>::Entity Element;
-    typedef Dune::UGGrid<2> GridType;
+    typedef typename GET_PROP_TYPE(TypeTag, Grid) GridType;
     typedef typename GridType::ctype DT;
     enum {
             dim = GridView::dimension,
diff --git a/test/implicit/2pdfm/2pdfmtestproblem.hh b/test/implicit/2pdfm/2pdfmtestproblem.hh
index 73bc5ad331..c39c2f87fb 100644
--- a/test/implicit/2pdfm/2pdfmtestproblem.hh
+++ b/test/implicit/2pdfm/2pdfmtestproblem.hh
@@ -54,6 +54,7 @@ NEW_TYPE_TAG(TwoPDFMTestProblem, INHERITS_FROM(BoxTwoPDFM, TwoPDFMSpatialParams)
 #if HAVE_UG
 SET_TYPE_PROP(TwoPDFMTestProblem, Grid, Dune::UGGrid<2>);
 #else
+#warning External grid UG needed to run this example.
 SET_TYPE_PROP(TwoPDFMTestProblem, Grid, Dune::YaspGrid<2>);
 #endif
 
-- 
GitLab