From 213ece9f317c77a28850a31bbe17e7e910f3fa7f Mon Sep 17 00:00:00 2001
From: Martin Schneider <martin.schneider@iws.uni-stuttgart.de>
Date: Mon, 8 Apr 2024 17:23:38 +0200
Subject: [PATCH] [disc][periodic] Rename to periodicDofMap

---
 dumux/discretization/box/fvgridgeometry.hh     | 14 ++++++++++++--
 .../facecentered/diamond/fvgridgeometry.hh     |  9 +++++++--
 .../facecentered/staggered/fvgridgeometry.hh   | 18 ++++++++++++++----
 dumux/discretization/fem/fegridgeometry.hh     |  1 +
 .../discretization/porenetwork/gridgeometry.hh |  2 ++
 .../discretization/pq1bubble/fvgridgeometry.hh |  7 ++++++-
 dumux/multidomain/facet/box/fvgridgeometry.hh  |  2 ++
 .../porousmediumflow/boxdfm/fvgridgeometry.hh  |  2 ++
 8 files changed, 46 insertions(+), 9 deletions(-)

diff --git a/dumux/discretization/box/fvgridgeometry.hh b/dumux/discretization/box/fvgridgeometry.hh
index 2da6f45916..02c490081e 100644
--- a/dumux/discretization/box/fvgridgeometry.hh
+++ b/dumux/discretization/box/fvgridgeometry.hh
@@ -180,9 +180,14 @@ public:
     { return periodicVertexMap_.at(dofIdx); }
 
     //! Returns the map between dofs across periodic boundaries
-    const std::unordered_map<GridIndexType, GridIndexType>& periodicVertexMap() const
+    const std::unordered_map<GridIndexType, GridIndexType>& periodicDofMap() const
     { return periodicVertexMap_; }
 
+    //! Returns the map between dofs across periodic boundaries
+    [[deprecated("Will be removed after release 3.9. Use periodicDofMap() instead.")]]
+    const std::unordered_map<GridIndexType, GridIndexType>& periodicVertexMap() const
+    { return periodicDofMap(); }
+
     //! local view of this object (constructed with the internal cache)
     friend inline LocalView localView(const BoxFVGridGeometry& gg)
     { return { gg.cache_ }; }
@@ -529,9 +534,14 @@ public:
     { return periodicVertexMap_.at(dofIdx); }
 
     //! Returns the map between dofs across periodic boundaries
-    const std::unordered_map<GridIndexType, GridIndexType>& periodicVertexMap() const
+    const std::unordered_map<GridIndexType, GridIndexType>& periodicDofMap() const
     { return periodicVertexMap_; }
 
+    //! Returns the map between dofs across periodic boundaries
+    [[deprecated("Will be removed after release 3.9. Use periodicDofMap() instead.")]]
+    const std::unordered_map<GridIndexType, GridIndexType>& periodicVertexMap() const
+    { return periodicDofMap(); }
+
     //! local view of this object (constructed with the internal cache)
     friend inline LocalView localView(const BoxFVGridGeometry& gg)
     { return { gg.cache_ }; }
diff --git a/dumux/discretization/facecentered/diamond/fvgridgeometry.hh b/dumux/discretization/facecentered/diamond/fvgridgeometry.hh
index 0c7b2bab6c..5adb2e41d4 100644
--- a/dumux/discretization/facecentered/diamond/fvgridgeometry.hh
+++ b/dumux/discretization/facecentered/diamond/fvgridgeometry.hh
@@ -165,10 +165,15 @@ public:
     GridIndexType periodicallyMappedDof(GridIndexType dofIdx) const
     { return periodicFaceMap_.at(dofIdx); }
 
-    //! Returns the map between dofs across periodic boundaries // TODO rename to periodic dof map in fvassembler
-    const std::unordered_map<GridIndexType, GridIndexType>& periodicVertexMap() const
+    //! Returns the map between dofs across periodic boundaries
+    const std::unordered_map<GridIndexType, GridIndexType>& periodicDofMap() const
     { return periodicFaceMap_; }
 
