Skip to content
Snippets Groups Projects
Commit 8385de55 authored by Timo Koch's avatar Timo Koch
Browse files

[md][boundary][ffmomentumpm] Make volvars interface private

parent fe48378e
No related branches found
No related tags found
1 merge request!2826[md][ff-pm] Add freeflow porous medium coupling managers and test
......@@ -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(),
......
......@@ -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),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment