From 7dbe0f696dc27410edca83c9a3bc91e0173d2de8 Mon Sep 17 00:00:00 2001
From: Klaus Mosthaf <klmos@env.dtu.dk>
Date: Fri, 23 Sep 2011 07:27:53 +0000
Subject: [PATCH] Some cosmetic changes in 2p2cboundaryvariables

git-svn-id: svn://svn.iws.uni-stuttgart.de/DUMUX/dumux/trunk@6644 2fb0f335-1f38-0410-981e-8018bf24f1b0
---
 dumux/boxmodels/2p2c/2p2cboundaryvariables.hh | 26 +++++++++++--------
 1 file changed, 15 insertions(+), 11 deletions(-)

diff --git a/dumux/boxmodels/2p2c/2p2cboundaryvariables.hh b/dumux/boxmodels/2p2c/2p2cboundaryvariables.hh
index e16f4bf8f3..c4914d2f7e 100644
--- a/dumux/boxmodels/2p2c/2p2cboundaryvariables.hh
+++ b/dumux/boxmodels/2p2c/2p2cboundaryvariables.hh
@@ -56,9 +56,7 @@ class TwoPTwoCBoundaryVariables
 
     typedef typename GET_PROP_TYPE(TypeTag, PTAG(TwoPTwoCIndices)) Indices;
 
-    enum {
-        dim = GridView::dimension,
-    };
+    enum { dim = GridView::dimension };
 
     typedef typename GridView::template Codim<0>::Entity Element;
     typedef Dune::FieldVector<Scalar, dim> VelocityVector;
@@ -71,13 +69,13 @@ class TwoPTwoCBoundaryVariables
 
     enum {
         lPhaseIdx = Indices::lPhaseIdx,
-        gPhaseIdx = Indices::gPhaseIdx,
-
+        gPhaseIdx = Indices::gPhaseIdx
+    };
+    enum {
         lCompIdx = Indices::lCompIdx,
-        gCompIdx = Indices::gCompIdx,
-
-        numPhases = GET_PROP_VALUE(TypeTag, PTAG(NumPhases))
+        gCompIdx = Indices::gCompIdx
     };
+    enum { numPhases = GET_PROP_VALUE(TypeTag, PTAG(NumPhases)) };
 
 public:
     TwoPTwoCBoundaryVariables(const Problem &problem,
@@ -86,7 +84,8 @@ public:
                      int boundaryFaceIdx,
                      const ElementVolumeVariables &elemDat,
                      int scvIdx)
-        : fvElemGeom_(elemGeom), scvIdx_(scvIdx)
+        : fvElemGeom_(elemGeom),
+          scvIdx_(scvIdx)
     {
         boundaryFace_ = &fvElemGeom_.boundaryFace[boundaryFaceIdx];
 
@@ -97,6 +96,8 @@ public:
             potentialGrad_[phaseIdx] = Scalar(0);
             concentrationGrad_[phaseIdx] = Scalar(0);
             molarConcGrad_[phaseIdx] = Scalar(0);
+            KmvpNormal_[phaseIdx] = Scalar(0);
+            porousDiffCoeff_[phaseIdx] = Scalar(0);
         }
 
         calculateBoundaryValues_(problem, element, elemDat);
@@ -197,9 +198,12 @@ protected:
 
         for (int phaseIdx=0; phaseIdx < numPhases; phaseIdx++)
         {
-            tmp = problem.gravity();
-            tmp *= densityAtIP_[phaseIdx];
+            if (GET_PARAM(TypeTag, bool, EnableGravity)) {
+                tmp = problem.gravity();
+                tmp *= densityAtIP_[phaseIdx];
+            }
 
+            // calculate the potential gradient
             potentialGrad_[phaseIdx] -= tmp;
 
             Scalar k = problem.spatialParameters().intrinsicPermeability(element, fvElemGeom_, scvIdx_);
-- 
GitLab