Upgrading from lecasy dolfin to dolfinx

hi all,

recently i have been trying to use more comprehensive meshes and i understood that i need to use meshio(which i currently having problem to understand how to use it) or gmsh for that.
as i understood from my previous questions in the community in order to use gmsh i need to install dolfinx (instead of what i have now, dolfin).

i wanted to ask if dolfinx will be able to run my code the same way as dolfin did till now, or i will need to change/adjust a lot of my functions or commands etc in order my code to run properly?


You do not need to install DOLFINx to use GMSH. GMSH is available through pip, conda or apt depending on what form of installation you want to use.

If you want to use GMSH with legacy dolfin, it is recommended to use meshio for conversion of the mesh from msh format to xdmf.

The interface to GMSH in DOLFINx is easier, as you would use dolfinx.io.gmsh.io.read_from_msh or dolfinx.io.gmshio.model_to_mesh to read gmsh models directly into DOLFINx (without having to go through meshio and xdmf).

The API of DOLFINx is quite different, see for instance: The FEniCSx tutorial — FEniCSx tutorial