-
Notifications
You must be signed in to change notification settings - Fork 6
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
Change post to pre hooks #323
base: main
Are you sure you want to change the base?
Conversation
acdf4c0
to
1bf08a3
Compare
Need to rebase after #333 merges. |
1bf08a3
to
75d2829
Compare
75d2829
to
ffdb816
Compare
We could actually make this non-breaking by making some small adjustments to the |
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.
I would advise against using either pre_explicit
or post_explicit
, as that does not accurately describe what this function will do. The correct name for this function is either post_stage
(preferred) or pre_tendency
(usually correct, except at the end of the last timestep, since there are no further tendencies to compute after that). The other function can be called pre_implicit
, but it would be more correct to call it pre_implicit_solve
, since the implicit tendency for each stage will still be computed with post_stage
/pre_tendency
.
I'm also not really in favor of allowing pre_explicit
and pre_implicit
to be used as aliases for these new functions, as that will almost certainly lead to confusion and bugs in the future. Those names are not indicative of how these functions will be used, so we should probably just make this a breaking change.
As I mentioned in #322,
I agree, I was just trying to avoid breaking changes. I think the cleaner thing will be to just fix this bug and make a breaking release. |
This PR is an attempt to close #322 and #270. This PR somewhat reverts (with some tweaks) #222 and #223. And #210 is also related.
This is a breaking change, but I think it's really needed since the existing hooks are both confusingly named and improperly implemented to allow splitting these functions.