Hi,
I am trying to run the navier-stokes demo but I face the following error:
I have put the “…/lshape.xml.gz” file and its extract inside a folder that contains the demo_navier-stokes.py .( beside the demo_navier-stokes.py )
I would be thankful if you could help me where should i put the mesh file so the fenics can read the mesh?
mhd@mhd-N552VW:~/Desktop/navier-stokesa$ python demo_navier-stokes.py
Traceback (most recent call last):
File “demo_navier-stokes.py”, line 36, in
mesh = Mesh(“…/lshape.xml.gz”)
RuntimeError:
Error: Unable to read data from XML file.
*** Reason: Unable to open file “…/lshape.xml.gz”.
*** Where: This error was encountered inside XMLFile.cpp.
*** Process: 0
First, it may be a typo that there are three dots instead of two at the beginning of the file path for the mesh. (In the current stable version, the path is "../lshape.xml.gz".) Second, the file lshape.xml.gz should be in the directory containing your current working directory when you run the script (i.e., if you typed cd .., you would be in the directory containing the mesh).
The file lshape.xml.gz should be in the directory “above” the one in which you run the script, e.g., if the script is in foo/bar/, the mesh should be in foo/ (which is also foo/bar/../).