From 0b2f45199846b7fe30e58976c029aca29b18d936 Mon Sep 17 00:00:00 2001
From: Benjamin Faigle <benjamin.faigle@posteo.de>
Date: Thu, 5 Sep 2013 12:08:00 +0000
Subject: [PATCH] Decoupled 2p2c fluidstate can entail the 3p3cfluidstate:
 -Members are no longer private but protected -Converted Arrays to Dune
 containers for variables that are used in complex 3p3c flash calculations
 (eqilibrium ratios and phase mass fractions) Simplified temperature acess
 function by default argument since only one equilibrium temperature for all
 phase is available. reviewed by Bernd

git-svn-id: svn://svn.iws.uni-stuttgart.de/DUMUX/dumux/trunk@11391 2fb0f335-1f38-0410-981e-8018bf24f1b0
---
 dumux/decoupled/2p2c/2p2cfluidstate.hh | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/dumux/decoupled/2p2c/2p2cfluidstate.hh b/dumux/decoupled/2p2c/2p2cfluidstate.hh
index b43996b0d1..7860c762d8 100644
--- a/dumux/decoupled/2p2c/2p2cfluidstate.hh
+++ b/dumux/decoupled/2p2c/2p2cfluidstate.hh
@@ -57,6 +57,7 @@ public:
 
     enum {  numPhases = GET_PROP_VALUE(TypeTag, NumPhases),
             numComponents = GET_PROP_VALUE(TypeTag, NumComponents)};
+    typedef Dune::FieldVector<Scalar, numPhases> PhaseVector;
 
 public:
     /*!
@@ -153,7 +154,7 @@ public:
      * Note that we assume thermodynamic equilibrium, so all fluids
      * and the rock matrix exhibit the same temperature.
      */
-    Scalar temperature(int phaseIdx) const
+    Scalar temperature(int phaseIdx = 0) const
     { return temperature_; };
 
     /*!
@@ -293,18 +294,19 @@ public:
     //@}
     TwoPTwoCFluidState()
     { Valgrind::SetUndefined(*this); }
-private:
+
+protected:
 //    Scalar massConcentration_[numComponents];
     Scalar phasePressure_[numPhases];
     Scalar temperature_;
 
     Scalar sw_;
-    Scalar nu_[numPhases]; //phase mass fraction
+    PhaseVector nu_; //phase mass fraction
     Scalar density_[numPhases];
     Scalar viscosity_[numPhases];
     Scalar massFraction_[numPhases][numComponents];
     Scalar moleFraction_[numPhases][numComponents];
-    Scalar equilRatio_[numPhases][numComponents];
+    Dune::FieldMatrix<Scalar, numPhases, numComponents> equilRatio_;
     Scalar averageMolarMass_[numPhases];
 };
 
-- 
GitLab