Refs of some edges are not preserved

Dear Algiane
I am using mmg2d for meshing a domain of square with another square inside it. All the boundary refs are appended using (MMG2D_Set_edge(mmgMesh, edges[2i], edges[2i+1], edgeMark[i], i+1) ; The ref of the outer square is 1 and that of the inner sqare is 1. However after the refining, the refers of the edges are not preserved? I searched the forum, and found that this problem has been solved. However, what is the possible problems with my setting?

the output mesh is below
MeshVersionFormatted 2

Dimension 2

Vertices
33
29 33 1
186.4482 33 1
357 33 1
357 206.1055525 1
357 364 1
186.4482 364 1
29 364 1
29 205.8639225 1
290 113 2
196.94 113 2
102 113 2
102 207.435 2
102 300 2
196.94 300 2
290 300 2
290 207.435 2
148.026977573218 74.1589694188438 0
73.4142989078961 97.1406909391972 0
112.715358 33 1
66.233497724493 204.117611482526 0
231.807294500215 73.9317288028104 0
29 123.189225 0
266.21862 33 1
310.810115030489 92.1395508414545 0
357 125.605525 1
322.326028121891 204.665919942205 0
190.473973068612 330.716596632636 0
81.859796747551 310.44184715061 0
29 280.331475 0
110.18 364 1
303.006649984163 312.887811025113 0
266.21862 364 1
357 282.0775 1

Corners
8
1
3
5
7
9
11
13
15

RequiredVertices
4
1
7
9
15

Edges
24
19 2 1
22 1 0
25 4 1
29 8 0
32 6 1
10 11 2
1 19 1
11 12 2
9 10 2
8 22 0
2 23 1
23 3 1
3 25 1
12 13 2
15 16 0
16 9 0
13 14 2
14 15 2
7 29 0
6 30 1
30 7 1
5 32 1
4 33 1
33 5 1

Triangles
42
2 17 19 0
17 2 21 0
1 18 22 0
9 21 24 0
4 26 25 0
8 20 29 0
13 27 28 0
6 27 32 0
15 26 31 0
10 11 17 0
17 11 18 0
19 18 1 0
19 17 18 0
20 11 12 0
10 21 9 0
10 17 21 0
18 11 20 0
22 20 8 0
22 18 20 0
21 2 23 0
24 23 3 0
24 21 23 0
26 9 24 0
25 24 3 0
25 26 24 0
20 12 13 0
15 16 26 0
16 9 26 0
13 14 27 0
14 15 27 0
20 13 28 0
29 28 7 0
29 20 28 0
27 6 30 0
28 30 7 0
28 27 30 0
27 15 31 0
32 31 5 0
32 27 31 0
26 4 33 0
31 33 5 0
31 26 33 0

End

In the section of Edge, there are edges with Refs with 0.

Just to mention that recently I have found similar issues in tests that were already working, and I don’t know when exactly this happened. I think was working in 5.5 and in 5.7 I have this issue, unfortunately I don’t have the time to research in deep. Basically just note that I am also dealing with this issue.

Dear @junweisu ,

I am sorry but I don’t work on Mmg support anymore (and I can’t find the time to deal with bug reports in my spare time).

Inria is considering opening a position to replace me in the management of the Mmg consortium so don’t hesitate to continue posting in case of problems and to keep this forum alive: this will probably be dealt with when a new person will arrive on the project and it also shows that Mmg is used and useful :wink: .

Again, I am sorry to not be more helpful.
Best,
Algiane

Hello @junweisu ,
If you are still struggling with this issue, could you please provide the input files (.mesh, .sol) and command line options that you are using, so that other users could reproduce (and possibly track down and solve :crossed_fingers: ) the problem?
Thanks,
Luca