-
Notifications
You must be signed in to change notification settings - Fork 134
Make SaveSolutionCallback immutable
#2640
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
base: main
Are you sure you want to change the base?
Make SaveSolutionCallback immutable
#2640
Conversation
Review checklistThis checklist is meant to assist creators of PRs (to let them know what reviewers will typically look for) and reviewers (to guide them in a structured review process). Items do not need to be checked explicitly for a PR to be eligible for merging. Purpose and scope
Code quality
Documentation
Testing
Performance
Verification
Created with ❤️ by the Trixi.jl community. |
…rixi.jl into Const_Immutable_Structs
|
Where is the |
Line 27 in 5498f78
|
Here: #2052 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2640 +/- ##
=======================================
Coverage 96.85% 96.85%
=======================================
Files 546 546
Lines 43276 43276
=======================================
Hits 41914 41914
Misses 1362 1362
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
ranocha
left a comment
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.
Why do you want to do this?
|
My motivation was mainly to make the code more self-documenting in the sense that a |
ranocha
left a comment
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.
Reasonable idea in general.
|
I guess I could split everything except for the change to |
I'm wondering whether the breaking change to the
But if we do mutate instances of a |
|
So in my opinion, the code in the examples is just laziness: One could have just constructed a new instance of the callback (this is what |
structs and const variablesSaveSolutionCallback immutable
This will probably crash multiple times until I figured out what may be specified as immutable.