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
Changes for VectorContinuousCallback #754
Conversation
src/integrators/type.jl
Outdated
previous_condition::Array{uType} | ||
callback_cache::CallbackCacheType | ||
previous_condition::CallbackCacheType | ||
callback_next_sign::CallbackCacheType |
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 can be a bitarray?
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.
Yeah this can be. This was defaulted to float previously thats why I chose float. Lets change this to BitArray.
src/solve.jl
Outdated
@@ -156,6 +156,13 @@ function DiffEqBase.__init( | |||
|
|||
callbacks_internal = CallbackSet(callback,prob.callback) | |||
|
|||
max_len = DiffEqBase.max_vector_callback_length(callbacks_internal) | |||
if max_len !== -1 |
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.
not a huge deal, but breaks inference. Can we instead just search for the existence of a VectorContinuousCallback?
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.
how does it break inference, return type is always Int64? I would need the max length out of all VectorContinuousCallback to make the CallbackCache.
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.
max_len
cannot be inferred since it's a value, and then which of the branches is taken isn't inferred.
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.
how do you propose to do this? I think Val{}
might not be of use as well
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.
Look for VectorContinuousCallback. That is type information.
Put a lower bound on DiffEqBase v5.9.0 |
I have made another PR (SciML/DiffEqBase.jl#231), please tag after that is approved and merge. |
1 similar comment
Oh god this is bad. Making fixes. |
Codecov Report
@@ Coverage Diff @@
## master #754 +/- ##
==========================================
- Coverage 72.37% 70.84% -1.54%
==========================================
Files 89 89
Lines 29039 29328 +289
==========================================
- Hits 21017 20777 -240
- Misses 8022 8551 +529
Continue to review full report at Codecov.
|
b2fd928
to
9e85dfc
Compare
That last test is fixed by SciML/DiffEqBase.jl#238 |
Ref: SciML/DiffEqBase.jl#221