From 1c6393db6622684174aa49e8abafff17ab0b73ee Mon Sep 17 00:00:00 2001 From: Timo Koch <timo.koch@iws.uni-stuttgart.de> Date: Wed, 13 Jul 2022 18:31:05 +0200 Subject: [PATCH] [boxfdm] Deprecate bcorner interface with intersection --- .../porousmediumflow/boxdfm/geometryhelper.hh | 34 +++++++++++++------ 1 file changed, 24 insertions(+), 10 deletions(-) diff --git a/dumux/porousmediumflow/boxdfm/geometryhelper.hh b/dumux/porousmediumflow/boxdfm/geometryhelper.hh index a74f54d84d..0e882f39ca 100644 --- a/dumux/porousmediumflow/boxdfm/geometryhelper.hh +++ b/dumux/porousmediumflow/boxdfm/geometryhelper.hh @@ -76,16 +76,23 @@ public: using ParentType::ParentType; //! Get the corners of the (d-1)-dimensional fracture scvf - ScvfCornerStorage getFractureScvfCorners(const Intersection& is, - const typename Intersection::Geometry& isGeom, - unsigned int idxOnIntersection = 0) const + ScvfCornerStorage getFractureScvfCorners(unsigned int localFacetIndex, + unsigned int) const { - const auto localFacetIndex = is.indexInInside(); const auto& geo = this->elementGeometry(); const auto ref = referenceElement(geo); return ScvfCornerStorage({ geo.global(ref.position(localFacetIndex, 1)) }); } + //! Get the corners of the (d-1)-dimensional fracture scvf + [[deprecated("Will be removed after release 3.6. Use other signature.")]] + ScvfCornerStorage getFractureScvfCorners(const Intersection& is, + const typename Intersection::Geometry& isGeom, + unsigned int idxOnIntersection = 0) const + { + return getFractureScvfCorners(is.indexInInside(), idxOnIntersection); + } + //! get fracture scvf normal vector (simply the unit vector of the edge) //! The third argument is for compatibility reasons with the 3d case! typename ScvfType::Traits::GlobalPosition @@ -122,11 +129,9 @@ public: using ParentType::ParentType; //! Create the sub control volume face geometries on an intersection marked as fracture - ScvfCornerStorage getFractureScvfCorners(const Intersection& is, - const typename Intersection::Geometry& isGeom, - unsigned int edgeIndexInIntersection) const + ScvfCornerStorage getFractureScvfCorners(unsigned int localFacetIndex, + unsigned int indexInFacet) const { - const auto localFacetIndex = is.indexInInside(); constexpr int facetCodim = 1; // we have to use the corresponding facet geometry as the intersection geometry @@ -138,12 +143,12 @@ public: if (type == Dune::GeometryTypes::triangle) { using Corners = Detail::ScvfCorners<Dune::GeometryTypes::triangle>; - return Detail::subEntityKeyToCornerStorage<ScvfCornerStorage>(geo, localFacetIndex, facetCodim, Corners::keys[edgeIndexInIntersection]); + return Detail::subEntityKeyToCornerStorage<ScvfCornerStorage>(geo, localFacetIndex, facetCodim, Corners::keys[indexInFacet]); } else if (type == Dune::GeometryTypes::quadrilateral) { using Corners = Detail::ScvfCorners<Dune::GeometryTypes::quadrilateral>; - return Detail::subEntityKeyToCornerStorage<ScvfCornerStorage>(geo, localFacetIndex, facetCodim, Corners::keys[edgeIndexInIntersection]); + return Detail::subEntityKeyToCornerStorage<ScvfCornerStorage>(geo, localFacetIndex, facetCodim, Corners::keys[indexInFacet]); } else DUNE_THROW(Dune::NotImplemented, "Box fracture scvf geometries for dim=" << dim @@ -151,6 +156,15 @@ public: << " type=" << type); } + //! Create the sub control volume face geometries on an intersection marked as fracture + [[deprecated("Will be removed after release 3.6. Use other signature.")]] + ScvfCornerStorage getFractureScvfCorners(const Intersection& is, + const typename Intersection::Geometry& isGeom, + unsigned int edgeIndexInIntersection) const + { + return getFractureScvfCorners(is.indexInInside(), edgeIndexInIntersection); + } + //! get fracture scvf normal vector typename ScvfType::Traits::GlobalPosition fractureNormal(const ScvfCornerStorage& scvfCorners, -- GitLab