Skip to content

Qol unmarked cells#1118

Open
RemDelaporteMathurin wants to merge 7 commits intomainfrom
qol-unmarked-cells
Open

Qol unmarked cells#1118
RemDelaporteMathurin wants to merge 7 commits intomainfrom
qol-unmarked-cells

Conversation

@RemDelaporteMathurin
Copy link
Copy Markdown
Collaborator

Description

Summary

Adds guardrails to let the user know when not all the cells are marked in a mesh

Related Issues

Fixes #1101

Motivation and Context

Sometimes users may set volume subdomains that don't cover the whole mesh domain (eg. wrong locators, tolerance issues with coarse meshes...). The simulation won't necessarily crash, it's just that some cells will be ignored from the solve which can lead to "discontinuous" domains.

This PR adds errors if we detect that some cells are still unmarked after calling all the VolumeSubdomain locators (ie that there are still zeros in the volume tags).

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

id = 0 is no longer permitted though I'm not sure I've ever seen anyone do this

Screenshots/Examples

Additional Notes

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 22, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.92%. Comparing base (3c3532e) to head (cb2026b).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1118   +/-   ##
=======================================
  Coverage   94.92%   94.92%           
=======================================
  Files          44       44           
  Lines        3268     3269    +1     
=======================================
+ Hits         3102     3103    +1     
  Misses        166      166           

☔ View full report in Codecov by Sentry.
📢 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.

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.

Raise error if all cells are not tagged

1 participant