From 25d7f81ec305077820e2c0a0c09e06d1d33e00c4 Mon Sep 17 00:00:00 2001
From: Christoph Grueninger <christoph.grueninger@iws.uni-stuttgart.de>
Date: Tue, 17 Sep 2013 08:58:38 +0000
Subject: [PATCH] Fix warnings, headercheck, tests without PDELab present.

Replace deprecated pressEqIdx.
Add missin header.
Add #ifdefs for presence of patched PDELab.


git-svn-id: svn://svn.iws.uni-stuttgart.de/DUMUX/dumux/trunk@11471 2fb0f335-1f38-0410-981e-8018bf24f1b0
---
 .../fvmpfal3dinteractionvolumecontainer.hh    | 50 +++++++++----------
 .../fvmpfa/lmethod/fvmpfal3dpressure2p.hh     | 10 ++--
 .../fvmpfa/lmethod/fvmpfal3dvelocity2p.hh     | 10 ++--
 .../fvmpfa/omethod/fvmpfao2dvelocity2p.hh     |  6 +--
 .../2p/diffusion/mimetic/croperator2p.hh      |  4 +-
 .../2p/diffusion/mimetic/mimetic2p.hh         | 10 ++--
 .../2p/diffusion/mimetic/mimeticoperator2p.hh |  2 +-
 dumux/io/vtknestedfunction.hh                 |  1 +
 test/decoupled/1p/resultevaluation3d.hh       |  2 -
 test/decoupled/1p/test_diffusion3d.cc         |  6 ++-
 test/decoupled/1p/test_diffusionproblem3d.hh  |  6 +--
 test/geomechanics/el1p2c/test_el1p2c.cc       | 38 ++++++++++++++
 test/geomechanics/el2p/test_el2p.cc           | 33 ++++++++++++
 13 files changed, 126 insertions(+), 52 deletions(-)

diff --git a/dumux/decoupled/2p/diffusion/fvmpfa/lmethod/fvmpfal3dinteractionvolumecontainer.hh b/dumux/decoupled/2p/diffusion/fvmpfa/lmethod/fvmpfal3dinteractionvolumecontainer.hh
index be32053f71..d3610076ac 100644
--- a/dumux/decoupled/2p/diffusion/fvmpfa/lmethod/fvmpfal3dinteractionvolumecontainer.hh
+++ b/dumux/decoupled/2p/diffusion/fvmpfa/lmethod/fvmpfal3dinteractionvolumecontainer.hh
@@ -79,7 +79,7 @@ class FvMpfaL3dInteractionVolumeContainer
 
     enum
         {
-            pressEqIdx = Indices::pressEqIdx,
+            pressureEqIdx = Indices::pressureEqIdx,
         };
 
     enum
