[Gmsh] more tets than hexes in hex-dom mesh of cube

Paul Garlick it at tourbillion-technology.com
Thu Dec 11 12:37:34 CET 2014


Dear Gmsh developers and users,

I am attempting to reproduce a hex-dominant mesh of a cube, similar to 
the example given in Figure 2 of the paper:

'A frontal approach to hex-dominant mesh generation'--Carrier Baudouin, 
Remacle, Marchandise, Henrotte and Geuzaine

http://www.amses-journal.com/content/1/1/8

Following the instructions on the wiki I have selected the DelQuad and 
R-Tree algorithms in the .geo file.  The file hexDomCube.geo is 
attached.  However, the mesh generated has a low percentage of hexes and 
the vertices of the volume mesh are not aligned with the vertices of the 
surface mesh, as shown in the attached file hexDomCube.png.

Running gmsh version 2.8.5 for this case gives the following output:

$gmsh hexDomCube.geo -3
.
.
.
Lloyd: 98 0.752
Lloyd: 99 0.752
Maximum number of iterations reached.
Maximum number of iterations reached.
Maximum number of iterations reached.
Info    : Meshing surface 105 (Plane, MeshAdapt)
Info    : Done meshing 2D (44.2838 s)
Info    : Meshing 3D...
Info    : Delaunay Meshing 1 volumes with 1 connected components
Info    : Meshing volume 200 (Delaunay)
Delaunizing vertices...
Delaunay seconds:  0.023444
Creating surface mesh ...
Surface mesh seconds:  0.009323
Recovering boundaries...
Boundary recovery seconds:  0.012358
Removing exterior tetrahedra ...
Exterior tets removal seconds:  0.002201
Recovering Delaunayness...
Delaunay recovery seconds:  0.007054
Optimizing mesh...
Optimization seconds:  0.010236

Writing nodes.
Writing elements.
Writing faces.
Writing edges.

Output seconds:  0.004045
Total running seconds:  0.069873

Statistics:

  Input points: 602
  Input facets: 1200
  Input segments: 1800
  Input holes: 0
  Input regions: 0

  Mesh points: 602
  Mesh tetrahedra: 1702
  Mesh faces: 4004
  Mesh edges: 2903
  Mesh faces on facets: 1200
  Mesh edges on segments: 1800

Info    : 602 points 2903 edges and 1200 faces in the initial mesh
Info    : Found region 200
Info    : 0 points created - Worst tet radius is 3.53944 (PTS removed 0 0)
Info    : 3D point insertion terminated (1020 points created):
Info    :  - 3 Delaunay cavities modified for star shapeness
Info    :  - 0 points could not be inserted
Info    :  - 4357 tetrahedra created in 0.196 sec. (22229 tets/sec.)
NumSmooth = 0
100
200
300
400
500
600
Info    : Meshing volume 200 (Delaunay)
Info    : Meshing volume 200 (Delaunay)
Delaunizing vertices...
Delaunay seconds:  0.024825
Creating surface mesh ...
Surface mesh seconds:  0.008894
Recovering boundaries...
Boundary recovery seconds:  0.012923
Removing exterior tetrahedra ...
Exterior tets removal seconds:  0.002063
Recovering Delaunayness...
Delaunay recovery seconds:  0.006693
Optimizing mesh...
Optimization seconds:  0.01056

Writing nodes.
Writing elements.
Writing faces.
Writing edges.

Output seconds:  0.004219
Total running seconds:  0.071645

Statistics:

  Input points: 602
  Input facets: 1200
  Input segments: 1800
  Input holes: 0
  Input regions: 0

  Mesh points: 602
  Mesh tetrahedra: 1702
  Mesh faces: 4004
  Mesh edges: 2903
  Mesh faces on facets: 1200
  Mesh edges on segments: 1800

