Set precision in the save function - #2103
Merged
Merged
Conversation
blaisb
reviewed
Aug 24, 2026
blaisb
approved these changes
Aug 24, 2026
blaisb
left a comment
Contributor
There was a problem hiding this comment.
Small thing to fix then good to go!
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.
Description
The precision used to checkpoint the simulation control object was limited to five decimal places. As a result, when using time steps smaller than this precision, the time stored in the checkpoint file could be significantly rounded.
Solution
The
std::setprecision(17)function is now used in the save function.Testing
I have run a application test with this change and the number of decimal places was coherent with the change.
Documentation
No.
Use of LLMs (Large Language Models)
ChatGPT was asked what precision should be used. The answer was 17.
Miscellaneous (will be removed when merged)
Checklist (will be removed when merged)
See this page for more information about the pull request process.
Code related list:
/release_notes/current/following the instructions of/release_notes/template.mdPull request related list: