DiffEqArrayOperator is missing

The code below is an example code taken from Problem Types / Non-autonomous Linear ODE / Lie Group Problems section in documentation of DifferentialEquations.jl (I cannot include the link).

using DifferentialEquations
function update_func(A, u, p, t)
    A[1, 1] = cos(t)
    A[2, 1] = sin(t)
    A[1, 2] = -sin(t)
    return A[2, 2] = cos(t)
end
A = DiffEqArrayOperator(ones(2, 2); update_func=update_func)
prob = ODEProblem(A, ones(2), (10, 50.0))

The code cannot run because DiffEqArrayOperator is not found.

The error says;

ERROR: LoadError: UndefVarError: `DiffEqArrayOperator` not defined in `Main`
Stacktrace:
 [1] top-level scope
   @ /path/to/code/test.jl:8
in expression starting at /path/to/code/test.jl:8

I haven’t found any package to add besides archived DiffEqOperators.jl.
Is there anything I have overlooked?


Julia v0.11.4
DifferentialEquations v7.16.1

It was archived a long time back in favor of SciMLOperators:

MatrixOperator is the version from there:

using DifferentialEquations
function update_func(A, u, p, t)
    A[1, 1] = cos(t)
    A[2, 1] = sin(t)
    A[1, 2] = -sin(t)
    return A[2, 2] = cos(t)
end
A = MatrixOperator(ones(2, 2); update_func=update_func)
prob = ODEProblem(A, ones(2), (10, 50.0))

Thank you for informing me.

The page Additional Features / DiffEqOperators is also still present.
This is one reason I failed to notice that this function has been deprecated.
I mistakenly searched for DiffEqArrayOperator in SciMLOperators.jl.

Oh thanks, it looks like one doc missed the updates. I’ll fix that up today

1 Like