From a19c5bf30ab5a77fd48d7be8fae417a8f2e57131 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Christoph=20Gr=C3=BCninger?=
 <christoph.grueninger@iws.uni-stuttgart.de>
Date: Wed, 13 Jan 2016 08:31:23 +0100
Subject: [PATCH] [multidomain] Simplify boundary types for Darcy subdomain

* Remove unused types
* Remove superfluous semicolons after methods
---
 dumux/implicit/2p2c/2p2cmodel.hh              |  2 +-
 .../2cnistokes2p2cni/2p2cnisubproblem.hh      | 22 ++++--------------
 .../2cnizeroeq2p2cni/2p2cnisubproblem.hh      | 14 ++++-------
 .../2cstokes2p2c/2p2csubproblem.hh            | 23 ++++---------------
 .../2czeroeq2p2c/2p2csubproblem.hh            | 10 ++------
 .../2czeroeq2p2c/zeroeq2csubproblem.hh        |  2 +-
 6 files changed, 17 insertions(+), 56 deletions(-)

diff --git a/dumux/implicit/2p2c/2p2cmodel.hh b/dumux/implicit/2p2c/2p2cmodel.hh
index 691bb315de..1e5b60b743 100644
--- a/dumux/implicit/2p2c/2p2cmodel.hh
+++ b/dumux/implicit/2p2c/2p2cmodel.hh
@@ -226,7 +226,7 @@ public:
 
         setSwitched_(false);
         resetPhasePresence_();
