gmsh::model::mesh::refine() crashes in gmsh windows sdk
Using refine() from C++ crashes Code snippet:
> gmsh::initialize();
> gmsh::option::setNumber("General.Terminal", 1);
> gmsh::model::occ::addBox(0, 0, 0, 10, 10, 10);
> gmsh::model::occ::synchronize();
> gmsh::model::mesh::generate(3);
> gmsh::model::mesh::setOrder(2);
> gmsh::model::mesh::refine();
Output from Terminal
Info : Meshing 1D...
Info : [ 0 %] Meshing curve 1 (Line)
Info : [ 10 %] Meshing curve 2 (Line)
Info : [ 20 %] Meshing curve 3 (Line)
Info : [ 30 %] Meshing curve 4 (Line)
Info : [ 40 %] Meshing curve 5 (Line)
Info : [ 50 %] Meshing curve 6 (Line)
Info : [ 50 %] Meshing curve 7 (Line)
Info : [ 60 %] Meshing curve 8 (Line)
Info : [ 70 %] Meshing curve 9 (Line)
Info : [ 80 %] Meshing curve 10 (Line)
Info : [ 90 %] Meshing curve 11 (Line)
Info : [100 %] Meshing curve 12 (Line)
Info : Done meshing 1D (0 s)
Info : Meshing 2D...
Info : [ 0 %] Meshing surface 1 (Plane, Frontal)
Info : [ 20 %] Meshing surface 2 (Plane, Frontal)
Info : [ 40 %] Meshing surface 3 (Plane, Frontal)
Info : [ 50 %] Meshing surface 4 (Plane, Frontal)
Info : [ 70 %] Meshing surface 5 (Plane, Frontal)
Info : [ 90 %] Meshing surface 6 (Plane, Frontal)
Info : Done meshing 2D (0.015625 s)
Info : Meshing 3D...
Info : 3D Meshing 1 volume with 1 connected component
Info : Tetrahedrization of 280 nodes in 0 seconds
Info : Reconstructing mesh...
Info : - Creating surface mesh
Info : - Identifying boundary edges
Info : - Recovering boundary
Info : Done reconstructing mesh (0 s)
Info : Found volume 1
Info : It. 0 - 0 nodes created - worst tet radius 2.95349 (nodes removed 0 0)
Info : 3D refinement terminated (333 nodes total):
Info : - 0 Delaunay cavities modified for star shapeness
Info : - 0 nodes could not be inserted
Info : - 1104 tetrahedra created in 0.015625 sec. (70656 tets/s)
Info : Done meshing 3D (0.015625 s)
Info : Optimizing mesh...
Info : Optimizing volume 1
Info : Optimization starts (volume = 1000) with worst = 0.0354623 / average = 0.75424:
Info : 0.00 < quality < 0.10 : 4 elements
Info : 0.10 < quality < 0.20 : 5 elements
Info : 0.20 < quality < 0.30 : 15 elements
Info : 0.30 < quality < 0.40 : 21 elements
Info : 0.40 < quality < 0.50 : 22 elements
Info : 0.50 < quality < 0.60 : 42 elements
Info : 0.60 < quality < 0.70 : 233 elements
Info : 0.70 < quality < 0.80 : 284 elements
Info : 0.80 < quality < 0.90 : 315 elements
Info : 0.90 < quality < 1.00 : 160 elements
Info : 23 edge swaps, 2 node relocations (volume = 1000): worst = 0.303645 / average = 0.766889 (0 s)
Info : No ill-shaped tets in the mesh :-)
Info : 0.00 < quality < 0.10 : 0 elements
Info : 0.10 < quality < 0.20 : 0 elements
Info : 0.20 < quality < 0.30 : 0 elements
Info : 0.30 < quality < 0.40 : 22 elements
Info : 0.40 < quality < 0.50 : 24 elements
Info : 0.50 < quality < 0.60 : 40 elements
Info : 0.60 < quality < 0.70 : 231 elements
Info : 0.70 < quality < 0.80 : 282 elements
Info : 0.80 < quality < 0.90 : 325 elements
Info : 0.90 < quality < 1.00 : 157 elements
Info : Done optimizing mesh (0 s)
Info : 333 nodes 1704 elements
Info : Meshing order 2 (curvilinear on)...
Info : [ 0 %] Meshing curve 1 order 2
Info : [ 10 %] Meshing curve 2 order 2
Info : [ 20 %] Meshing curve 3 order 2
Info : [ 20 %] Meshing curve 4 order 2
Info : [ 30 %] Meshing curve 5 order 2
Info : [ 30 %] Meshing curve 6 order 2
Info : [ 40 %] Meshing curve 7 order 2
Info : [ 40 %] Meshing curve 8 order 2
Info : [ 50 %] Meshing curve 9 order 2
Info : [ 50 %] Meshing curve 10 order 2
Info : [ 60 %] Meshing curve 11 order 2
Info : [ 60 %] Meshing curve 12 order 2
Info : [ 70 %] Meshing surface 1 order 2
Info : [ 70 %] Meshing surface 2 order 2
Info : [ 80 %] Meshing surface 3 order 2
Info : [ 80 %] Meshing surface 4 order 2
Info : [ 90 %] Meshing surface 5 order 2
Info : [ 90 %] Meshing surface 6 order 2
Info : [100 %] Meshing volume 1 order 2
Info : Surface mesh: worst distortion = 1 (0 elements in ]0, 0.2]); worst gamma = 0.900907`
From GUI I could see this worst distortion warning by still continues to volume mesh, in SDK it crashes.
Edited by Christophe Geuzaine