[Gmsh] Can GMSH return element type list
Andre Antunes
andre.antunes at tuebingen.mpg.de
Wed Sep 24 13:40:02 CEST 2014
Hi Aleksejs
I dealt with the same issue my self. As far as I know, gmsh does not provide that information directly. It's also not possible to know by looking at the ASCII msh format. (unless you count them first).
The binary msh file format has this capability
http://geuz.org/gmsh/doc/texinfo/gmsh.html#MSH-binary-file-format
..if you specifiy num_elm_follow accordingly.
>From what I see, for each element, gmsh usually saves the mesh saying that "num_elm_follow" is 1 for each single element, even it there are consecutive elements of the same type.
You would be able to externally build a .msh file by using this capability, I don't know if gmsh has that option.
All this was for .msh files version 2. I think there is a version 3 now, but I have no idea how it works.
Best,
Andre
PS: I'm just a regular user and don't know much about all functionalities.
On Wed, 24 Sep 2014 11:33:32 +0200
Aleksejs Fomins <aleksejs.fomins at lspr.ch> wrote:
> Dear GMSH,
>
> I was wondering if it is possible, when saving a .msh file with GMSH, to
> output the total number of elements of each type. I can of course
> calculate it myself when reading the file, but it takes extra time for
> larger meshes. In particular, if I want to read the file in parallel, I
> need to know these numbers so that I can choose a priori which elements
> belong on this process and which do not. At the moment, I have to read
> the file twice - first time to find out the total number of elements of
> each type, and second time, to actually read the elements.
>
> Do you think this is possible?
>
> Regards,
> Aleksejs
>
> P.S. So far you have not replied to about 3 of my messages! I feel sad
>