Here is a MWE solving a simple 3x3 equation, where I use the SizedVector
from StaticArrays.jl
:
using DifferentialEquations
using StaticArrays
# Set up the Giesekus model
function dudt!(du, σ, p, t)
du .= -σ
end
η0 = 1
τ = 1
α = 0.8
p_giesekus = [η0,τ,α]
σ0 = SizedMatrix{3,3}([1. 0. 0. ; 0. 2. 0. ; 3. 0. 0.])
fct(t) = 1*cos(t)
prob_giesekus = ODEProblem(dudt!, σ0, (0., 2.), p_giesekus)
solve_giesekus = solve(prob_giesekus, Rodas4(), saveat=0.2) # Broadcast error
solve_giesekus = solve(prob_giesekus, Tsit5(), saveat=0.2) # Runs fine
Notice the line that says Broadcast error. Why do I get an error?
I feel like I am not using StaticArrays correctly. The MWE is a greatly reduced version of a code which has been giving strange errors. I am solving a UODE and was using static arrays. When using Rodas4
, I think that autodifferentiatpion is used, and therefore the types stored in the static arrays were no long bit-compatible variables (ints, floats, etc.) and I got an error. So I changed to mutable arrays SizedArray
since my array sizes are almost `9x9. Thanks for any help!
Here is the stack trace:
ERROR: DimensionMismatch: array could not be broadcast to match destination
Stacktrace:
[1] check_broadcast_shape(shp::Tuple{SOneTo{3}, SOneTo{3}}, Ashp::Tuple{SOneTo{9}}) @ Base.Broadcast ./broadcast.jl:553
[2] check_broadcast_axes @ ./broadcast.jl:556 [inlined]
[3] instantiate @ ./broadcast.jl:297 [inlined]
[4] instantiate @ ~/.julia/packages/StaticArrays/VLqRb/src/broadcast.jl:32 [inlined]
[5] materialize! @ ./broadcast.jl:884 [inlined]
[6] materialize! @ ./broadcast.jl:881 [inlined]
[7] fast_materialize! @ ~/.julia/packages/FastBroadcast/xrPat/src/FastBroadcast.jl:47 [inlined]
[8] perform_step!(integrator::OrdinaryDiffEq.ODEIntegrator{Rodas4{9, true, LUFactorization{LinearAlgebra.RowMaximum}, typeof(OrdinaryDiffEq.DEFAULT_PRECS), Val{:forward}, true, nothing}, true, SizedMatrix{3, 3, Float64, 2, Matrix{Float64}}, Nothing, Float64, Vector{Float64}, Float64, Float64, Float64, Float64, Vector{SizedMatrix{3, 3, Float64, 2, Matrix{Float64}}}, ODESolution{Float64, 3, Vector{SizedMatrix{3, 3, Float64, 2, Matrix{Float64}}}, Nothing, Nothing, Vector{Float64}, Vector{Vector{SizedMatrix{3, 3, Float64, 2, Matrix{Float64}}}}, ODEProblem{SizedMatrix{3, 3, Float64, 2, Matrix{Float64}}, Tuple{Float64, Float64}, true, Vector{Float64}, ODEFunction{true, SciMLBase.AutoSpecialize, typeof(dudt!), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, SciMLBase.StandardODEProblem}, Rodas4{9, true, LUFactorization{LinearAlgebra.RowMaximum}, typeof(OrdinaryDiffEq.DEFAULT_PRECS), Val{:forward}, true, nothing}, OrdinaryDiffEq.InterpolationData{ODEFunction{true, SciMLBase.AutoSpecialize, typeof(dudt!), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, Vector{SizedMatrix{3, 3, Float64, 2, Matrix{Float64}}}, Vector{Float64}, Vector{Vector{SizedMatrix{3, 3, Float64, 2, Matrix{Float64}}}}, OrdinaryDiffEq.Rodas4Cache{SizedMatrix{3, 3, Float64, 2, Matrix{Float64}}, SizedMatrix{3, 3, Float64, 2, Matrix{Float64}}, SizedMatrix{3, 3, Float64, 2, Matrix{Float64}}, Matrix{Float64}, Matrix{Float64}, OrdinaryDiffEq.RodasTableau{Float64, Float64}, SciMLBase.TimeGradientWrapper{ODEFunction{true, SciMLBase.AutoSpecialize, typeof(dudt!), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, SizedMatrix{3, 3, Float64, 2, Matrix{Float64}}, Vector{Float64}}, SciMLBase.UJacobianWrapper{ODEFunction{true, SciMLBase.AutoSpecialize, typeof(dudt!), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, Float64, Vector{Float64}}, LinearSolve.LinearCache{Matrix{Float64}, SizedVector{9, Float64, Vector{Float64}}, SizedVector{9, Float64, Vector{Float64}}, SciMLBase.NullParameters, LUFactorization{LinearAlgebra.RowMaximum}, LinearAlgebra.LU{Float64, Matrix{Float64}, Vector{Int64}}, LinearSolve.InvPreconditioner{LinearAlgebra.Diagonal{Float64, SizedVector{9, Float64, Vector{Float64}}}}, LinearAlgebra.Diagonal{Float64, SizedVector{9, Float64, Vector{Float64}}}, Float64, true, LinearSolve.OperatorCondition.IllConditioned}, SparseDiffTools.ForwardColorJacCache{SizedMatrix{3, 3, ForwardDiff.Dual{ForwardDiff.Tag{DiffEqBase.OrdinaryDiffEqTag, Float64}, Float64, 9}, 2, Matrix{ForwardDiff.Dual{ForwardDiff.Tag{DiffEqBase.OrdinaryDiffEqTag, Float64}, Float64, 9}}}, SizedMatrix{3, 3, ForwardDiff.Dual{ForwardDiff.Tag{DiffEqBase.OrdinaryDiffEqTag, Float64}, Float64, 9}, 2, Matrix{ForwardDiff.Dual{ForwardDiff.Tag{DiffEqBase.OrdinaryDiffEqTag, Float64}, Float64, 9}}}, SizedMatrix{3, 3, Float64, 2, Matrix{Float64}}, Vector{Vector{NTuple{9, Float64}}}, UnitRange{Int64}, Nothing}, SizedMatrix{3, 3, ForwardDiff.Dual{ForwardDiff.Tag{DiffEqBase.OrdinaryDiffEqTag, Float64}, Float64, 1}, 2, Matrix{ForwardDiff.Dual{ForwardDiff.Tag{DiffEqBase.OrdinaryDiffEqTag, Float64}, Float64, 1}}}, Float64, Rodas4{9, true, LUFactorization{LinearAlgebra.RowMaximum}, typeof(OrdinaryDiffEq.DEFAULT_PRECS), Val{:forward}, true, nothing}}}, DiffEqBase.Stats, Nothing}, ODEFunction{true, SciMLBase.AutoSpecialize, typeof(dudt!), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, OrdinaryDiffEq.Rodas4Cache{SizedMatrix{3, 3, Float64, 2, Matrix{Float64}}, SizedMatrix{3, 3, Float64, 2, Matrix{Float64}}, SizedMatrix{3, 3, Float64, 2, Matrix{Float64}}, Matrix{Float64}, Matrix{Float64}, OrdinaryDiffEq.RodasTableau{Float64, Float64}, SciMLBase.TimeGradientWrapper{ODEFunction{true, SciMLBase.AutoSpecialize, typeof(dudt!), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, SizedMatrix{3, 3, Float64, 2, Matrix{Float64}}, Vector{Float64}}, SciMLBase.UJacobianWrapper{ODEFunction{true, SciMLBase.AutoSpecialize, typeof(dudt!), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, Float64, Vector{Float64}}, LinearSolve.LinearCache{Matrix{Float64}, SizedVector{9, Float64, Vector{Float64}}, SizedVector{9, Float64, Vector{Float64}}, SciMLBase.NullParameters, LUFactorization{LinearAlgebra.RowMaximum}, LinearAlgebra.LU{Float64, Matrix{Float64}, Vector{Int64}}, LinearSolve.InvPreconditioner{LinearAlgebra.Diagonal{Float64, SizedVector{9, Float64, Vector{Float64}}}}, LinearAlgebra.Diagonal{Float64, SizedVector{9, Float64, Vector{Float64}}}, Float64, true, LinearSolve.OperatorCondition.IllConditioned}, SparseDiffTools.ForwardColorJacCache{SizedMatrix{3, 3, ForwardDiff.Dual{ForwardDiff.Tag{DiffEqBase.OrdinaryDiffEqTag, Float64}, Float64, 9}, 2, Matrix{ForwardDiff.Dual{ForwardDiff.Tag{DiffEqBase.OrdinaryDiffEqTag, Float64}, Float64, 9}}}, SizedMatrix{3, 3, ForwardDiff.Dual{ForwardDiff.Tag{DiffEqBase.OrdinaryDiffEqTag, Float64}, Float64, 9}, 2, Matrix{ForwardDiff.Dual{ForwardDiff.Tag{DiffEqBase.OrdinaryDiffEqTag, Float64}, Float64, 9}}}, SizedMatrix{3, 3, Float64, 2, Matrix{Float64}}, Vector{Vector{NTuple{9, Float64}}}, UnitRange{Int64}, Nothing}, SizedMatrix{3, 3, ForwardDiff.Dual{ForwardDiff.Tag{DiffEqBase.OrdinaryDiffEqTag, Float64}, Float64, 1}, 2, Matrix{ForwardDiff.Dual{ForwardDiff.Tag{DiffEqBase.OrdinaryDiffEqTag, Float64}, Float64, 1}}}, Float64, Rodas4{9, true, LUFactorization{LinearAlgebra.RowMaximum}, typeof(OrdinaryDiffEq.DEFAULT_PRECS), Val{:forward}, true, nothing}}, OrdinaryDiffEq.DEOptions{Float64, Float64, Float64, Float64, PIController{Rational{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{}, Float64, Tuple{}}, SizedMatrix{3, 3, Float64, 2, Matrix{Float64}}, Float64, Nothing, OrdinaryDiffEq.DefaultInit}, cache::OrdinaryDiffEq.Rodas4Cache{SizedMatrix{3, 3, Float64, 2, Matrix{Float64}}, SizedMatrix{3, 3, Float64, 2, Matrix{Float64}}, SizedMatrix{3, 3, Float64, 2, Matrix{Float64}}, Matrix{Float64}, Matrix{Float64}, OrdinaryDiffEq.RodasTableau{Float64, Float64}, SciMLBase.TimeGradientWrapper{ODEFunction{true, SciMLBase.AutoSpecialize, typeof(dudt!), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, SizedMatrix{3, 3, Float64, 2, Matrix{Float64}}, Vector{Float64}}, SciMLBase.UJacobianWrapper{ODEFunction{true, SciMLBase.AutoSpecialize, typeof(dudt!), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, Float64, Vector{Float64}}, LinearSolve.LinearCache{Matrix{Float64}, SizedVector{9, Float64, Vector{Float64}}, SizedVector{9, Float64, Vector{Float64}}, SciMLBase.NullParameters, LUFactorization{LinearAlgebra.RowMaximum}, LinearAlgebra.LU{Float64, Matrix{Float64}, Vector{Int64}}, LinearSolve.InvPreconditioner{LinearAlgebra.Diagonal{Float64, SizedVector{9, Float64, Vector{Float64}}}}, LinearAlgebra.Diagonal{Float64, SizedVector{9, Float64, Vector{Float64}}}, Float64, true, LinearSolve.OperatorCondition.IllConditioned}, SparseDiffTools.ForwardColorJacCache{SizedMatrix{3, 3, ForwardDiff.Dual{ForwardDiff.Tag{DiffEqBase.OrdinaryDiffEqTag, Float64}, Float64, 9}, 2, Matrix{ForwardDiff.Dual{ForwardDiff.Tag{DiffEqBase.OrdinaryDiffEqTag, Float64}, Float64, 9}}}, SizedMatrix{3, 3, ForwardDiff.Dual{ForwardDiff.Tag{DiffEqBase.OrdinaryDiffEqTag, Float64}, Float64, 9}, 2, Matrix{ForwardDiff.Dual{ForwardDiff.Tag{DiffEqBase.OrdinaryDiffEqTag, Float64}, Float64, 9}}}, SizedMatrix{3, 3, Float64, 2, Matrix{Float64}}, Vector{Vector{NTuple{9, Float64}}}, UnitRange{Int64}, Nothing}, SizedMatrix{3, 3, ForwardDiff.Dual{ForwardDiff.Tag{DiffEqBase.OrdinaryDiffEqTag, Float64}, Float64, 1}, 2, Matrix{ForwardDiff.Dual{ForwardDiff.Tag{DiffEqBase.OrdinaryDiffEqTag, Float64}, Float64, 1}}}, Float64, Rodas4{9, true, LUFactorization{LinearAlgebra.RowMaximum}, typeof(OrdinaryDiffEq.DEFAULT_PRECS), Val{:forward}, true, nothing}}, repeat_step::Bool) @ OrdinaryDiffEq ~/.julia/packages/OrdinaryDiffEq/xs0Fk/src/perform_step/rosenbrock_perform_step.jl:1084
[9] perform_step!(integrator::OrdinaryDiffEq.ODEIntegrator{Rodas4{9, true, LUFactorization{LinearAlgebra.RowMaximum}, typeof(OrdinaryDiffEq.DEFAULT_PRECS), Val{:forward}, true, nothing}, true, SizedMatrix{3, 3, Float64, 2, Matrix{Float64}}, Nothing, Float64, Vector{Float64}, Float64, Float64, Float64, Float64, Vector{SizedMatrix{3, 3, Float64, 2, Matrix{Float64}}}, ODESolution{Float64, 3, Vector{SizedMatrix{3, 3, Float64, 2, Matrix{Float64}}}, Nothing, Nothing, Vector{Float64}, Vector{Vector{SizedMatrix{3, 3, Float64, 2, Matrix{Float64}}}}, ODEProblem{SizedMatrix{3, 3, Float64, 2, Matrix{Float64}}, Tuple{Float64, Float64}, true, Vector{Float64}, ODEFunction{true, SciMLBase.AutoSpecialize, typeof(dudt!), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, SciMLBase.StandardODEProblem}, Rodas4{9, true, LUFactorization{LinearAlgebra.RowMaximum}, typeof(OrdinaryDiffEq.DEFAULT_PRECS), Val{:forward}, true, nothing}, OrdinaryDiffEq.InterpolationData{ODEFunction{true, SciMLBase.AutoSpecialize, typeof(dudt!), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, Vector{SizedMatrix{3, 3, Float64, 2, Matrix{Float64}}}, Vector{Float64}, Vector{Vector{SizedMatrix{3, 3, Float64, 2, Matrix{Float64}}}}, OrdinaryDiffEq.Rodas4Cache{SizedMatrix{3, 3, Float64, 2, Matrix{Float64}}, SizedMatrix{3, 3, Float64, 2, Matrix{Float64}}, SizedMatrix{3, 3, Float64, 2, Matrix{Float64}}, Matrix{Float64}, Matrix{Float64}, OrdinaryDiffEq.RodasTableau{Float64, Float64}, SciMLBase.TimeGradientWrapper{ODEFunction{true, SciMLBase.AutoSpecialize, typeof(dudt!), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, SizedMatrix{3, 3, Float64, 2, Matrix{Float64}}, Vector{Float64}}, SciMLBase.UJacobianWrapper{ODEFunction{true, SciMLBase.AutoSpecialize, typeof(dudt!), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, Float64, Vector{Float64}}, LinearSolve.LinearCache{Matrix{Float64}, SizedVector{9, Float64, Vector{Float64}}, SizedVector{9, Float64, Vector{Float64}}, SciMLBase.NullParameters, LUFactorization{LinearAlgebra.RowMaximum}, LinearAlgebra.LU{Float64, Matrix{Float64}, Vector{Int64}}, LinearSolve.InvPreconditioner{LinearAlgebra.Diagonal{Float64, SizedVector{9, Float64, Vector{Float64}}}}, LinearAlgebra.Diagonal{Float64, SizedVector{9, Float64, Vector{Float64}}}, Float64, true, LinearSolve.OperatorCondition.IllConditioned}, SparseDiffTools.ForwardColorJacCache{SizedMatrix{3, 3, ForwardDiff.Dual{ForwardDiff.Tag{DiffEqBase.OrdinaryDiffEqTag, Float64}, Float64, 9}, 2, Matrix{ForwardDiff.Dual{ForwardDiff.Tag{DiffEqBase.OrdinaryDiffEqTag, Float64}, Float64, 9}}}, SizedMatrix{3, 3, ForwardDiff.Dual{ForwardDiff.Tag{DiffEqBase.OrdinaryDiffEqTag, Float64}, Float64, 9}, 2, Matrix{ForwardDiff.Dual{ForwardDiff.Tag{DiffEqBase.OrdinaryDiffEqTag, Float64}, Float64, 9}}}, SizedMatrix{3, 3, Float64, 2, Matrix{Float64}}, Vector{Vector{NTuple{9, Float64}}}, UnitRange{Int64}, Nothing}, SizedMatrix{3, 3, ForwardDiff.Dual{ForwardDiff.Tag{DiffEqBase.OrdinaryDiffEqTag, Float64}, Float64, 1}, 2, Matrix{ForwardDiff.Dual{ForwardDiff.Tag{DiffEqBase.OrdinaryDiffEqTag, Float64}, Float64, 1}}}, Float64, Rodas4{9, true, LUFactorization{LinearAlgebra.RowMaximum}, typeof(OrdinaryDiffEq.DEFAULT_PRECS), Val{:forward}, true, nothing}}}, DiffEqBase.Stats, Nothing}, ODEFunction{true, SciMLBase.AutoSpecialize, typeof(dudt!), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, OrdinaryDiffEq.Rodas4Cache{SizedMatrix{3, 3, Float64, 2, Matrix{Float64}}, SizedMatrix{3, 3, Float64, 2, Matrix{Float64}}, SizedMatrix{3, 3, Float64, 2, Matrix{Float64}}, Matrix{Float64}, Matrix{Float64}, OrdinaryDiffEq.RodasTableau{Float64, Float64}, SciMLBase.TimeGradientWrapper{ODEFunction{true, SciMLBase.AutoSpecialize, typeof(dudt!), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, SizedMatrix{3, 3, Float64, 2, Matrix{Float64}}, Vector{Float64}}, SciMLBase.UJacobianWrapper{ODEFunction{true, SciMLBase.AutoSpecialize, typeof(dudt!), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, Float64, Vector{Float64}}, LinearSolve.LinearCache{Matrix{Float64}, SizedVector{9, Float64, Vector{Float64}}, SizedVector{9, Float64, Vector{Float64}}, SciMLBase.NullParameters, LUFactorization{LinearAlgebra.RowMaximum}, LinearAlgebra.LU{Float64, Matrix{Float64}, Vector{Int64}}, LinearSolve.InvPreconditioner{LinearAlgebra.Diagonal{Float64, SizedVector{9, Float64, Vector{Float64}}}}, LinearAlgebra.Diagonal{Float64, SizedVector{9, Float64, Vector{Float64}}}, Float64, true, LinearSolve.OperatorCondition.IllConditioned}, SparseDiffTools.ForwardColorJacCache{SizedMatrix{3, 3, ForwardDiff.Dual{ForwardDiff.Tag{DiffEqBase.OrdinaryDiffEqTag, Float64}, Float64, 9}, 2, Matrix{ForwardDiff.Dual{ForwardDiff.Tag{DiffEqBase.OrdinaryDiffEqTag, Float64}, Float64, 9}}}, SizedMatrix{3, 3, ForwardDiff.Dual{ForwardDiff.Tag{DiffEqBase.OrdinaryDiffEqTag, Float64}, Float64, 9}, 2, Matrix{ForwardDiff.Dual{ForwardDiff.Tag{DiffEqBase.OrdinaryDiffEqTag, Float64}, Float64, 9}}}, SizedMatrix{3, 3, Float64, 2, Matrix{Float64}}, Vector{Vector{NTuple{9, Float64}}}, UnitRange{Int64}, Nothing}, SizedMatrix{3, 3, ForwardDiff.Dual{ForwardDiff.Tag{DiffEqBase.OrdinaryDiffEqTag, Float64}, Float64, 1}, 2, Matrix{ForwardDiff.Dual{ForwardDiff.Tag{DiffEqBase.OrdinaryDiffEqTag, Float64}, Float64, 1}}}, Float64, Rodas4{9, true, LUFactorization{LinearAlgebra.RowMaximum}, typeof(OrdinaryDiffEq.DEFAULT_PRECS), Val{:forward}, true, nothing}}, OrdinaryDiffEq.DEOptions{Float64, Float64, Float64, Float64, PIController{Rational{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{}, Float64, Tuple{}}, SizedMatrix{3, 3, Float64, 2, Matrix{Float64}}, Float64, Nothing, OrdinaryDiffEq.DefaultInit}, cache::OrdinaryDiffEq.Rodas4Cache{SizedMatrix{3, 3, Float64, 2, Matrix{Float64}}, SizedMatrix{3, 3, Float64, 2, Matrix{Float64}}, SizedMatrix{3, 3, Float64, 2, Matrix{Float64}}, Matrix{Float64}, Matrix{Float64}, OrdinaryDiffEq.RodasTableau{Float64, Float64}, SciMLBase.TimeGradientWrapper{ODEFunction{true, SciMLBase.AutoSpecialize, typeof(dudt!), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, SizedMatrix{3, 3, Float64, 2, Matrix{Float64}}, Vector{Float64}}, SciMLBase.UJacobianWrapper{ODEFunction{true, SciMLBase.AutoSpecialize, typeof(dudt!), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, Float64, Vector{Float64}}, LinearSolve.LinearCache{Matrix{Float64}, SizedVector{9, Float64, Vector{Float64}}, SizedVector{9, Float64, Vector{Float64}}, SciMLBase.NullParameters, LUFactorization{LinearAlgebra.RowMaximum}, LinearAlgebra.LU{Float64, Matrix{Float64}, Vector{Int64}}, LinearSolve.InvPreconditioner{LinearAlgebra.Diagonal{Float64, SizedVector{9, Float64, Vector{Float64}}}}, LinearAlgebra.Diagonal{Float64, SizedVector{9, Float64, Vector{Float64}}}, Float64, true, LinearSolve.OperatorCondition.IllConditioned}, SparseDiffTools.ForwardColorJacCache{SizedMatrix{3, 3, ForwardDiff.Dual{ForwardDiff.Tag{DiffEqBase.OrdinaryDiffEqTag, Float64}, Float64, 9}, 2, Matrix{ForwardDiff.Dual{ForwardDiff.Tag{DiffEqBase.OrdinaryDiffEqTag, Float64}, Float64, 9}}}, SizedMatrix{3, 3, ForwardDiff.Dual{ForwardDiff.Tag{DiffEqBase.OrdinaryDiffEqTag, Float64}, Float64, 9}, 2, Matrix{ForwardDiff.Dual{ForwardDiff.Tag{DiffEqBase.OrdinaryDiffEqTag, Float64}, Float64, 9}}}, SizedMatrix{3, 3, Float64, 2, Matrix{Float64}}, Vector{Vector{NTuple{9, Float64}}}, UnitRange{Int64}, Nothing}, SizedMatrix{3, 3, ForwardDiff.Dual{ForwardDiff.Tag{DiffEqBase.OrdinaryDiffEqTag, Float64}, Float64, 1}, 2, Matrix{ForwardDiff.Dual{ForwardDiff.Tag{DiffEqBase.OrdinaryDiffEqTag, Float64}, Float64, 1}}}, Float64, Rodas4{9, true, LUFactorization{LinearAlgebra.RowMaximum}, typeof(OrdinaryDiffEq.DEFAULT_PRECS), Val{:forward}, true, nothing}}) @ OrdinaryDiffEq ~/.julia/packages/OrdinaryDiffEq/xs0Fk/src/perform_step/rosenbrock_perform_step.jl:1033
[10] solve!(integrator::OrdinaryDiffEq.ODEIntegrator{Rodas4{9, true, LUFactorization{LinearAlgebra.RowMaximum}, typeof(OrdinaryDiffEq.DEFAULT_PRECS), Val{:forward}, true, nothing}, true, SizedMatrix{3, 3, Float64, 2, Matrix{Float64}}, Nothing, Float64, Vector{Float64}, Float64, Float64, Float64, Float64, Vector{SizedMatrix{3, 3, Float64, 2, Matrix{Float64}}}, ODESolution{Float64, 3, Vector{SizedMatrix{3, 3, Float64, 2, Matrix{Float64}}}, Nothing, Nothing, Vector{Float64}, Vector{Vector{SizedMatrix{3, 3, Float64, 2, Matrix{Float64}}}}, ODEProblem{SizedMatrix{3, 3, Float64, 2, Matrix{Float64}}, Tuple{Float64, Float64}, true, Vector{Float64}, ODEFunction{true, SciMLBase.AutoSpecialize, typeof(dudt!), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, SciMLBase.StandardODEProblem}, Rodas4{9, true, LUFactorization{LinearAlgebra.RowMaximum}, typeof(OrdinaryDiffEq.DEFAULT_PRECS), Val{:forward}, true, nothing}, OrdinaryDiffEq.InterpolationData{ODEFunction{true, SciMLBase.AutoSpecialize, typeof(dudt!), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, Vector{SizedMatrix{3, 3, Float64, 2, Matrix{Float64}}}, Vector{Float64}, Vector{Vector{SizedMatrix{3, 3, Float64, 2, Matrix{Float64}}}}, OrdinaryDiffEq.Rodas4Cache{SizedMatrix{3, 3, Float64, 2, Matrix{Float64}}, SizedMatrix{3, 3, Float64, 2, Matrix{Float64}}, SizedMatrix{3, 3, Float64, 2, Matrix{Float64}}, Matrix{Float64}, Matrix{Float64}, OrdinaryDiffEq.RodasTableau{Float64, Float64}, SciMLBase.TimeGradientWrapper{ODEFunction{true, SciMLBase.AutoSpecialize, typeof(dudt!), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, SizedMatrix{3, 3, Float64, 2, Matrix{Float64}}, Vector{Float64}}, SciMLBase.UJacobianWrapper{ODEFunction{true, SciMLBase.AutoSpecialize, typeof(dudt!), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, Float64, Vector{Float64}}, LinearSolve.LinearCache{Matrix{Float64}, SizedVector{9, Float64, Vector{Float64}}, SizedVector{9, Float64, Vector{Float64}}, SciMLBase.NullParameters, LUFactorization{LinearAlgebra.RowMaximum}, LinearAlgebra.LU{Float64, Matrix{Float64}, Vector{Int64}}, LinearSolve.InvPreconditioner{LinearAlgebra.Diagonal{Float64, SizedVector{9, Float64, Vector{Float64}}}}, LinearAlgebra.Diagonal{Float64, SizedVector{9, Float64, Vector{Float64}}}, Float64, true, LinearSolve.OperatorCondition.IllConditioned}, SparseDiffTools.ForwardColorJacCache{SizedMatrix{3, 3, ForwardDiff.Dual{ForwardDiff.Tag{DiffEqBase.OrdinaryDiffEqTag, Float64}, Float64, 9}, 2, Matrix{ForwardDiff.Dual{ForwardDiff.Tag{DiffEqBase.OrdinaryDiffEqTag, Float64}, Float64, 9}}}, SizedMatrix{3, 3, ForwardDiff.Dual{ForwardDiff.Tag{DiffEqBase.OrdinaryDiffEqTag, Float64}, Float64, 9}, 2, Matrix{ForwardDiff.Dual{ForwardDiff.Tag{DiffEqBase.OrdinaryDiffEqTag, Float64}, Float64, 9}}}, SizedMatrix{3, 3, Float64, 2, Matrix{Float64}}, Vector{Vector{NTuple{9, Float64}}}, UnitRange{Int64}, Nothing}, SizedMatrix{3, 3, ForwardDiff.Dual{ForwardDiff.Tag{DiffEqBase.OrdinaryDiffEqTag, Float64}, Float64, 1}, 2, Matrix{ForwardDiff.Dual{ForwardDiff.Tag{DiffEqBase.OrdinaryDiffEqTag, Float64}, Float64, 1}}}, Float64, Rodas4{9, true, LUFactorization{LinearAlgebra.RowMaximum}, typeof(OrdinaryDiffEq.DEFAULT_PRECS), Val{:forward}, true, nothing}}}, DiffEqBase.Stats, Nothing}, ODEFunction{true, SciMLBase.AutoSpecialize, typeof(dudt!), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, OrdinaryDiffEq.Rodas4Cache{SizedMatrix{3, 3, Float64, 2, Matrix{Float64}}, SizedMatrix{3, 3, Float64, 2, Matrix{Float64}}, SizedMatrix{3, 3, Float64, 2, Matrix{Float64}}, Matrix{Float64}, Matrix{Float64}, OrdinaryDiffEq.RodasTableau{Float64, Float64}, SciMLBase.TimeGradientWrapper{ODEFunction{true, SciMLBase.AutoSpecialize, typeof(dudt!), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, SizedMatrix{3, 3, Float64, 2, Matrix{Float64}}, Vector{Float64}}, SciMLBase.UJacobianWrapper{ODEFunction{true, SciMLBase.AutoSpecialize, typeof(dudt!), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, Float64, Vector{Float64}}, LinearSolve.LinearCache{Matrix{Float64}, SizedVector{9, Float64, Vector{Float64}}, SizedVector{9, Float64, Vector{Float64}}, SciMLBase.NullParameters, LUFactorization{LinearAlgebra.RowMaximum}, LinearAlgebra.LU{Float64, Matrix{Float64}, Vector{Int64}}, LinearSolve.InvPreconditioner{LinearAlgebra.Diagonal{Float64, SizedVector{9, Float64, Vector{Float64}}}}, LinearAlgebra.Diagonal{Float64, SizedVector{9, Float64, Vector{Float64}}}, Float64, true, LinearSolve.OperatorCondition.IllConditioned}, SparseDiffTools.ForwardColorJacCache{SizedMatrix{3, 3, ForwardDiff.Dual{ForwardDiff.Tag{DiffEqBase.OrdinaryDiffEqTag, Float64}, Float64, 9}, 2, Matrix{ForwardDiff.Dual{ForwardDiff.Tag{DiffEqBase.OrdinaryDiffEqTag, Float64}, Float64, 9}}}, SizedMatrix{3, 3, ForwardDiff.Dual{ForwardDiff.Tag{DiffEqBase.OrdinaryDiffEqTag, Float64}, Float64, 9}, 2, Matrix{ForwardDiff.Dual{ForwardDiff.Tag{DiffEqBase.OrdinaryDiffEqTag, Float64}, Float64, 9}}}, SizedMatrix{3, 3, Float64, 2, Matrix{Float64}}, Vector{Vector{NTuple{9, Float64}}}, UnitRange{Int64}, Nothing}, SizedMatrix{3, 3, ForwardDiff.Dual{ForwardDiff.Tag{DiffEqBase.OrdinaryDiffEqTag, Float64}, Float64, 1}, 2, Matrix{ForwardDiff.Dual{ForwardDiff.Tag{DiffEqBase.OrdinaryDiffEqTag, Float64}, Float64, 1}}}, Float64, Rodas4{9, true, LUFactorization{LinearAlgebra.RowMaximum}, typeof(OrdinaryDiffEq.DEFAULT_PRECS), Val{:forward}, true, nothing}}, OrdinaryDiffEq.DEOptions{Float64, Float64, Float64, Float64, PIController{Rational{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{}, Float64, Tuple{}}, SizedMatrix{3, 3, Float64, 2, Matrix{Float64}}, Float64, Nothing, OrdinaryDiffEq.DefaultInit}) @ OrdinaryDiffEq ~/.julia/packages/OrdinaryDiffEq/xs0Fk/src/solve.jl:520
[11] #__solve#640 @ ~/.julia/packages/OrdinaryDiffEq/xs0Fk/src/solve.jl:6 [inlined]
[12] __solve @ ~/.julia/packages/OrdinaryDiffEq/xs0Fk/src/solve.jl:1 [inlined]
[13] #solve_call#22 @ ~/.julia/packages/DiffEqBase/ihYDa/src/solve.jl:509 [inlined]
[14] solve_call @ ~/.julia/packages/DiffEqBase/ihYDa/src/solve.jl:479 [inlined]
[15] #solve_up#29 @ ~/.julia/packages/DiffEqBase/ihYDa/src/solve.jl:932 [inlined]
[16] solve_up @ ~/.julia/packages/DiffEqBase/ihYDa/src/solve.jl:905 [inlined]
[17] #solve#27 @ ~/.julia/packages/DiffEqBase/ihYDa/src/solve.jl:842 [inlined]
[18] top-level scope @ ~/src/2022/rude/giesekus/GE_rude.jl/alex_report_code_2023-03-24/julia19/giesekus_opt_3x3:24
I am running Julia 1.9. The error does not occur when using Tsit5
.
More specifically, the error occurs in :
perform_step!(integrator::OrdinaryDiffEq.ODEIntegrator{Rodas4{9, true, LUFactor ...