Adaptive stepsize#654
Merged
RemDelaporteMathurin merged 18 commits intoDec 6, 2023
Merged
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## fenicsx #654 +/- ##
===========================================
+ Coverage 98.87% 98.90% +0.03%
===========================================
Files 23 23
Lines 974 1009 +35
===========================================
+ Hits 963 998 +35
Misses 11 11 ☔ View full report in Codecov by Sentry. |
jhdark
requested changes
Dec 5, 2023
Collaborator
jhdark
left a comment
There was a problem hiding this comment.
Think we can change a few small things here, but otherwise, its looking good and will be incredibly useful
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proposed changes
This is an attempt at adding adaptive timestepping.
I've taken a similar approach to MOOSE where the users give a target number of iterations and a growth factor and a cutback factor.
If the number of newton iterations is larger than the target number, the stepsize is reduced (multiplied by cutback factor). Inversely when it's lower than the target, the stepsize is increased (growth factor).
@jhdark I've noticed we have the concept of the stepsize living in different places.
First we have
HTransportProblem.settings.stepsizeANDHTransportProblem.dt(which is just thefenicsx.Constantobject).I feel like we should remove this redundancy to improve clarity. Doesn't have to be in this PR but I felt like we could kick off the discussion now
Types of changes
What types of changes does your code introduce to FESTIM?
Checklist