Info    : 602 points 2903 edges and 1200 faces in the initial mesh
Info    : Found region 200
Info    : 0 points created - Worst tet radius is 3.53944 (PTS removed 0 0)
Info    : 3D point insertion terminated (1021 points created):
Info    :  - 3 Delaunay cavities modified for star shapeness
Info    :  - 0 points could not be inserted
Info    :  - 4372 tetrahedra created in 0.212 sec. (20622 tets/sec.)
................HEXAHEDRA................
Info    : Building Connectivity...
Info    : Hex-merging pattern nb. 1...
Info    : Hex-merging pattern nb. 2...
Info    : Hex-merging pattern nb. 3...
hexahedra average quality (0->1) : 0.696976
percentage of hexahedra (number) : 8.80
percentage of hexahedra (volume) : 40.42
................PRISMS................
connectivity
pattern
prisms average quality (0->1) : 0.568036
percentage of prisms (number) : 10.46
percentage of prisms (volume) : 16.74
................PYRAMIDS................
Number :
  percentage of hexahedra : 12.78
  percentage of prisms : 12.48
  percentage of pyramids : 19.27
  percentage of tetrahedra : 55.47
Volume :
  percentage of hexahedra : 42.57
  percentage of prisms : 17.59
  percentage of pyramids : 18.65
  percentage of tetrahedra : 26.00
Total number of elements : 2003
Total volume : 0.926993
Misc : 0 0 0
Info    : Done meshing 3D (7.38 s)
Info    : 1021 vertices 2988 elements
Info    : Writing 'hexDomCube.msh'...
Info    : Done writing 'hexDomCube.msh'
Info    : Stopped on Thu Dec 11 11:04:04 2014

The low percentage of hexes is similar to the example in Figure 1 of the 
paper.  The vertex alignment part of the algorithm does not appear to 
have worked.  I am unsure whether this is a script problem or a gmsh 
problem.  Can anyone advise?

Best regards,

Paul Garlick.
-------------- next part --------------
Point(1) = {0.0, 0.0, 0};
Point(2) = {0.0, 1.0, 0};
Point(3) = {1.0, 0.0, 0};
Point(4) = {1.0, 1.0, 0};
Point(5) = {0.0, 0.0, 1.0};
Point(6) = {0.0, 1.0, 1.0};
Point(7) = {1.0, 0.0, 1.0};
Point(8) = {1.0, 1.0, 1.0};

Line(1) = {1, 2};
Line(2) = {2, 4};
Line(3) = {4, 3};
Line(4) = {3, 1};
Line(5) = {5, 6};
Line(6) = {6, 8};
Line(7) = {8, 7};
Line(8) = {7, 5};
Line(9) = {1, 5};
Line(10) = {2, 6};
Line(11) = {3, 7};
Line(12) = {4, 8};

Line Loop(100) = {1, 2, 3, 4};
Line Loop(101) = {-5, -6, -7, -8};
Line Loop(102) = {-1, -10, 5, 9};
Line Loop(103) = {-2, -12, 6, 10};
Line Loop(104) = {-3, -11, 7, 12};
Line Loop(105) = {-4, -9, 8, 11};
Plane Surface(100) = {100};
Plane Surface(101) = {101};
Plane Surface(102) = {102};
Plane Surface(103) = {103};
Plane Surface(104) = {104};
Plane Surface(105) = {105};

Surface Loop(200) = {100, 101, 102, 103, 104, 105};
Volume(200) = {200};

// Mesh.SmoothCrossField=10;
Mesh.Lloyd = 50; 
Mesh.Algorithm = 8; // DelQuad (experimental)
Mesh.Algorithm3D = 9; 
Mesh.Recombine3DAll = 1; 
Mesh.Smoothing = 0; 

Field[1] = MathEval;
// Field[1].F = "0.05 + 0.01*(x + y + z)";
Field[1].F = "0.1";
Background Field = 1;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: hexDomCube.png
Type: image/png
Size: 36990 bytes
Desc: not available
URL: <http://www.geuz.org/pipermail/gmsh/attachments/20141211/e6c8279b/attachment.png>