"Recombine all" fails on some Line In Surface - gmsh4.12.2
Hi,
since GMSH 4.12.2, the option "recombine all triangular mesh" now takes into account the "Line In Surface", and the related issues are solved (#2488 (closed), #1969 (closed)).
But for some configs, the algo fails with the error "1D mesh cannot be divided by two".
It seems to fail only when the first triangle mesh is produced with an even number of vertex on the Line In Surface :
p1 = newp; Point(p1) = { 0, 30, 0, 2};
p2 = newp; Point(p2) = { 0, 0, 0, 2};
p3 = newp; Point(p3) = { 40, 0, 0, 2};
p4 = newp; Point(p4) = { 40, 30, 0, 2};
p5 = newp; Point(p5) = { 16, 20, 0, 2 };
p6 = newp; Point(p6) = { 20, 20, 0, 2};
Line(1) = { p1, p2 };
Line(2) = { p2, p3 };
Line(3) = { p3, p4 };
Line(4) = { p4, p1 };
Line Loop(5) = { 1, 2, 3, 4 };
Plane Surface(6) = { 5 };
Line(7) = { p5, p6 };
Line{ 7 } In Surface { 6 };
Physical Line( "Crack" ) = { 7 };
Mesh.CharacteristicLengthFactor = 1;
Mesh.ElementOrder = 1;
Mesh.RecombinationAlgorithm = 2;
Mesh.RecombineAll = 1;
Below, I just change the CharacteristicLengthFactor between each attempts, and the recombination works only when the number of vertex on the Line In Surface is odd.
Making this Line In Surface transfinite with an odd number of vertex seems to work in each of the above configs. But having the transfinite contraint might be too heavy, are there any other solutions ?
Edited by Christophe Geuzaine