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

Fix vtx outputs zero #624

Merged
merged 2 commits into from
Nov 2, 2023
Merged

Fix vtx outputs zero #624

merged 2 commits into from
Nov 2, 2023

Conversation

RemDelaporteMathurin
Copy link
Collaborator

@RemDelaporteMathurin RemDelaporteMathurin commented Nov 1, 2023

Proposed changes

This PR fixes #622

Turns out using .collapse() for the output function of a VTXWriter produces zeros when writing. This doesn't occur with XDMFFile.

I removed it and manually tested that the expected output was produced.
I cannot add test for this as dolfinx doesn't have checkpointing yet.

Also removed some un-necessary code here and there.

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 RemDelaporteMathurin added bug Something isn't working fenicsx Issue that is related to the fenicsx support labels Nov 1, 2023
@RemDelaporteMathurin RemDelaporteMathurin linked an issue Nov 1, 2023 that may be closed by this pull request
Copy link

codecov bot commented Nov 1, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (1dbe47d) 98.19% compared to head (3ce66cd) 98.18%.

Additional details and impacted files
@@             Coverage Diff             @@
##           fenicsx     #624      +/-   ##
===========================================
- Coverage    98.19%   98.18%   -0.01%     
===========================================
  Files           16       16              
  Lines          610      607       -3     
===========================================
- Hits           599      596       -3     
  Misses          11       11              
Files Coverage Δ
festim/hydrogen_transport_problem.py 99.19% <100.00%> (-0.01%) ⬇️

☔ 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 great, cleans up the code nicely

@RemDelaporteMathurin RemDelaporteMathurin merged commit 798a5cb into fenicsx Nov 2, 2023
10 checks passed
@RemDelaporteMathurin RemDelaporteMathurin deleted the fix-vtx-outputs-zero branch November 2, 2023 14:15
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.

[BUG] Cannot export to VTX with multispecies
2 participants