From 6c41b226b761448f9f8df2fd2943c5278ab3685c Mon Sep 17 00:00:00 2001
From: Katharina Heck <katharina.heck@iws.uni-stuttgart.de>
Date: Fri, 17 Feb 2017 16:13:00 +0100
Subject: [PATCH] [fix] various small fixes

---
 .../cellcentered/bboxtreecouplingmanagersimple.hh      | 10 ++++++----
 .../compositional/primaryvariableswitch.hh             |  2 +-
 test/porousmediumflow/2p2c/implicit/waterairproblem.hh |  2 +-
 3 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/dumux/mixeddimension/embedded/cellcentered/bboxtreecouplingmanagersimple.hh b/dumux/mixeddimension/embedded/cellcentered/bboxtreecouplingmanagersimple.hh
index 2fe54b415e..f48d229325 100644
--- a/dumux/mixeddimension/embedded/cellcentered/bboxtreecouplingmanagersimple.hh
+++ b/dumux/mixeddimension/embedded/cellcentered/bboxtreecouplingmanagersimple.hh
@@ -86,7 +86,8 @@ class CCBBoxTreeEmbeddedCouplingManagerSimple
     using LowDimProblem = typename GET_PROP_TYPE(LowDimProblemTypeTag, Problem);
     using LowDimPointSource = typename GET_PROP_TYPE(LowDimProblemTypeTag, PointSource);
     using LowDimPrimaryVariables = typename GET_PROP_TYPE(LowDimProblemTypeTag, PrimaryVariables);
-    using LowDimVolumeVariables = typename GET_PROP_TYPE(BulkProblemTypeTag, VolumeVariables);
+    using LowDimElementSolutionVector = typename GET_PROP_TYPE(LowDimProblemTypeTag, ElementSolutionVector);
+    using LowDimVolumeVariables = typename GET_PROP_TYPE(LowDimProblemTypeTag, VolumeVariables);
     using LowDimElementVolumeVariables = typename GET_PROP_TYPE(LowDimProblemTypeTag, ElementVolumeVariables);
     using LowDimFVElementGeometry = typename GET_PROP_TYPE(LowDimProblemTypeTag, FVElementGeometry);
     using LowDimElementBoundaryTypes = typename GET_PROP_TYPE(LowDimProblemTypeTag, ElementBoundaryTypes);
@@ -410,14 +411,15 @@ public:
     //! Compute lowDim volume variables for the identifier id
     LowDimVolumeVariables lowDimVolVars(unsigned int id) const
     {
-        const auto& data = pointSourceData_[id];
+        auto& data = pointSourceData_[id];
+        auto lowDimPriVars = data.interpolateLowDim(lowDimProblem().model().curSol());
+
         const auto element = lowDimProblem().model().globalFvGeometry().element(data.lowDimElementIdx());
         auto fvGeometry = localView(lowDimProblem().model().globalFvGeometry());
         fvGeometry.bindElement(element);
 
-        const auto& curSol = lowDimProblem().model().curSol();
         LowDimVolumeVariables volVars;
-        volVars.update(lowDimProblem().model().elementSolution(element, curSol),
+        volVars.update(LowDimElementSolutionVector({lowDimPriVars}),
                        lowDimProblem(),
                        element,
                        fvGeometry.scv(data.lowDimElementIdx()));
diff --git a/dumux/porousmediumflow/compositional/primaryvariableswitch.hh b/dumux/porousmediumflow/compositional/primaryvariableswitch.hh
index 72dd6919ae..e9485dd050 100644
--- a/dumux/porousmediumflow/compositional/primaryvariableswitch.hh
+++ b/dumux/porousmediumflow/compositional/primaryvariableswitch.hh
@@ -194,7 +194,7 @@ public:
                     visited_[dofIdxGlobal] = true;
                     // Compute temporary volVars on which grounds we decide
                     // if we need to switch the primary variables
-                    auto&& volVars = curGlobalVolVars.volVars(scv);
+                    auto&& volVars = curGlobalVolVars.volVars(scv.index());
                     volVars.update(curElemSol, problem, element, scv);
 
                     if (asImp_().update_(curSol[dofIdxGlobal], volVars, dofIdxGlobal, scv.dofPosition()))
diff --git a/test/porousmediumflow/2p2c/implicit/waterairproblem.hh b/test/porousmediumflow/2p2c/implicit/waterairproblem.hh
index bad5734c30..407ff58d52 100644
--- a/test/porousmediumflow/2p2c/implicit/waterairproblem.hh
+++ b/test/porousmediumflow/2p2c/implicit/waterairproblem.hh
@@ -304,7 +304,7 @@ public:
 
 #if !ISOTHERMAL
         if (globalPos[0] > 20 - eps_ && globalPos[0] < 30 + eps_ && globalPos[1] < 30 + eps_)
-            values[temperatureIdx] = 380;
+            priVars[temperatureIdx] = 380;
 #endif
         return priVars;
     }
-- 
GitLab