-    };
+    }
 
     /*!
      * \brief Called by the problem if a time integration was
diff --git a/test/multidomain/2cnistokes2p2cni/2p2cnisubproblem.hh b/test/multidomain/2cnistokes2p2cni/2p2cnisubproblem.hh
index bd6fa63c48..0a500b369c 100644
--- a/test/multidomain/2cnistokes2p2cni/2p2cnisubproblem.hh
+++ b/test/multidomain/2cnistokes2p2cni/2p2cnisubproblem.hh
@@ -95,7 +95,6 @@ class TwoPTwoCNISubProblem : public ImplicitPorousMediaProblem<TypeTag>
 {
     typedef typename GET_PROP_TYPE(TypeTag, GridView) GridView;
     typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
-    typedef typename GridView::Grid Grid;
 
     typedef TwoPTwoCNISubProblem<TypeTag> ThisType;
     typedef ImplicitPorousMediaProblem<TypeTag> ParentType;
@@ -103,9 +102,6 @@ class TwoPTwoCNISubProblem : public ImplicitPorousMediaProblem<TypeTag>
     // copy some indices for convenience
     typedef typename GET_PROP_TYPE(TypeTag, Indices) Indices;
 
-    // the type tag of the coupled problem
-    typedef typename GET_PROP_TYPE(TypeTag, MultiDomainTypeTag) CoupledTypeTag;
-
     enum { numEq = GET_PROP_VALUE(TypeTag, NumEq) };
     enum { numPhases = GET_PROP_VALUE(TypeTag, NumPhases) };
     enum { numComponents = GET_PROP_VALUE(TypeTag, NumComponents) };
@@ -265,21 +261,11 @@ public:
         {
             values.setDirichlet(temperatureIdx);
         }
-
-        if (onUpperBoundary_(globalPos))
-        {
-            if (time > initializationTime_)
-            {
-                if (globalPos[0] > runUpDistanceX_ - eps_)
-                {
-                    values.setAllCouplingNeumann();
-                }
-                else
-                    values.setAllNeumann();
-            }
-            else
+        else if (onUpperBoundary_(globalPos)
+            && (globalPos[0] > runUpDistanceX_ - eps_)
+            && (time > initializationTime_))
             {
-                values.setAllNeumann();
+                values.setAllCouplingNeumann();
             }
         }
     }
diff --git a/test/multidomain/2cnizeroeq2p2cni/2p2cnisubproblem.hh b/test/multidomain/2cnizeroeq2p2cni/2p2cnisubproblem.hh
index 5f413336dc..a00e148c59 100644
--- a/test/multidomain/2cnizeroeq2p2cni/2p2cnisubproblem.hh
+++ b/test/multidomain/2cnizeroeq2p2cni/2p2cnisubproblem.hh
@@ -95,7 +95,6 @@ class TwoPTwoCNISubProblem : public ImplicitPorousMediaProblem<TypeTag>
 {
     typedef typename GET_PROP_TYPE(TypeTag, GridView) GridView;
     typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
-    typedef typename GridView::Grid Grid;
 
     typedef TwoPTwoCNISubProblem<TypeTag> ThisType;
     typedef ImplicitPorousMediaProblem<TypeTag> ParentType;
@@ -236,16 +235,11 @@ public:
         {
             values.setDirichlet(temperatureIdx);
         }
-
-        if (onUpperBoundary_(globalPos))
+        else if (onUpperBoundary_(globalPos)
+            && (globalPos[0] > runUpDistanceX1_ - eps_)
+            && (globalPos[0] < runUpDistanceX2_ + eps_))
         {
-            if (globalPos[0] > runUpDistanceX1_ - eps_
-                && globalPos[0] < runUpDistanceX2_ + eps_)
-            {
-                values.setAllCouplingNeumann();
-            }
-            else
-                values.setAllNeumann();
+            values.setAllCouplingNeumann();
         }
     }
 
diff --git a/test/multidomain/2cstokes2p2c/2p2csubproblem.hh b/test/multidomain/2cstokes2p2c/2p2csubproblem.hh
index 79060954e5..ab7bafbe2e 100644
--- a/test/multidomain/2cstokes2p2c/2p2csubproblem.hh
+++ b/test/multidomain/2cstokes2p2c/2p2csubproblem.hh
@@ -89,7 +89,6 @@ class TwoPTwoCSubProblem : public ImplicitPorousMediaProblem<TypeTag>
 {
     typedef typename GET_PROP_TYPE(TypeTag, GridView) GridView;
     typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
-    typedef typename GridView::Grid Grid;
 
     typedef TwoPTwoCSubProblem<TypeTag> ThisType;
     typedef ImplicitPorousMediaProblem<TypeTag> ParentType;
@@ -97,9 +96,6 @@ class TwoPTwoCSubProblem : public ImplicitPorousMediaProblem<TypeTag>
     // copy some indices for convenience
     typedef typename GET_PROP_TYPE(TypeTag, Indices) Indices;
 
-    // the type tag of the coupled problem
-    typedef typename GET_PROP_TYPE(TypeTag, MultiDomainTypeTag) CoupledTypeTag;
-
     enum { numEq = GET_PROP_VALUE(TypeTag, NumEq)};
     enum { // the equation indices
         contiTotalMassIdx = Indices::contiNEqIdx,
@@ -220,7 +216,7 @@ public:
     Scalar temperatureAtPos(const GlobalPosition &globalPos) const
     {
         return refTemperature_;
-    };
+    }
     // \}
 
     /*!
@@ -242,20 +238,11 @@ public:
 
         values.setAllNeumann();
 
-        if (onUpperBoundary_(globalPos))
+        if (onUpperBoundary_(globalPos)
+            && (globalPos[0] > runUpDistanceX_ - eps_)
+            && (time > initializationTime_))
         {
-            if (time > initializationTime_)
-            {
-                if (globalPos[0] > runUpDistanceX_ - eps_)
-                    values.setAllCouplingNeumann();
-                else
-                    values.setAllNeumann();
-            }
-            else
-            {
-//                values.setAllDirichlet();
-                values.setAllNeumann();
-            }
+                values.setAllCouplingNeumann();
         }
     }
 
diff --git a/test/multidomain/2czeroeq2p2c/2p2csubproblem.hh b/test/multidomain/2czeroeq2p2c/2p2csubproblem.hh
index 073ebd4ee6..d86c89ff4b 100644
--- a/test/multidomain/2czeroeq2p2c/2p2csubproblem.hh
+++ b/test/multidomain/2czeroeq2p2c/2p2csubproblem.hh
@@ -89,7 +89,6 @@ class TwoPTwoCSubProblem : public ImplicitPorousMediaProblem<TypeTag>
 {
     typedef typename GET_PROP_TYPE(TypeTag, GridView) GridView;
     typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
-    typedef typename GridView::Grid Grid;
 
     typedef TwoPTwoCSubProblem<TypeTag> ThisType;
     typedef ImplicitPorousMediaProblem<TypeTag> ParentType;
@@ -97,9 +96,6 @@ class TwoPTwoCSubProblem : public ImplicitPorousMediaProblem<TypeTag>
     // copy some indices for convenience
     typedef typename GET_PROP_TYPE(TypeTag, Indices) Indices;
 
-    // the type tag of the coupled problem
-    typedef typename GET_PROP_TYPE(TypeTag, MultiDomainTypeTag) CoupledTypeTag;
-
     enum { numEq = GET_PROP_VALUE(TypeTag, NumEq)};
     enum { // the equation indices
         contiTotalMassIdx = Indices::contiNEqIdx,
@@ -232,12 +228,10 @@ public:
     {
         values.setAllNeumann();
 
-        if (onUpperBoundary_(globalPos))
+        if (onUpperBoundary_(globalPos)
+            && (globalPos[0] > runUpDistanceX_ - eps_))
         {
-            if (globalPos[0] > runUpDistanceX_ - eps_)
                 values.setAllCouplingNeumann();
-            else
-                values.setAllNeumann();
         }
     }
 
diff --git a/test/multidomain/2czeroeq2p2c/zeroeq2csubproblem.hh b/test/multidomain/2czeroeq2p2c/zeroeq2csubproblem.hh
index be41899948..0ecbcd611a 100644
--- a/test/multidomain/2czeroeq2p2c/zeroeq2csubproblem.hh
+++ b/test/multidomain/2czeroeq2p2c/zeroeq2csubproblem.hh
@@ -195,7 +195,7 @@ public:
     Scalar temperatureAtPos(const GlobalPosition &globalPos) const
     {
         return refTemperature_;
-    };
+    }
 
     /*!
      * \name Boundary conditions
-- 
GitLab