Skip to content

Errors when meshing simple periodic mesh

Hi I'm getting errors with this simple testcase:

cm = 1e-2;

p1 = newp; Point(p1) = {0, 0, 0};

out[] = Extrude {0, 2.5 * cm, 0} { Point{p1}; Layers{25}; };

out[] = Extrude {10 * cm, 0, 0} { Curve{out[1]}; Layers{100}; Recombine; };

out[] = Extrude {{1, 0, 0}, {0, 0, 0}, Pi / 2} { Surface{out[1]}; Layers{10}; Recombine; };

Mesh 3;

Periodic Surface{20} = {13} Translate {10 * cm, 0, 0};
Periodic Surface{22} = {5}  Rotate    {{1, 0, 0}, {0, 0, 0}, Pi / 2};

Physical Surface("wall") = {17};
Physical Surface("inlet") = {13};
Physical Surface("outlet") = {20};
Physical Surface("xy plane") = {5};
Physical Surface("xz plane") = {22};

Physical Volume("domain") = {1};

When generating the mesh I get:

Info    : Setting mesh master using transformation
Warning : Gmsh must be compiled with ANN support for finding closest nodes
Warning : Gmsh must be compiled with ANN support for finding closest nodes
Warning : Gmsh must be compiled with ANN support for finding closest nodes
Info    : Setting curve master 2 - 1
Warning : Gmsh must be compiled with ANN support for finding closest nodes
Warning : Gmsh must be compiled with ANN support for finding closest nodes
Warning : Gmsh must be compiled with ANN support for finding closest nodes
Info    : Setting curve master 16 - 12
Warning : Gmsh must be compiled with ANN support for finding closest nodes
Warning : Gmsh must be compiled with ANN support for finding closest nodes
Warning : Gmsh must be compiled with ANN support for finding closest nodes
Info    : Setting curve master 9 - 7
Warning : Gmsh must be compiled with ANN support for finding closest nodes
Info    : Setting mesh master using transformation
Warning : Gmsh must be compiled with ANN support for finding closest nodes
Warning : Gmsh must be compiled with ANN support for finding closest nodes
Info    : Setting curve master 7 - 1
Warning : Gmsh must be compiled with ANN support for finding closest nodes
Warning : Gmsh must be compiled with ANN support for finding closest nodes
Warning : Gmsh must be compiled with ANN support for finding closest nodes
Info    : Setting curve master 8 - 4
Warning : Gmsh must be compiled with ANN support for finding closest nodes
Warning : Gmsh must be compiled with ANN support for finding closest nodes
Info    : Setting curve master 9 - 2
Warning : Gmsh must be compiled with ANN support for finding closest nodes
Info    : Done reading 'test.geo'
Info    : Reconstructing periodicity for curve connection 2 - 1
Error   : Cannot find periodic counterpart of node 3 of curve 2 on curve 1
Info    : Meshing 3D...
Info    : Meshing volume 1 (Extruded)
Info    : Done meshing 3D (Wall 0.124388s, CPU 0.124388s)
Info    : Optimizing mesh...
Info    : Done optimizing mesh (Wall 0.000496542s, CPU 0.000496s)
Info    : Reconstructing periodicity for curve connection 2 - 1
Error   : Cannot find periodic counterpart of node 3 of curve 2 on curve 1
Info    : 27876 nodes 31926 elements
Error   : ------------------------------
Error   : Mesh generation error summary
Error   :     0 warnings
Error   :     2 errors
Error   : Check the full log for details
Error   : ------------------------------

It used to work with older versions of Gmsh. I'm using version 4.12.1 as packaged in linux mint 22, which I believe is the same package as that of Ubuntu 24.04.

I saw in another issue that the ANN warnings should be harmless. Is there something wrong with this simple mesh?

Thanks!