From e5a5f3907762a17aa90357dd9d3c3c24b8430106 Mon Sep 17 00:00:00 2001
From: Martin Schneider <martin.schneider@iws.uni-stuttgart.de>
Date: Tue, 24 Sep 2024 18:19:03 +0200
Subject: [PATCH] [fcstaggered] Fix connectivity map

---
 .../facecentered/staggered/connectivitymap.hh | 26 +++----------------
 1 file changed, 4 insertions(+), 22 deletions(-)

diff --git a/dumux/discretization/facecentered/staggered/connectivitymap.hh b/dumux/discretization/facecentered/staggered/connectivitymap.hh
index aa085db9a3..59ea12d33d 100644
--- a/dumux/discretization/facecentered/staggered/connectivitymap.hh
+++ b/dumux/discretization/facecentered/staggered/connectivitymap.hh
@@ -44,34 +44,16 @@ public:
         auto fvGeometry = localView(gridGeometry);
         for (const auto& element : elements(gridGeometry.gridView()))
         {
-            if (element.partitionType() == Dune::InteriorEntity)
-                continue;
+            assert(element.partitionType() == Dune::OverlapEntity || element.partitionType() == Dune::InteriorEntity);
 
-            assert(element.partitionType() == Dune::OverlapEntity);
-
-            // restrict the FvGeometry locally and bind to the element
-            fvGeometry.bind(element);
-            // loop over sub control faces
-            for (const auto& scvf : scvfs(fvGeometry))
-            {
-                if (scvf.isFrontal() && !scvf.boundary() && !scvf.processorBoundary())
-                {
-                    const auto& ownScv = fvGeometry.scv(scvf.insideScvIdx());
-                    const auto& facet = element.template subEntity <1> (ownScv.indexInElement());
-                    if (facet.partitionType() == Dune::BorderEntity)
-                        map_[ownScv.index()].push_back(scvf.outsideScvIdx());
-                }
-            }
-        }
-
-        for (const auto& element : elements(gridGeometry.gridView(), Dune::Partitions::interior))
-        {
             fvGeometry.bind(element);
 
             // loop over sub control faces
             for (const auto& scvf : scvfs(fvGeometry))
             {
-                assert(!scvf.processorBoundary());
+                if(scvf.processorBoundary())
+                    continue;
+
                 const auto& ownScv = fvGeometry.scv(scvf.insideScvIdx());
                 const auto ownDofIndex = ownScv.dofIndex();
                 const auto ownScvIndex = ownScv.index();
-- 
GitLab