From 99bc4b9e8365b8c5148804533ee070c477d9a67a Mon Sep 17 00:00:00 2001
From: Timo Koch <timokoch@math.uio.no>
Date: Tue, 21 Mar 2023 23:24:53 +0100
Subject: [PATCH] [staggered][disc] Deprecate scv/scvf.geometry/corner

---
 .../staggered/fvelementgeometry.hh            | 19 ++++++++++++++-----
 1 file changed, 14 insertions(+), 5 deletions(-)

diff --git a/dumux/discretization/staggered/fvelementgeometry.hh b/dumux/discretization/staggered/fvelementgeometry.hh
index 0f37a11550..626449c96a 100644
--- a/dumux/discretization/staggered/fvelementgeometry.hh
+++ b/dumux/discretization/staggered/fvelementgeometry.hh
@@ -219,11 +219,20 @@ public:
     bool hasBoundaryScvf() const
     { return hasBoundaryScvf_; }
 
-    typename SubControlVolumeFace::Traits::Geometry geometry (const SubControlVolumeFace& scvf) const
-    {
-        assert(isBound());
-        return scvf.geometry();
-    }
+    // suppress warnings due to current implementation
+    // these interfaces should be used!
+    #pragma GCC diagnostic push
+    #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
+
+    //! Create the geometry of a given sub control volume
+    typename SubControlVolume::Traits::Geometry geometry(const SubControlVolume& scv) const
+    { return scv.geometry(); }
+
+    //! Create the geometry of a given sub control volume face
+    typename SubControlVolumeFace::Traits::Geometry geometry(const SubControlVolumeFace& scvf) const
+    { return scvf.geometry(); }
+
+    #pragma GCC diagnostic pop
 
 private:
     //! Binding of an element preparing the geometries only inside the element
-- 
GitLab