I have been trying to generate the element for a square mesh following this post, https://fenicsproject.org/qa/8483/how-to-specify-cell-type-in-mesheditor-open/
from dolfin import *
mesh0 = UnitSquareMesh(2, 2)
mesh = Mesh()
editor = MeshEditor()
gdim = mesh0.geometry().dim()
tdim = mesh0.topology().dim()
c_type = mesh0.type()
c_str = c_type.type2string(c_type.cell_type())
editor.open(mesh, c_str, tdim, gdim)
editor.close()
it is working in FeniCS 2017.1.0 in docker.
But when I use FeniCS 2019.1.0 with python3, using the exact code, it does not work out. It posted the following error message, any clue?
$ python3 test.py
Traceback (most recent call last):
File "test.py", line 11, in <module>
c_str = c_type.type2string(c_type.cell_type())
TypeError: type2string(): incompatible function arguments. The following argument types are supported:
1. (self: dolfin.cpp.mesh.CellType.Type) -> str