diff --git a/dumux/multidomain/boundary/freeflowporousmedium/ffmasspm/couplingmanager.hh b/dumux/multidomain/boundary/freeflowporousmedium/ffmasspm/couplingmanager.hh index 15281f1a0e310c7fc28f29bb5e7cc1824afdf44d..09b317561d8e958c01e1701f4bd0aa0a5db2bb01 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 a9e51cb25a2302ff024ac236a7a4e81a44002796..c8193ac26430470d82c1e7ff294bb1575290b0c2 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),