Hi folks, thanks for the package! I'm currently trying to run the examples in the docs for the Non-autonomous Linear ODE solvers, but I'm running into type conversion errors with the Magnus solvers (Edit: And also with Tsit5, etc. It appears to be an issue with using the SciML MatrixOperator).
ERROR: LoadError: MethodError: Cannot `convert` an object of type Float64 to an object of type Matrix{Float64}
The function `convert` exists, but no method is defined for this combination of argument types.
Closest candidates are:
convert(::Type{Array{T, N}}, ::SizedArray{S, T, N, N, Array{T, N}}) where {S, T, N}
@ StaticArrays ~/.julia/packages/StaticArrays/LSPcF/src/SizedArray.jl:88
convert(::Type{Array{T, N}}, ::SizedArray{S, T, N, M, TData} where {M, TData<:AbstractArray{T, M}}) where {T, S, N}
@ StaticArrays ~/.julia/packages/StaticArrays/LSPcF/src/SizedArray.jl:82
convert(::Type{T}, ::T) where T
@ Base Base.jl:126
...
Stacktrace:
[1] setproperty!(x::MatrixOperator{Float64, Matrix{Float64}, SciMLOperators.FilterKwargs{typeof(update_func), Tuple{}}, SciMLOperators.FilterKwargs{Nothing, Tuple{}}}, f::Symbol, v::Float64)
@ Base ./Base.jl:52
[2] update_coefficients!(L::MatrixOperator{Float64, Matrix{Float64}, SciMLOperators.FilterKwargs{typeof(update_func), Tuple{}}, SciMLOperators.FilterKwargs{Nothing, Tuple{}}}, u::Vector{Float64}, p::SciMLBase.NullParameters, t::Float64; kwargs::@Kwargs{})
@ SciMLOperators ~/.julia/packages/SciMLOperators/Op60W/src/matrix.jl:186
[3] update_coefficients!(L::MatrixOperator{Float64, Matrix{Float64}, SciMLOperators.FilterKwargs{typeof(update_func), Tuple{}}, SciMLOperators.FilterKwargs{Nothing, Tuple{}}}, u::Vector{Float64}, p::SciMLBase.NullParameters, t::Float64)
@ SciMLOperators ~/.julia/packages/SciMLOperators/Op60W/src/matrix.jl:182
[4] (::MatrixOperator{Float64, Matrix{Float64}, SciMLOperators.FilterKwargs{typeof(update_func), Tuple{}}, SciMLOperators.FilterKwargs{Nothing, Tuple{}}})(w::Vector{Float64}, v::Vector{Float64}, u::Vector{Float64}, p::SciMLBase.NullParameters, t::Float64; kwargs::@Kwargs{})
@ SciMLOperators ~/.julia/packages/SciMLOperators/Op60W/src/matrix.jl:199
[5] (::MatrixOperator{Float64, Matrix{Float64}, SciMLOperators.FilterKwargs{typeof(update_func), Tuple{}}, SciMLOperators.FilterKwargs{Nothing, Tuple{}}})(w::Vector{Float64}, v::Vector{Float64}, u::Vector{Float64}, p::SciMLBase.NullParameters, t::Float64)
@ SciMLOperators ~/.julia/packages/SciMLOperators/Op60W/src/matrix.jl:198
[6] (::ODEFunction{true, SciMLBase.AutoSpecialize, MatrixOperator{Float64, Matrix{Float64}, SciMLOperators.FilterKwargs{typeof(update_func), Tuple{}}, SciMLOperators.FilterKwargs{Nothing, Tuple{}}}, LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing, Nothing, Nothing})(du::Vector{Float64}, u::Vector{Float64}, p::SciMLBase.NullParameters, t::Float64)
@ SciMLBase ~/.julia/packages/SciMLBase/rvXrA/src/scimlfunctions.jl:2578
[7] initialize!(integrator::OrdinaryDiffEqCore.ODEIntegrator{MagnusGL6, true, Vector{Float64}, Nothing, Float64, SciMLBase.NullParameters, Float64, Float64, Float64, Float64, Vector{Vector{Float64}}, ODESolution{Float64, 2, Vector{Vector{Float64}}, Nothing, Nothing, Vector{Float64}, Vector{Vector{Vector{Float64}}}, Nothing, ODEProblem{Vector{Float64}, Tuple{Float64, Float64}, true, SciMLBase.NullParameters, ODEFunction{true, SciMLBase.AutoSpecialize, MatrixOperator{Float64, Matrix{Float64}, SciMLOperators.FilterKwargs{typeof(update_func), Tuple{}}, SciMLOperators.FilterKwargs{Nothing, Tuple{}}}, LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing, Nothing, Nothing}, @Kwargs{}, SciMLBase.StandardODEProblem}, MagnusGL6, OrdinaryDiffEqCore.InterpolationData{ODEFunction{true, SciMLBase.AutoSpecialize, MatrixOperator{Float64, Matrix{Float64}, SciMLOperators.FilterKwargs{typeof(update_func), Tuple{}}, SciMLOperators.FilterKwargs{Nothing, Tuple{}}}, LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing, Nothing, Nothing}, Vector{Vector{Float64}}, Vector{Float64}, Vector{Vector{Vector{Float64}}}, Nothing, OrdinaryDiffEqLinear.MagnusGL6Cache{Vector{Float64}, Vector{Float64}, Matrix{Float64}, Nothing}, Nothing}, SciMLBase.DEStats, Nothing, Nothing, Nothing, Nothing}, ODEFunction{true, SciMLBase.AutoSpecialize, MatrixOperator{Float64, Matrix{Float64}, SciMLOperators.FilterKwargs{typeof(update_func), Tuple{}}, SciMLOperators.FilterKwargs{Nothing, Tuple{}}}, LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing, Nothing, Nothing}, OrdinaryDiffEqLinear.MagnusGL6Cache{Vector{Float64}, Vector{Float64}, Matrix{Float64}, Nothing}, OrdinaryDiffEqCore.DEOptions{Float64, Float64, Float64, Float64, PIController{Int64}, typeof(DiffEqBase.ODE_DEFAULT_NORM), typeof(LinearAlgebra.opnorm), Nothing, CallbackSet{Tuple{}, Tuple{}}, typeof(DiffEqBase.ODE_DEFAULT_ISOUTOFDOMAIN), typeof(DiffEqBase.ODE_DEFAULT_PROG_MESSAGE), typeof(DiffEqBase.ODE_DEFAULT_UNSTABLE_CHECK), DataStructures.BinaryHeap{Float64, DataStructures.FasterForward}, DataStructures.BinaryHeap{Float64, DataStructures.FasterForward}, Nothing, Nothing, Int64, Tuple{}, Tuple{}, Tuple{}}, Vector{Float64}, Float64, Nothing, OrdinaryDiffEqCore.DefaultInit, Nothing}, cache::OrdinaryDiffEqLinear.MagnusGL6Cache{Vector{Float64}, Vector{Float64}, Matrix{Float64}, Nothing})
@ OrdinaryDiffEqLinear ~/.julia/packages/OrdinaryDiffEqLinear/Drnl6/src/linear_perform_step.jl:568
[8] __init(prob::ODEProblem{Vector{Float64}, Tuple{Float64, Float64}, true, SciMLBase.NullParameters, ODEFunction{true, SciMLBase.AutoSpecialize, MatrixOperator{Float64, Matrix{Float64}, SciMLOperators.FilterKwargs{typeof(update_func), Tuple{}}, SciMLOperators.FilterKwargs{Nothing, Tuple{}}}, LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing, Nothing, Nothing}, @Kwargs{}, SciMLBase.StandardODEProblem}, alg::MagnusGL6, timeseries_init::Tuple{}, ts_init::Tuple{}, ks_init::Tuple{}, recompile::Type{Val{true}}; saveat::Tuple{}, tstops::Tuple{}, d_discontinuities::Tuple{}, save_idxs::Nothing, save_everystep::Bool, save_on::Bool, save_start::Bool, save_end::Nothing, callback::Nothing, dense::Bool, calck::Bool, dt::Float64, dtmin::Float64, dtmax::Float64, force_dtmin::Bool, adaptive::Bool, gamma::Int64, abstol::Nothing, reltol::Nothing, qmin::Int64, qmax::Int64, qsteady_min::Int64, qsteady_max::Int64, beta1::Nothing, beta2::Nothing, qoldinit::Int64, controller::Nothing, fullnormalize::Bool, failfactor::Int64, maxiters::Int64, internalnorm::typeof(DiffEqBase.ODE_DEFAULT_NORM), internalopnorm::typeof(LinearAlgebra.opnorm), isoutofdomain::typeof(DiffEqBase.ODE_DEFAULT_ISOUTOFDOMAIN), unstable_check::typeof(DiffEqBase.ODE_DEFAULT_UNSTABLE_CHECK), verbose::Bool, timeseries_errors::Bool, dense_errors::Bool, advance_to_tstop::Bool, stop_at_next_tstop::Bool, initialize_save::Bool, progress::Bool, progress_steps::Int64, progress_name::String, progress_message::typeof(DiffEqBase.ODE_DEFAULT_PROG_MESSAGE), progress_id::Symbol, userdata::Nothing, allow_extrapolation::Bool, initialize_integrator::Bool, alias::ODEAliasSpecifier, initializealg::OrdinaryDiffEqCore.DefaultInit, kwargs::@Kwargs{})
@ OrdinaryDiffEqCore ~/.julia/packages/OrdinaryDiffEqCore/AYNr9/src/solve.jl:587
[9] __init (repeats 5 times)
@ ~/.julia/packages/OrdinaryDiffEqCore/AYNr9/src/solve.jl:11 [inlined]
[10] #__solve#62
@ ~/.julia/packages/OrdinaryDiffEqCore/AYNr9/src/solve.jl:6 [inlined]
[11] __solve
@ ~/.julia/packages/OrdinaryDiffEqCore/AYNr9/src/solve.jl:1 [inlined]
[12] #solve_call#36
@ ~/.julia/packages/DiffEqBase/qvEPa/src/solve.jl:670 [inlined]
[13] solve_call
@ ~/.julia/packages/DiffEqBase/qvEPa/src/solve.jl:627 [inlined]
[14] #solve_up#45
@ ~/.julia/packages/DiffEqBase/qvEPa/src/solve.jl:1205 [inlined]
[15] solve_up
@ ~/.julia/packages/DiffEqBase/qvEPa/src/solve.jl:1183 [inlined]
[16] #solve#43
@ ~/.julia/packages/DiffEqBase/qvEPa/src/solve.jl:1096 [inlined]
[17] top-level scope
@ ~/Programs/aaa_julia/updatetest.jl:11
Describe the bug 🐞
Hi folks, thanks for the package! I'm currently trying to run the examples in the docs for the Non-autonomous Linear ODE solvers, but I'm running into type conversion errors with the Magnus solvers (Edit: And also with Tsit5, etc. It appears to be an issue with using the SciML MatrixOperator).
Minimal Reproducible Example 👇
Error & Stacktrace⚠️
Environment (please complete the following information):
using Pkg; Pkg.status()using Pkg; Pkg.status(; mode = PKGMODE_MANIFEST)versioninfo()