Hello, Firstly thank you so much for your response. The code that I used to read it is like that :
from dolfin import *
import numpy as np
import matplotlib.pyplot as plt
mesh = Mesh("stentmeshedfromansa.msh")
For this I get the error belowed:
Traceback (most recent call last):
File “/home/fenics/denemekodu.py”, line 6, in
mesh = Mesh(“stentmeshedfromansa.msh”)
RuntimeError:
*** -------------------------------------------------------------------------
*** DOLFIN encountered an error. If you are not able to resolve this issue
*** using the information listed below, you can ask for help at
*** fenics-support@googlegroups.com
*** Remember to include the error message listed below and, if possible,
*** include a minimal running example to reproduce the error.
*** -------------------------------------------------------------------------
*** Error: Unable to open file.
*** Reason: Unknown file type (“.msh”) for file “stentmeshedfromansa.msh”.
*** Where: This error was encountered inside File.cpp.
*** Process: 0
*** DOLFIN version: 2019.2.0.dev0
*** Git changeset: ubuntu
*** -------------------------------------------------------------------------
I also tried this method but it also was not work:
import meshio
# GMSH formatındaki dosyayı XDMF formatına dönüştür
msh = meshio.read("stentmeshedfromansa.msh")
meshio.write("stent.xdmf", msh)
For this code I also get the error belowed:
Traceback (most recent call last):
File “/home/fenics/denemekodu.py”, line 4, in
msh = meshio.read(“stentmeshedfromansa.msh”)
File “/home/fenics/.local/lib/python3.10/site-packages/meshio/_helpers.py”, line 71, in read
return _read_file(Path(filename), file_format)
File “/home/fenics/.local/lib/python3.10/site-packages/meshio/_helpers.py”, line 103, in _read_file
return reader_mapfile_format
File “/home/fenics/.local/lib/python3.10/site-packages/meshio/gmsh/main.py”, line 19, in read
mesh = read_buffer(f)
File “/home/fenics/.local/lib/python3.10/site-packages/meshio/gmsh/main.py”, line 48, in read_buffer
return reader.read_buffer(f, is_ascii, data_size)
File “/home/fenics/.local/lib/python3.10/site-packages/meshio/gmsh/_gmsh22.py”, line 60, in read_buffer
has_additional_tag_data, cell_tags = _read_cells(
File “/home/fenics/.local/lib/python3.10/site-packages/meshio/gmsh/_gmsh22.py”, line 136, in _read_cells
point_tags = np.asarray(point_tags, dtype=np.int32) - 1
TypeError: int() argument must be a string, a bytes-like object or a real number, not ‘NoneType’