@@ -743,7 +743,7 @@ void FvMpfaL3dInteractionVolumeContainer<TypeTag>::storeIntersectionInfo(const E
                             PrimaryVariables boundValues(0.0);
 
                             interactionVolume.setBoundary(bcType, 0);
-                            if (bcType.isNeumann(pressEqIdx))
+                            if (bcType.isNeumann(pressureEqIdx))
                             {
                                 problem_.neumann(boundValues, *isIt);
                                 boundValues *= faceVol/4.0;
@@ -761,7 +761,7 @@ void FvMpfaL3dInteractionVolumeContainer<TypeTag>::storeIntersectionInfo(const E
                             PrimaryVariables boundValues(0.0);
 
                             interactionVolume.setBoundary(bcType, 3);
-                            if (bcType.isNeumann(pressEqIdx))
+                            if (bcType.isNeumann(pressureEqIdx))
                             {
                                 problem_.neumann(boundValues, *isIt);
                                 boundValues *= faceVol/4.0;
@@ -779,7 +779,7 @@ void FvMpfaL3dInteractionVolumeContainer<TypeTag>::storeIntersectionInfo(const E
                             PrimaryVariables boundValues(0.0);
 
                             interactionVolume.setBoundary(bcType, 8);
-                            if (bcType.isNeumann(pressEqIdx))
+                            if (bcType.isNeumann(pressureEqIdx))
                             {
                                 problem_.neumann(boundValues, *isIt);
                                 boundValues *= faceVol/4.0;
@@ -800,7 +800,7 @@ void FvMpfaL3dInteractionVolumeContainer<TypeTag>::storeIntersectionInfo(const E
                             PrimaryVariables boundValues(0.0);
 
                             interactionVolume.setBoundary(bcType, 1);
-                            if (bcType.isNeumann(pressEqIdx))
+                            if (bcType.isNeumann(pressureEqIdx))
                             {
                                 problem_.neumann(boundValues, *isIt);
                                 boundValues *= faceVol/4.0;
@@ -818,7 +818,7 @@ void FvMpfaL3dInteractionVolumeContainer<TypeTag>::storeIntersectionInfo(const E
                             PrimaryVariables boundValues(0.0);
 
                             interactionVolume.setBoundary(bcType, 0);
-                            if (bcType.isNeumann(pressEqIdx))
+                            if (bcType.isNeumann(pressureEqIdx))
                             {
                                 problem_.neumann(boundValues, *isIt);
                                 boundValues *= faceVol/4.0;
@@ -836,7 +836,7 @@ void FvMpfaL3dInteractionVolumeContainer<TypeTag>::storeIntersectionInfo(const E
                             PrimaryVariables boundValues(0.0);
 
                             interactionVolume.setBoundary(bcType, 9);
-                            if (bcType.isNeumann(pressEqIdx))
+                            if (bcType.isNeumann(pressureEqIdx))
                             {
                                 problem_.neumann(boundValues, *isIt);
                                 boundValues *= faceVol/4.0;
@@ -857,7 +857,7 @@ void FvMpfaL3dInteractionVolumeContainer<TypeTag>::storeIntersectionInfo(const E
                             PrimaryVariables boundValues(0.0);
 
                             interactionVolume.setBoundary(bcType, 3);
-                            if (bcType.isNeumann(pressEqIdx))
+                            if (bcType.isNeumann(pressureEqIdx))
                             {
                                 problem_.neumann(boundValues, *isIt);
                                 boundValues *= faceVol/4.0;
@@ -875,7 +875,7 @@ void FvMpfaL3dInteractionVolumeContainer<TypeTag>::storeIntersectionInfo(const E
                             PrimaryVariables boundValues(0.0);
 
                             interactionVolume.setBoundary(bcType, 2);
-                            if (bcType.isNeumann(pressEqIdx))
+                            if (bcType.isNeumann(pressureEqIdx))
                             {
                                 problem_.neumann(boundValues, *isIt);
                                 boundValues *= faceVol/4.0;
@@ -893,7 +893,7 @@ void FvMpfaL3dInteractionVolumeContainer<TypeTag>::storeIntersectionInfo(const E
                             PrimaryVariables boundValues(0.0);
 
                             interactionVolume.setBoundary(bcType, 11);
-                            if (bcType.isNeumann(pressEqIdx))
+                            if (bcType.isNeumann(pressureEqIdx))
                             {
                                 problem_.neumann(boundValues, *isIt);
                                 boundValues *= faceVol/4.0;
@@ -914,7 +914,7 @@ void FvMpfaL3dInteractionVolumeContainer<TypeTag>::storeIntersectionInfo(const E
                             PrimaryVariables boundValues(0.0);
 
                             interactionVolume.setBoundary(bcType, 2);
-                            if (bcType.isNeumann(pressEqIdx))
+                            if (bcType.isNeumann(pressureEqIdx))
                             {
                                 problem_.neumann(boundValues, *isIt);
                                 boundValues *= faceVol/4.0;
@@ -932,7 +932,7 @@ void FvMpfaL3dInteractionVolumeContainer<TypeTag>::storeIntersectionInfo(const E
                             PrimaryVariables boundValues(0.0);
 
                             interactionVolume.setBoundary(bcType, 1);
-                            if (bcType.isNeumann(pressEqIdx))
+                            if (bcType.isNeumann(pressureEqIdx))
                             {
                                 problem_.neumann(boundValues, *isIt);
                                 boundValues *= faceVol/4.0;
@@ -950,7 +950,7 @@ void FvMpfaL3dInteractionVolumeContainer<TypeTag>::storeIntersectionInfo(const E
                             PrimaryVariables boundValues(0.0);
 
                             interactionVolume.setBoundary(bcType, 10);
-                            if (bcType.isNeumann(pressEqIdx))
+                            if (bcType.isNeumann(pressureEqIdx))
                             {
                                 problem_.neumann(boundValues, *isIt);
                                 boundValues *= faceVol/4.0;
@@ -971,7 +971,7 @@ void FvMpfaL3dInteractionVolumeContainer<TypeTag>::storeIntersectionInfo(const E
                             PrimaryVariables boundValues(0.0);
 
                             interactionVolume.setBoundary(bcType, 8);
-                            if (bcType.isNeumann(pressEqIdx))
+                            if (bcType.isNeumann(pressureEqIdx))
                             {
                                 problem_.neumann(boundValues, *isIt);
                                 boundValues *= faceVol/4.0;
@@ -989,7 +989,7 @@ void FvMpfaL3dInteractionVolumeContainer<TypeTag>::storeIntersectionInfo(const E
                             PrimaryVariables boundValues(0.0);
 
                             interactionVolume.setBoundary(bcType, 4);
-                            if (bcType.isNeumann(pressEqIdx))
+                            if (bcType.isNeumann(pressureEqIdx))
                             {
                                 problem_.neumann(boundValues, *isIt);
                                 boundValues *= faceVol/4.0;
@@ -1007,7 +1007,7 @@ void FvMpfaL3dInteractionVolumeContainer<TypeTag>::storeIntersectionInfo(const E
                             PrimaryVariables boundValues(0.0);
 
                             interactionVolume.setBoundary(bcType, 7);
-                            if (bcType.isNeumann(pressEqIdx))
+                            if (bcType.isNeumann(pressureEqIdx))
                             {
                                 problem_.neumann(boundValues, *isIt);
                                 boundValues *= faceVol/4.0;
@@ -1028,7 +1028,7 @@ void FvMpfaL3dInteractionVolumeContainer<TypeTag>::storeIntersectionInfo(const E
                             PrimaryVariables boundValues(0.0);
 
                             interactionVolume.setBoundary(bcType, 9);
-                            if (bcType.isNeumann(pressEqIdx))
+                            if (bcType.isNeumann(pressureEqIdx))
                             {
                                 problem_.neumann(boundValues, *isIt);
                                 boundValues *= faceVol/4.0;
@@ -1046,7 +1046,7 @@ void FvMpfaL3dInteractionVolumeContainer<TypeTag>::storeIntersectionInfo(const E
                             PrimaryVariables boundValues(0.0);
 
                             interactionVolume.setBoundary(bcType, 5);
-                            if (bcType.isNeumann(pressEqIdx))
+                            if (bcType.isNeumann(pressureEqIdx))
                             {
                                 problem_.neumann(boundValues, *isIt);
                                 boundValues *= faceVol/4.0;
@@ -1064,7 +1064,7 @@ void FvMpfaL3dInteractionVolumeContainer<TypeTag>::storeIntersectionInfo(const E
                             PrimaryVariables boundValues(0.0);
 
                             interactionVolume.setBoundary(bcType, 4);
-                            if (bcType.isNeumann(pressEqIdx))
+                            if (bcType.isNeumann(pressureEqIdx))
                             {
                                 problem_.neumann(boundValues, *isIt);
                                 boundValues *= faceVol/4.0;
@@ -1085,7 +1085,7 @@ void FvMpfaL3dInteractionVolumeContainer<TypeTag>::storeIntersectionInfo(const E
                             PrimaryVariables boundValues(0.0);
 
                             interactionVolume.setBoundary(bcType, 11);
-                            if (bcType.isNeumann(pressEqIdx))
+                            if (bcType.isNeumann(pressureEqIdx))
                             {
                                 problem_.neumann(boundValues, *isIt);
                                 boundValues *= faceVol/4.0;
@@ -1103,7 +1103,7 @@ void FvMpfaL3dInteractionVolumeContainer<TypeTag>::storeIntersectionInfo(const E
                             PrimaryVariables boundValues(0.0);
 
                             interactionVolume.setBoundary(bcType, 7);
-                            if (bcType.isNeumann(pressEqIdx))
+                            if (bcType.isNeumann(pressureEqIdx))
                             {
                                 problem_.neumann(boundValues, *isIt);
                                 boundValues *= faceVol/4.0;
@@ -1121,7 +1121,7 @@ void FvMpfaL3dInteractionVolumeContainer<TypeTag>::storeIntersectionInfo(const E
                             PrimaryVariables boundValues(0.0);
 
                             interactionVolume.setBoundary(bcType, 6);
-                            if (bcType.isNeumann(pressEqIdx))
+                            if (bcType.isNeumann(pressureEqIdx))
                             {
                                 problem_.neumann(boundValues, *isIt);
                                 boundValues *= faceVol/4.0;
@@ -1142,7 +1142,7 @@ void FvMpfaL3dInteractionVolumeContainer<TypeTag>::storeIntersectionInfo(const E
                             PrimaryVariables boundValues(0.0);
 
                             interactionVolume.setBoundary(bcType, 10);
-                            if (bcType.isNeumann(pressEqIdx))
+                            if (bcType.isNeumann(pressureEqIdx))
                             {
                                 problem_.neumann(boundValues, *isIt);
                                 boundValues *= faceVol/4.0;
@@ -1160,7 +1160,7 @@ void FvMpfaL3dInteractionVolumeContainer<TypeTag>::storeIntersectionInfo(const E
                             PrimaryVariables boundValues(0.0);
 
                             interactionVolume.setBoundary(bcType, 6);
-                            if (bcType.isNeumann(pressEqIdx))
+                            if (bcType.isNeumann(pressureEqIdx))
                             {
                                 problem_.neumann(boundValues, *isIt);
                                 boundValues *= faceVol/4.0;
@@ -1178,7 +1178,7 @@ void FvMpfaL3dInteractionVolumeContainer<TypeTag>::storeIntersectionInfo(const E
                             PrimaryVariables boundValues(0.0);
 
                             interactionVolume.setBoundary(bcType, 5);
-                            if (bcType.isNeumann(pressEqIdx))
+                            if (bcType.isNeumann(pressureEqIdx))
                             {
                                 problem_.neumann(boundValues, *isIt);
                                 boundValues *= faceVol/4.0;
diff --git a/dumux/decoupled/2p/diffusion/fvmpfa/lmethod/fvmpfal3dpressure2p.hh b/dumux/decoupled/2p/diffusion/fvmpfa/lmethod/fvmpfal3dpressure2p.hh
index b7c5415cec..b1b3461367 100644
--- a/dumux/decoupled/2p/diffusion/fvmpfa/lmethod/fvmpfal3dpressure2p.hh
+++ b/dumux/decoupled/2p/diffusion/fvmpfa/lmethod/fvmpfal3dpressure2p.hh
@@ -94,7 +94,7 @@ class FvMpfaL3dPressure2p: public FVPressure<TypeTag>
             nPhaseIdx = Indices::nPhaseIdx,
             pressureIdx = Indices::pressureIdx,
             saturationIdx = Indices::saturationIdx,
-            pressEqIdx = Indices::pressEqIdx,
+            pressureEqIdx = Indices::pressureEqIdx,
             satEqIdx = Indices::satEqIdx,
             numPhases = GET_PROP_VALUE(TypeTag, NumPhases)
         };
@@ -2253,7 +2253,7 @@ void FvMpfaL3dPressure2p<TypeTag>::assembleBoundaryInteractionVolume(Interaction
 
             if (interactionVolume.isBoundaryFace(intVolFaceIdx))
             {
-                if (interactionVolume.getBoundaryType(intVolFaceIdx).isDirichlet(pressEqIdx))
+                if (interactionVolume.getBoundaryType(intVolFaceIdx).isDirichlet(pressureEqIdx))
                 {
                     const GlobalPosition& globalPosFace = interactionVolume.getFacePosition(elemIdx, faceIdx);
 
@@ -2392,7 +2392,7 @@ void FvMpfaL3dPressure2p<TypeTag>::assembleBoundaryInteractionVolume(Interaction
                         }
                     }
                 }
-                else if (interactionVolume.getBoundaryType(intVolFaceIdx).isNeumann(pressEqIdx))
+                else if (interactionVolume.getBoundaryType(intVolFaceIdx).isNeumann(pressureEqIdx))
                 {
                     Scalar J = interactionVolume.getNeumannValues(intVolFaceIdx)[wPhaseIdx]
                         / density_[wPhaseIdx];
@@ -2401,8 +2401,8 @@ void FvMpfaL3dPressure2p<TypeTag>::assembleBoundaryInteractionVolume(Interaction
                 }
                 else
                 {
-                    std::cout << "interactionVolume.getBoundaryType(intVolFaceIdx).isNeumann(pressEqIdx)"
-                              << interactionVolume.getBoundaryType(intVolFaceIdx).isNeumann(pressEqIdx) << "\n";
+                    std::cout << "interactionVolume.getBoundaryType(intVolFaceIdx).isNeumann(pressureEqIdx)"
+                              << interactionVolume.getBoundaryType(intVolFaceIdx).isNeumann(pressureEqIdx) << "\n";
                     DUNE_THROW(Dune::NotImplemented,
                                "No valid boundary condition type defined for pressure equation!");
                 }
diff --git a/dumux/decoupled/2p/diffusion/fvmpfa/lmethod/fvmpfal3dvelocity2p.hh b/dumux/decoupled/2p/diffusion/fvmpfa/lmethod/fvmpfal3dvelocity2p.hh
index cef2839d8e..dd8df422c0 100644
--- a/dumux/decoupled/2p/diffusion/fvmpfa/lmethod/fvmpfal3dvelocity2p.hh
+++ b/dumux/decoupled/2p/diffusion/fvmpfa/lmethod/fvmpfal3dvelocity2p.hh
@@ -98,7 +98,7 @@ template<class TypeTag> class FvMpfaL3dVelocity2p
             nPhaseIdx = Indices::nPhaseIdx,
             pressureIdx = Indices::pressureIdx,
             saturationIdx = Indices::saturationIdx,
-            pressEqIdx = Indices::pressEqIdx,
+            pressureEqIdx = Indices::pressureEqIdx,
             satEqIdx = Indices::satEqIdx,
             numPhases = GET_PROP_VALUE(TypeTag, NumPhases)
         };
@@ -1880,7 +1880,7 @@ void FvMpfaL3dVelocity2p<TypeTag>::calculateBoundaryInteractionVolumeVelocity(In
 
             if (interactionVolume.isBoundaryFace(intVolFaceIdx))
             {
-                if (interactionVolume.getBoundaryType(intVolFaceIdx).isDirichlet(pressEqIdx))
+                if (interactionVolume.getBoundaryType(intVolFaceIdx).isDirichlet(pressureEqIdx))
                 {
                     int boundaryFaceIdx = interactionVolume.getIndexOnElement(elemIdx, faceIdx);
 
@@ -1980,7 +1980,7 @@ void FvMpfaL3dVelocity2p<TypeTag>::calculateBoundaryInteractionVolumeVelocity(In
                     cellData.fluxData().addVelocity(nPhaseIdx, boundaryFaceIdx, velocityNw);
                     cellData.fluxData().setVelocityMarker(boundaryFaceIdx);
                 }
-                else if (interactionVolume.getBoundaryType(intVolFaceIdx).isNeumann(pressEqIdx))
+                else if (interactionVolume.getBoundaryType(intVolFaceIdx).isNeumann(pressureEqIdx))
                 {
                     int boundaryFaceIdx = interactionVolume.getIndexOnElement(elemIdx, faceIdx);
 
@@ -2010,8 +2010,8 @@ void FvMpfaL3dVelocity2p<TypeTag>::calculateBoundaryInteractionVolumeVelocity(In
                 }
                 else
                 {
-                    std::cout << "interactionVolume.getBoundaryType(intVolFaceIdx).isNeumann(pressEqIdx)"
-                              << interactionVolume.getBoundaryType(intVolFaceIdx).isNeumann(pressEqIdx) << "\n";
+                    std::cout << "interactionVolume.getBoundaryType(intVolFaceIdx).isNeumann(pressureEqIdx)"
+                              << interactionVolume.getBoundaryType(intVolFaceIdx).isNeumann(pressureEqIdx) << "\n";
                     DUNE_THROW(Dune::NotImplemented,
                                "No valid boundary condition type defined for pressure equation!");
                 }
diff --git a/dumux/decoupled/2p/diffusion/fvmpfa/omethod/fvmpfao2dvelocity2p.hh b/dumux/decoupled/2p/diffusion/fvmpfa/omethod/fvmpfao2dvelocity2p.hh
index 5544bbf555..8ea1eb99f2 100644
--- a/dumux/decoupled/2p/diffusion/fvmpfa/omethod/fvmpfao2dvelocity2p.hh
+++ b/dumux/decoupled/2p/diffusion/fvmpfa/omethod/fvmpfao2dvelocity2p.hh
@@ -95,7 +95,7 @@ template<class TypeTag> class FvMpfaO2dVelocity2P
             nPhaseIdx = Indices::nPhaseIdx,
             pressureIdx = Indices::pressureIdx,
             saturationIdx = Indices::saturationIdx,
-            pressEqIdx = Indices::pressEqIdx,
+            pressureEqIdx = Indices::pressureEqIdx,
             satEqIdx = Indices::satEqIdx,
             numPhases = GET_PROP_VALUE(TypeTag, NumPhases)
         };
@@ -528,7 +528,7 @@ void FvMpfaO2dVelocity2P<TypeTag>::calculateBoundaryInteractionVolumeVelocity(In
 
             if (interactionVolume.isBoundaryFace(intVolFaceIdx))
             {
-                if (interactionVolume.getBoundaryType(intVolFaceIdx).isDirichlet(pressEqIdx))
+                if (interactionVolume.getBoundaryType(intVolFaceIdx).isDirichlet(pressureEqIdx))
                 {
                     int boundaryFaceIdx = interactionVolume.getIndexOnElement(elemIdx, faceIdx);
 
@@ -638,7 +638,7 @@ void FvMpfaO2dVelocity2P<TypeTag>::calculateBoundaryInteractionVolumeVelocity(In
                         cellData.fluxData().setVelocity(nPhaseIdx, boundaryFaceIdx, velocityNW);
                         cellData.fluxData().setVelocityMarker(boundaryFaceIdx);
                 }
-                else if (interactionVolume.getBoundaryType(intVolFaceIdx).isNeumann(pressEqIdx))
+                else if (interactionVolume.getBoundaryType(intVolFaceIdx).isNeumann(pressureEqIdx))
                 {
                     int boundaryFaceIdx = interactionVolume.getIndexOnElement(elemIdx, faceIdx);
 
diff --git a/dumux/decoupled/2p/diffusion/mimetic/croperator2p.hh b/dumux/decoupled/2p/diffusion/mimetic/croperator2p.hh
index 08465c3990..0c5aebb913 100644
--- a/dumux/decoupled/2p/diffusion/mimetic/croperator2p.hh
+++ b/dumux/decoupled/2p/diffusion/mimetic/croperator2p.hh
@@ -98,7 +98,7 @@ class CROperatorAssemblerTwoP
     typedef typename GET_PROP_TYPE(TypeTag, Indices) Indices;
     enum
     {
-        pressEqIdx = Indices::pressEqIdx,
+        pressureEqIdx = Indices::pressureEqIdx,
     };
 
     //! a function to approximately compute the number of nonzeros
@@ -275,7 +275,7 @@ public:
                 }
 
                 // essential boundary condition and rhs
-                if (loc.bc(i).isDirichlet(pressEqIdx))
+                if (loc.bc(i).isDirichlet(pressureEqIdx))
                 {
                     essential[local2Global[i]][0] = BoundaryConditions::dirichlet;
                     f[local2Global[i]][0] = loc.rhs(i)[0];
diff --git a/dumux/decoupled/2p/diffusion/mimetic/mimetic2p.hh b/dumux/decoupled/2p/diffusion/mimetic/mimetic2p.hh
index aa971e5013..43814f011f 100644
--- a/dumux/decoupled/2p/diffusion/mimetic/mimetic2p.hh
+++ b/dumux/decoupled/2p/diffusion/mimetic/mimetic2p.hh
@@ -77,7 +77,7 @@ class MimeticTwoPLocalStiffness: public LocalStiffness<TypeTag, 1>
         nPhaseIdx = Indices::nPhaseIdx,
         pressureIdx = Indices::pressureIdx,
         saturationIdx = Indices::saturationIdx,
-        pressEqIdx = Indices::pressEqIdx,
+        pressureEqIdx = Indices::pressureEqIdx,
         satEqIdx = Indices::satEqIdx,
         numPhases = GET_PROP_VALUE(TypeTag, NumPhases)
     };
@@ -240,7 +240,7 @@ public:
 
         for (int i = 0; i < numFaces; i++)
         {
-            if (!this->bc(i).isDirichlet(pressEqIdx))
+            if (!this->bc(i).isDirichlet(pressureEqIdx))
                 f[local2Global[i]][0] += (dInv * F[i] * rhs_[globalIdx]);
         }
     }
@@ -648,7 +648,7 @@ void MimeticTwoPLocalStiffness<TypeTag>::assembleElementMatrices(const Element&
             BoundaryTypes bctype;
             problem_.boundaryTypes(bctype, *isIt);
 
-            if (bctype.isDirichlet(pressEqIdx))
+            if (bctype.isDirichlet(pressureEqIdx))
             {
                 if (flux > 0. || !bctype.isDirichlet(satEqIdx))
                 {
@@ -720,13 +720,13 @@ void MimeticTwoPLocalStiffness<TypeTag>::assembleBC(const Element& element, int
             problem_.boundaryTypes(this->bctype[faceIndex], *isIt);
             PrimaryVariables boundValues(0.0);
 
-            if (this->bctype[faceIndex].isNeumann(pressEqIdx))
+            if (this->bctype[faceIndex].isNeumann(pressureEqIdx))
             {
                 problem_.neumann(boundValues, *isIt);
                 Scalar J = (boundValues[wPhaseIdx]/density_[wPhaseIdx] + boundValues[nPhaseIdx]/density_[nPhaseIdx]);
                 this->b[faceIndex] -= J * isIt->geometry().volume();
             }
-            else if (this->bctype[faceIndex].isDirichlet(pressEqIdx))
+            else if (this->bctype[faceIndex].isDirichlet(pressureEqIdx))
             {
                 problem_.dirichlet(boundValues, *isIt);
                 if (pressureType == pw)
diff --git a/dumux/decoupled/2p/diffusion/mimetic/mimeticoperator2p.hh b/dumux/decoupled/2p/diffusion/mimetic/mimeticoperator2p.hh
index 78234411b9..f2ae0a5faf 100644
--- a/dumux/decoupled/2p/diffusion/mimetic/mimeticoperator2p.hh
+++ b/dumux/decoupled/2p/diffusion/mimetic/mimeticoperator2p.hh
@@ -81,7 +81,7 @@ class MimeticOperatorAssemblerTwoP: public CROperatorAssemblerTwoP<TypeTag>
         nPhaseIdx = Indices::nPhaseIdx,
         saturationIdx = Indices::saturationIdx,
         satEqIdx = Indices::satEqIdx,
-        pressEqIdx = Indices::pressEqIdx
+        pressureEqIdx = Indices::pressureEqIdx
     };
 
     typedef Dune::FieldVector<Scalar, dimWorld> FieldVector;
diff --git a/dumux/io/vtknestedfunction.hh b/dumux/io/vtknestedfunction.hh
index 4760275ac2..6e76ae4252 100644
--- a/dumux/io/vtknestedfunction.hh
+++ b/dumux/io/vtknestedfunction.hh
@@ -27,6 +27,7 @@
 #include <string>
 
 #include <dune/common/fvector.hh>
+#include <dune/common/version.hh>
 #include <dune/istl/bvector.hh>
 #include <dune/grid/io/file/vtk/function.hh>
 
diff --git a/test/decoupled/1p/resultevaluation3d.hh b/test/decoupled/1p/resultevaluation3d.hh
index 29c6c68357..73b8291d45 100644
--- a/test/decoupled/1p/resultevaluation3d.hh
+++ b/test/decoupled/1p/resultevaluation3d.hh
@@ -436,7 +436,6 @@ public:
         typedef typename Grid::template Codim<0>::Entity Element;
         typedef typename Element::Geometry Geometry;
         typedef typename GridView::template Codim<0>::Iterator ElementIterator;
-        typedef typename GridView::template Codim<dim>::Iterator VertexIterator;
         typedef typename GridView::IntersectionIterator IntersectionIterator;
         typedef Dune::MultipleCodimMultipleGeomTypeMapper<GridView,ElementLayout> ElementMapper;
         typedef Dune::BlockVector<Dune::FieldVector<Scalar, 1> > SolVector;
@@ -727,7 +726,6 @@ public:
         typedef typename Grid::template Codim<0>::Entity Element;
         typedef typename Element::Geometry Geometry;
         typedef typename GridView::template Codim<0>::Iterator ElementIterator;
-        typedef typename GridView::template Codim<dim>::Iterator VertexIterator;
         typedef typename GridView::IntersectionIterator IntersectionIterator;
         typedef Dune::MultipleCodimMultipleGeomTypeMapper<GridView,ElementLayout> ElementMapper;
 
diff --git a/test/decoupled/1p/test_diffusion3d.cc b/test/decoupled/1p/test_diffusion3d.cc
index 45235e7642..ce86b6edbc 100644
--- a/test/decoupled/1p/test_diffusion3d.cc
+++ b/test/decoupled/1p/test_diffusion3d.cc
@@ -28,7 +28,12 @@
 #include <boost/format.hpp>
 
 #include <dune/common/exceptions.hh>
+#include <dune/common/version.hh>
+#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 3)
+#include <dune/common/parallel/mpihelper.hh>
+#else
 #include <dune/common/mpihelper.hh>
+#endif
 
 #include <dune/grid/common/gridinfo.hh>
 #include <dune/common/parametertreeparser.hh>
@@ -49,7 +54,6 @@ int main(int argc, char** argv)
 {
     try {
         typedef TTAG(DiffusionTestProblem) TypeTag;
-        typedef GET_PROP_TYPE(TypeTag, Scalar) Scalar;
         typedef GET_PROP_TYPE(TypeTag, Grid) Grid;
         typedef typename GET_PROP(TypeTag, ParameterTree) ParameterTree;
 
diff --git a/test/decoupled/1p/test_diffusionproblem3d.hh b/test/decoupled/1p/test_diffusionproblem3d.hh
index d479471f37..72216ad087 100644
--- a/test/decoupled/1p/test_diffusionproblem3d.hh
+++ b/test/decoupled/1p/test_diffusionproblem3d.hh
@@ -135,8 +135,8 @@ class TestDiffusion3DProblem: public DiffusionProblem2P<TypeTag>
         wPhaseIdx = Indices::wPhaseIdx,
         nPhaseIdx = Indices::nPhaseIdx,
         pWIdx = Indices::pressureIdx,
-        SwIdx = Indices::SwIdx,
-        pressEqIdx = Indices::pressEqIdx,
+        swIdx = Indices::swIdx,
+        pressureEqIdx = Indices::pressureEqIdx,
     };
 
     typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
@@ -243,7 +243,7 @@ public:
     void dirichletAtPos(PrimaryVariables &values, const GlobalPosition& globalPos) const
     {
             values[pWIdx] = exact(globalPos);
-            values[SwIdx] = 1.0;
+            values[swIdx] = 1.0;
     }
 
     //! set neumann condition for phases (flux, [kg/(m^2 s)])
diff --git a/test/geomechanics/el1p2c/test_el1p2c.cc b/test/geomechanics/el1p2c/test_el1p2c.cc
index 7827df6667..43e2ba4d0d 100644
--- a/test/geomechanics/el1p2c/test_el1p2c.cc
+++ b/test/geomechanics/el1p2c/test_el1p2c.cc
@@ -16,8 +16,18 @@
  *   You should have received a copy of the GNU General Public License       *
  *   along with this program.  If not, see <http://www.gnu.org/licenses/>.   *
  *****************************************************************************/
+/*!
+ * \file
+ *
+ * \brief test for the elasticity 1p2c model
+ */
 #include "config.h"
 
+#if HAVE_DUNE_PDELAB
+
+// Check if DUNE-PDELab has been patched for our needs.
+#ifdef DUNE_PDELAB_IS_PATCHED_FOR_DUMUX
+
 #include "el1p2cproblem.hh"
 #include <dune/common/precision.hh>
 #include <dumux/common/start.hh>
@@ -62,3 +72,31 @@ int main(int argc, char** argv)
     typedef TTAG(El1P2CProblem) ProblemTypeTag;
     return Dumux::start<ProblemTypeTag>(argc, argv, usage);
 }
+
+#else // DUNE_PDELAB_IS_PATCHED_FOR_DUMUX
+
+#warning You need to have  a patched dune-pdelab to run this test, see ../../../patches/README for details.
+
+#include <iostream>
+
+int main()
+{
+    std::cerr << "You need to have a patched dune-pdelab to run this test, "
+                 "see ../../../patches/README for details." << std::endl;;
+    return 77;
+}
+
+#endif // DUNE_PDELAB_IS_PATCHED_FOR_DUMUX
+
+#else // HAVE_DUNE_PDELAB
+
+#warning You need to have dune-pdelab installed and patched to run this test.
+
+#include <iostream>
+
+int main()
+{
+    std::cerr << "You need to have dune-pdelab installed and patched to run this test.\n";
+    return 77;
+}
+#endif // HAVE_DUNE_PDELAB
diff --git a/test/geomechanics/el2p/test_el2p.cc b/test/geomechanics/el2p/test_el2p.cc
index 7960919197..7ba5d398b4 100644
--- a/test/geomechanics/el2p/test_el2p.cc
+++ b/test/geomechanics/el2p/test_el2p.cc
@@ -23,6 +23,11 @@
  */
 #include "config.h"
 
+#if HAVE_DUNE_PDELAB
+
+// Check if DUNE-PDELab has been patched for our needs.
+#ifdef DUNE_PDELAB_IS_PATCHED_FOR_DUMUX
+
 #include "el2pproblem.hh"
 #include <dune/common/precision.hh>
 #include <dumux/common/start.hh>
@@ -99,3 +104,31 @@ int main(int argc, char** argv) {
         std::cerr << "Unknown exception thrown!" << std::endl;
     }
 }
+
+#else // DUNE_PDELAB_IS_PATCHED_FOR_DUMUX
+
+#warning You need to have  a patched dune-pdelab to run this test, see ../../../patches/README for details.
+
+#include <iostream>
+
+int main()
+{
+    std::cerr << "You need to have a patched dune-pdelab to run this test, "
+                 "see ../../../patches/README for details." << std::endl;;
+    return 77;
+}
+
+#endif // DUNE_PDELAB_IS_PATCHED_FOR_DUMUX
+
+#else // HAVE_DUNE_PDELAB
+
+#warning You need to have dune-pdelab installed and patched to run this test.
+
+#include <iostream>
+
+int main()
+{
+    std::cerr << "You need to have dune-pdelab installed and patched to run this test.\n";
+    return 77;
+}
+#endif // HAVE_DUNE_PDELAB
-- 
GitLab