blockMesh fails when mergePatchPairs is used and regions are declared
Summary
When using mergePatchPairs in blockMeshDict, blockMesh fails only when regions are declared as part of a block declaration with hex.
Steps to reproduce
Author a blockMeshDict file with 3 blocks that share common planes. Declare patches for two of the adjacent blocks. Use mergePatchPairs to merge the patches together. In the hex declaration assign a region name to any one of the blocks. blockMesh fails even if the region defined is not associated with a merged block. (That is why I indicated 3 blocks above.)
Example case
I am attaching a sample case that I made to trouble shoot the problem I was having.
What is the current bug behaviour?
The bug behavior is that blockMesh fails to complete and outputs the following messasge:
--> FOAM FATAL ERROR: (openfoam-2012)
point, face or cell zone already exists
From void Foam::polyMesh::addZones(const Foam::List<Foam::pointZone*>&, const Foam::List<Foam::faceZone*>&, const Foam::List<Foam::cellZone*>&)
in file meshes/polyMesh/polyMesh.C at line 1007.
FOAM aborting
#0 Foam::error::printStack(Foam::Ostream&) at ??:?
#1 Foam::error::exitOrAbort(int, bool) at ??:?
#2 Foam::polyMesh::addZones(Foam::List<Foam::pointZone*> const&, Foam::List<Foam::faceZone*> const&, Foam::List<Foam::cellZone*> const&) at ??:?
#3 ? in ~/OpenFOAM/OpenFOAM-v2012/platforms/linux64GccDPInt32Opt/bin/blockMesh
#4 __libc_start_main in /lib/x86_64-linux-gnu/libc.so.6
#5 ? in ~/OpenFOAM/OpenFOAM-v2012/platforms/linux64GccDPInt32Opt/bin/blockMesh
Aborted
What is the expected correct behavior?
The correct behavior is to successfully generate the mesh with the regions defined as long as blocks from different regions were not joined with mergePatchPairs.
Relevant logs and/or images
Environment information
- OpenFOAM version :2012
- Operating system :Debian 10 (Buster)
- Hardware info :AMD Ryzen 9 3900X 12-Core Processor, 64 GB ddr4
- Compiler :g++ 4:8.3.0-1,g++-8 8.3.0-6blockMeshDict