Skip to content

Error when Jacobian is Tridiagonal #67

@matthieugomez

Description

@matthieugomez

finite_difference_jacobian! returns an error when the Jacobian is a Tridiagonal matrix (or BandedMatrix/BlockBandedMatrix etc):

using LinearAlgebra, DiffEqDiffTools
y0 = ones(10)
J = Tridiagonal(ones(9), ones(10), ones(9))
DiffEqDiffTools.finite_difference_jacobian!(J,  (dy, y) -> dy, y0)
#> ERROR: UndefVarError: cols_index not defined

(found this when trying to use SparseDiffTools.jl for a Tridiagonal jacobian)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions