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

TemperatureFromXDMF with transient h transport cases #500

Merged
merged 7 commits into from
Jul 15, 2022

Conversation

jhdark
Copy link
Collaborator

@jhdark jhdark commented Jul 15, 2022

Proposed changes

fix for issue #499

Currently, the class TemperatureFromXDMF does not work in transient cases as there was no update function with time, with the following fix this should now work.

I have added a test however it may be a bit long, let me know what you think

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)

Further comments

If this is a relatively large or complex change, kick off the discussion by explaining why you chose the solution you did and what alternatives you considered, etc...

@jhdark jhdark added the bug Something isn't working label Jul 15, 2022
@jhdark jhdark self-assigned this Jul 15, 2022
@jhdark jhdark changed the title Tempfromxdmf with transient h transport cases TemperatureFromXDMF with transient h transport cases Jul 15, 2022
@codecov
Copy link

codecov bot commented Jul 15, 2022

Codecov Report

Merging #500 (11edf64) into dev (3fb6cd8) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##              dev     #500   +/-   ##
=======================================
  Coverage   98.80%   98.80%           
=======================================
  Files          54       54           
  Lines        2005     2007    +2     
=======================================
+ Hits         1981     1983    +2     
  Misses         24       24           
Impacted Files Coverage Δ
FESTIM/temperature/temperature_from_xdmf.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3fb6cd8...11edf64. Read the comment docs.

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.

Thanks for the fix, a few suggestions.

Let's wait and check the CI passes

Tests/unit/test_temperature.py Outdated Show resolved Hide resolved
Tests/unit/test_temperature.py Outdated Show resolved Hide resolved
FESTIM/temperature/temperature_from_xdmf.py Outdated Show resolved Hide resolved
@RemDelaporteMathurin
Copy link
Collaborator

RemDelaporteMathurin commented Jul 15, 2022

Thanks for this fix. I think this bug highlights another problem which is that TemperatureFromXDMF shouldn't have a expression attribute in the first place.

We should therefore create another base class (for exemple called TemperatureBase).
Instead of inheriting from Temperature, all the temperature classes would instead inherit from TemperatureBase.
This base class would contain all the methods and attributes common to TemperatureFromXDMF , Temperature (and maybe HeatTransferSolver?) and all the rest would be defined in the specific classes

@jhdark jhdark merged commit 13232e5 into dev Jul 15, 2022
@RemDelaporteMathurin RemDelaporteMathurin deleted the tempfromxdmf-transient branch July 27, 2022 08:32
@RemDelaporteMathurin RemDelaporteMathurin mentioned this pull request Jul 27, 2022
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] TemperatureFromXDMF class not working in transient h transport
2 participants