Cross-version compatibility helpers for DOLFINx.
Centralizes workarounds for breaking API changes across dolfinx versions
(nightly/main, stable, and back to release 0.10), previously duplicated
across dolfinx-adjoint, io4dolfinx, and scifem.
Pure Python, no compiled extensions. Supports dolfinx >= 0.10.0.
fenicsx-compat requires Python 3.12 or newer and DOLFINx 0.10 or newer.
conda install conda-forge::fenicsx-compatThis also installs DOLFINx from conda-forge if it is not already in the environment.
python3 -m pip install fenicsx-compatInstall DOLFINx first, for instance with conda, spack or one of the FEniCS Docker images. pip cannot build DOLFINx itself.
To install the development version from GitHub, run
python3 -m pip install git+https://github.com/scientificcomputing/fenicsx-compat.gitTo build without build isolation, first install the build requirements from the build dependency group (requires pip >= 25.1), then install from a clone of the repository:
python3 -m pip install --group build
python3 -m pip install --check-build-dependencies --no-build-isolation .The documentation lists every function in the package: what it does, what DOLFINx 0.10, 0.11 and main do natively, and how to call it.