Closed jiangzhangze closed 1 year ago
It seems to be that you have modified the code, as obstacle is defined here: https://github.com/jorgensd/dolfinx-tutorial/blob/dokken/jupyterbook/chapter2/ns_code2.py#L98 I admit that overwriting the obstacle int from gmsh is bad coding style (and will be rectified in a later release), but it should not cause any errors. Please also note that since you are using v0.4.1, you should follow: https://github.com/jorgensd/dolfinx-tutorial/blob/v0.4.0/chapter2/ns_code2.ipynb as there are differences in syntax between v0.5.0 and v0.4.1
ok,thank you very much.
I’m trying to follow the https://github.com/jorgensd/dolfinx-tutorial/blob/dokken/jupyterbook/chapter2/ns_code2.py,but I met the following error:
Traceback (most recent call last): File "/home/cots/Documents/fenicsx/cylinder.py", line 54, in <module> obstacle.append(boundary[1]) AttributeError: 'int' object has no attribute 'append'
In addition,I use dolfin 0.4.1 in Ubuntu20.04.Any advises would be appreciated.