From a6a42486701a9518c48e5826b733d171fccaffae Mon Sep 17 00:00:00 2001
From: Thomas Fetzer <thomas.fetzer@iws.uni-stuttgart.de>
Date: Tue, 29 Nov 2016 14:44:35 +0100
Subject: [PATCH] [2p2c][2pnc][2pncmin] Update phase presence indices and
 formulation indices -> identical to 2pnc

2p2c updated the reference solutions (changed phase presence indices)
2pnc changed: plSg --> pnsw; pgSl --> pwsn, removed plSg + pgSl from indices
2pncmin changed: plSg --> pnsw; pgSl --> pwsn as for 2pnc
2p2c, 2pnc: added the formulation changes to CHANGELOG.md

(cherry picked from commit b03738a290e53af381561839f2326061678c6a4b)
---
 CHANGELOG.md                                  |  6 ++
 .../porousmediumflow/2p2c/implicit/indices.hh | 66 +++----------------
 .../2p2c/implicit/propertydefaults.hh         | 15 +----
 .../porousmediumflow/2pnc/implicit/indices.hh | 14 ++--
 dumux/porousmediumflow/2pnc/implicit/model.hh |  4 +-
 .../2pnc/implicit/primaryvariableswitch.hh    | 12 ++--
 .../2pnc/implicit/propertydefaults.hh         |  4 +-
 .../2pnc/implicit/volumevariables.hh          | 12 ++--
 .../2pncmin/implicit/model.hh                 | 19 +-----
 .../2pncmin/implicit/volumevariables.hh       | 12 ++--
 .../2pnc/implicit/fuelcellproblem.hh          |  2 +-
 .../2pncmin/implicit/dissolutionproblem.hh    |  2 +-
 test/references/injectionbox-reference.vtu    |  8 +--
 test/references/injectioncc-reference.vtu     |  8 +--
 test/references/waterairbox-reference.vtu     | 20 +++---
 test/references/wateraircc-reference.vtu      | 20 +++---
 16 files changed, 78 insertions(+), 146 deletions(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index d9da880393..fe531d40a5 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -20,6 +20,12 @@ Differences Between DuMuX 2.10 and DuMuX 2.11
     - In the ZeroEq models, the properties BBoxMinIsWall and BBoxMaxIsWall have
       been replaced by the functions bBoxMaxIsWall() and bBoxMaxIsWall() in the
       problem file.
+    - In the TwoPNC (and, consequently the TwoPNCMin) models, the old formulations
+      pgSl, plSg as well as pnSw and pwSg have been replaced by the pnsw and pwsn,
+      to satify the naming convention and be consistent with TwoPTwoC.
+    - In the TwoPTwoC model, the indices are no longer dependent on the
+      formulation. Further, the values of "nPhaseOnly" and "bothPhases"
+      have been harmonized with those in TwoPNC
 
 * Deprecated PROPERTY and PARAMETER NAMES, to be removed after 2.11: BEWARE: The
   compiler will not print any warning if a deprecated property or parameter name
diff --git a/dumux/porousmediumflow/2p2c/implicit/indices.hh b/dumux/porousmediumflow/2p2c/implicit/indices.hh
index a3518b278f..55fb3dc6b2 100644
--- a/dumux/porousmediumflow/2p2c/implicit/indices.hh
+++ b/dumux/porousmediumflow/2p2c/implicit/indices.hh
@@ -38,8 +38,10 @@ namespace Dumux
  */
 struct TwoPTwoCFormulation
 {
-    static const int pwsn = 0; //!< pw and sn as primary variables
-    static const int pnsw = 1; //!< pn and sw as primary variables
+    enum {
+        pnsw,
+        pwsn
+        };
 };
 
 /*!
@@ -47,12 +49,9 @@ struct TwoPTwoCFormulation
  * \ingroup ImplicitIndices
  * \brief The indices for the isothermal two-phase two-component model.
  *
- * \tparam formulation The formulation, either pwsn or pnsw.
  * \tparam PVOffset The first index in a primary variable vector.
  */
-template <class TypeTag,
-          int formulation = TwoPTwoCFormulation::pwsn,
-          int PVOffset = 0>
+template <class TypeTag, int PVOffset = 0>
 class TwoPTwoCIndices
 {
     typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem;
@@ -67,9 +66,9 @@ public:
     static const int nCompIdx = FluidSystem::nCompIdx; //!< Index of the primary component of the non-wetting phase
 
     // present phases (-> 'pseudo' primary variable)
-    static const int wPhaseOnly = 1; //!< Only the wetting phase is present
-    static const int nPhaseOnly = 0; //!< Only the non-wetting phase is present
-    static const int bothPhases = 2; //!< Both phases are present
+    static const int wPhaseOnly = 1; //!< Only the non-wetting phase is present
+    static const int nPhaseOnly = 2; //!< Only the wetting phase is present
+    static const int bothPhases = 3; //!< Both phases are present
 
     // Primary variable indices
     //! Index for wetting/non-wetting phase pressure (depending on the formulation) in a solution vector
@@ -91,55 +90,6 @@ public:
     static const int contiNEqIdx = conti0EqIdx + nCompIdx;
 };
 
-/*!
- * \ingroup TwoPTwoCModel
- * \ingroup ImplicitIndices
- * \brief The indices for the isothermal two-phase two-component model in the pn-sw
- *        formulation.
- *
- * \tparam PVOffset The first index in a primary variable vector.
- */
-template <class TypeTag, int PVOffset>
-class TwoPTwoCIndices<TypeTag, TwoPTwoCFormulation::pnsw, PVOffset>
-{
-    typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem;
-
-public:
-    // Phase indices
-    static const int wPhaseIdx = FluidSystem::wPhaseIdx; //!< Index of the wetting phase
-    static const int nPhaseIdx = FluidSystem::nPhaseIdx; //!< Index of the non-wetting phase
-
-    // Component indices
-    static const int wCompIdx = FluidSystem::wCompIdx; //!< Index of the primary component of the wetting phase
-    static const int nCompIdx = FluidSystem::nCompIdx; //!< Index of the primary component of the non-wetting phase
-
-    // present phases (-> 'pseudo' primary variable)
-    static const int wPhaseOnly = 1; //!< Only the wetting phase is present
-    static const int nPhaseOnly = 2; //!< Only the non-wetting phase is present
-    static const int bothPhases = 3; //!< Both phases are present
-
-    // Primary variable indices
-    //! Index for wetting/non-wetting phase pressure (depending on the formulation) in a solution vector
-    static const int pressureIdx = PVOffset + 0;
-    //! Index of either the saturation or the mass fraction of the non-wetting/wetting phase
-    static const int switchIdx = PVOffset + 1;
-
-    //! Index for non-wetting phase pressure in a solution vector
-    static const int pnIdx = pressureIdx;
-    //! Index of either the saturation of the liquid phase or the mass fraction of the secondary component in the only phase
-    static const int swOrXIdx = switchIdx;
-
-    // Equation indices
-    //! Index of the mass conservation equation for the first component
-    static const int conti0EqIdx = PVOffset;
-    //! Index of the mass conservation equation for the primary component of the wetting phase
-    static const int contiWEqIdx = conti0EqIdx + wCompIdx;
-    //! Index of the mass conservation equation for the primary component of the non-wetting phase
-    static const int contiNEqIdx = conti0EqIdx + nCompIdx;
-};
-
-// \}
-
 }
 
 #endif
