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
How to activate conda environment fenicsproject during fenics installation on anaconda?
Periodic Boundary conditions in Poisson 2D
Out of range while using compute_closest_entity
How to run poisson extended
Computing norm of solution obtained by LUSolver
Dolfin syntaxe error
Boundary Constraints in Tutorial not being enforced?
Error running programs
Exporting and plotting derived quantities in time-dependent problem
Documentation request for Fenics-Dolfin-2019
How to load 3D hexahedron mesh file and set the boundaries
Docker installation and Version questions
Fenics in docker
Dolfin eBook Figure 26.1, Exception: Missing quad_scheme in quadrature element
Simple surface contact between different volumes
Scaling Laplacian from 2D to 3D
Scaling Laplacian from 2D to 3D
Simple diffusion problem with a growing electrode
Want to import already defined physical groups of Microstructure in Gmsh to FEnics
Error installing Fenics for python
Accessing entries of Global size matrix
Using quadrature function space
Mesh helix geometry
Model of steel wires of stranded-wire helical spring
Calculating gradient from mesh
Tensor internal variables for higher-order elements
Error out of memory
About the dolfinx category
I have imported all packages from dolfin using " from dolfin import *"
Problem with grad and interpolate
About the Legacy DOLFIN category
Can not import name
Adaptive solver is not working in dolfin
How to install FEniCS 2019.2.0.dev0 by conda?
CGAL::Mesh_3::internal::C3t3_initializer, CGAL::Mesh_3::internal::has_Has_features, CGAL::internal::Mesh_3::init_c3t3 in make_multicomponent_mesh_3.h
3D navier-stokes equation with divergent velocity
Can't find the packages current channels, conda

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.