Difficulties troubleshooting "Error: Could not recover boundary mesh: error 2"
Hi, I'm trying to generate a complex 3D mesh but Gmsh is failing with only two errors:
Error : Could not recover boundary mesh: error 2
Error : No elements in volume 1155 1346
Error : ------------------------------
Error : Mesh generation error summary
Error : 0 warnings
Error : 2 errors
Error : Check the full log for details
Error : ------------------------------
The final lines of output from Gmsh are as follows:
Info : Done meshing 2D (Wall 1892.21s, CPU 1748.93s)
Info : Meshing 3D...
Info : 3D Meshing 2 volumes with 1 connected component
Info : Tetrahedrizing 3921930 nodes...
Info : Done tetrahedrizing 3921938 nodes (Wall 133.604s, CPU 119.661s)
Debug : Points have been tetrahedralized
Info : Reconstructing mesh...
Info : - Creating surface mesh
Info : - Identifying boundary edges
Debug : 7791093 (11713026) subfaces (segments)
Info : - Recovering boundary
Info : Done meshing 3D (Wall 295.918s, CPU 245.845s)
Info : 7589763 nodes 15826226 elements
Debug : Renumbering for potentially partial mesh save
Info : Writing 'IntPlug.msh'...
Info : Done writing 'IntPlug.msh'
Info : Stopped on Mon Nov 23 13:22:52 2020 (From start: Wall 2442.8s, CPU 2235.62s)
I'm having a hard time figuring out how to troubleshoot the source of these errors. I've turned General.Verbosity to a high value which hasn't helped much - there are a lot of "Debug: Point XXXX YYYY cannot be inserted because {it is too close to another point, cavity if of size 1, cavity is not star shaped, euler formula is not fulfilled}" but I suspect these aren't necessarily bad as there are many of these messages, and the surface mesh output by Gmsh looks fine.
I've attached the .geo files I'm running as well as the output but as the code is somewhat complex I'm not sure if they'll be very helpful - hopefully someone who has seen the "Could not recovery boundary mesh" error before could point me in the right direction for troubleshooting.
I'm running Gmsh 4.6.0 with the following command:
gmsh -3 -format msh22 -o IntPlug.msh main.geo > IntPlug.out