diff --git a/dumux/porousmediumflow/2p2c/implicit/propertydefaults.hh b/dumux/porousmediumflow/2p2c/implicit/propertydefaults.hh
index 64d8a0905e..77154f8e96 100644
--- a/dumux/porousmediumflow/2p2c/implicit/propertydefaults.hh
+++ b/dumux/porousmediumflow/2p2c/implicit/propertydefaults.hh
@@ -151,12 +151,7 @@ SET_SCALAR_PROP(TwoPTwoC, ImplicitMassUpwindWeight, 1.0);
 SET_SCALAR_PROP(TwoPTwoC, ImplicitMobilityUpwindWeight, 1.0);
 
 //! Set the indices required by the isothermal 2p2c
-SET_PROP(TwoPTwoC, Indices)
-{ private:
-    enum { Formulation = GET_PROP_VALUE(TypeTag, Formulation) };
- public:
-    typedef TwoPTwoCIndices<TypeTag, Formulation, 0> type;
-};
+SET_TYPE_PROP(TwoPTwoC, Indices, TwoPTwoCIndices <TypeTag, /*PVOffset=*/0>);
 
 //! Use the ImplicitSpatialParams by default
 SET_TYPE_PROP(TwoPTwoC, SpatialParams, ImplicitSpatialParams<TypeTag>);