+    //! Returns the map between dofs across periodic boundaries
+    [[deprecated("Will be removed after release 3.9. Use periodicDofMap() instead.")]]
+    const std::unordered_map<GridIndexType, GridIndexType>& periodicVertexMap() const
+    { return periodicDofMap(); }
+
     //! local view of this object (constructed with the internal cache)
     friend inline LocalView localView(const FaceCenteredDiamondFVGridGeometry& gg)
     { return { gg.cache_ }; }
diff --git a/dumux/discretization/facecentered/staggered/fvgridgeometry.hh b/dumux/discretization/facecentered/staggered/fvgridgeometry.hh
index abf11397eb..41d58c51ff 100644
--- a/dumux/discretization/facecentered/staggered/fvgridgeometry.hh
+++ b/dumux/discretization/facecentered/staggered/fvgridgeometry.hh
@@ -241,10 +241,15 @@ public:
     GridIndexType periodicallyMappedDof(GridIndexType dofIdx) const
     { return periodicFaceMap_.at(dofIdx); }
 
-    //! Returns the map between dofs across periodic boundaries // TODO rename to periodic dof map in fvassembler
-    const std::unordered_map<GridIndexType, GridIndexType>& periodicVertexMap() const
+    //! Returns the map between dofs across periodic boundaries
+    const std::unordered_map<GridIndexType, GridIndexType>& periodicDofMap() const
     { return periodicFaceMap_; }
 
+    //! Returns the map between dofs across periodic boundaries
+    [[deprecated("Will be removed after release 3.9. Use periodicDofMap() instead.")]]
+    const std::unordered_map<GridIndexType, GridIndexType>& periodicVertexMap() const
+    { return periodicDofMap(); }
+
 private:
 
     void update_()
@@ -644,10 +649,15 @@ public:
     GridIndexType periodicallyMappedDof(GridIndexType dofIdx) const
     { return periodicFaceMap_.at(dofIdx); }
 
-    //! Returns the map between dofs across periodic boundaries // TODO rename to periodic dof map in fvassembler
-    const std::unordered_map<GridIndexType, GridIndexType>& periodicVertexMap() const
+    //! Returns the map between dofs across periodic boundaries
+    const std::unordered_map<GridIndexType, GridIndexType>& periodicDofMap() const
     { return periodicFaceMap_; }
 
+    //! Returns the map between dofs across periodic boundaries
+    [[deprecated("Will be removed after release 3.9. Use periodicDofMap() instead.")]]
+    const std::unordered_map<GridIndexType, GridIndexType>& periodicVertexMap() const
+    { return periodicDofMap(); }
+
 private:
 
     void update_()
diff --git a/dumux/discretization/fem/fegridgeometry.hh b/dumux/discretization/fem/fegridgeometry.hh
index 100c3ba822..e50d068545 100644
--- a/dumux/discretization/fem/fegridgeometry.hh
+++ b/dumux/discretization/fem/fegridgeometry.hh
@@ -98,6 +98,7 @@ public:
     { DUNE_THROW(Dune::NotImplemented, "Periodic BC support for FEM schemes"); }
 
     //! Returns the map between dofs across periodic boundaries
+    [[deprecated("Will be removed after release 3.9. Implement periodicDofMap() if periodic bcs are supported.")]]
     const std::unordered_map<GridIndexType, GridIndexType>& periodicVertexMap() const
     { DUNE_THROW(Dune::NotImplemented, "Periodic BC support for FEM schemes"); }
 
diff --git a/dumux/discretization/porenetwork/gridgeometry.hh b/dumux/discretization/porenetwork/gridgeometry.hh
index 5687e8accb..788ad22034 100644
--- a/dumux/discretization/porenetwork/gridgeometry.hh
+++ b/dumux/discretization/porenetwork/gridgeometry.hh
@@ -589,6 +589,7 @@ public:
     { DUNE_THROW(Dune::NotImplemented, "Periodic boundaries"); }
 
     //! Returns the map between dofs across periodic boundaries
+    [[deprecated("Will be removed after release 3.9. Implement periodicDofMap() if periodic bcs are supported.")]]
     std::unordered_map<GridIndexType, GridIndexType> periodicVertexMap() const
     { return std::unordered_map<GridIndexType, GridIndexType>{}; }
 
@@ -783,6 +784,7 @@ public:
     { DUNE_THROW(Dune::NotImplemented, "Periodic boundaries"); }
 
     //! Returns the map between dofs across periodic boundaries
