Software

All the codes are open and gathered at github.com/PhiFEM: the phiFEM package and the implementation that accompanies each article.

The phiFEM package

phiFEM provides convenience tools that help with the implementation of φ-FEM schemes in FEniCSx. It runs in parallel.

Installation

The package can be used inside the dolfinx Docker container. Launch the container:

docker run -ti -v $(pwd):/home/dolfinx/shared -w /home/dolfinx/shared dolfinx/dolfinx:stable

Then install phiFEM with pip inside the container:

pip install phifem

A Conda environment file is also provided. The instructions are in the README of the repository.

Demos

The demos are in the demo directory of the repository. Clone the repository to run them.

How to cite

R. Bulle, M. Duprez, K. Vuillemot, phiFEM: a convenience package for using phiFEM with FEniCSx (2025), hal, doi.

Code of the articles

Each repository contains the code used for the numerical results of one article. The articles are on the page Publications.

Repository Article
publication_Poisson-Dirichlet_fenics φ-FEM: a finite element method on domains defined by level-sets
publication_Poisson-Neumann_multiphenics A new φ-FEM approach for problems with natural boundary conditions
publication_Particulate-flows-Stokes_multiphenics φ-FEM: an optimally convergent and easily implementable immersed boundary method for particulate flows and Stokes equations
publication_Poisson-Mixed-Boundary-Fracture-Interface_multiphenics φ-FEM: an efficient simulation tool using simple meshes for problems in structure mechanics and heat transfer
publication_Heat-Equation_fenics φ-FEM for the heat equation: optimal convergence on unfitted meshes in space
publication_PhiFD φ-FD: a well-conditioned finite difference method inspired by φ-FEM for general geometries on elliptic PDEs
PhiFEM_and_FNO φ-FEM-FNO: a new approach to train a Neural Operator as a fast PDE solver for variable geometries
publication_residual-estimates_fenicsx Residual based a posteriori error analysis for φ-FEM
publication_penalized_phiFEM A penalized φ-FEM scheme for the Poisson Dirichlet problem
PhiFEM_Multigrid A multigrid and neural network approach to reduce the computational cost of φ-FEM
publication_PhiFD_Neumann φ-FD, a second order finite difference scheme for geometries defined by a level-set function: the Neumann case