@@ -214,13 +209,7 @@ SET_BOOL_PROP(TwoPTwoCNI, NiOutputLevel, 0);
 //////////////////////////////////////////////////////////////////
 
 //set isothermal Indices
-SET_PROP(TwoPTwoCNI, IsothermalIndices)
-{
-private:
-    enum { Formulation = GET_PROP_VALUE(TypeTag, Formulation) };
-public:
-    typedef TwoPTwoCIndices<TypeTag, Formulation, 0> type;
-};
+SET_TYPE_PROP(TwoPTwoCNI, IsothermalIndices, TwoPTwoCIndices<TypeTag, /*PVOffset=*/0>);
 
 //set isothermal NumEq
 SET_INT_PROP(TwoPTwoCNI, IsothermalNumEq, 2);
diff --git a/dumux/porousmediumflow/2pnc/implicit/indices.hh b/dumux/porousmediumflow/2pnc/implicit/indices.hh
index 9068db745d..97422f1513 100644
--- a/dumux/porousmediumflow/2pnc/implicit/indices.hh
+++ b/dumux/porousmediumflow/2pnc/implicit/indices.hh
@@ -36,11 +36,9 @@ namespace Dumux
 struct TwoPNCFormulation
 {
     enum {
-            plSg,
-            pgSl,
-            pnSw = pgSl,
-            pwSn = plSg
-          };
+        pnsw,
+        pwsn
+        };
 };
 
 /*!
@@ -59,6 +57,11 @@ public:
     // Phase indices
     static const int wPhaseIdx = FluidSystem::wPhaseIdx; //!< Index of the wetting phase
     static const int nPhaseIdx = FluidSystem::nPhaseIdx; //!< Index of the non-wetting phase
+
+    // Component indices
+    static const int wCompIdx = FluidSystem::wCompIdx; //!< Index of the primary component of the wetting phase
+    static const int nCompIdx = FluidSystem::nCompIdx; //!< Index of the primary component of the non-wetting phase
+
     // present phases (-> 'pseudo' primary variable)
     static const int wPhaseOnly = 1; //!< Only the non-wetting phase is present
     static const int nPhaseOnly = 2; //!< Only the wetting phase is present
@@ -67,6 +70,7 @@ public:
     // Primary variable indices
     static const int pressureIdx = PVOffset + 0; //!< Index for wetting/non-wetting phase pressure (depending on formulation) in a solution vector
     static const int switchIdx = PVOffset + 1; //!< Index of the either the saturation or the mass fraction of the non-wetting/wetting phase
+
     // equation indices
     static const int conti0EqIdx = PVOffset + 0; //!< Reference index for mass conservation equations.
     static const int contiWEqIdx = conti0EqIdx + FluidSystem::wCompIdx; //!< Index of the mass conservation equation for the wetting phase major component
diff --git a/dumux/porousmediumflow/2pnc/implicit/model.hh b/dumux/porousmediumflow/2pnc/implicit/model.hh
index c90696a9e0..c80b7e296f 100644
--- a/dumux/porousmediumflow/2pnc/implicit/model.hh
+++ b/dumux/porousmediumflow/2pnc/implicit/model.hh
@@ -140,8 +140,8 @@ class TwoPNCModel: public GET_PROP_TYPE(TypeTag, BaseModel)
             bothPhases = Indices::bothPhases
     };
     enum {
-            plSg = TwoPNCFormulation::plSg,
-            pgSl = TwoPNCFormulation::pgSl,
+            pwsn = TwoPNCFormulation::pwsn,
+            pnsw = TwoPNCFormulation::pnsw,
             formulation = GET_PROP_VALUE(TypeTag, Formulation)
     };
 
diff --git a/dumux/porousmediumflow/2pnc/implicit/primaryvariableswitch.hh b/dumux/porousmediumflow/2pnc/implicit/primaryvariableswitch.hh
index 508288b0e6..e0356298bc 100644
--- a/dumux/porousmediumflow/2pnc/implicit/primaryvariableswitch.hh
+++ b/dumux/porousmediumflow/2pnc/implicit/primaryvariableswitch.hh
@@ -67,8 +67,8 @@ class TwoPNCPrimaryVariableSwitch : public Dumux::PrimaryVariableSwitch<TypeTag>
     };
 
     enum {
-            plSg = TwoPNCFormulation::plSg,
-            pgSl = TwoPNCFormulation::pgSl,
+            pwsn = TwoPNCFormulation::pwsn,
+            pnsw = TwoPNCFormulation::pnsw,
             formulation = GET_PROP_VALUE(TypeTag, Formulation)
     };
 
@@ -147,9 +147,9 @@ protected:
                 newPhasePresence = bothPhases;
 
                 //saturation of the liquid phase set to 0.0001 (if formulation pgSl and vice versa)
-                if (formulation == pgSl)
+                if (formulation == pnsw)
                     priVars[switchIdx] = 0.0001;
-                else if (formulation == plSg)
+                else if (formulation == pwsn)
                     priVars[switchIdx] = 0.9999;
 
                 //switch all secondary components back to liquid mole fraction
@@ -178,9 +178,9 @@ protected:
                         << sumxg << std::endl;
                 newPhasePresence = bothPhases;
                 //saturation of the liquid phase set to 0.9999 (if formulation pgSl and vice versa)
-                if (formulation == pgSl)
+                if (formulation == pnsw)
                     priVars[switchIdx] = 0.9999;
-                else if (formulation == plSg)
+                else if (formulation == pwsn)
                     priVars[switchIdx] = 0.0001;
 
             }
diff --git a/dumux/porousmediumflow/2pnc/implicit/propertydefaults.hh b/dumux/porousmediumflow/2pnc/implicit/propertydefaults.hh
index 18441a1d30..ad8ce63d8f 100644
--- a/dumux/porousmediumflow/2pnc/implicit/propertydefaults.hh
+++ b/dumux/porousmediumflow/2pnc/implicit/propertydefaults.hh
@@ -129,8 +129,8 @@ SET_PROP(TwoPNC, FluidState)
         typedef CompositionalFluidState<Scalar, FluidSystem> type;
 };
 
-//! Set the default formulation to pl-Sg: This can be over written in the problem.
-SET_INT_PROP(TwoPNC, Formulation, TwoPNCFormulation::plSg);
+//! Set the default formulation to pw-Sn: This can be over written in the problem.
+SET_INT_PROP(TwoPNC, Formulation, TwoPNCFormulation::pwsn);
 
 //! Set the property for the material parameters by extracting it from the material law.
 SET_PROP(TwoPNC, MaterialLawParams)
diff --git a/dumux/porousmediumflow/2pnc/implicit/volumevariables.hh b/dumux/porousmediumflow/2pnc/implicit/volumevariables.hh
index da347bfeba..4f7c6c4a8d 100644
--- a/dumux/porousmediumflow/2pnc/implicit/volumevariables.hh
+++ b/dumux/porousmediumflow/2pnc/implicit/volumevariables.hh
@@ -74,8 +74,8 @@ class TwoPNCVolumeVariables : public ImplicitVolumeVariables<TypeTag>
 
         // formulations
         formulation = GET_PROP_VALUE(TypeTag, Formulation),
-        plSg = TwoPNCFormulation::plSg,
-        pgSl = TwoPNCFormulation::pgSl,
+        pwsn = TwoPNCFormulation::pwsn,
+        pnsw = TwoPNCFormulation::pnsw,
 
         // phase indices
         wPhaseIdx = FluidSystem::wPhaseIdx,
@@ -194,9 +194,9 @@ public:
         }
         else if (phasePresence == bothPhases)
         {
-            if (formulation == plSg)
+            if (formulation == pwsn)
                 Sg = priVars[switchIdx];
-            else if (formulation == pgSl)
+            else if (formulation == pnsw)
                 Sg = 1.0 - priVars[switchIdx];
             else
                 DUNE_THROW(Dune::InvalidStateException, "Formulation: " << formulation << " is invalid.");
@@ -218,14 +218,14 @@ public:
         auto pc = MaterialLaw::pc(materialParams, 1 - Sg);
 
         // extract the pressures
-        if (formulation == plSg)
+        if (formulation == pwsn)
         {
             fluidState.setPressure(wPhaseIdx, priVars[pressureIdx]);
             if (priVars[pressureIdx] + pc < 0.0)
                  DUNE_THROW(NumericalProblem,"Capillary pressure is too low");
             fluidState.setPressure(nPhaseIdx, priVars[pressureIdx] + pc);
         }
-        else if (formulation == pgSl)
+        else if (formulation == pnsw)
         {
             fluidState.setPressure(nPhaseIdx, priVars[pressureIdx]);
             // Here we check for (p_g - pc) in order to ensure that (p_l > 0)
diff --git a/dumux/porousmediumflow/2pncmin/implicit/model.hh b/dumux/porousmediumflow/2pncmin/implicit/model.hh
index fdc903b870..650a5f10fc 100644
--- a/dumux/porousmediumflow/2pncmin/implicit/model.hh
+++ b/dumux/porousmediumflow/2pncmin/implicit/model.hh
@@ -131,29 +131,12 @@ class TwoPNCMinModel: public GET_PROP_TYPE(TypeTag, BaseModel)
         dim = GridView::dimension,
         dimWorld = GridView::dimensionworld,
 
-        numEq = GET_PROP_VALUE(TypeTag, NumEq),
         numPhases = GET_PROP_VALUE(TypeTag, NumPhases),
         numSPhases = GET_PROP_VALUE(TypeTag, NumSPhases),
         numComponents = GET_PROP_VALUE(TypeTag, NumComponents),
-        numSecComponents = GET_PROP_VALUE(TypeTag, NumSecComponents),
-        numMajorComponents = GET_PROP_VALUE(TypeTag, NumMajorComponents),
-
-        pressureIdx = Indices::pressureIdx,
-        switchIdx = Indices::switchIdx,
 
         wPhaseIdx = Indices::wPhaseIdx,
-        nPhaseIdx = Indices::nPhaseIdx,
-
-        wCompIdx = FluidSystem::wCompIdx,
-        nCompIdx = FluidSystem::nCompIdx,
-
-        wPhaseOnly = Indices::wPhaseOnly,
-        nPhaseOnly = Indices::nPhaseOnly,
-        bothPhases = Indices::bothPhases,
-
-        plSg = TwoPNCFormulation::plSg,
-        pgSl = TwoPNCFormulation::pgSl,
-        formulation = GET_PROP_VALUE(TypeTag, Formulation)
+        nPhaseIdx = Indices::nPhaseIdx
     };
 
     using Vertex = typename GridView::template Codim<dim>::Entity;
diff --git a/dumux/porousmediumflow/2pncmin/implicit/volumevariables.hh b/dumux/porousmediumflow/2pncmin/implicit/volumevariables.hh
index f681c635fb..4135aadfbd 100644
--- a/dumux/porousmediumflow/2pncmin/implicit/volumevariables.hh
+++ b/dumux/porousmediumflow/2pncmin/implicit/volumevariables.hh
@@ -76,8 +76,8 @@ class TwoPNCMinVolumeVariables : public TwoPNCVolumeVariables<TypeTag>
 
         // formulations
         formulation = GET_PROP_VALUE(TypeTag, Formulation),
-        plSg = TwoPNCFormulation::plSg,
-        pgSl = TwoPNCFormulation::pgSl,
+        pwsn = TwoPNCFormulation::pwsn,
+        pnsw = TwoPNCFormulation::pnsw,
 
         // phase indices
         wPhaseIdx = FluidSystem::wPhaseIdx,
@@ -194,9 +194,9 @@ public:
         }
         else if (phasePresence == bothPhases)
         {
-            if (formulation == plSg)
+            if (formulation == pwsn)
                 Sg = priVars[switchIdx];
-            else if (formulation == pgSl)
+            else if (formulation == pnsw)
                 Sg = 1.0 - priVars[switchIdx];
             else
                 DUNE_THROW(Dune::InvalidStateException, "Formulation: " << formulation << " is invalid.");
@@ -218,14 +218,14 @@ public:
         auto pc = MaterialLaw::pc(materialParams, 1 - Sg);
 
         // extract the pressures
-        if (formulation == plSg)
+        if (formulation == pwsn)
         {
             fluidState.setPressure(wPhaseIdx, priVars[pressureIdx]);
             if (priVars[pressureIdx] + pc < 0.0)
                  DUNE_THROW(Dumux::NumericalProblem, "Capillary pressure is too low");
             fluidState.setPressure(nPhaseIdx, priVars[pressureIdx] + pc);
         }
-        else if (formulation == pgSl)
+        else if (formulation == pnsw)
         {
             fluidState.setPressure(nPhaseIdx, priVars[pressureIdx]);
             // Here we check for (p_g - pc) in order to ensure that (p_l > 0)
diff --git a/test/porousmediumflow/2pnc/implicit/fuelcellproblem.hh b/test/porousmediumflow/2pnc/implicit/fuelcellproblem.hh
index c0c845a4b1..4984fdd1fd 100644
--- a/test/porousmediumflow/2pnc/implicit/fuelcellproblem.hh
+++ b/test/porousmediumflow/2pnc/implicit/fuelcellproblem.hh
@@ -50,7 +50,7 @@ SET_TYPE_PROP(FuelCellProblem, Grid, Dune::YaspGrid<2>);
 // Set the problem property
 SET_TYPE_PROP(FuelCellProblem, Problem, FuelCellProblem<TypeTag>);
 // Set the primary variable combination for the 2pnc model
-SET_INT_PROP(FuelCellProblem, Formulation, TwoPNCFormulation::pgSl);
+SET_INT_PROP(FuelCellProblem, Formulation, TwoPNCFormulation::pnsw);
 
 // Set fluid configuration
 SET_PROP(FuelCellProblem, FluidSystem)
diff --git a/test/porousmediumflow/2pncmin/implicit/dissolutionproblem.hh b/test/porousmediumflow/2pncmin/implicit/dissolutionproblem.hh
index c08f541cc8..22b578d94b 100644
--- a/test/porousmediumflow/2pncmin/implicit/dissolutionproblem.hh
+++ b/test/porousmediumflow/2pncmin/implicit/dissolutionproblem.hh
@@ -64,7 +64,7 @@ SET_BOOL_PROP(DissolutionProblem, ProblemEnableGravity, true);
 
 //Set properties here to override the default property settings in the model.
 SET_INT_PROP(DissolutionProblem, ReplaceCompEqIdx, 1); //! Replace gas balance by total mass balance
-SET_INT_PROP(DissolutionProblem, Formulation, TwoPNCFormulation::pgSl);
+SET_INT_PROP(DissolutionProblem, Formulation, TwoPNCFormulation::pnsw);
 }
 
 /*!
diff --git a/test/references/injectionbox-reference.vtu b/test/references/injectionbox-reference.vtu
index 3f58502c71..9aca984029 100644
--- a/test/references/injectionbox-reference.vtu
+++ b/test/references/injectionbox-reference.vtu
@@ -734,13 +734,13 @@
           1 1 1 1 1 1 1 1 1 1 1 1
           1 1 1 1 1 1 1 1 1 1 1 1
           1 1 1 1 1 1 1 1 1 1 1 1
-          1 1 2 2 1 1 1 1 1 1 1 1
+          1 1 3 3 1 1 1 1 1 1 1 1
           1 1 1 1 1 1 1 1 1 1 1 1
-          1 1 1 2 2 1 1 1 1 1 1 1
+          1 1 1 3 3 1 1 1 1 1 1 1
           1 1 1 1 1 1 1 1 1 1 1 1
-          1 1 1 1 2 2 1 1 1 1 1 1
+          1 1 1 1 3 3 1 1 1 1 1 1
           1 1 1 1 1 1 1 1 1 1 1 1
-          1 1 1 1 1 1 2 1 1 1 1 1
+          1 1 1 1 1 1 3 1 1 1 1 1
           1 1 1 1 1 1 1 1 1 1 1 1
           1 1 1 1 1 1 1 1 1 1 1 1
           1 1 1 1 1 1 1 1 1 1 1 1
diff --git a/test/references/injectioncc-reference.vtu b/test/references/injectioncc-reference.vtu
index 611e2c4b72..a24b1ff570 100644
--- a/test/references/injectioncc-reference.vtu
+++ b/test/references/injectioncc-reference.vtu
@@ -657,13 +657,13 @@
           1 1 1 1 1 1 1 1 1 1 1 1
           1 1 1 1 1 1 1 1 1 1 1 1
           1 1 1 1 1 1 1 1 1 1 1 1
-          1 1 1 1 1 1 1 1 1 1 1 2
+          1 1 1 1 1 1 1 1 1 1 1 3
           1 1 1 1 1 1 1 1 1 1 1 1
-          1 1 1 1 1 1 1 1 1 1 1 2
+          1 1 1 1 1 1 1 1 1 1 1 3
           1 1 1 1 1 1 1 1 1 1 1 1
-          1 1 1 1 1 1 1 1 1 1 1 2
+          1 1 1 1 1 1 1 1 1 1 1 3
           1 1 1 1 1 1 1 1 1 1 1 1
-          1 1 1 1 1 1 1 1 1 1 1 2
+          1 1 1 1 1 1 1 1 1 1 1 3
           1 1 1 1 1 1 1 1 1 1 1 1
           1 1 1 1 1 1 1 1 1 1 1 1
           1 1 1 1 1 1 1 1 1 1 1 1
diff --git a/test/references/waterairbox-reference.vtu b/test/references/waterairbox-reference.vtu
index c93f5e54a3..3afbe29f55 100644
--- a/test/references/waterairbox-reference.vtu
+++ b/test/references/waterairbox-reference.vtu
@@ -6752,28 +6752,28 @@
           1 1 1 1 1 1 1 1 1 1 1 1
           1 1 1 1 1 1 1 1 1 1 1 1
           1 1 1 1 1 1 1 1 1 1 1 1
-          1 1 1 1 1 1 1 1 1 1 2 1
-          2 2 2 2 2 2 2 2 2 2 2 2
-          2 2 2 2 2 2 2 2 2 2 2 2
-          2 2 2 2 2 2 2 2 2 2 2 1
+          1 1 1 1 1 1 1 1 1 1 3 1
+          3 3 3 3 3 3 3 3 3 3 3 3
+          3 3 3 3 3 3 3 3 3 3 3 3
+          3 3 3 3 3 3 3 3 3 3 3 1
           1 1 1 1 1 1 1 1 1 1 1 1
           1 1 1 1 1 1 1 1 1 1 1 1
           1 1 1 1 1 1 1 1 1 1 1 1
           1 1 1 1 1 1 1 1 1 1 1 1
           1 1 1 1 1 1 1 1 1 1 1 1
-          1 1 1 1 1 1 1 1 1 1 2 2
-          2 2 2 2 2 2 2 2 2 2 2 2
-          2 2 2 1 1 1 1 1 1 1 1 1
+          1 1 1 1 1 1 1 1 1 1 3 3
+          3 3 3 3 3 3 3 3 3 3 3 3
+          3 3 3 1 1 1 1 1 1 1 1 1
           1 1 1 1 1 1 1 1 1 1 1 1
           1 1 1 1 1 1 1 1 1 1 1 1
           1 1 1 1 1 1 1 1 1 1 1 1
-          1 1 1 1 2 2 2 2 2 2 2 2
-          2 2 2 2 2 2 2 1 1 1 1 1
+          1 1 1 1 3 3 3 3 3 3 3 3
+          3 3 3 3 3 3 3 1 1 1 1 1
           1 1 1 1 1 1 1 1 1 1 1 1
           1 1 1 1 1 1 1 1 1 1 1 1
           1 1 1 1 1 1 1 1 1 1 1 1
           1 1 1 1 1 1 1 1 1 1 1 1
-          1 1 1 1 1 2 2 2 2 2 1 1
+          1 1 1 1 1 3 3 3 3 3 1 1
           1 1 1 1 1 1 1 1 1 1 1 1
           1 1 1 1 1 1 1 1 1 1 1 1
           1 1 1 1 1 1 1 1 1 1 1 1
diff --git a/test/references/wateraircc-reference.vtu b/test/references/wateraircc-reference.vtu
index baf705f762..6d27c8f6fc 100644
--- a/test/references/wateraircc-reference.vtu
+++ b/test/references/wateraircc-reference.vtu
@@ -6541,25 +6541,25 @@
         </DataArray>
         <DataArray type="Float32" Name="phase presence" NumberOfComponents="1" format="ascii">
           1 1 1 1 1 1 1 1 1 1 1 1
-          1 1 1 1 1 1 1 1 1 1 2 2
-          2 2 2 2 2 2 2 2 2 2 2 2
-          2 2 2 2 2 1 1 1 1 1 1 1
+          1 1 1 1 1 1 1 1 1 1 3 3
+          3 3 3 3 3 3 3 3 3 3 3 3
+          3 3 3 3 3 1 1 1 1 1 1 1
           1 1 1 1 1 1 1 1 1 1 1 1
           1 1 1 1 1 1 1 1 1 1 1 1
           1 1 1 1 1 1 1 1 1 1 1 1
-          1 1 1 2 2 2 2 2 2 2 2 2
-          2 2 2 2 2 2 2 2 2 1 1 1
+          1 1 1 3 3 3 3 3 3 3 3 3
+          3 3 3 3 3 3 3 3 3 1 1 1
           1 1 1 1 1 1 1 1 1 1 1 1
           1 1 1 1 1 1 1 1 1 1 1 1
           1 1 1 1 1 1 1 1 1 1 1 1
-          1 1 1 1 1 1 1 2 2 2 2 2
-          2 2 2 2 2 2 2 2 2 2 2 2
-          2 1 1 1 1 1 1 1 1 1 1 1
+          1 1 1 1 1 1 1 3 3 3 3 3
+          3 3 3 3 3 3 3 3 3 3 3 3
+          3 1 1 1 1 1 1 1 1 1 1 1
           1 1 1 1 1 1 1 1 1 1 1 1
           1 1 1 1 1 1 1 1 1 1 1 1
           1 1 1 1 1 1 1 1 1 1 1 1
-          2 2 2 2 2 2 2 2 2 2 2 2
-          2 2 2 2 1 1 1 1 1 1 1 1
+          3 3 3 3 3 3 3 3 3 3 3 3
+          3 3 3 3 1 1 1 1 1 1 1 1
           1 1 1 1 1 1 1 1 1 1 1 1
           1 1 1 1 1 1 1 1 1 1 1 1
           1 1 1 1 1 1 1 1 1 1 1 1
-- 
GitLab