Label mesh in Freefem

Dear developers,
I used gmsh in order to obtain a file.mesh to use as computational grid in Freefem. Of course I fixed all the label necessary to impose the boundary conditions.
When I run my program in Freefem, everything works fine until I update the mesh with mmg3d. After this step, every label is set to 0 and I cannot impose any boundary conditions.
Instead everything works fine if I use a mesh built in Freefem.

How can I solve this?

Thanks

Hello,

If I well understand, without mesh adaptation your computation works well in FreeFem.
Am I right ?

If yes, how do you call Mmg3d ? with which options ?

Hello,
yes, everything works fine without adaptation.
I call the following command (inside the Freefem program)
exec(mmg3d_O3 mymesh.mesh -sol mysol.sol -hgrad 25. -hmax 1.5 -hmin 0.0001);

I get a mesh, but the mymesh.o.mesh file contains all the triangles (=> all the surfaces) marked with the label 0.

This never happened to me (even with adaptation) when I used a simple box generated in Freefem and not with gmsh.

(EDIT: it looks like things go wrong when mmg3d has to deal with two different meshes joint together. Anyway, I do not know how to build my mesh differently)

Hello,

Is it possible that you have duplicated triangles at the interface between the two meshes ?
or missing triangles ?

If yes, I think that explains your problem : Mmg3d analyses your mesh and does not know how to deal with your duplicated/missing boundaries so it deletes them.

By the way, the parameter -hgrad defines the ratio between two adjacent edges. In your case your value is very high. If your aim is to disable the gradation, you can put -1 instead of 25.