From d98926ef27faa0f6d1b53a3d6264c0757c472a7c Mon Sep 17 00:00:00 2001
From: Helen Schottenhamml <helen.schottenhamml@fau.de>
Date: Mon, 21 Feb 2022 14:50:56 +0100
Subject: [PATCH] Intersect local cell interval with flag field.

---
 src/geometry/initializer/BoundaryFromCellInterval.impl.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/geometry/initializer/BoundaryFromCellInterval.impl.h b/src/geometry/initializer/BoundaryFromCellInterval.impl.h
index 588f5a9c4..f5365a8a5 100644
--- a/src/geometry/initializer/BoundaryFromCellInterval.impl.h
+++ b/src/geometry/initializer/BoundaryFromCellInterval.impl.h
@@ -44,6 +44,9 @@ void BoundaryFromCellInterval<BoundaryHandlerT>::init( const CellInterval & glob
       CellInterval localCellInterval;
       structuredBlockStorage_.transformGlobalToBlockLocalCellInterval( localCellInterval, *blockIt, globalCellInterval );
       boundarySetter.configure( *blockIt, boundaryHandlerID_ );
+
+      auto flagField = boundarySetter.getFlagField();
+      localCellInterval.intersect(flagField->xyzSizeWithGhostLayer());
       boundarySetter.set( localCellInterval );
    }
 }
-- 
GitLab