[Gmsh] Refine by splitting over a curve

Felix Salazar felix.a.salazar at gmail.com
Fri Jun 8 18:27:31 CEST 2012


Hello,

I'm trying to create a second order quadrangular mesh around a circular
geometry, using O-Grids and Transfinite meshes. My FEM code requires that
the intermediate nodes are placed at the midpoint of the element edges.
Thus, I use the option Mesh.SecondOrderLinear = 1 in my .geo file. That
avoids that GMSH move the extra nodes to the circle. Again, I want
straight-edges elements. Until here, no issues.

After the mesh is created, I try to refine it using the "refine by
splitting" option on the GUI. Even if I do that with a 1st order mesh, the
added nodes are placed at the midpoint of the edges of the previous mesh.
According to the log file, GMSH creates a 2nd order mesh as part of the
refinement process. Thus, it uses the Mesh.SecondOrderLinear = 1 option,
and that causes that the refined mesh is not adapted to the circular
geometry. Is there any way to turn off this option off for the "refine by
splitting" step, but leave it active for the generation of the actual 2nd
order mesh?

For me, the expected behaviour or any refinement should be the increase of
the mesh density, and improve the definition of the geometrical features of
the domain. With the Mesh.SecondOrderLinear active, the second objective is
not achieved.

I'm including the .geo and the logfile

Thanks in advance for any help with this issue,

=======testestest.geo==========
N = 5;
Point(1) = {0, 0, 0};
Point(2) = {1, 0, 0};
Point(3) = {2, 0, 0};
Point(4) = {0, 1, 0};
Point(5) = {0, 2, 0};
Circle(1) = {2, 1, 4};
Transfinite Line {1} = N;
Line(2) = {2, 3};
Transfinite Line {2} = N;
Line(3) = {3, 5};
Transfinite Line {3} = N;
Line(4) = {5, 4};
Transfinite Line {4} = N;

Line Loop(1) = {3, 4, -1, 2};
Plane Surface(1) = {1};
Transfinite Surface {1} = {};
Physical Surface(1) = {1};

Geometry.Tolerance = 1.0e-16;

Mesh.Smoothing = 0;
Mesh.SmoothNormals = 1;
Mesh.Algorithm = 6;
Mesh.Points = 1;
Mesh.PointSize = 8;
Mesh.SecondOrderLinear = 1;
Mesh.RecombineAll = 1;

Mesh.ElementOrder = 1;
Mesh.Format = 30;
Mesh.SaveElementTagType = 2;

=====testestest.log==========
Info    : Reading 'testestest'...
Info    : Done reading 'testestest'
Info    : Meshing 1D...
Info    : Meshing curve 1 (Circle)
Info    : Meshing curve 2 (Line)
Info    : Meshing curve 3 (Line)
Info    : Meshing curve 4 (Line)
Info    : Done meshing 1D (0.004 s)
Info    : Meshing 2D...
Info    : Meshing surface 1 (transfinite)
Info    : Done meshing 2D (0 s)
Info    : 26 vertices 37 elements
Info    : Refining mesh...
Info    : Meshing order 2...
Info    : Meshing curves order 2...
Warning : We don't have a valid parameter on curve 3760-3764
Warning : We don't have a valid parameter on curve 3764-3765
Warning : We don't have a valid parameter on curve 3765-3766
Warning : We don't have a valid parameter on curve 3766-3762
Warning : We don't have a valid parameter on curve 3760-3767
Warning : We don't have a valid parameter on curve 3767-3768
Warning : We don't have a valid parameter on curve 3768-3769
Warning : We don't have a valid parameter on curve 3769-3761
Warning : We don't have a valid parameter on curve 3761-3770
Warning : We don't have a valid parameter on curve 3770-3771
Warning : We don't have a valid parameter on curve 3771-3772
Warning : We don't have a valid parameter on curve 3772-3763
Warning : We don't have a valid parameter on curve 3763-3773
Warning : We don't have a valid parameter on curve 3773-3774
Warning : We don't have a valid parameter on curve 3774-3775
Warning : We don't have a valid parameter on curve 3775-3762
Info    : Meshing surfaces order 2...
Info    : Meshing volumes order 2...
Info    : Done meshing order 2 (0.001 s)
Info    : Done refining mesh (0.002 s)
Info    : Meshing order 2...
Info    : Meshing curves order 2...
Warning : We don't have a valid parameter on curve 3760-3785
Warning : We don't have a valid parameter on curve 3785-3764
Warning : We don't have a valid parameter on curve 3764-3786
Warning : We don't have a valid parameter on curve 3786-3765
Warning : We don't have a valid parameter on curve 3765-3787
Warning : We don't have a valid parameter on curve 3787-3766
Warning : We don't have a valid parameter on curve 3766-3788
Warning : We don't have a valid parameter on curve 3788-3762
Warning : We don't have a valid parameter on curve 3760-3789
Warning : We don't have a valid parameter on curve 3789-3767
Warning : We don't have a valid parameter on curve 3767-3790
Warning : We don't have a valid parameter on curve 3790-3768
Warning : We don't have a valid parameter on curve 3768-3791
Warning : We don't have a valid parameter on curve 3791-3769
Warning : We don't have a valid parameter on curve 3769-3792
Warning : We don't have a valid parameter on curve 3792-3761
Warning : We don't have a valid parameter on curve 3761-3793
Warning : We don't have a valid parameter on curve 3793-3770
Warning : We don't have a valid parameter on curve 3770-3794
Warning : We don't have a valid parameter on curve 3794-3771
Warning : We don't have a valid parameter on curve 3771-3795
Warning : We don't have a valid parameter on curve 3795-3772
Warning : We don't have a valid parameter on curve 3772-3796
Warning : We don't have a valid parameter on curve 3796-3763
Warning : We don't have a valid parameter on curve 3763-3797
Warning : We don't have a valid parameter on curve 3797-3773
Warning : We don't have a valid parameter on curve 3773-3798
Warning : We don't have a valid parameter on curve 3798-3774
Warning : We don't have a valid parameter on curve 3774-3799
Warning : We don't have a valid parameter on curve 3799-3775
Warning : We don't have a valid parameter on curve 3775-3800
Warning : We don't have a valid parameter on curve 3800-3762
Info    : Meshing surfaces order 2...
Info    : Meshing volumes order 2...
Info    : Done meshing order 2 (0.004 s)
Info    : Writing 'testestest.log'...


-------------------------
*Félix Salazar*
felix.a.salazar at gmail.com
-------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.geuz.org/pipermail/gmsh/attachments/20120608/f4588047/attachment.html>