<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Hello all,</p>
<p><br>
</p>
<p>Not sure if this is a bug, but I have been trying to figure out
where some weird results are coming from and I think it is because
some elements in the meshes are ordered in reverse, some of the
time. Here is a simple example:</p>
<p><br>
</p>
<p>// Gmsh project created on Fri Aug 14 22:33:15 2020<br>
//+<br>
Point(1) = {0, 0, 0, 0.5};<br>
//+<br>
Point(2) = {0.4, 0.2, 0, 0.5};<br>
//+<br>
Point(3) = {0.6, 0.2, 0, 0.5};<br>
//+<br>
Point(4) = {1., 0, 0, 0.5};<br>
//+<br>
Point(5) = {1., 1., 0, 0.5};<br>
//+<br>
Point(6) = {0., 1., 0, 0.5};<br>
//+<br>
Point(7) = {0.4, 0.4, 0, 0.5};<br>
//+<br>
Point(8) = {0.6, 0.4, 0, 0.5};<br>
//+<br>
Line(1) = {1, 4};<br>
//+<br>
Line(2) = {4, 5};<br>
//+<br>
Line(3) = {5, 6};<br>
//+<br>
Line(4) = {6, 1};<br>
//+<br>
Line(6) = {2, 3};<br>
//+<br>
Line(7) = {3, 8};<br>
//+<br>
Line(8) = {8, 7};<br>
//+<br>
Line(9) = {7, 2};<br>
//+<br>
Curve Loop(1) = {9, 6, 7, 8};<br>
//+<br>
Plane Surface(1) = {1};<br>
//+<br>
Curve Loop(2) = {4, 1, 2, 3};<br>
//+<br>
Plane Surface(2) = {1, 2};<br>
//+<br>
Physical Curve("zero") = {4};<br>
//+<br>
Physical Curve("one") = {9, 8, 7, 6};<br>
//+<br>
Physical Surface("main") = {2, 1};</p>
<p><br>
</p>
<p>In my case, I am doing this with second order triangles. The
following elements are reverse ordered:</p>
<pre>25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46</pre>
<p>According to the documentation in section "9.2.2 High-order
elements": The orientation of a face is such that the computed
normal points outward; the starting point is the node with the
lowest index. <br>
</p>
<p>But if the mesh is strictly 2D and all on one plane, I would
expect the code to give all elements the same normal direction. In
my example the hole and the main square have different normal
directions. I think this is unexpected behaviour. <br>
</p>
<p>I am using 4.6.0</p>
<p>Thanks for all your great work!</p>
<p>Regards,</p>
<p>Marc</p>
<p><br>
</p>
<p><br>
</p>
<p><br>
</p>
<p><br>
</p>
</body>
</html>