Bug: Split Triangle to Quad On Sphere Surface
Splitting triangle to quad using sphere produce incorrect results: GMSH-4.7.1
// Gmsh project created on Fri Jan 8 23:53:17 2021
SetFactory("OpenCASCADE");
Sphere(1) = {0, 0., 0, 0.5, -Pi/2, Pi/2, Pi};
Transfinite Curve {1} = 2 Using Progression 1;
Transfinite Curve {2} = 3 Using Progression 1;
Transfinite Curve {4} = 3 Using Progression 1;
Transfinite Curve {5} = 2 Using Progression 1;
Mesh option Uses Initial Mesh Only.
(1) Sphere surface is split into 4 triangles
(2) The triangles are split into 12 Quads of same area. The 4 Quads around the apex 9 of the sphere must be the same shape and symmetric, however the code produce wrong results due to a wrong computation inside the routine Subdivide(..GFace*....) within meshRefine.cpp at line 161-166.
The initial 4 triangles are equilateral, Hence the split must also produce 12 equal Quads.
The results are :
Vertex 14 and 15 are at wrong positions. The results must be as,
The right results are produced making making either of the two correction below, to the routine as,
or computing the closest Point based from the barycenter of the triangles
We think the problem is due to the mixing of coordinates from periodical faces. In this case we think that computing the closest point is more reliable than interpolating the parametric coordinates.