Smarter error handling
I experience this behavior when 3D meshing some complex geometries:
It meshes the surfaces, an error is found but it continues to mesh further. See the snippet below.
Now, my software parses this output an thinks, that the meshing has failed due to the error messages. So the mesh, even if available as an inp file is discarded and a new try with smaller mesh size is started.
Not mather from what point of view I look at this behavior of GMSH, something does not add up:
- If, on one side, the first encountered error means that the mesh is wrong, why GMSH continues to try meshing? In many cases this "trying" takes very long time after the first error.
- If, on the other side, after the first error there is still a chanse that the mesh succeeds (motivated by the fact that GMSH does not abort after the first error), then maybe in some cases the mesh is good after all. So in some cases I should ignore the error because the result after the first error is correct.
In general, it seems dificult to decide from the output, of a mesh operation has succeed or not (provided there was at least one error).
Info : [ 20 %] Meshing surface 64 (Plane, Frontal-Delaunay) Info : [ 20 %] Meshing surface 65 (Plane, Frontal-Delaunay) Info : [ 20 %] Meshing surface 66 (Plane, Frontal-Delaunay) Info : [ 20 %] Meshing surface 67 (Plane, Frontal-Delaunay) Info : [ 20 %] Meshing surface 68 (Plane, Frontal-Delaunay) Info : [ 20 %] Meshing surface 69 (Cylinder, Frontal-Delaunay) Info : [ 20 %] Meshing surface 70 (Plane, Frontal-Delaunay) Error : Identical points in triangulation: increase element size or Mesh.RandomFactor Error : Unable to recover the edge 46093 (1/4) on curve 321 (on surface 70) Info : [ 20 %] Meshing surface 71 (Plane, Frontal-Delaunay) Info : [ 20 %] Meshing surface 72 (Plane, Frontal-Delaunay) Info : [ 20 %] Meshing surface 73 (Plane, Frontal-Delaunay) Info : [ 20 %] Meshing surface 74 (Cylinder, Frontal-Delaunay) Info : [ 20 %] Meshing surface 75 (Plane, Frontal-Delaunay) Info : [ 20 %] Meshing surface 76 (Cylinder, Frontal-Delaunay) ... Info : [ 90 %] Meshing surface 458 (Plane, Frontal-Delaunay) Info : [ 90 %] Meshing surface 459 (Plane, Frontal-Delaunay) Info : [ 90 %] Meshing surface 460 (Plane, Frontal-Delaunay) Error : Adjacent nullptrs found Error : Unable to recover the edge 136431 (1/1622) on curve 1343 (on surface 460) Info : [ 90 %] Meshing surface 461 (Cylinder, Frontal-Delaunay) Error : Identical points in triangulation: increase element size or Mesh.RandomFactor Info : [ 90 %] :-( There are 3259 intersections in the 1D mesh (curves 1209(802,809) 1343(757,802) 1209(802,809) 1209(802,809) 1209(802,809) 1209(802,809) Info : [ 90 %] 8-| Splitting those edges and trying again Info : [ 90 %] :-( There are 2 intersections in the 1D mesh (curves 1343(757,802) 1343(757,802)) Info : [ 90 %] 8-| Splitting those edges and trying again Error : Identical points in triangulation: increase element size or Mesh.RandomFactor Info : [ 90 %] :-( There are 6520 intersections in the 1D mesh (curves 1209(802,809) 1343(757,802) 1209(802,809) 1209(802,809) 1209(802,809) 1209(802,809) Info : [ 90 %] 8-| Splitting those edges and trying again Error : Identical points in triangulation: increase element size or Mesh.RandomFactor Info : [ 90 %] 8-| Splitting those edges and trying again Error : Identical points in triangulation: increase element size or Mesh.RandomFactor Info : [ 90 %] 8-| Splitting those edges and trying again