How to use MMG2D_Get_edge and MMG2D_Get_triangle


#1

Dear sir:
I have refined my mesh successfully with

   if ( MMG2D_Set_solSize(mmgMesh,mmgSol,MMG5_Vertex, 5,1) != 1 )  exit(EXIT_FAILURE);
    for (int i=1; i<=5; ++i )
    if (MMG2D_Set_tensorSol(mmgSol,0.05,0.05,0.05,i) != 1 ) exit(EXIT_FAILURE);
    MMG2D_mmg2dlib(mmgMesh,mmgSol);

Now, i want get some informations from the new mesh with MMG2D_Get_edge and MG2D_Get_triangle as follows:

 MMG2D_Get_edge(mmgMesh,e0,e1,re,isRidge,isRequired);
 MMG2D_Get_triangle(mmgMesh,v0,v1,v2,re,isRequired);

but the values in the returned e0 e1 v0 v1 v2 are totally wrong. They include negative values and very large integer number. I am confused by it.
146 44
32764 0
-450220752 0
32764 0
0 303135358
0 1069576718
1 0
0 0
-450220976 376582734
32764 1071736054
366826660 0
32547 0

Could you please give me some suggestions.


#2

Hi,

In your example, do you use pointers for e0,e1,re,isRidge,isRequired and v0, v1,v2?

Thank you by advance for your answer.

Regards,
Algiane