-
Notifications
You must be signed in to change notification settings - Fork 38
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
Re-write source code of lyapunov
to use set_state!
#213
Comments
(the solution of this issue is literally changing 10 lines of code, it is very straightforward) |
How to give two indices in the set_state function for this rescale function : |
Don't give two indices, but rather call |
I'm not sure I get what you mean. For the matrix case, I need to assign |
I'm confused, can you please link the source code line you are referring to in the |
Yeah sure. I'm talking about the
which would be equivalent to |
@SudoMishra yeah, you're confused because the point is to re-write the function. Have a read at the documentation string of function rescale!(integ::AbstractODEIntegrator{Alg, IIP, M}, a) where {Alg, IIP, M<:Matrix}
r = get_state(integ, 1) .+ (get_state(integ, 2) .- get_state(integ, 1)) ./ a
set_state!(integ, r, 2)
end Of course, we can do some optimization so that we have a dummy preinitialized |
if you open a pr I will give more advice |
The source code of
lyapunov
was one of the very first functions of DynamicalSystems.jl. It does not use theset_state!
function for parallel integrators. That is a mistake (and in fact made us miss a bug).One should re-write the
rescale!
function of the code to simply generate the new reference state and the just callset_state!
.The text was updated successfully, but these errors were encountered: