Commit 9da4d501 authored by Kilian Weishaupt's avatar Kilian Weishaupt
Browse files

[md][stokesDarcy] Make couplingContext bind itself

* if a couplingContext is not yet correctly bound, it now can just
  do that itself
* change the signature of some methods to have the element at hand
parent 829065ed
......@@ -188,7 +188,7 @@ public:
*
* This member function must be overloaded in the problem implementation, if the BJS boundary condition is used.
*/
Scalar permeability(const SubControlVolumeFace& scvf) const
Scalar permeability(const Element& element, const SubControlVolumeFace& scvf) const
{
DUNE_THROW(Dune::NotImplemented, "When using the Beavers-Joseph-Saffman boundary condition, the permeability must be returned in the acutal problem");
}
......@@ -204,7 +204,8 @@ public:
}
//! helper function to evaluate the slip velocity on the boundary when the Beavers-Joseph-Saffman condition is used
const Scalar bjsVelocity(const SubControlVolumeFace& scvf,
const Scalar bjsVelocity(const Element& element,
const SubControlVolumeFace& scvf,
const SubControlVolumeFace& normalFace,
const Scalar& localSubFaceIdx,
const Scalar& velocitySelf) const
......@@ -213,7 +214,7 @@ public:
// du/dy = (u_center - u_boundary) / deltaY
// u_boundary = u_center / (alpha/sqrt(K)*deltaY + 1)
using std::sqrt;
const Scalar K = asImp_().permeability(normalFace);
const Scalar K = asImp_().permeability(element, normalFace);
const Scalar alpha = asImp_().alphaBJ(normalFace);
return velocitySelf / (alpha / sqrt(K) * scvf.pairData(localSubFaceIdx).parallelDistance + 1.0);
}
......
......@@ -400,7 +400,7 @@ private:
// Check if we have a Beavers-Joseph-Saffman condition.
// If yes, the parallel velocity at the boundary is calculated accordingly.
if (lateralFaceHasBJS)
return problem.bjsVelocity(scvf, normalFace, localSubFaceIdx, velocitySelf);
return problem.bjsVelocity(element, scvf, normalFace, localSubFaceIdx, velocitySelf);
const auto ghostFace = makeParallelGhostFace_(scvf, localSubFaceIdx);
......@@ -524,7 +524,7 @@ private:
{
const auto ghostFace = makeParallelGhostFace_(scvf, localSubFaceIdx);
if (lateralFaceHasBJS)
return problem.bjsVelocity(scvf, normalFace, localSubFaceIdx, innerParallelVelocity);
return problem.bjsVelocity(element, scvf, normalFace, localSubFaceIdx, innerParallelVelocity);
return problem.dirichlet(element, ghostFace)[Indices::velocity(scvf.directionIndex())];
};
......
......@@ -334,7 +334,7 @@ public:
if (normalFace.center()[normalNormDim] < cellCenter_[elementIdx][normalNormDim])
neighborIdx = neighborIdx_[elementIdx][normalNormDim][1];
bjsVelocityAverage[normalNormDim] += ParentType::bjsVelocity(scvf, normalFace, localSubFaceIdx, velocity_[elementIdx][velIdx]);
bjsVelocityAverage[normalNormDim] += ParentType::bjsVelocity(element, scvf, normalFace, localSubFaceIdx, velocity_[elementIdx][velIdx]);
if (bjsNumFaces[normalNormDim] > 0 && neighborIdx != bjsNeighbor[normalNormDim])
DUNE_THROW(Dune::InvalidStateException, "Two different neighborIdx should not occur");
bjsNeighbor[normalNormDim] = neighborIdx;
......
......@@ -233,6 +233,7 @@ class StokesDarcyCouplingDataImplementationBase
template<std::size_t id> using SubDomainTypeTag = typename MDTraits::template SubDomainTypeTag<id>;
template<std::size_t id> using FVGridGeometry = GetPropType<SubDomainTypeTag<id>, Properties::FVGridGeometry>;
template<std::size_t id> using Element = typename FVGridGeometry<id>::GridView::template Codim<0>::Entity;
template<std::size_t id> using FVElementGeometry = typename FVGridGeometry<id>::LocalView;
template<std::size_t id> using SubControlVolumeFace = typename FVGridGeometry<id>::LocalView::SubControlVolumeFace;
template<std::size_t id> using SubControlVolume = typename FVGridGeometry<id>::LocalView::SubControlVolume;
......@@ -285,9 +286,9 @@ public:
/*!
* \brief Returns the intrinsic permeability of the coupled Darcy element.
*/
Scalar darcyPermeability(const SubControlVolumeFace<stokesIdx>& scvf) const
Scalar darcyPermeability(const Element<stokesIdx>& element, const SubControlVolumeFace<stokesIdx>& scvf) const
{
const auto& stokesContext = couplingManager().stokesCouplingContext(scvf);
const auto& stokesContext = couplingManager().stokesCouplingContext(element, scvf);
return stokesContext.volVars.permeability();
}
......@@ -299,7 +300,8 @@ public:
*
*/
template<class ElementFaceVariables>
Scalar momentumCouplingCondition(const FVElementGeometry<stokesIdx>& fvGeometry,
Scalar momentumCouplingCondition(const Element<stokesIdx>& element,
const FVElementGeometry<stokesIdx>& fvGeometry,
const ElementVolumeVariables<stokesIdx>& stokesElemVolVars,
const ElementFaceVariables& stokesElemFaceVars,
const SubControlVolumeFace<stokesIdx>& scvf) const
......@@ -307,7 +309,7 @@ public:
static constexpr auto numPhasesDarcy = GetPropType<SubDomainTypeTag<darcyIdx>, Properties::ModelTraits>::numPhases();
Scalar momentumFlux(0.0);
const auto& stokesContext = couplingManager_.stokesCouplingContext(scvf);
const auto& stokesContext = couplingManager_.stokesCouplingContext(element, scvf);
const auto darcyPhaseIdx = couplingPhaseIdx(darcyIdx);
// - p_pm * n_pm = p_pm * n_ff
......@@ -325,7 +327,7 @@ public:
const Scalar rho = stokesContext.volVars.density(darcyPhaseIdx);
const Scalar distance = (stokesContext.element.geometry().center() - scvf.center()).two_norm();
const Scalar g = -scvf.directionSign() * couplingManager_.problem(darcyIdx).gravity()[scvf.directionIndex()];
const Scalar interfacePressure = ((scvf.directionSign() * velocity * (mu/darcyPermeability(scvf))) + rho * g) * distance + darcyPressure;
const Scalar interfacePressure = ((scvf.directionSign() * velocity * (mu/darcyPermeability(element, scvf))) + rho * g) * distance + darcyPressure;
momentumFlux = interfacePressure;
}
......@@ -477,6 +479,7 @@ class StokesDarcyCouplingDataImplementation<MDTraits, CouplingManager, enableEne
using SubDomainTypeTag = typename MDTraits::template SubDomainTypeTag<id>;
template<std::size_t id> using FVGridGeometry = GetPropType<SubDomainTypeTag<id>, Properties::FVGridGeometry>;
template<std::size_t id> using Element = typename FVGridGeometry<id>::GridView::template Codim<0>::Entity;
template<std::size_t id> using FVElementGeometry = typename FVGridGeometry<id>::LocalView;
template<std::size_t id> using SubControlVolumeFace = typename FVGridGeometry<id>::LocalView::SubControlVolumeFace;
template<std::size_t id> using SubControlVolume = typename FVGridGeometry<id>::LocalView::SubControlVolume;
......@@ -497,11 +500,12 @@ public:
/*!
* \brief Returns the mass flux across the coupling boundary as seen from the Darcy domain.
*/
Scalar massCouplingCondition(const FVElementGeometry<darcyIdx>& fvGeometry,
Scalar massCouplingCondition(const Element<darcyIdx>& element,
const FVElementGeometry<darcyIdx>& fvGeometry,
const ElementVolumeVariables<darcyIdx>& darcyElemVolVars,
const SubControlVolumeFace<darcyIdx>& scvf) const
{
const auto& darcyContext = this->couplingManager().darcyCouplingContext(scvf);
const auto& darcyContext = this->couplingManager().darcyCouplingContext(element, scvf);
const Scalar velocity = darcyContext.velocity * scvf.unitOuterNormal();
const Scalar darcyDensity = darcyElemVolVars[scvf.insideScvIdx()].density(couplingPhaseIdx(darcyIdx));
const Scalar stokesDensity = darcyContext.volVars.density();
......@@ -513,12 +517,13 @@ public:
/*!
* \brief Returns the mass flux across the coupling boundary as seen from the free-flow domain.
*/
Scalar massCouplingCondition(const FVElementGeometry<stokesIdx>& fvGeometry,
Scalar massCouplingCondition(const Element<stokesIdx>& element,
const FVElementGeometry<stokesIdx>& fvGeometry,
const ElementVolumeVariables<stokesIdx>& stokesElemVolVars,
const ElementFaceVariables<stokesIdx>& stokesElemFaceVars,
const SubControlVolumeFace<stokesIdx>& scvf) const
{
const auto& stokesContext = this->couplingManager().stokesCouplingContext(scvf);
const auto& stokesContext = this->couplingManager().stokesCouplingContext(element, scvf);
const Scalar velocity = stokesElemFaceVars[scvf].velocitySelf();
const Scalar stokesDensity = stokesElemVolVars[scvf.insideScvIdx()].density();
const Scalar darcyDensity = stokesContext.volVars.density(couplingPhaseIdx(darcyIdx));
......@@ -531,12 +536,13 @@ public:
* \brief Returns the energy flux across the coupling boundary as seen from the Darcy domain.
*/
template<bool isNI = enableEnergyBalance, typename std::enable_if_t<isNI, int> = 0>
Scalar energyCouplingCondition(const FVElementGeometry<darcyIdx>& fvGeometry,
Scalar energyCouplingCondition(const Element<darcyIdx>& element,
const FVElementGeometry<darcyIdx>& fvGeometry,
const ElementVolumeVariables<darcyIdx>& darcyElemVolVars,
const SubControlVolumeFace<darcyIdx>& scvf,
const DiffusionCoefficientAveragingType diffCoeffAvgType = DiffusionCoefficientAveragingType::ffOnly) const
{
const auto& darcyContext = this->couplingManager().darcyCouplingContext(scvf);
const auto& darcyContext = this->couplingManager().darcyCouplingContext(element, scvf);
const auto& darcyVolVars = darcyElemVolVars[scvf.insideScvIdx()];
const auto& stokesVolVars = darcyContext.volVars;
......@@ -551,13 +557,14 @@ public:
* \brief Returns the energy flux across the coupling boundary as seen from the free-flow domain.
*/
template<bool isNI = enableEnergyBalance, typename std::enable_if_t<isNI, int> = 0>
Scalar energyCouplingCondition(const FVElementGeometry<stokesIdx>& fvGeometry,
Scalar energyCouplingCondition(const Element<stokesIdx>& element,
const FVElementGeometry<stokesIdx>& fvGeometry,
const ElementVolumeVariables<stokesIdx>& stokesElemVolVars,
const ElementFaceVariables<stokesIdx>& stokesElemFaceVars,
const SubControlVolumeFace<stokesIdx>& scvf,
const DiffusionCoefficientAveragingType diffCoeffAvgType = DiffusionCoefficientAveragingType::ffOnly) const
{
const auto& stokesContext = this->couplingManager().stokesCouplingContext(scvf);
const auto& stokesContext = this->couplingManager().stokesCouplingContext(element, scvf);
const auto& stokesVolVars = stokesElemVolVars[scvf.insideScvIdx()];
const auto& darcyVolVars = stokesContext.volVars;
......@@ -636,6 +643,7 @@ class StokesDarcyCouplingDataImplementation<MDTraits, CouplingManager, enableEne
using SubDomainTypeTag = typename MDTraits::template SubDomainTypeTag<id>;
template<std::size_t id> using FVGridGeometry = GetPropType<SubDomainTypeTag<id>, Properties::FVGridGeometry>;
template<std::size_t id> using Element = typename FVGridGeometry<id>::GridView::template Codim<0>::Entity;
template<std::size_t id> using FVElementGeometry = typename FVGridGeometry<id>::LocalView;
template<std::size_t id> using SubControlVolumeFace = typename FVElementGeometry<id>::SubControlVolumeFace;
template<std::size_t id> using SubControlVolume = typename FVGridGeometry<id>::LocalView::SubControlVolume;
......@@ -671,13 +679,14 @@ public:
/*!
* \brief Returns the mass flux across the coupling boundary as seen from the Darcy domain.
*/
NumEqVector massCouplingCondition(const FVElementGeometry<darcyIdx>& fvGeometry,
NumEqVector massCouplingCondition(const Element<darcyIdx>& element,
const FVElementGeometry<darcyIdx>& fvGeometry,
const ElementVolumeVariables<darcyIdx>& darcyElemVolVars,
const SubControlVolumeFace<darcyIdx>& scvf,
const DiffusionCoefficientAveragingType diffCoeffAvgType = DiffusionCoefficientAveragingType::ffOnly) const
{
NumEqVector flux(0.0);
const auto& darcyContext = this->couplingManager().darcyCouplingContext(scvf);
const auto& darcyContext = this->couplingManager().darcyCouplingContext(element, scvf);
const auto& darcyVolVars = darcyElemVolVars[scvf.insideScvIdx()];
const auto& stokesVolVars = darcyContext.volVars;
const auto& outsideScv = (*scvs(darcyContext.fvGeometry).begin());
......@@ -694,14 +703,15 @@ public:
/*!
* \brief Returns the mass flux across the coupling boundary as seen from the free-flow domain.
*/
NumEqVector massCouplingCondition(const FVElementGeometry<stokesIdx>& fvGeometry,
NumEqVector massCouplingCondition(const Element<stokesIdx>& element,
const FVElementGeometry<stokesIdx>& fvGeometry,
const ElementVolumeVariables<stokesIdx>& stokesElemVolVars,
const ElementFaceVariables<stokesIdx>& stokesElemFaceVars,
const SubControlVolumeFace<stokesIdx>& scvf,
const DiffusionCoefficientAveragingType diffCoeffAvgType = DiffusionCoefficientAveragingType::ffOnly) const
{
NumEqVector flux(0.0);
const auto& stokesContext = this->couplingManager().stokesCouplingContext(scvf);
const auto& stokesContext = this->couplingManager().stokesCouplingContext(element, scvf);
const auto& stokesVolVars = stokesElemVolVars[scvf.insideScvIdx()];
const auto& darcyVolVars = stokesContext.volVars;
const auto& outsideScv = (*scvs(stokesContext.fvGeometry).begin());
......@@ -719,12 +729,13 @@ public:
* \brief Returns the energy flux across the coupling boundary as seen from the Darcy domain.
*/
template<bool isNI = enableEnergyBalance, typename std::enable_if_t<isNI, int> = 0>
Scalar energyCouplingCondition(const FVElementGeometry<darcyIdx>& fvGeometry,
Scalar energyCouplingCondition(const Element<darcyIdx>& element,
const FVElementGeometry<darcyIdx>& fvGeometry,
const ElementVolumeVariables<darcyIdx>& darcyElemVolVars,
const SubControlVolumeFace<darcyIdx>& scvf,
const DiffusionCoefficientAveragingType diffCoeffAvgType = DiffusionCoefficientAveragingType::ffOnly) const
{
const auto& darcyContext = this->couplingManager().darcyCouplingContext(scvf);
const auto& darcyContext = this->couplingManager().darcyCouplingContext(element, scvf);
const auto& darcyVolVars = darcyElemVolVars[scvf.insideScvIdx()];
const auto& stokesVolVars = darcyContext.volVars;
......@@ -739,13 +750,14 @@ public:
* \brief Returns the energy flux across the coupling boundary as seen from the free-flow domain.
*/
template<bool isNI = enableEnergyBalance, typename std::enable_if_t<isNI, int> = 0>
Scalar energyCouplingCondition(const FVElementGeometry<stokesIdx>& fvGeometry,
Scalar energyCouplingCondition(const Element<stokesIdx>& element,
const FVElementGeometry<stokesIdx>& fvGeometry,
const ElementVolumeVariables<stokesIdx>& stokesElemVolVars,
const ElementFaceVariables<stokesIdx>& stokesElemFaceVars,
const SubControlVolumeFace<stokesIdx>& scvf,
const DiffusionCoefficientAveragingType diffCoeffAvgType = DiffusionCoefficientAveragingType::ffOnly) const
{
const auto& stokesContext = this->couplingManager().stokesCouplingContext(scvf);
const auto& stokesContext = this->couplingManager().stokesCouplingContext(element, scvf);
const auto& stokesVolVars = stokesElemVolVars[scvf.insideScvIdx()];
const auto& darcyVolVars = stokesContext.volVars;
......
......@@ -187,18 +187,19 @@ public:
* \brief prepares all data and variables that are necessary to evaluate the residual of an Darcy element (i.e. Darcy information)
*/
template<std::size_t i, class Assembler, std::enable_if_t<(i == stokesCellCenterIdx || i == stokesFaceIdx), int> = 0>
void bindCouplingContext(Dune::index_constant<i> domainI, const Element<stokesCellCenterIdx>& element, const Assembler& assembler)
void bindCouplingContext(Dune::index_constant<i> domainI, const Element<stokesCellCenterIdx>& element, const Assembler& assembler) const
{ bindCouplingContext(domainI, element); }
/*!
* \brief prepares all data and variables that are necessary to evaluate the residual of an Darcy element (i.e. Darcy information)
*/
template<std::size_t i, std::enable_if_t<(i == stokesCellCenterIdx || i == stokesFaceIdx), int> = 0>
void bindCouplingContext(Dune::index_constant<i> domainI, const Element<stokesCellCenterIdx>& element)
void bindCouplingContext(Dune::index_constant<i> domainI, const Element<stokesCellCenterIdx>& element) const
{
stokesCouplingContext_.clear();
const auto stokesElementIdx = this->problem(stokesIdx).fvGridGeometry().elementMapper().index(element);
boundStokesElemIdx_ = stokesElementIdx;
// do nothing if the element is not coupled to the other domain
if(!couplingMapper_.stokesElementToDarcyElementMap().count(stokesElementIdx))
......@@ -227,17 +228,18 @@ public:
* \brief prepares all data and variables that are necessary to evaluate the residual of an Darcy element (i.e. Stokes information)
*/
template<class Assembler>
void bindCouplingContext(Dune::index_constant<darcyIdx> domainI, const Element<darcyIdx>& element, const Assembler& assembler)
void bindCouplingContext(Dune::index_constant<darcyIdx> domainI, const Element<darcyIdx>& element, const Assembler& assembler) const
{ bindCouplingContext(domainI, element); }
/*!
* \brief prepares all data and variables that are necessary to evaluate the residual of an Darcy element (i.e. Stokes information)
*/
void bindCouplingContext(Dune::index_constant<darcyIdx> domainI, const Element<darcyIdx>& element)
void bindCouplingContext(Dune::index_constant<darcyIdx> domainI, const Element<darcyIdx>& element) const
{
darcyCouplingContext_.clear();
const auto darcyElementIdx = this->problem(darcyIdx).fvGridGeometry().elementMapper().index(element);
boundDarcyElemIdx_ = darcyElementIdx;
// do nothing if the element is not coupled to the other domain
if(!couplingMapper_.darcyElementToStokesElementMap().count(darcyElementIdx))
......@@ -378,8 +380,11 @@ public:
/*!
* \brief Access the coupling context needed for the Stokes domain
*/
const auto& stokesCouplingContext(const SubControlVolumeFace<stokesIdx>& scvf) const
const auto& stokesCouplingContext(const Element<stokesIdx>& element, const SubControlVolumeFace<stokesIdx>& scvf) const
{
if (stokesCouplingContext_.empty() || boundStokesElemIdx_ != scvf.insideScvIdx())
bindCouplingContext(stokesIdx, element);
for(const auto& context : stokesCouplingContext_)
{
if(scvf.index() == context.stokesScvfIdx)
......@@ -392,8 +397,11 @@ public:
/*!
* \brief Access the coupling context needed for the Darcy domain
*/
const auto& darcyCouplingContext(const SubControlVolumeFace<darcyIdx>& scvf) const
const auto& darcyCouplingContext(const Element<darcyIdx>& element, const SubControlVolumeFace<darcyIdx>& scvf) const
{
if (darcyCouplingContext_.empty() || boundDarcyElemIdx_ != scvf.insideScvIdx())
bindCouplingContext(darcyIdx, element);
for(const auto& context : darcyCouplingContext_)
{
if(scvf.index() == context.darcyScvfIdx)
......@@ -544,8 +552,11 @@ private:
////////////////////////////////////////////////////////////////////////////
//! The coupling context
////////////////////////////////////////////////////////////////////////////
std::vector<StationaryStokesCouplingContext> stokesCouplingContext_;
std::vector<StationaryDarcyCouplingContext> darcyCouplingContext_;
mutable std::vector<StationaryStokesCouplingContext> stokesCouplingContext_;
mutable std::vector<StationaryDarcyCouplingContext> darcyCouplingContext_;
mutable std::size_t boundStokesElemIdx_;
mutable std::size_t boundDarcyElemIdx_;
CouplingMapper couplingMapper_;
};
......
......@@ -205,7 +205,7 @@ public:
NumEqVector values(0.0);
if (couplingManager().isCoupledEntity(CouplingManager::darcyIdx, scvf))
values = couplingManager().couplingData().massCouplingCondition(fvGeometry, elemVolVars, scvf, DiffusionCoefficientAveragingType::harmonic);
values = couplingManager().couplingData().massCouplingCondition(element, fvGeometry, elemVolVars, scvf, DiffusionCoefficientAveragingType::harmonic);
return values;
}
......
......@@ -231,9 +231,9 @@ public:
if(couplingManager().isCoupledEntity(CouplingManager::stokesIdx, scvf))
{
values[Indices::momentumYBalanceIdx] = couplingManager().couplingData().momentumCouplingCondition(fvGeometry, elemVolVars, elemFaceVars, scvf);
values[Indices::momentumYBalanceIdx] = couplingManager().couplingData().momentumCouplingCondition(element, fvGeometry, elemVolVars, elemFaceVars, scvf);
const auto tmp = couplingManager().couplingData().massCouplingCondition(fvGeometry, elemVolVars, elemFaceVars, scvf, DiffusionCoefficientAveragingType::harmonic);
const auto tmp = couplingManager().couplingData().massCouplingCondition(element, fvGeometry, elemVolVars, elemFaceVars, scvf, DiffusionCoefficientAveragingType::harmonic);
values[Indices::conti0EqIdx] = tmp[0];
values[Indices::conti0EqIdx + 1] = tmp[1];
}
......@@ -271,9 +271,9 @@ public:
/*!
* \brief Returns the intrinsic permeability of required as input parameter for the Beavers-Joseph-Saffman boundary condition
*/
Scalar permeability(const SubControlVolumeFace& scvf) const
Scalar permeability(const Element& element, const SubControlVolumeFace& scvf) const
{
return couplingManager().couplingData().darcyPermeability(scvf);
return couplingManager().couplingData().darcyPermeability(element, scvf);
}
/*!
......
......@@ -209,7 +209,7 @@ public:
NumEqVector values(0.0);
if (couplingManager().isCoupledEntity(CouplingManager::darcyIdx, scvf))
values = couplingManager().couplingData().massCouplingCondition(fvGeometry, elemVolVars, scvf);
values = couplingManager().couplingData().massCouplingCondition(element, fvGeometry, elemVolVars, scvf);
return values;
}
......
......@@ -234,9 +234,9 @@ public:
if(couplingManager().isCoupledEntity(CouplingManager::stokesIdx, scvf))
{
values[Indices::momentumYBalanceIdx] = couplingManager().couplingData().momentumCouplingCondition(fvGeometry, elemVolVars, elemFaceVars, scvf);
values[Indices::momentumYBalanceIdx] = couplingManager().couplingData().momentumCouplingCondition(element, fvGeometry, elemVolVars, elemFaceVars, scvf);
const auto tmp = couplingManager().couplingData().massCouplingCondition(fvGeometry, elemVolVars, elemFaceVars, scvf);
const auto tmp = couplingManager().couplingData().massCouplingCondition(element, fvGeometry, elemVolVars, elemFaceVars, scvf);
values[Indices::conti0EqIdx] = tmp[0];
values[Indices::conti0EqIdx + 1] = tmp[1];
}
......@@ -274,9 +274,9 @@ public:
/*!
* \brief Returns the intrinsic permeability of required as input parameter for the Beavers-Joseph-Saffman boundary condition
*/
Scalar permeability(const SubControlVolumeFace& scvf) const
Scalar permeability(const Element& element, const SubControlVolumeFace& scvf) const
{
return couplingManager().couplingData().darcyPermeability(scvf);
return couplingManager().couplingData().darcyPermeability(element, scvf);
}
/*!
......
......@@ -233,7 +233,7 @@ public:
NumEqVector values(0.0);
if(couplingManager().isCoupledEntity(CouplingManager::darcyIdx, scvf))
values = couplingManager().couplingData().massCouplingCondition(fvGeometry, elemVolVars, scvf);
values = couplingManager().couplingData().massCouplingCondition(element, fvGeometry, elemVolVars, scvf);
return values;
}
......
......@@ -243,9 +243,9 @@ public:
if(couplingManager().isCoupledEntity(CouplingManager::stokesIdx, scvf))
{
values[Indices::momentumYBalanceIdx] = couplingManager().couplingData().momentumCouplingCondition(fvGeometry, elemVolVars, elemFaceVars, scvf);
values[Indices::momentumYBalanceIdx] = couplingManager().couplingData().momentumCouplingCondition(element, fvGeometry, elemVolVars, elemFaceVars, scvf);
const auto tmp = couplingManager().couplingData().massCouplingCondition(fvGeometry, elemVolVars, elemFaceVars, scvf);
const auto tmp = couplingManager().couplingData().massCouplingCondition(element, fvGeometry, elemVolVars, elemFaceVars, scvf);
values[Indices::conti0EqIdx] = tmp[0];
values[Indices::conti0EqIdx + 1] = tmp[1];
}
......@@ -295,9 +295,9 @@ public:
/*!
* \brief Returns the intrinsic permeability of required as input parameter for the Beavers-Joseph-Saffman boundary condition
*/
Scalar permeability(const SubControlVolumeFace& scvf) const
Scalar permeability(const Element& element, const SubControlVolumeFace& scvf) const
{
return couplingManager().couplingData().darcyPermeability(scvf);
return couplingManager().couplingData().darcyPermeability(element, scvf);
}
/*!
......
......@@ -262,14 +262,14 @@ public:
if (couplingManager().isCoupledEntity(CouplingManager::darcyIdx, scvf))
{
#if !NONISOTHERMAL
values = couplingManager().couplingData().massCouplingCondition(fvGeometry, elemVolVars, scvf, diffCoeffAvgType_);
values = couplingManager().couplingData().massCouplingCondition(element, fvGeometry, elemVolVars, scvf, diffCoeffAvgType_);
#else
const auto massFlux = couplingManager().couplingData().massCouplingCondition(fvGeometry, elemVolVars, scvf, diffCoeffAvgType_);
const auto massFlux = couplingManager().couplingData().massCouplingCondition(element, fvGeometry, elemVolVars, scvf, diffCoeffAvgType_);
for(int i = 0; i< massFlux.size(); ++i)
values[i] = massFlux[i];
values[Indices::energyEqIdx] = couplingManager().couplingData().energyCouplingCondition(fvGeometry, elemVolVars, scvf, diffCoeffAvgType_);
values[Indices::energyEqIdx] = couplingManager().couplingData().energyCouplingCondition(element, fvGeometry, elemVolVars, scvf, diffCoeffAvgType_);
#endif
}
......
......@@ -266,14 +266,14 @@ public:
if(couplingManager().isCoupledEntity(CouplingManager::stokesIdx, scvf))
{
values[Indices::momentumYBalanceIdx] = couplingManager().couplingData().momentumCouplingCondition(fvGeometry, elemVolVars, elemFaceVars, scvf);
values[Indices::momentumYBalanceIdx] = couplingManager().couplingData().momentumCouplingCondition(element, fvGeometry, elemVolVars, elemFaceVars, scvf);
const auto massFlux = couplingManager().couplingData().massCouplingCondition(fvGeometry, elemVolVars, elemFaceVars, scvf, diffCoeffAvgType_);
const auto massFlux = couplingManager().couplingData().massCouplingCondition(element, fvGeometry, elemVolVars, elemFaceVars, scvf, diffCoeffAvgType_);
values[Indices::conti0EqIdx] = massFlux[0];
values[Indices::conti0EqIdx + 1] = massFlux[1];
#if NONISOTHERMAL
values[Indices::energyEqIdx] = couplingManager().couplingData().energyCouplingCondition(fvGeometry, elemVolVars, elemFaceVars, scvf, diffCoeffAvgType_);
values[Indices::energyEqIdx] = couplingManager().couplingData().energyCouplingCondition(element, fvGeometry, elemVolVars, elemFaceVars, scvf, diffCoeffAvgType_);
#endif
}
......@@ -343,9 +343,9 @@ public:
/*!
* \brief Returns the intrinsic permeability of required as input parameter for the Beavers-Joseph-Saffman boundary condition
*/
Scalar permeability(const SubControlVolumeFace& scvf) const
Scalar permeability(const Element& element, const SubControlVolumeFace& scvf) const
{
return couplingManager().couplingData().darcyPermeability(scvf);
return couplingManager().couplingData().darcyPermeability(element, scvf);
}
/*!
......
......@@ -201,7 +201,7 @@ public:
NumEqVector values(0.0);
if (couplingManager().isCoupledEntity(couplingManager().darcyIdx, scvf))
values = couplingManager().couplingData().massCouplingCondition(fvGeometry, elemVolVars, scvf, DiffusionCoefficientAveragingType::harmonic);
values = couplingManager().couplingData().massCouplingCondition(element, fvGeometry, elemVolVars, scvf, DiffusionCoefficientAveragingType::harmonic);
return values;
}
......
......@@ -227,9 +227,9 @@ public:
if(couplingManager().isCoupledEntity(couplingManager().stokesIdx, scvf))
{
values[Indices::momentumYBalanceIdx] = couplingManager().couplingData().momentumCouplingCondition(fvGeometry, elemVolVars, elemFaceVars, scvf);
values[Indices::momentumYBalanceIdx] = couplingManager().couplingData().momentumCouplingCondition(element, fvGeometry, elemVolVars, elemFaceVars, scvf);
const auto tmp = couplingManager().couplingData().massCouplingCondition(fvGeometry, elemVolVars, elemFaceVars, scvf, DiffusionCoefficientAveragingType::harmonic);
const auto tmp = couplingManager().couplingData().massCouplingCondition(element, fvGeometry, elemVolVars, elemFaceVars, scvf, DiffusionCoefficientAveragingType::harmonic);
values[Indices::conti0EqIdx] = tmp[0];
values[Indices::conti0EqIdx + 1] = tmp[1];
values[Indices::conti0EqIdx + 2] = tmp[2];
......@@ -267,9 +267,9 @@ public:
/*!
* \brief Returns the intrinsic permeability of required as input parameter for the Beavers-Joseph-Saffman boundary condition
*/
Scalar permeability(const SubControlVolumeFace& scvf) const
Scalar permeability(const Element& element, const SubControlVolumeFace& scvf) const
{
return couplingManager().couplingData().darcyPermeability(scvf);
return couplingManager().couplingData().darcyPermeability(element, scvf);
}
/*!
......
......@@ -198,7 +198,7 @@ public:
NumEqVector values(0.0);
if (couplingManager().isCoupledEntity(CouplingManager::darcyIdx, scvf))
values[Indices::conti0EqIdx] = couplingManager().couplingData().massCouplingCondition(fvGeometry, elemVolVars, scvf);
values[Indices::conti0EqIdx] = couplingManager().couplingData().massCouplingCondition(element, fvGeometry, elemVolVars, scvf);
return values;
}
......
......@@ -211,8 +211,8 @@ public:
if(couplingManager().isCoupledEntity(CouplingManager::stokesIdx, scvf))
{
values[Indices::conti0EqIdx] = couplingManager().couplingData().massCouplingCondition(fvGeometry, elemVolVars, elemFaceVars, scvf);
values[Indices::momentumYBalanceIdx] = couplingManager().couplingData().momentumCouplingCondition(fvGeometry, elemVolVars, elemFaceVars, scvf);
values[Indices::conti0EqIdx] = couplingManager().couplingData().massCouplingCondition(element, fvGeometry, elemVolVars, elemFaceVars, scvf);
values[Indices::momentumYBalanceIdx] = couplingManager().couplingData().momentumCouplingCondition(element, fvGeometry, elemVolVars, elemFaceVars, scvf);
}
return values;
}
......@@ -246,9 +246,9 @@ public:
/*!
* \brief Returns the intrinsic permeability of required as input parameter for the Beavers-Joseph-Saffman boundary condition
*/
Scalar permeability(const SubControlVolumeFace& scvf) const
Scalar permeability(const Element& element, const SubControlVolumeFace& scvf) const
{
return couplingManager().couplingData().darcyPermeability(scvf);
return couplingManager().couplingData().darcyPermeability(element, scvf);
}
/*!
......