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

Reset derived quantity objects data and t at the beginning of a simulation #733

Merged
merged 3 commits into from
Nov 4, 2024

Conversation

Allentro
Copy link
Contributor

@Allentro Allentro commented Apr 2, 2024

Proposed changes

I have implemented a fix to reset export.t and export.data at the beginning of a simulation, accompanied by a respective test. This PR resolves #728

Types of changes

  • 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)

@Allentro Allentro marked this pull request as ready for review April 2, 2024 22:51
Copy link

codecov bot commented Apr 2, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.76%. Comparing base (db4ad6f) to head (e26c4f3).
Report is 4 commits behind head on fenicsx.

Additional details and impacted files
@@           Coverage Diff            @@
##           fenicsx     #733   +/-   ##
========================================
  Coverage    97.76%   97.76%           
========================================
  Files           44       44           
  Lines         2099     2102    +3     
========================================
+ Hits          2052     2055    +3     
  Misses          47       47           

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

@RemDelaporteMathurin RemDelaporteMathurin added bug Something isn't working fenicsx Issue that is related to the fenicsx support labels Apr 3, 2024
Copy link
Collaborator

@RemDelaporteMathurin RemDelaporteMathurin left a comment

Choose a reason for hiding this comment

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

Initial round of comments, the fix obviously works fine, but it's not the right place for it.

festim/hydrogen_transport_problem.py Outdated Show resolved Hide resolved
Comment on lines +346 to +349
my_export = F.SurfaceFlux(
field=H,
surface=surf,
)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can you parametrise this test to also check for other derived quantities (eg. TotalVolume)

@RemDelaporteMathurin
Copy link
Collaborator

Hey @Allentro what is the status of this?

@Allentro
Copy link
Contributor Author

Hey @Allentro what is the status of this?

Hi Remi, sorry this has slipped my list. I'll get this complete tomorrow!

@RemDelaporteMathurin
Copy link
Collaborator

Hi @Allentro! Do you want someone else to pick up this PR?

@Allentro
Copy link
Contributor Author

Hi @Allentro! Do you want someone else to pick up this PR?

Hi Remi,

This slipped my inbox.. I was just scrolling through my mentions and saw this. I'm happy to work on this tomorrow evening. Sorry for the delay on this.

@RemDelaporteMathurin RemDelaporteMathurin merged commit ed67331 into festim-dev:fenicsx Nov 4, 2024
5 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fenicsx Issue that is related to the fenicsx support
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Derived quantity objects data and t attributes are not emptied at beginning of simulation
2 participants