Skip to content

Upgrade FEniCS solvers to FEniCSx (legacy FEniCS 2019.1.0 pins us to Python 3.10) #100

Description

@dionhaefner

The two FEniCS-based Tesseracts pin the legacy fenics==2019.1.0 / dolfin-adjoint==2019.1.0 stack:

dependencies:
  - python==3.10
  - fenics==2019.1.0
  - dolfin-adjoint==2019.1.0

Why this matters

Legacy FEniCS (fenics/dolfin 2019.1.0) has been superseded by FEniCSx (dolfinx) and is no longer actively developed. It has no conda-forge builds for Python 3.12+, which forces these two solvers to pin python==3.10.

Python 3.10 reaches end-of-life in October 2026 and already lags the rest of the project — the main package and mosaic-shared target newer interpreters. As long as these solvers depend on legacy FEniCS, the whole repo is held back to the 3.10 floor.

The task

Port both solvers from legacy FEniCS to the modern FEniCSx stack:

  • fenicsfenics-dolfinx (conda-forge, has 3.12/3.13 builds)
  • dolfin-adjoint → adjoint via pyadjoint / the FEniCSx adjoint path
  • Bump python==3.103.12 in both tesseract_environment.yaml files

The tesseract_api.py in each solver directory will need updating for the DOLFINx API (function spaces, forms, assembly, and the adjoint tape all changed between the two generations).

Acceptance criteria

  • Both fenics-heat and fenics-structural Tesseracts build and run on Python 3.12
  • Forward + gradient (VJP) outputs match the current legacy implementation within tolerance
  • python==3.10 no longer appears in either environment file

Pointers

Context: surfaced while reverting a Python-version bump (#96); the legacy FEniCS pin was the blocker for moving off 3.10.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions