Problem to display results from second order elements

Numerical methods and mathematical models of Elmer
raback
Site Admin
Posts: 4812
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: Problem to display results from second order elements

Post by raback »

Hi

It is not probably "wrong". It is the entity number that Gmsh created. Gmsh does not have continuous numbering. Use "-autoclean" flag, for example, in ElmerGrid to obtain continuous numbering.

-Peter
Rich_B
Posts: 421
Joined: 24 Aug 2009, 20:18

Re: Problem to display results from second order elements

Post by Rich_B »

Glad to hear using the gmsh2 format helped with your situation. Netgen probably needs some help with the elmer output format.

Almost always, one should call elmergrid with -autoclean, like this:
elmergrid 14 2 yourFileNameHere -autoclean
where the '14' says the input file is in gmsh format, and the '2' says the desired output file will be in elmer mesh.* format.

Rich.
jeremie
Posts: 28
Joined: 11 Jul 2019, 11:31
Antispam: Yes

Re: Problem to display results from second order elements

Post by jeremie »

Thank you very much Peter and Rich. Very helpful!

Good to know the -autoclean option.

I have also tested an another solution by comparing the correct and wrong mesh files. Then I have manually "repaired" the mesh.elements file coming from Netgen by re-ordering the node indexes as you suggested Peter. As an illustration here in the mesh.elements the node #6 is not at the correct location (10 node tet):

Correct node ordering: 1 2 3 4 5 6 7 8 9 10
WRONG node ordering: 1 2 3 4 5 7 8 6 9 10 (ordering coming from Netgen export to Elmer format)

By giving also the correct element types in the mesh.header, the simulation is finally working.

I have posted this problem in the Netgen forum, hoping that a correction can be taken into account.

Thanks again!

Jeremie
Post Reply