DynamicalSystemsBase.jl
DynamicalSystemsBase.jl copied to clipboard
Improving the speed of Lyapunov spectra computation
When using the lyapunovspectrum function, it would be nice to use the Jacobian's structure (diagonal, banded, rank1, and so on) especially as long as one doesn't use a GPU for the matrix multiplication. In the problem I am working on the Jacobian has a diagonal, a rank 1, and a banded part. When the size gets big it would be nice to make use of that. Is this possible and how would this be done?
Maybe another related idea is to use a GPU for the evolution of the variational equation. Is this something that could be implemented?
All of these are nice ideas, and they need to be implemented in DynamicalSystemsBase.jl for the TangentDynamicalSystem
. DifferentialEquations.jl ecosystem has functionality to detect the sparsity structure of Jacobian that we could utilize. In general, DifferentialEquations.jl uses the Jacobian in many solvers already so we could be re-using things.
Unfortunately this issue falls outside my bandwidth.
(note that you can pass in a sparse Jacobian already thats not a problem, but you would have to create the sparse and pass it in when you initialize a TangentDynamicalSystem
)
https://juliadynamics.github.io/DynamicalSystemsDocs.jl/dynamicalsystemsbase/stable/#Advanced-example
See also https://github.com/SciML/ModelingToolkit.jl/issues/1160 that practically solves the problem. We just need to make sure that this information is utilized when creating a TangentDynamicalSystem
.