Mmgs and quadrilateral mesh

I am using mmgs version 5.5.1 and using it to remesh a mesh consisting of triangles and quadrilaterals. Everything works fine except when I try to remesh a mesh consisting of only quadrilaterals. In that case, I get an error of: ** MISSING DATA. When I add a single triangle to that mesh, everything works fine again. I can subdivide the quads by hand but …

Hello Matej,
Mmg only performs simplicial mesh adaptation, i.e. it only adapts triangles in 2D and tetrahedra in 3D. You can pass quadrilaterals but these are intended as additional elements that are left untouched during adaptation. So it cannot work on a mesh without triangles.

Yours,
Luca

Thanks for the reply. Maybe I was not clear enough. I do not need to get the quads as a result. I am happy with triangles.

The “problem” is with the input. If I input one quad it does not work. If I input one triangle and one quad which are connected then it works and the whole mesh (one quad and one triangle) are remeshed in triangles. This is what I need. So it seems to me the remeshing is working even for the quads. The problem is that when no triangles exist in the mesh the error is thrown despite the fact, that the mmgs can handle the quads.

Sorry, my bad, the quadrilateral split is a not-well-documented feature of Mmgs only, so my answer concerned Mmg2d/Mmg3d instead (where the user typically wants to preserve a quadrilateral boundary layer mesh).

Anyway I am not sure this is an official feature. In fact, as you say Mmgs exits if it doesn’t find input triangles. Thanks for reporting this.

I will discuss the reason for this inconsistency between Mmgs and Mmg2d/Mmg3d before proposing an official fix. In the meanwhile, I strongly suggest either

  • to split the quadrilaterals beforehand (even only one quadrilateral, if it does the trick) using an (A B C D) --> (A B C) + (A C D) pattern (which is the same used in Mmgs),
  • or to apply the attached patch to the Mmg master branch and recompile.patch_quads (372 Bytes) (it allows to run if no input triangles are provided, but quads are present).

Yours,
Luca

Dear Luca,

thank you for the fast response and fix. At the moment I am using a splitting method as you described. But I am splitting all the triangles since I did not think about splitting only one :slight_smile:. Thanks.

I will probably wait for the official fix. I was only worried if I am splitting the qads in the same way as mmgs. And now I know.

Thank you, Matej