+    [[deprecated("Will be removed after release 3.9. Implement periodicDofMap() if periodic bcs are supported.")]]
     std::unordered_map<GridIndexType, GridIndexType> periodicVertexMap() const
     { return std::unordered_map<GridIndexType, GridIndexType>{}; }
 
diff --git a/dumux/discretization/pq1bubble/fvgridgeometry.hh b/dumux/discretization/pq1bubble/fvgridgeometry.hh
index 2d18705167..c8bd0df627 100644
--- a/dumux/discretization/pq1bubble/fvgridgeometry.hh
+++ b/dumux/discretization/pq1bubble/fvgridgeometry.hh
@@ -185,9 +185,14 @@ public:
     { return periodicVertexMap_.at(dofIdx); }
 
     //! Returns the map between dofs across periodic boundaries
-    const std::unordered_map<GridIndexType, GridIndexType>& periodicVertexMap() const
+    const std::unordered_map<GridIndexType, GridIndexType>& periodicDofMap() const
     { return periodicVertexMap_; }
 
+    //! Returns the map between dofs across periodic boundaries
+    [[deprecated("Will be removed after release 3.9. Use periodicDofMap() instead.")]]
+    const std::unordered_map<GridIndexType, GridIndexType>& periodicVertexMap() const
+    { return periodicDofMap(); }
+
     //! local view of this object (constructed with the internal cache)
     friend inline LocalView localView(const PQ1BubbleFVGridGeometry& gg)
     { return { gg.cache_ }; }
diff --git a/dumux/multidomain/facet/box/fvgridgeometry.hh b/dumux/multidomain/facet/box/fvgridgeometry.hh
index c598c85a7d..c76793740f 100644
--- a/dumux/multidomain/facet/box/fvgridgeometry.hh
+++ b/dumux/multidomain/facet/box/fvgridgeometry.hh
@@ -219,6 +219,7 @@ public:
     { DUNE_THROW(Dune::InvalidStateException, "Periodic boundaries are not supported by the box facet coupling scheme"); }
 
     //! Returns the map between dofs across periodic boundaries
+    [[deprecated("Will be removed after release 3.9. Implement periodicDofMap() if periodic bcs are supported.")]]
     std::unordered_map<GridIndexType, GridIndexType> periodicVertexMap() const
     { return std::unordered_map<GridIndexType, GridIndexType>(); }
 
@@ -509,6 +510,7 @@ public:
     { DUNE_THROW(Dune::InvalidStateException, "Periodic boundaries are not supported by the facet coupling scheme"); }
 
     //! Returns the map between dofs across periodic boundaries
+    [[deprecated("Will be removed after release 3.9. Implement periodicDofMap() if periodic bcs are supported.")]]
     std::unordered_map<GridIndexType, GridIndexType> periodicVertexMap() const
     { return std::unordered_map<GridIndexType, GridIndexType>(); }
 
diff --git a/dumux/porousmediumflow/boxdfm/fvgridgeometry.hh b/dumux/porousmediumflow/boxdfm/fvgridgeometry.hh
index dc4717eac7..ed4fb89bae 100644
--- a/dumux/porousmediumflow/boxdfm/fvgridgeometry.hh
+++ b/dumux/porousmediumflow/boxdfm/fvgridgeometry.hh
@@ -192,6 +192,7 @@ public:
     { DUNE_THROW(Dune::InvalidStateException, "Periodic boundaries are not supported by the box-dfm scheme"); }
 
     //! Returns the map between dofs across periodic boundaries
+    [[deprecated("Will be removed after release 3.9. Implement periodicDofMap() if periodic bcs are supported.")]]
     std::unordered_map<std::size_t, std::size_t> periodicVertexMap() const
     { return std::unordered_map<std::size_t, std::size_t>(); }
 
@@ -516,6 +517,7 @@ public:
     { DUNE_THROW(Dune::InvalidStateException, "Periodic boundaries are not supported by the box-dfm scheme"); }
 
     //! Returns the map between dofs across periodic boundaries
+    [[deprecated("Will be removed after release 3.9. Implement periodicDofMap() if periodic bcs are supported.")]]
     std::unordered_map<std::size_t, std::size_t> periodicVertexMap() const
     { return std::unordered_map<std::size_t, std::size_t>(); }
 
-- 
GitLab