From e05d3291806f9ba74dfb22ba09c2bdd8a6694b2c Mon Sep 17 00:00:00 2001 From: Timo Koch <timokoch@math.uio.no> Date: Tue, 21 Mar 2023 22:44:25 +0000 Subject: [PATCH] [test][angeli] Use fvGeometry.geometry(scvf) --- test/freeflow/navierstokes/angeli/problem.hh | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/test/freeflow/navierstokes/angeli/problem.hh b/test/freeflow/navierstokes/angeli/problem.hh index d66187dfde..7ed77e7ee1 100644 --- a/test/freeflow/navierstokes/angeli/problem.hh +++ b/test/freeflow/navierstokes/angeli/problem.hh @@ -167,7 +167,10 @@ public: DirichletValues dirichlet(const Element& element, const SubControlVolumeFace& scvf) const { if (ParentType::isMomentumProblem() && interpolateExactVelocity_) - return velocityDirichlet_(scvf); + { + const auto fvGeometry = localView(this->gridGeometry()).bindElement(element); + return velocityDirichlet_(fvGeometry.geometry(scvf)); + } else return analyticalSolution(scvf.center(), time_); } @@ -275,7 +278,7 @@ public: for (const auto& intersection : intersections(this->gridGeometry().gridView(), element)) { if (intersection.indexInInside() == scv.indexInElement()) - return velocityDirichlet_(intersection); + return velocityDirichlet_(intersection.geometry()); } DUNE_THROW(Dune::InvalidStateException, "No intersection found"); @@ -301,12 +304,11 @@ public: } private: - template<class Entity> - DirichletValues velocityDirichlet_(const Entity& entity) const + template<class Geometry> + DirichletValues velocityDirichlet_(const Geometry& geo) const { DirichletValues priVars(0.0); - const auto geo = entity.geometry(); - const auto& quad = Dune::QuadratureRules<Scalar, decltype(geo)::mydimension>::rule(geo.type(), 3); + const auto& quad = Dune::QuadratureRules<Scalar, Geometry::mydimension>::rule(geo.type(), 3); for (auto&& qp : quad) { const auto w = qp.weight()*geo.integrationElement(qp.position()); -- GitLab