BUG: shm: filter out duplicates. Fixes #3333

Problem was duplicates in list of patches to
add buffer layers to
This commit is contained in:
mattijs
2025-08-21 17:42:35 +01:00
parent 9c13057b80
commit 8aa69ad976
2 changed files with 6 additions and 14 deletions

View File

@ -6,7 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2011-2016 OpenFOAM Foundation
Copyright (C) 2015-2022,2024 OpenCFD Ltd.
Copyright (C) 2015-2025 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -179,7 +179,7 @@ Foam::labelPair Foam::addPatchCellLayer::getEdgeString
// Get edge that hasn't been done yet but needs extrusion
forAll(fEdges, fp)
{
label edgei = fEdges[fp];
const label edgei = fEdges[fp];
const edge& e = pp.edges()[edgei];
if
@ -197,7 +197,7 @@ Foam::labelPair Foam::addPatchCellLayer::getEdgeString
{
// We found an edge that needs extruding but hasn't been done yet.
// Now find the face on the other side
label nbrGlobalFacei = nbrFace
const label nbrGlobalFacei = nbrFace
(
globalEdgeFaces,
fEdges[startFp],

View File

@ -6,7 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2011-2015 OpenFOAM Foundation
Copyright (C) 2015-2024 OpenCFD Ltd.
Copyright (C) 2015-2025 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -2652,16 +2652,8 @@ void Foam::snappySnapDriver::doSnap
{
if (addLayers[globalRegioni])
{
const label masterP =
globalToMasterPatch_[globalRegioni];
const label slaveP =
globalToSlavePatch_[globalRegioni];
bufPatchIDs.append(masterP);
if (slaveP != masterP)
{
bufPatchIDs.append(slaveP);
}
bufPatchIDs.push_uniq(globalToMasterPatch_[globalRegioni]);
bufPatchIDs.push_uniq(globalToSlavePatch_[globalRegioni]);
}
}