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 tiny timestep bug #580

Merged
merged 2 commits into from
Oct 5, 2023
Merged

Fix tiny timestep bug #580

merged 2 commits into from
Oct 5, 2023

Conversation

gabriele-ferrero
Copy link
Contributor

Proposed changes

When starting to solve a model, some initial stepsize can be required. Sometimes the adaptive timesteps becomes very small at the beginning of a simulation. In these cases, the message output in festim is 0.0 s. With this change, we can see tiny timesteps in the scientific format (eg 1E-9 s).

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
  • [X ] I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)

@codecov
Copy link

codecov bot commented Oct 5, 2023

Codecov Report

All modified lines are covered by tests ✅

Comparison is base (2847817) 99.07% compared to head (56938e1) 99.07%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #580      +/-   ##
==========================================
- Coverage   99.07%   99.07%   -0.01%     
==========================================
  Files          56       56              
  Lines        2054     2053       -1     
==========================================
- Hits         2035     2034       -1     
  Misses         19       19              
Files Coverage Δ
festim/generic_simulation.py 100.00% <100.00%> (ø)

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

@RemDelaporteMathurin RemDelaporteMathurin linked an issue Oct 5, 2023 that may be closed by this pull request
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.

Thank you very much @gabriele-ferrero for this fix!

@RemDelaporteMathurin RemDelaporteMathurin merged commit bf7f4f9 into festim-dev:main Oct 5, 2023
@RemDelaporteMathurin RemDelaporteMathurin changed the title Tiny timestep Fix tiny timestep bug Oct 5, 2023
@gabriele-ferrero gabriele-ferrero deleted the tiny_timestep branch October 5, 2023 21:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Tiny stepsizes produce time zero in display
2 participants