From 1fb7860720c08942c4166070b27bb138815a1be5 Mon Sep 17 00:00:00 2001
From: Simon Scholz <simon.scholz@iws.uni-stuttgart.de>
Date: Wed, 25 Jul 2018 13:55:35 +0200
Subject: [PATCH] [volVars][2p] fix wrong index in saturation update

---
 dumux/porousmediumflow/2p/volumevariables.hh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/dumux/porousmediumflow/2p/volumevariables.hh b/dumux/porousmediumflow/2p/volumevariables.hh
index 407eb6d20c..9ef23d8de4 100644
--- a/dumux/porousmediumflow/2p/volumevariables.hh
+++ b/dumux/porousmediumflow/2p/volumevariables.hh
@@ -170,8 +170,8 @@ public:
             }
             else
             {
-                fluidState.setSaturation(phase1Idx, priVars[saturationIdx]);
-                fluidState.setSaturation(phase0Idx, 1 - priVars[saturationIdx]);
+                fluidState.setSaturation(phase0Idx, priVars[saturationIdx]);
+                fluidState.setSaturation(phase1Idx, 1 - priVars[saturationIdx]);
                 pc_ = MaterialLaw::pc(materialParams, fluidState.saturation(wPhaseIdx));
                 fluidState.setPressure(phase0Idx, priVars[pressureIdx] - pc_);
             }
-- 
GitLab