-
Notifications
You must be signed in to change notification settings - Fork 33
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
Restart simulation fixes #1047
Merged
Merged
Restart simulation fixes #1047
Conversation
This file contains 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
njansson
reviewed
Nov 29, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great stuff! 🍻
I'll cleanup the rest and also backport it to release/0.7
Formating fixes
njansson
approved these changes
Dec 1, 2023
timofeymukha
reviewed
Dec 4, 2023
Co-authored-by: Timofey Mukha <[email protected]>
timofeymukha
approved these changes
Dec 4, 2023
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.
Adds various arrays to the restart such that a restart no longer starts the time integration with time integration of order 1, but rather exactly progresses the simulation exactly as if the simulation did not restart but simply ran for longer. Should be backwards compatible, but could use further testing.
Additions to the checkpoint file:
To be improved:
To be noted:
There are two ways to restart in some sense, one is to save everything (like I do in this PR), and another is to recompute certain values from the field values at earlier stages (abx, aby, etc. can technically be calculated from the lagged u,v,w,s fields). However, due to the coupling with the forcing to calculate the abX arrays I chose to simply save everything. I feel this avoids a bunch of issues if someone would change the forcing or similar. We should just enforce that all new solvers add exactly what they need to the checkpoint upon init. The good thing about the recomputation part would be that one could restart easily from field files, but I think we can add some kind of reader for that as well in the future if it is necessary.