Plot() command option to show mesh connectivity

(Ali Roustaei) #1

I’m writing a code which calculates a lot of geometric info about mesh (like for a flux limiter). It would be very very useful that the plot(Th) had an option to show vertices/cells/borders numbers. Like the figure in documentation:
image

(Mojtaba Barzegari) #2

Hi,

This option is not available in FreeFem++, but you can do this in Gmsh. In order to achieve this, you should save your FreeFem++ mesh (using savemesh function) and load it in Gmsh. Then turn on desired mesh display options. The output would be something like this:

1 Like
(Ali Roustaei) #3

Thanks a lot! This would also be very useful. I tried savemesh(Th,“A.gmsh”) and I see it generated two files A.gmsh/A.gmsh.gmsh. But when I load A.gmsh in Gmsh gives syntax error! (Freefem 3.61/Gmsh 4.3.0).

Anyways, it would be great to have it built-in Freefem.

(Mojtaba Barzegari) #4

You should save it with .mesh file extension: savemesh(Th,“A.mesh”);

1 Like
(Ali Roustaei) #5

Worked, thanks :ok_hand::ok_hand::ok_hand: