How to set the isrequired if only the ith tet is wanted

In the " MMG3D_Get_tetrahedron", How to set the arrary “isrequired” if only the ith tet is needed.
Regards

Hi,

Sorry for the delay, I have missed your message.
I am not sure to understand your question:

  • the MMG3D_Get_tetrahedron function is a “getter” so you recover informations from Mmg. Thus, here, the “isRequired” integer allows to recover if the tetrahedron that you are getting is a “required” tetra;
  • to impose a required tetra, you must use the MMG3D_Set_requiredTetrahedron function and give the index of the tetra to preserve (i in your example).

Regards,

Algiane

Hello,

I am jumping into this topic for a related question :
What metric are we supposed to put for the vertices of the “RequiredTetrahedron” ? As I understand, if I put anything it will be ignored because the Tetrahedron il flagged to be required, so it will be left untouched am I right ?

Best,

Antoine

Hello Antoine,
With the default options, the metrics on the points of a required tetrahedron is indeed not taken into consideration, and Mmg would overwrite it with a new metrics compatible with the sizes of the required edges.
The metrics near required entities is then corrected with the demanded gradation according to the -hgradreq option (instead of -hgrad), unless it is disabled by passing a negative value.
So, the metrics on required entities would be ignored but it would be touched.

The advanced option -nosizreq overrides this behaviour, asking Mmg not to recompute the metrics on the vertices of the required entities. Please note that, with this option, the adaptation loop could fail to converge if the sizes of the required edges are too far from the sizes that would be dictated by the metrics. So it should be used with some care.

Regards,
Luca