[Gmsh] Curvilinear meshing

Christophe Geuzaine cgeuzaine at ulg.ac.be
Tue Jul 9 10:33:21 CEST 2013


On 27 Apr 2013, at 19:42, Jonathan Viquerat <jonathan.viquerat at inria.fr> wrote:

> Dear gmsh dev,
> 
> First of all, thanks for that great software that makes 
> 
> I am currently trying to achieve a very simple goal, which is meshing a unit-radius sphere with curvilinear tetrahedrons on the boundary, but I seem unable to do it properly.
> I use the following .geo file :
> 


Hi Jonathan - The new high-order mesh optimization features are not yet interfaced in the scripting language: give them a try in the GUI : in the "Mesh" module, select "Optimize high order".

We will interface them in scripts in the near future.




> // Spherical domain
> 
> Mesh.ElementOrder = 2;
> Mesh.SecondOrderLinear = 0;
> Mesh.CharacteristicLengthMax = 0.3;
> Mesh.HighOrderOptimize = 5;
> 
> // Parameters
> h = 0.3;
> r = 1.0;
> 
> // Sphere
> 
> Point (1) = {0,0,0,h};
> Point (2) = {r,0,0,h};
> Point (3) = {0,r,0,h};
> Point (4) = {-r,0,0,h};
> Point (5) = {0,-r,0,h};
> Point (6) = {0,0,r,h};
> Point (7) = {0,0,-r,h};
> 
> Circle (1) = {2,1,3};
> Circle (2) = {3,1,4};
> Circle (3) = {4,1,5};
> Circle (4) = {5,1,2};
> Circle (5) = {6,1,3};
> Circle (6) = {3,1,7};
> Circle (7) = {7,1,5};
> Circle (8) = {5,1,6};
> 
> Line Loop (1) = {1,6,7,4};
> Line Loop (2) = {1,-5,-8,4};
> Line Loop (3) = {2,3,-7,-6};
> Line Loop (4) = {2,3,8,5};
> 
> Ruled Surface (1) = {1} In Sphere {1};
> Ruled Surface (2) = {2} In Sphere {1};
> Ruled Surface (3) = {3} In Sphere {1};
> Ruled Surface (4) = {4} In Sphere {1};
> 
> Surface Loop (1) = {1,2,3,4};
> 
> Physical Surface (2) = {1,2,3,4};
> 
> // Volumes
> 
> Volume (1) = {1};
> 
> Physical Volume (1) = {1};
> 
> and then launch the gmsh mesher as follows :
> 
> gmsh curvspheres.geo -3 -hoOptimize -o curvspheres.msh
> 
> which gives me the following output :
> 
> Info    : Running 'gmsh curvspheres.geo -3 -hoOptimize -o curvspheres.msh' [Gmsh 2.7.0, 1 node, max. 1 thread]
> Info    : Started on Sat Apr 27 19:34:55 2013
> Info    : Reading 'curvspheres.geo'...
> Info    : Done reading 'curvspheres.geo'
> Info    : Meshing 1D...
> Info    : Meshing curve 1 (Circle)
> Info    : Meshing curve 2 (Circle)
> Info    : Meshing curve 3 (Circle)
> Info    : Meshing curve 4 (Circle)
> Info    : Meshing curve 5 (Circle)
> Info    : Meshing curve 6 (Circle)
> Info    : Meshing curve 7 (Circle)
> Info    : Meshing curve 8 (Circle)
> Info    : Done meshing 1D (0.000982 s)
> Info    : Meshing 2D...
> Info    : Meshing surface 1 (Ruled surface, MeshAdapt)
> Info    : Meshing surface 2 (Ruled surface, MeshAdapt)
> Info    : Meshing surface 3 (Ruled surface, MeshAdapt)
> Info    : Meshing surface 4 (Ruled surface, MeshAdapt)
> Info    : Done meshing 2D (0.07429 s)
> Info    : Meshing 3D...
> Info    : Meshing volume 1 (Delaunay)
> Delaunizing vertices...
> Delaunay seconds:  0.037122
> Creating surface mesh ...
> Surface mesh seconds:  0.00093
> Recovering boundaries...
> Boundary recovery seconds:  0.001441
> Removing exterior tetrahedra ...
> Exterior tets removal seconds:  0.000317
> Suppressing Steiner points ...
> Steiner suppression seconds:  2.6e-05
> Recovering Delaunayness...
> Delaunay recovery seconds:  0.011951
> Optimizing mesh...
> Optimization seconds:  0.000587
> 
> Writing nodes.
> Writing elements.
> Writing faces.
> Writing edges.
> 
> Output seconds:  0.000599
> Total running seconds:  0.053066
> 
> Statistics:
> 
>   Input points: 243
>   Input facets: 482
>   Input segments: 723
>   Input holes: 0
>   Input regions: 0
> 
>   Mesh points: 243
>   Mesh tetrahedra: 677
>   Mesh faces: 1595
>   Mesh edges: 1160
>   Mesh boundary faces: 482
>   Mesh boundary edges: 723
> 
> Info    : 243 points 723 edges and 482 faces in the final mesh
> Info    : a region is found 0x1036410b0
> Info    : 243 points created -- Worst tet radius is 9.91345 (MISSES 0 0)
> Info    : Done meshing 3D (0.081036 s)
> Info    : Meshing order 2 (curvilinear on)...
> Info    : Meshing curve 1 order 2
> Info    : Meshing curve 2 order 2
> Info    : Meshing curve 3 order 2
> Info    : Meshing curve 4 order 2
> Info    : Meshing curve 5 order 2
> Info    : Meshing curve 6 order 2
> Info    : Meshing curve 7 order 2
> Info    : Meshing curve 8 order 2
> Info    : Meshing surface 1 order 2
> Info    : Meshing surface 2 order 2
> Info    : Meshing surface 3 order 2
> Info    : Meshing surface 4 order 2
> Info    : Meshing volume 1 order 2
> Warning : Surface mesh : Worst Face Distorsion Mapping -0.127182 (25 negative jacobians) Worst Gamma 0.253364 Avg Smoothness 0.70106
> Warning : Final surface mesh : Worst Face Distorsion Mapping -0.127182 (25 negative jacobians) Worst Gamma 0.253364 Avg Smoothness 0.70106
> Warning : Volume Mesh : Worst Tetrahedron Smoothness -3.0707 (1390 negative jacobians) Avg Smoothness -0.104472
> Info    : Done meshing order 2 (0.011952 s)
> Info    : 4108 vertices 3266 elements
> Warning : ------------------------------
> Warning : Mesh generation error summary
> Warning :     3 warnings
> Warning :     0 errors
> Warning : Check the full log for details
> Warning : ------------------------------
> Info    : Writing 'curvspheres.msh'...
> Info    : Done writing 'curvspheres.msh'
> 
> The sight of the latter draws several questions from my aching mind :
> 
> - I can't find any optimization step in the output, as I could see when meshing with "flat" tetrahedrons and using the option -optimize; Is that normal ?
> - I tried many things to get rid of the negative jacobians, but couldn't. How could I ? That is most certainly linked to the previous question;
> - Is there a way to know the number of flat and curved tetrahedrons in the ouput ?
> 
> In advance, many thanks for your answers.
> 
> Regards,
> 
> J. Viquerat
> INRIA Sophia Antipolis - Nachos team
> 
> _______________________________________________
> gmsh mailing list
> gmsh at geuz.org
> http://www.geuz.org/mailman/listinfo/gmsh

-- 
Prof. Christophe Geuzaine
University of Liege, Electrical Engineering and Computer Science 
http://www.montefiore.ulg.ac.be/~geuzaine