This is a read only copy of the old FEniCS QA forum. Please visit the new QA forum to ask questions

ft08_navier_stokes_cylinder.py

0 votes

Dear All
I am trying to start working with FEniCs where i start with the tutorial and I have the following error . Any suggestions will be appreciate
File "ft08_navier_stokes_cylinder.py", line 102, in
xdmffile_u = XDMFFile('navier_stokes_cylinder/velocity.xdmf')
TypeError: init() takes exactly 3 arguments (2 given)

asked May 12, 2017 by happliedmath FEniCS Novice (120 points)

1 Answer

+1 vote

Looks like you're using an old version of dolfin. If you update to the latest version you shouldn't see this error. Or you can provide an MPI communicator.

In past versions, XDMFFile required an MPI communicator as an argument, as well as the file URL.

answered May 12, 2017 by nate FEniCS Expert (17,050 points)

I do install the latest version via
https://fenicsproject.org/download/
Using Ubuntu as
sudo add-apt-repository ppa:fenics-packages/fenics
sudo apt-get update
sudo apt-get install --no-install-recommends fenics
sudo apt-get dist-upgrade
- Unfortunately i still have the same error and it says that this is the latest version.

Are you using an older version of Ubuntu? You need at least Ubuntu 16.04 to get a recent version of FEniCS using the FEniCS PPA. If you are unable to upgrade to a more recent Ubuntu, then you might try some of the other methods of installing FEniCS, like by using the Docker images.

Thanks a lot for your help updating Ubuntu solves the problem

...