snappyHexMesh type castellatedBufferLayer with face zones crash: All edges of face seem to have same neighbour
Summary
snappyHexMesh using buffer layer feature with baffle type face zones can cause a crash for complex geometry. Crash does not happen if no face zone is specified (if the lines faceZone walls_nonmanifold;
and faceType baffle;
are commented away in the attached example case), so I guess this issue is related to face zones.
The error message for crash is
--> FOAM FATAL ERROR: (openfoam-2412)
On face:25060 fc:(0.375396 -0.0623236 0.337415) vertices:4(26303 26304 26305 26306) points:4((0.375584 -0.0742326 0.351182) (0.374816 -0.0671053 0.332587) (0.375999 -0.0500982 0.323812) (0.375188 -0.0578133 0.342304)) edges:4(51375 51376 51377 51378) All edges of face seem to have same neighbour 327901 starting walking from edge (26303 26304)
From Foam::labelPair Foam::addPatchCellLayer::getEdgeString(const Foam::indirectPrimitivePatch&, const Foam::labelListList&, const Foam::boolList&, Foam::label, Foam::label) const
in file polyTopoChange/polyTopoChange/addPatchCellLayer.C at line 229.
Example case
Relevant logs and/or images
SnappyHexMesh log file with stderr: log.snappy.txt
Environment information
- OpenFOAM version : 4fe3f55e-20250110 OPENFOAM=2412 version=v2412
- Operating system : ubuntu
- Hardware info : x64
- Compiler : gcc (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0