Commit 5dd6a04f authored by mattijs's avatar mattijs Committed by Andrew Heather
Browse files

BUG: attach/detach: correctly change modified faces. Fixes #1329.

parent fc11c408
...@@ -114,6 +114,9 @@ void Foam::attachDetach::attachInterface ...@@ -114,6 +114,9 @@ void Foam::attachDetach::attachInterface
const boolList& mfFlip = mesh.faceZones()[faceZoneID_.index()].flipMap(); const boolList& mfFlip = mesh.faceZones()[faceZoneID_.index()].flipMap();
// Keep track of which faces have been modified
bitSet faceModified(mesh.nFaces());
forAll(masterFaceCells, facei) forAll(masterFaceCells, facei)
{ {
// If slave neighbour is greater than master, face does not need // If slave neighbour is greater than master, face does not need
...@@ -155,6 +158,7 @@ void Foam::attachDetach::attachInterface ...@@ -155,6 +158,7 @@ void Foam::attachDetach::attachInterface
) )
); );
} }
faceModified[masterPatchStart + facei] = true;
} }
// Renumber faces affected by point removal // Renumber faces affected by point removal
...@@ -175,7 +179,11 @@ void Foam::attachDetach::attachInterface ...@@ -175,7 +179,11 @@ void Foam::attachDetach::attachInterface
forAll(curFaces, facei) forAll(curFaces, facei)
{ {
if (!ref.faceRemoved(curFaces[facei])) if
(
!ref.faceRemoved(curFaces[facei])
&& !faceModified[curFaces[facei]]
)
{ {
facesToModifyMap.insert(curFaces[facei]); facesToModifyMap.insert(curFaces[facei]);
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment