Skip to content

Fixes for nightly - #1287

Open
jhdark wants to merge 9 commits into
festim-dev:mainfrom
jhdark:interface-flux-dolfinx-nightly
Open

jhdark wants to merge 9 commits into
festim-dev:mainfrom
jhdark:interface-flux-dolfinx-nightly

Conversation

@jhdark

@jhdark jhdark commented Oct 30, 2026

Copy link
Copy Markdown
Collaborator

DOLFINx 0.12 wraps IndexMap and MeshTags.topology in Python classes, passes dof markers rather than boundary conditions to the C++ matrix assembler, and drops the insert_diagonal binding. Unwrap the objects handed to C++ bindings and fall back to the existing calls on 0.10 and 0.11.

Drop the assertion that the parent facet measure gives the wrong gradient on a tilted manifold: it now gives the right one, and the assertion tested DOLFINx rather than FESTIM.

Description

Summary

Related Issues

Motivation and Context

Type of Change

  • 🐛 Bug fix (non-breaking change which fixes an issue)
  • ✨ New feature (non-breaking change which adds functionality)
  • 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • 🔨 Code refactoring (no functional changes, no API changes)
  • 📝 Documentation update
  • ✅ Test update (adding missing tests or correcting existing tests)
  • 🔧 Build/CI configuration change

Testing

  • All existing tests pass locally (pytest)
  • I have added new tests that prove my fix is effective or that my feature works

Code Quality Checklist

  • My code follows the code style of this project (Ruff formatted: ruff format .)
  • My code passes linting checks (ruff check .)
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas

Documentation

  • I have updated the documentation accordingly (if applicable)
  • I have added docstrings to new functions/classes following the project conventions

Breaking Changes

Screenshots/Examples

Additional Notes

DOLFINx 0.12 wraps IndexMap and MeshTags.topology in Python classes, passes
dof markers rather than boundary conditions to the C++ matrix assembler, and
drops the insert_diagonal binding. Unwrap the objects handed to C++ bindings
and fall back to the existing calls on 0.10 and 0.11.

Drop the assertion that the parent facet measure gives the wrong gradient on
a tilted manifold: it now gives the right one, and the assertion tested
DOLFINx rather than FESTIM.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jhdark
jhdark requested a review from jorgensd October 30, 2026 18:51
@codecov

codecov Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.16%. Comparing base (5620e8f) to head (1b7e15a).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1287      +/-   ##
==========================================
+ Coverage   96.13%   96.16%   +0.02%     
==========================================
  Files          57       57              
  Lines        5199     5211      +12     
==========================================
+ Hits         4998     5011      +13     
+ Misses        201      200       -1     
Flag Coverage Δ
dolfinx-nightly 95.85% <87.87%> (?)
dolfinx-v0.10.0 93.26% <87.87%> (-0.01%) ⬇️
dolfinx-v0.11.0 95.98% <87.87%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jhdark

jhdark commented Oct 30, 2026

Copy link
Copy Markdown
Collaborator Author

@jorgensd do these changes look alright to you? Dont know if this is a bit pre-emptive?

@jhdark
jhdark changed the base branch from interface-flux to main October 30, 2026 19:53
@jorgensd

Copy link
Copy Markdown
Collaborator

@jhdark have you had a look at https://scientificcomputing.github.io/fenicsx-compat/main/docs/choosing.html for making migration smoother?

jhdark and others added 8 commits November 2, 2026 10:54
dolfinx.fem.compute_integration_domains takes the Python topology on every
supported version, so the interface code no longer has to hand the C++
binding a C++ topology. MeshTags.topology is still the C++ object on 0.10
and 0.11, so add a meshtags_topology helper mirroring fenicsx-compat's.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
It takes the Python mesh topology on every supported DOLFINx version, so the
C++ binding and its hand-unwrapped topology are not needed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Replaces the inline unwrapping of MeshTags.topology with the shared helper,
and adds a test for the mismatched-mesh error it guards.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
V.dofmap is the same on every supported DOLFINx version for a single cell type,
so the dofmaps method-or-sequence fallback is not needed. Only the index map
wrapper (DOLFINx PR #4496) still needs unwrapping for the C++ binding.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Version("0.12.0.dev0") style comparisons misfire on development builds, and
the returned type already says which form the dof map is in: one array on
DOLFINx 0.10, a list of arrays (one per cell type) on 0.11 and later.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants