The new DOLFINx solver is now recommended over DOLFIN

In April 2022 we released versions of the new FEniCS Project components; DOLFINx (v0.4.1) , FFCx (v0.4.2), Basix (v0.4.1) and UFL (2022.1.0.post0). These projects are hosted under our GitHub account at FEniCS Project · GitHub

We now recommend that all new projects begin in the new DOLFINx problem solving environment, rather than the old DOLFIN problem solving environment. We consider DOLFINx to be superior to the old DOLFIN, particularly in terms of performance, scalability, API consistency and the ease with which it can be extended.

Although the old DOLFIN environment will continue to function, it is no longer supported. The API of DOLFINx, while similar in tone, is significantly different to DOLFIN, and therefore you should expect there to be some work porting old codes and examples to DOLFINx.

The following resources will help you get started:

https://fenicsproject.org - Our website
https://docs.fenicsproject.org - Documentation
The FEniCSx tutorial — FEniCSx tutorial - The DOLFINx Tutorial
FEniCS Project · GitHub - The source code

Finally we would like to thank everyone in the community who has contributed over the past 15 years to both the old FEniCS and new FEniCSx components. Without your contributions we would be nowhere today. We hope through this new path that the FEniCS Project will have a strong future for the decades to come.

The FEniCS Project Steering Council

31 Likes

Hi jackhale
actually there is a serious problem with the new version.
when I try to use the command: from dolfinx import * with python3 dolfinx in JupyterLab the below error occurred:
ImportError: /usr/local/dolfinx-complex/lib/python3.8/dist-packages/dolfinx/cpp.cpython-310-x86_64-linux-gnu.so: undefined symbol: _ZN7dolfinx3fem5petsc18create_matrix_nestERKSt6vectorIS2_IPKNS0_4FormIdEESaIS6_EESaIS8_EERKS2_IS2_INSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaISI_EESaISK_EE

I search and I found the problem is maybe because of python version 3.10. the official docker you suggest us to download from the: docker pull dolfinx/lab contain python 3.10 and it has conflict with the dolfinx.
so what do you suggest me to do?

best regards.
amir

Hi Amir,

You are right, the environment file for the complex number build of DOLFINx has an error in it (it should be 3.10). We recently moved to the new Ubuntu LTS which is based on Python 3.10 and this change was overlooked.

I will push a fix, and if you pull a new image around tomorrow lunchtime it should work.

In the meantime, if you are not using complex numbers, you can get the real mode DOLFINx by clicking the other icon when you launch your Jupyter Notebooks.

1 Like

Has anybody already put together a document summarizing the changes between dolfin 2019 and dolfinx, like a quick intro for users transitioning from former versions? :wink:

There are quite a lot of difference.
However, a way to spot the differences is by reading the FEniCSx tutorial: The FEniCSx tutorial — FEniCSx tutorial
which covers many of the same topics as the FEniCS tutorial: The FEniCS Tutorial Volume I (also found at: Solving PDEs in Python | SpringerLink)

1 Like

@dj1372 This has now been fixed in the latest docker images.
Please do docker pull dolfinx/dolfinx (or dolfinx/lab) to get the latest image.