-
-
Notifications
You must be signed in to change notification settings - Fork 101
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
feat: add implementations of CheckInit
and OverrideInit
#845
feat: add implementations of CheckInit
and OverrideInit
#845
Conversation
3e213af
to
e79b906
Compare
OK, awesome! Thanks for sticking with this. If you feel this is at a point where it would be helpful to test against Catalyst let me know. We have master capped right now to SciMLBase 2.57.1 as that was the last time tests passed (and we wanted to be able to work / merge other PRs). |
1d94904
to
819b3dd
Compare
algebraic_vars = [all(iszero, x) for x in eachcol(M)] | ||
algebraic_eqs = [all(iszero, x) for x in eachrow(M)] |
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.
This should use a cached one from the integrator?
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.
Cached what, exactly? 😅 I copied almost all of this from the existing implementation
(iszero(algebraic_vars) || iszero(algebraic_eqs)) && return | ||
update_coefficients!(M, u0, p, t) | ||
tmp = _evaluate_f_ode(integrator, f, isinplace, u0, p, t) | ||
tmp .= ArrayInterface.restructure(tmp, algebraic_eqs .* _vec(tmp)) |
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.
This allocates
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.
Somehow changing this to tmp = algebraic_eqs .* _vec(tmp)
allocates more
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.
At least, according to @allocated
/@allocations
03218a7
to
b3105cc
Compare
@TorkelE @isaacsas this should make it so that your rebuild function is something along the lines of:
Checklist
contributor guidelines, in particular the SciML Style Guide and
COLPRAC.
Additional context
Add any other context about the problem here.