## Warning: MMG5_warnOrientation: 22198 tetra on 11133 reoriented. Your mesh may be non-conform

Dear sir:
when i use MMG3d to adaptive my old mesh. I got this warning. How to resolve this problem.


It depends:

  • it means that some tetra are not provided in the forward direction;
  • maybe it is just because this convention doesn’t matter for you and your solver. In this case, you can ignore the warning;
  • if you think that each tetra is oriented in the forward direction, your mesh contains maybe errors (non conformal mesh) or overlapping elements.

A way to ensure that your mesh is right may be to use the Medit software (https://github.com/ISCDtoolbox/Medit) to vizualize your mesh (at .mesh format):

  • you can cut the mesh with F1;
  • and visualize the boundaries only with F4;
  • then move the cutting plane with F2 and the mouse (middle click + movement);

If your mesh contains errors, you will probably seen spurious faces inside the mesh.



Dear friends:
Thd old mesh is created by hand with MMG3d API, then solutions is obtained with my FVM code.
MMG3d then is used to adapte the old mesh according the solutions. The problem i solved is a heat diffusion in 3d cube problem. The new generated mesh can be visulalized by visitit. but My FVM cann’t compute any values with many “NAN” feeded back.
I don’t know why this warning had happed. Which parameter should i adjust to avoid this warfning.


Is it possible that some of the tetra that you give by hand aren’t in the forward direction?

You can try to save your mesh after its creation with the Mmg API using the MMG3D_saveMesh(mesh,“meshname.mesh”) function.

By the same way, you can use the MMG3D_saveSol(mesh,met,“meshname.sol”) function to save your metric.

Is it possible to attach both the mesh file and metric file so I can try to figure out what happens?



Thank you very much.
Attachments please find the files I used in my FVM code.

mmg1.mesh (478.1 KB) mmg1.sol (16.7 KB)

The problem seems that at the boundary cell 794, the boundary tri of this cell has three vertices at the same line which reslults in a zero normal vector.

This mesh seems to be valid and If I run Mmg on it, it works without any warning: I thinks that it confirms that some of the tetra aren’t provided in the forward direction and that the Set_tetrahedron function has reorientated this tetras succesfully (as you use Mmg in library, it keeps the number or modified tetra in memory and prints the warning).

In the input mesh, the tetra 794 has the following vertices : 2525, 1571, 1594, 1615? If yes, I don’t note any issue on this tetra.

I attach here the output mesh that I obtain (for comparison with yours).

(I work with the commit 32770b48 of the master branch of Mmg).


Thank you very much for your help. My FVM code works now.