invalid mesh version

35 views
Skip to first unread message

Mahmood Naderan

unread,
Sep 29, 2019, 9:25:08 AM9/29/19
to pyfrmai...@googlegroups.com
Hi,
I have saved a msh file with gmsh-4.4.1, however, the import command fails with invalid mesh version.

pyfr import ~/Downloads/gmsh-4.4.1-Linux64/share/doc/gmsh/demos/untitled.msh untitiled.pyfrm
Traceback (most recent call last):
  File "/home/mahmood/.local/bin/pyfr", line 11, in <module>
    load_entry_point('pyfr==1.8.5', 'console_scripts', 'pyfr')()
  File "/home/mahmood/.local/lib/python3.6/site-packages/pyfr-1.8.5-py3.6.egg/pyfr/__main__.py", line 110, in main
  File "/home/mahmood/.local/lib/python3.6/site-packages/pyfr-1.8.5-py3.6.egg/pyfr/__main__.py", line 121, in process_import
  File "/home/mahmood/.local/lib/python3.6/site-packages/pyfr-1.8.5-py3.6.egg/pyfr/readers/__init__.py", line 19, in get_reader_by_extn
  File "/home/mahmood/.local/lib/python3.6/site-packages/pyfr-1.8.5-py3.6.egg/pyfr/readers/gmsh.py", line 89, in __init__
  File "/home/mahmood/.local/lib/python3.6/site-packages/pyfr-1.8.5-py3.6.egg/pyfr/readers/gmsh.py", line 110, in _read_mesh_format
ValueError: Invalid mesh version

Any idea to fix that?

Regards,
Mahmood



Junting Chen

unread,
Sep 29, 2019, 12:05:18 PM9/29/19
to PyFR Mailing List
I always saved mesh file in GMSH version 2 ascii format (it always asks you when you click the save button, maybe there is a way to do that in command lines). As description in the latest PyFR (1.8.5) says, GMSH version 4 should be supported. I'm being lazy didn't update pyfr yet.

Junting Chen

Freddie Witherden

unread,
Sep 29, 2019, 12:13:49 PM9/29/19
to pyfrmai...@googlegroups.com
Hi,

On 29/09/2019 08:24, Mahmood Naderan wrote:
> I have saved a msh file with gmsh-4.4.1, however, the import command
> fails with invalid mesh version.

Would you be able to provide us with the first few kilobytes of the mesh
you are trying to import (we do not need/want the entire mesh, just the
first few bytes with include the mesh version string).

Regards, Freddie.

signature.asc

Mahmood Naderan

unread,
Sep 29, 2019, 12:32:48 PM9/29/19
to Freddie Witherden, pyfrmai...@googlegroups.com
Using GUI and export section, I saved with "Version 2 ASCII", However, it fails with another error

$ pyfr import untitled.msh untitled.pyfrm

Traceback (most recent call last):
  File "/home/mahmood/.local/bin/pyfr", line 11, in <module>
    load_entry_point('pyfr==1.8.5', 'console_scripts', 'pyfr')()
  File "/home/mahmood/.local/lib/python3.6/site-packages/pyfr-1.8.5-py3.6.egg/pyfr/__main__.py", line 110, in main
  File "/home/mahmood/.local/lib/python3.6/site-packages/pyfr-1.8.5-py3.6.egg/pyfr/__main__.py", line 121, in process_import
  File "/home/mahmood/.local/lib/python3.6/site-packages/pyfr-1.8.5-py3.6.egg/pyfr/readers/__init__.py", line 19, in get_reader_by_extn
  File "/home/mahmood/.local/lib/python3.6/site-packages/pyfr-1.8.5-py3.6.egg/pyfr/readers/gmsh.py", line 89, in __init__
  File "/home/mahmood/.local/lib/python3.6/site-packages/pyfr-1.8.5-py3.6.egg/pyfr/readers/gmsh.py", line 215, in _read_eles
  File "/home/mahmood/.local/lib/python3.6/site-packages/pyfr-1.8.5-py3.6.egg/pyfr/readers/gmsh.py", line 227, in _read_eles_impl_v2
ValueError: Unsupported element type 15
$ head -n 15 untitled.msh
$MeshFormat
2.2 0 8
$EndMeshFormat
$ParametricNodes
67968
1 -1 -0 0 0 1
2 -1 0.2 0 0 2
3 -1.2 0 0 0 3
4 -1 -0.2 0 0 4
5 -0.8 0 0 0 5
6 -1 0.3 0 0 6
7 -1.3 0 0 0 7
8 -1 -0.3 0 0 8
9 -0.7 0 0 0 9
10 -1 0.4 0 0 10


image.png


Regards,
Mahmood





--
You received this message because you are subscribed to the Google Groups "PyFR Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pyfrmailingli...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/pyfrmailinglist/5babf009-5e83-5cf1-bbec-5ce8fbaaa762%40witherden.org.
Reply all
Reply to author
Forward
0 new messages