From 8385de5567ef9122a2831539072f304873c118fd Mon Sep 17 00:00:00 2001
From: Timo Koch <timo.koch@iws.uni-stuttgart.de>
Date: Sun, 17 Oct 2021 21:19:13 +0200
Subject: [PATCH] [md][boundary][ffmomentumpm] Make volvars interface private

---
 .../ffmasspm/couplingmanager.hh               | 30 +++++++++---------
 .../ffmomentumpm/couplingmanager.hh           | 31 +++++++++----------
 2 files changed, 30 insertions(+), 31 deletions(-)

diff --git a/dumux/multidomain/boundary/freeflowporousmedium/ffmasspm/couplingmanager.hh b/dumux/multidomain/boundary/freeflowporousmedium/ffmasspm/couplingmanager.hh
index 15281f1a0e..09b317561d 100644
--- a/dumux/multidomain/boundary/freeflowporousmedium/ffmasspm/couplingmanager.hh
+++ b/dumux/multidomain/boundary/freeflowporousmedium/ffmasspm/couplingmanager.hh
@@ -222,20 +222,6 @@ public:
     bool isCoupled(Dune::index_constant<i> domainI, const SubControlVolumeFace<i>& scvf) const
     { return couplingMapper_.isCoupled(domainI, scvf); }
 
-    //! Return the volume variables of domain i for a given element and scv
-    template<std::size_t i>
-    VolumeVariables<i> volVars(Dune::index_constant<i> domainI,
-                               const Element<i>& element,
-                               const SubControlVolume<i>& scv) const
-    {
-        VolumeVariables<i> volVars;
-        const auto elemSol = elementSolution(
-            element, this->curSol(domainI), problem(domainI).gridGeometry()
-        );
-        volVars.update(elemSol, problem(domainI), element, scv);
-        return volVars;
-    }
-
     template<std::size_t i>
     Problem<i>& problem(Dune::index_constant<i> domainI)
     {
@@ -262,6 +248,20 @@ private:
     bool isCoupledElement_(Dune::index_constant<i> domainI, std::size_t eIdx) const
     { return couplingMapper_.isCoupledElement(domainI, eIdx); }
 
+    //! Return the volume variables of domain i for a given element and scv
+    template<std::size_t i>
+    VolumeVariables<i> volVars_(Dune::index_constant<i> domainI,
+                                const Element<i>& element,
+                                const SubControlVolume<i>& scv) const
+    {
+        VolumeVariables<i> volVars;
+        const auto elemSol = elementSolution(
+            element, this->curSol(domainI), this->problem(domainI).gridGeometry()
+        );
+        volVars.update(elemSol, this->problem(domainI), element, scv);
+        return volVars;
+    }
+
     /*!
      * \brief prepares all data and variables that are necessary to evaluate the residual of an Darcy element (i.e. Stokes information)
      */
@@ -302,7 +302,7 @@ private:
                 // there is only one scv for TPFA
                 context.push_back({
                     otherElement,
-                    volVars(domainJ, otherElement, *std::begin(scvs(otherFvGeometry))),
+                    volVars_(domainJ, otherElement, *std::begin(scvs(otherFvGeometry))),
                     std::move(otherFvGeometry),
                     otherElementIdx,
                     scvf.index(),
diff --git a/dumux/multidomain/boundary/freeflowporousmedium/ffmomentumpm/couplingmanager.hh b/dumux/multidomain/boundary/freeflowporousmedium/ffmomentumpm/couplingmanager.hh
index a9e51cb25a..c8193ac264 100644
--- a/dumux/multidomain/boundary/freeflowporousmedium/ffmomentumpm/couplingmanager.hh
+++ b/dumux/multidomain/boundary/freeflowporousmedium/ffmomentumpm/couplingmanager.hh
@@ -315,21 +315,6 @@ public:
         return velocity;
     }
 
-
-    //! Return the volume variables of domain i for a given element and scv
-    template<std::size_t i>
-    VolumeVariables<i> volVars(Dune::index_constant<i> domainI,
-                               const Element<i>& element,
-                               const SubControlVolume<i>& scv) const
-    {
-        VolumeVariables<i> volVars;
-        const auto elemSol = elementSolution(
-            element, this->curSol(domainI), problem(domainI).gridGeometry()
-        );
-        volVars.update(elemSol, problem(domainI), element, scv);
-        return volVars;
-    }
-
     template<std::size_t i>
     Problem<i>& problem(Dune::index_constant<i> domainI)
     {
@@ -349,6 +334,20 @@ public:
     }
 
 private:
+    //! Return the volume variables of domain i for a given element and scv
+    template<std::size_t i>
+    VolumeVariables<i> volVars_(Dune::index_constant<i> domainI,
+                                const Element<i>& element,
+                                const SubControlVolume<i>& scv) const
+    {
+        VolumeVariables<i> volVars;
+        const auto elemSol = elementSolution(
+            element, this->curSol(domainI), problem(domainI).gridGeometry()
+        );
+        volVars.update(elemSol, problem(domainI), element, scv);
+        return volVars;
+    }
+
     /*!
      * \brief Returns whether a given scvf is coupled to the other domain
      */
@@ -398,7 +397,7 @@ private:
                     // there is only one scv for TPFA
                     context.push_back({
                         otherElement,
-                        volVars(domainJ, otherElement, *std::begin(scvs(otherFvGeometry))),
+                        volVars_(domainJ, otherElement, *std::begin(scvs(otherFvGeometry))),
                         std::move(otherFvGeometry),
                         scvf.index(),
                         couplingMapper_.flipScvfIndex(domainI, scvf),
-- 
GitLab