How to obtain the cell face informations

Hello:
I want to obtain the face informations(neighbors, etc…) in the 3d Mesh for the FVM computation.
Does MMG provide this API.
Regards

Hi,

Mmg doesn’t allow for now to get the list of non boundary triangles of the mesh (but it is planned to implement that very soon).

For now, you can:

  • Get the list of the tetra that are adjacents to the tetra of index k using the MMG3D_Get_adjaTet(MMG5_pMesh mesh, int k, int listet[4]) function. The array listet will contains the result such as listet[i] contains the index of the tetra adjacent to tetra k through the face opposite to the vertex of local index i. As the numbering of the tetra starts from 1, a 0 value for listet[i] means that the tetra has no adjacent through the face i (boundary face);

  • Get the 2 tetra that shares a boundary triangle ktri using the MMG3D_Get_tetsFromTria(MMG5_pMesh mesh, int ktri, int ktet[2], int iface[2]). ktet will contain the indices of the 2 tetra (as previously, a 0 index means that the triangle belongs to one tetra only). iface will contain the local index of the triangle in the tetra (be careful, the numbering of iface starts from 0).

I hope that it will help.

Regards,
Algiane