Dear MMG community,
I have a test.msh file (attached to this post) containing a mesh with two subdomains (tagged 10 and 20) and I would like to remesh only the subdomain with label 10. As far as I understand, it is possible to do so using the MMG3D_Set_requiredTetrahedron
function. But, first, I am not even capable of getting the reference label of each tetraheron from the loaded mesh.
This is what I have tried in my testmmg.c file (attached to this post) to print the label of each tetrahedron:
ier = MMG3D_Get_meshSize(mmgMesh,&np,&ne,NULL,&nt,NULL,&na);
printf("Nb of Tetra : %d\n", ne);
for (int i=0; i<ne; i++)
{
MMG5_pTetra pt;
pt = &mmgMesh->tetra[i];
if (pt->ref>0)
printf("%d\n",pt->ref);
}
But it prints very big integers, not the tags I have set with GMSH.
Any help would be appreciate.
Cheers.
testmmg.c (5.7 KB)
test.msh (223.2 KB)