BUG: blockMesh mergePatchPairs fails with edge-shared points (fixes #2589)

- remedy by performing the attach() action sequentially (as per
  stitchMesh changes). This ensures that the current point addressing
  is always used and avoids references to the already-merged points
  (which is what causes the failure).

ENH: improve handling of empty patch removal

- only remove empty *merged* patches, but leave any other empty
  patches untouched since they may intentional placeholders for other
  parts of a workflow.

- remove any empty point/face zones created for patch merging
This commit is contained in:
Mark Olesen
2022-09-23 10:01:39 +02:00
parent 9fa37ba068
commit 56e9f7bf4b
6 changed files with 371 additions and 39 deletions

View File

@ -6,7 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2011-2017 OpenFOAM Foundation
Copyright (C) 2017-2020 OpenCFD Ltd.
Copyright (C) 2017-2022 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -564,7 +564,7 @@ int main(int argc, char *argv[])
mesh.faceZones()
(
mergePatchName + "MasterZone",
mergePatchName + "Side0Zone",
true // verbose
).resetAddressing(std::move(faceIds), false);
@ -574,7 +574,7 @@ int main(int argc, char *argv[])
mesh.faceZones()
(
mergePatchName + "SlaveZone",
mergePatchName + "Side1Zone",
true // verbose
).resetAddressing(std::move(faceIds), false);
@ -595,8 +595,8 @@ int main(int argc, char *argv[])
"couple" + Foam::name(actioni),
0,
stitcher,
mergePatchName + "MasterZone",
mergePatchName + "SlaveZone",
mergePatchName + "Side0Zone",
mergePatchName + "Side1Zone",
mergePatchName + "CutPointZone",
cutZoneName,
masterPatchName,