How to check mesh

Dear MMG users,
I’d like to know if there is an option to check the new mesh quality.
For example, I’d like to know if there are bad oriented tetras and if so, re-run MMG.
I’m using FreeFem++. There is the option “checkmovemesh” for the remeshing command “movemesh”.
I’d like to know if there is something similar for MMG or how to adapt and use “checkmovemesh” with MMG.
Thanks in advance!
Lily

Dear Lily,

All Mmg versions display the elements quality histogram if you ask a minimum verbosity -v 4.

In Mmg3d you can get more precise information if you use the library functions:

Please follow the links to access to the usage documentation in libmmg3d.h, while general library examples can be found in the folder libexamples (although these functions are not explicitly covered by the examples yet).

The quality Q of a tetrahedron in the isotropic case is defined as in this paper, while the definitions of volume and edge length for the anisotropic extension can be found in this other paper.

Please let me know if you have more specific needs!

Yours,
Luca

Dear Luca,
Thank you for your clear response. It helps me a lot.
Yours,
Lily

Dear Luca,

I have one more question if you please.
I’m using MMG3D with FreeFem++.
How can I export the info about the worst quality Q in FreeFem.
I’d like to define in FreeFem something like
real wQ = “worth Q given by MMG”
Thanks in advance!

Lily

Dear Lily,
I think that the coupling of the two software does not expose all Mmg API functions to FreeFem users in the current release.
Anyway, since I am not an expert Freefem user nor developer, I strongly advice to ask for further support about this topic on the FreeFem community forum:

Surely they have deeper knowledge about FreeFem to help you find out:

(… But I see you are already doing it :wink: )
Yours,
Luca