• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

FEniCS / ufl / 31370183750
80%

Build:
DEFAULT BRANCH: main
Ran 10 Aug 2026 08:29AM UTC
Jobs 1
Files 108
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

06 Aug 2026 07:27AM UTC coverage: 79.553% (-0.03%) from 79.579%
31370183750

push

github

web-flow
Fix generic terminal traversal for BaseForm types in extract_domains (#502)

* Fix extract_domains for BaseForm to expand MeshSequence

The BaseForm-not-Expr branch added in #494 returned
expr.ufl_domains() directly, skipping the join_domains/sort_domains
call every other branch uses. BaseFunctionSpace.ufl_domains() does
not expand MeshSequence, so extract_domains(cofunction) on a mixed
dual space returned the raw MeshSequence instead of its component
meshes, unlike extract_domains(form) on the same space. Firedrake's
adjoint tape adds each extracted domain as a dependency, and a
MeshSequence is not an OverloadedType, so this crashed with
AttributeError: 'MeshSequenceGeometry' object has no attribute
'block_variable' when solving with a Cofunction RHS on a mixed
function space.

* Fix generic terminal traversal for ZeroBaseForm and Matrix

ZeroBaseForm, FormSum, Action, Adjoint and Matrix are BaseForm
subclasses that aren't also Expr subclasses, so ufl_type() never gives
them the _ufl_is_terminal_ trait (its Expr-specific branch returns
early for anything that isn't an Expr). traverse_unique_terminals
raised AttributeError on any of them, which is what the previous
commit's isinstance(expr, BaseForm) and not isinstance(expr, Expr)
special case in extract_domains was working around.

Give ZeroBaseForm _ufl_is_terminal_ = False (its operands are the
placeholder Arguments, real terminals worth descending into) and
Matrix _ufl_is_terminal_ = True (it's a genuine leaf, with domains and
arguments derived from its function spaces rather than any operand).
Matrix was also missing a ufl_domains() method entirely -- add it.

With those two fixed, extract_domains's generic branch no longer needs
the special case: route it through iter_expressions instead, the same
unwrapping algorithms/analysis.py's extract_type already uses to
decompose FormSum/Action/Adjoint (and Forms nested within them) down
to plain Expr trees and leaf BaseForms. Fall back to the bare expr ... (continued)

15 of 15 new or added lines in 3 files covered. (100.0%)

10 existing lines in 1 file now uncovered.

9785 of 12300 relevant lines covered (79.55%)

0.8 hits per line

Coverage Regressions

Lines Coverage ∆ File
10
85.01
-2.21% ufl/form.py
Jobs
ID Job ID Ran Files Coverage
1 31370183750.1 10 Aug 2026 08:29AM UTC 108
79.55
GitHub Action Run
Source Files on build 31370183750
  • Tree
  • List 108
  • Changed 5
  • Source Changed 0
  • Coverage Changed 5
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 2a633658 on github
  • Prev Build on main (#30999691016)
  • Next Build on main (#32009042654)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc