Skip to content

No jacobian prototype for sparse jacobian SDEProblems? #3527

@TorkelE

Description

@TorkelE

Not that familiar with SDE solving, but it seems odd that there this field is empty when a sparse jacobian is built for SDEs? They are there for e.g. ODEs and Nonlinear problems. And if one shouldn't do sparse Jacobians here, shouldn't;t there at least be an error/warning?

using ModelingToolkit, StochasticDiffEq
using ModelingToolkit: t_nounits as t, D_nounits as D
using Plots

@parameters σ=10.0 ρ=2.33 β=26.0
@variables x(t)=5.0 y(t)=5.0 z(t)=1.0
@brownian B
eqs = [D(x) ~ σ * (y - x) + 0.3x * B,
    D(y) ~ x *- z) - y + 0.3y * B,
    D(z) ~ x * y - β * z + 0.3z * B]

@mtkbuild de = System(eqs, t)
sprob = SDEProblem(de, [], 0.0, [], jac = true, sparse = true)
sprob.f.jac_prototype == nothing # true

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions