Small elements with wrong marker (MMG2D)

Hello everyone,

I am using MMG2D/3D for meshing moving interfaces, and it has worked very well in several test cases. However, in my latest example, I encountered an issue that I can’t quite explain.


As shown in the screenshots, I have two materials, each with a corresponding marker. At first glance, everything looks fine: both the cell markers and facet markers appear to be assigned correctly. However, I noticed that in some remeshing steps, two very small and sharp shaped elements at the interface between the two materials receive incorrect facet markers (see Screenshot below).

I’ve uploaded the mesh files for step 8 (which looks correct) and step 9 (where the issue appears):

domain_debug_step_8.h5 (4.8 MB)
domain_debug_step_8.xdmf (1.7 KB)
domain_debug_step_9.h5 (4.9 MB)
domain_debug_step_9.xdmf (1.7 KB)

You can find the problematic elements near coordinates [0, 1.5] / [1, 1.5].

Here are the parameters I’m using:

MMG2D_IPARAM_iso = 1
MMG2D_DPARAM_hmax = 0.05
MMG2D_DPARAM_hmin = 0.005
MMG2D_DPARAM_rmc = 1e-5 (I want to preserve small circles in the lower half of the mesh)
MMG2D_DPARAM_hgrad = 1.05
MMG2D_IPARAM_numberOfLocalParam = 10

Additionally, I set local parameters for boundary edges using:
MMG2D_Set_localParameter(mmgMesh, NULL, MMG5_Edg, i, hmin, hmin, 0.01)

I would greatly appreciate any suggestions or ideas as to what might be causing these problem.

Thanks in advance,
Nils