Open ChrisRackauckas opened 5 years ago
You seem to assume I want to do something more sophisticated than just filling up a SparseMatrixCSC like I did here, and I'm not sure I want anything different than that. What exactly do you have in mind?
See BlockBandedMatrices.jl or BandedMatrices.jl for inspiration. The most helpful thing here would be a type for sparse blocked matrices with a few overloads such as blocked ldiv!
, blocked mul!
, etc. The fact that it would be useful for Jacobians just comes down to having a fast coloring allowed on it by blocking the coloring.
It would be good if this library implemented the iterator:
https://github.com/JuliaDiffEq/ArrayInterface.jl#findstructralnzx
This would allow it to be used as a sparsity type in SparseDiffTools.jl and DiffEqDiffTools.jl for fast color differentiation. Also, it would be good to add a
matrix_colors
overload so that way it is easy to generate the color vector.https://github.com/JuliaDiffEq/ArrayInterface.jl#matrix_colorsa
With these two tools this will make it auto-speed up DifferentialEquations.jl when the Jacobian is set to the type from this package, which would be really nice for scaling PDE solvers! See the Requires block in ArrayInterface.jl for how we did this with BandedMatrices.jl and BlockBandedMatrices.jl