diff --git a/dumux/discretization/facecentered/staggered/geometryhelper.hh b/dumux/discretization/facecentered/staggered/geometryhelper.hh index 1875c2256840c0253877a0e1faa453f27eab1e2e..80bb2433f5c055adcdfe8065dd93267c12aeb127 100644 --- a/dumux/discretization/facecentered/staggered/geometryhelper.hh +++ b/dumux/discretization/facecentered/staggered/geometryhelper.hh @@ -147,7 +147,7 @@ public: } //! Returns an element's facet based on the local facet index. - Facet facet(const SmallLocalIndexType localFacetIdx, const Element& element) const + static Facet facet(const SmallLocalIndexType localFacetIdx, const Element& element) { return element.template subEntity <1> (localFacetIdx); } diff --git a/dumux/freeflow/navierstokes/momentum/fluxhelper.hh b/dumux/freeflow/navierstokes/momentum/fluxhelper.hh index 0382053f9f29a882d1e08439032bee6fde3e26df..7a023de98d7d18dfddf5a5d54747345108aec2ff 100644 --- a/dumux/freeflow/navierstokes/momentum/fluxhelper.hh +++ b/dumux/freeflow/navierstokes/momentum/fluxhelper.hh @@ -155,16 +155,7 @@ struct NavierStokesMomentumBoundaryFluxHelper if (scv.boundary()) { const auto innerVelocity = elemVolVars[scvf.insideScvIdx()].velocity(); - const auto outerVelocity = [&] - { - if (scvf.boundary()) - { - assert(problem.boundaryTypes(element, scvf).isDirichlet(scv.dofAxis())); - return problem.dirichlet(element, scvf)[scv.dofAxis()]; - } - else - return elemVolVars[scvf.outsideScvIdx()].velocity(); - }(); + const auto outerVelocity = elemVolVars[scvf.outsideScvIdx()].velocity(); const auto rho = problem.insideAndOutsideDensity(element, fvGeometry, scvf); const bool selfIsUpstream = scvf.directionSign() == sign(transportingVelocity); diff --git a/dumux/freeflow/navierstokes/momentum/fluxvariables.hh b/dumux/freeflow/navierstokes/momentum/fluxvariables.hh index 815dcd88e02ea84f7d9ac5288164947e70dfab97..765620d2fe55aee919111fe35cfd917e865e48b3 100644 --- a/dumux/freeflow/navierstokes/momentum/fluxvariables.hh +++ b/dumux/freeflow/navierstokes/momentum/fluxvariables.hh @@ -428,6 +428,8 @@ public: { if (const auto& scv = fvGeometry.scv(scvf.insideScvIdx()); this->elemBcTypes()[scvf.localIndex()].isDirichlet(scv.dofAxis())) return problem.dirichlet(this->element(), scvf)[scv.dofAxis()] * this->problem().density(this->element(), scv); + else + DUNE_THROW(Dune::InvalidStateException, "Neither Dirichlet nor Neumann BC set at " << scvf.ipGlobal()); } const bool selfIsUpstream = scvf.directionSign() == sign(transportingVelocity);