Convert Code from fenics to fenicsx

Hi all,
I have just started to learn FEniCS, I download the new version (FEniCSx).
I want to run this example (Neo-Hookean Solid Model Example in FEniCS | by Bilgin Koçak | Medium) but as I understand this example is found in the old version (FEniCS) and I have some trouble to convert this code from FEniCS to FEniCSx.
I would like some help to understand how this works, and how can I run this code in the new version?
Is there any tutorial that explain the changes between the two versions?

Thanks in advance!
Yasmine.

There are plenty of examples of the new FEniCSx syntax at the example page: Demos — DOLFINx 0.6.0 documentation
and
The FEniCSx tutorial — FEniCSx tutorial
The particular example you are looking at is quite straightforward to port if you look at examples such as:
The equations of linear elasticity — FEniCSx tutorial
There is also the cheat-sheet: https://github.com/juliusgh/dolfinx-demos/blob/main/dolfin-dolfinx-cheatsheet.md

2 Likes