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

FEniCS / ufl / 30999691016
80%

Build:
DEFAULT BRANCH: main
Ran 05 Aug 2026 11:02AM 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

05 Aug 2026 10:56AM UTC coverage: 79.579% (+0.1%) from 79.459%
30999691016

push

github

web-flow
Fix ZeroBaseForm holes in derivative expansion and action (#494)

* Fix ZeroBaseForm holes in derivative expansion and action

GateauxDerivativeRuleset had no rule for ZeroBaseForm itself, so
differentiating an already-zero BaseForm (e.g. a Hessian of a Matrix)
raised "Rule not set for ZeroBaseForm" in expand_derivatives.

map_integrands' FormSum branch collapsed to a bare `0` via `sum([])`
when every component vanished, silently dropping the argument shape;
apply_derivatives had a matching fallback that rebuilt an
argument-less Form([]) instead of a properly shaped ZeroBaseForm.

action() only expanded derivatives when the top-level object was
already a Form/BaseFormOperator, so a CoefficientDerivative reachable
only through a FormSum (e.g. from an affine residual F - b) survived
unexpanded inside the resulting lazy Action. Widened the check to
match adjoint()'s existing BaseForm handling.

Finally, ZeroBaseForm inherited BaseForm.empty(), which always
returns False -- give it its own empty() returning True.

* Silence mypy for the new ZeroBaseForm derivative rule

Matches the existing # type: ignore on the neighboring Matrix rule,
whose signature is likewise incompatible with the Expr-typed base
process() the singledispatchmethod registry expects.

* Coerce ZeroBaseForm arguments to a tuple

ZeroBaseForm stored its arguments as-is, so passing a list (e.g. the
output of extract_arguments) made the object unhashable and broke
anything relying on __hash__, such as expression traversal.

* Handle BaseForm in extract_domains

extract_domains only special-cased Form and Integral, falling back to
walking expr as an Expr tree of Arguments/Coefficients for anything
else. That crashes for a BaseForm with no such tree, e.g. a bare
ZeroBaseForm (no _ufl_is_terminal_) or a FormSum mixing a Form with a
Cofunction.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

* Fix ZeroBaseForm._ufl_expr_reconstruct_

BaseForm's default, type(self)(*operands), unpacks... (continued)

15 of 16 new or added lines in 5 files covered. (93.75%)

9781 of 12291 relevant lines covered (79.58%)

0.8 hits per line

Uncovered Changes

Lines Coverage ∆ File
1
77.64
0.07% ufl/algorithms/apply_derivatives.py
Jobs
ID Job ID Ran Files Coverage
1 30999691016.1 05 Aug 2026 11:02AM UTC 108
79.58
GitHub Action Run
Source Files on build 30999691016
  • Tree
  • List 108
  • Changed 5
  • Source Changed 0
  • Coverage Changed 5
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 4ddd722a on github
  • Prev Build on main (#30254296886)
  • Next Build on main (#31081250646)
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