Read a simple 2D mesh

grid2D.mesh (1.4 KB)

Hello all,

I am trying to read a simple 2D mesh done using SALOME, classically:

mesh TH=readmesh("grid2D.mesh");

However, I get an error. The log file is:

Dimension
    Vertices
   Nb of Vertices = 16
    .6666666666667
     Warning we skip the field .6666666666667 at line 17
    5
    0
    0
    -1.6666666666667
    1.6666666666667
    0
    0
    1.6666666666667
    1.6666666666667
    0
    0
    -1.6666666666667
    -1.6666666666667
    0
    0
    1.6666666666667
    -1.6666666666667
    0
    0
    Edges
     Record Edges: Nb of Edge 12 edges 0x5587345ba890
     hmin 0
    End
 ## Warning: Mesh without geometry we construct a geometry (theta =-57.2958 degres )
  -- construction of the geometry from the 2d mesh 
 Fatal error in the mesh generator 101
  current line = 7
Meshing error: Bamg
 number : 101, 
Meshing error: Bamg
 number : 101, 
 err code 5 ,  mpirank 0

It is the first time, I get this error.

Could someone help me to understand what does it mean ? I have attached the mesh used.

Thank you in advance;

Best regards,

Loïc

hi,

the mesh files contains nothing but a rectangular curve and a set of nodes on it, so it’s not a mesh actually. how did you generate it using SALOME?

you can check the mesh in GMSH and see that it doesn’t contain any element or surface, required by readmesh function to be considered as a 2D mesh in FF.

Hello,

Thank you for your reply,

I have now the solution:

In order that a SALOME mesh is considered as a 2D mesh and not as a meshS in FreeFEM, we have to save it under the .msh format, version 2 and not 4, or translate the .MED file with gmsh in .msh file, and open it with gmshload().

Loïc,