FESTIM icon indicating copy to clipboard operation
FESTIM copied to clipboard

Simplify custom tagging of meshes

Open RemDelaporteMathurin opened this issue 1 year ago • 1 comments

Proposed changes

This PR brings some simplification in subdomains:

  • moved the meshtags creation from Mesh1D to Mesh to make it more generic
  • moved locate entities methods to base classes
  • added default behaviour of tagging all surfaces with 1 and all cells with 1 to SurfaceSubdomain and VolumeSubdomain respectively.

An example of how this simplifies a lot of things is the refactoring of the system tests!

@jhdark an additional simplification would be to enable users to provide a geometrical locator function when defining a subdomain (instead of creating a custom class). What do you think?

Types of changes

What types of changes does your code introduce to FESTIM?

  • [ ] Bugfix (non-breaking change which fixes an issue)
  • [x] 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
  • [ ] Documentation Update (if none of the other choices apply)
  • [ ] New tests

Checklist

  • [ ] Black formatted
  • [ ] Unit tests pass locally with my changes
  • [ ] I have added tests that prove my fix is effective or that my feature works
  • [ ] I have added necessary documentation (if appropriate)

RemDelaporteMathurin avatar Apr 17 '24 18:04 RemDelaporteMathurin

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 98.90%. Comparing base (8d3ab7b) to head (072578b). Report is 72 commits behind head on fenicsx.

Additional details and impacted files
@@             Coverage Diff             @@
##           fenicsx     #755      +/-   ##
===========================================
+ Coverage    98.39%   98.90%   +0.51%     
===========================================
  Files           28       28              
  Lines         1554     1550       -4     
===========================================
+ Hits          1529     1533       +4     
+ Misses          25       17       -8     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Apr 18 '24 12:04 codecov[bot]

@jhdark is this ok to be merged? I would like to merge it before #735 as it may bring some conflicts

RemDelaporteMathurin avatar Jun 11 '24 15:06 RemDelaporteMathurin