Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allowed_meshes property for derived quantities #832

Merged
merged 3 commits into from
Jul 31, 2024

Conversation

RemDelaporteMathurin
Copy link
Collaborator

@RemDelaporteMathurin RemDelaporteMathurin commented Jul 30, 2024

Proposed changes

Fix for #829

This PR proposes to change the approach for knowing if certain quantities are allowed with various systems of coordinates (cartesian, cylindrical, spherical).

Instead of having a long list of allowed quantities for each mesh type in Simulation.initialise - which was very hard to maintain -, each quantity now has a property called allowed_meshes that is a list of mesh types that this property can be used with.
By default, the three mesh types are allowed.

When inheriting from the parent class, it is possible to override this property.

Types of changes

What types of changes does your code introduce to FESTIM?

  • Bugfix (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
  • 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
Copy link
Collaborator Author

@jhdark would you mind giving this a look? also, if we agree to go with this system, then you would have to add the same changes in #410

@RemDelaporteMathurin RemDelaporteMathurin added this to the 1.3.1 milestone Jul 30, 2024
@RemDelaporteMathurin RemDelaporteMathurin added bug Something isn't working enhancement New feature or request labels Jul 30, 2024
Copy link

codecov bot commented Jul 30, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.56%. Comparing base (40cdd22) to head (2a99ee3).
Report is 80 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #832   +/-   ##
=======================================
  Coverage   99.55%   99.56%           
=======================================
  Files          61       61           
  Lines        2718     2741   +23     
=======================================
+ Hits         2706     2729   +23     
  Misses         12       12           

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

Copy link
Collaborator

@jhdark jhdark left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me

@RemDelaporteMathurin RemDelaporteMathurin merged commit 10bfae9 into main Jul 31, 2024
8 checks passed
@RemDelaporteMathurin RemDelaporteMathurin deleted the allowed-quantities branch August 14, 2024 13:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TotalSurface and AbsorbedHydrogen raise warnings in cartesian
2 participants