-
-
Notifications
You must be signed in to change notification settings - Fork 68
Closed
Description
Note the use of ArrayPartition
below
julia> using DifferentialEquations,RecursiveArrayTools
julia> function lorenz(du,u,p,t)
du[1] = 10.0*(u[2]-u[1])
du[2] = u[1]*(28.0-u[3]) - u[2]
du[3] = u[1]*u[2] - (8/3)*u[3]
end
lorenz (generic function with 1 method)
julia> u0 = ArrayPartition([1.0,0.0],[0.0])
([1.0, 0.0], [0.0])
julia> tspan = (0.0,100.0)
(0.0, 100.0)
julia> prob = ODEProblem(lorenz,u0,tspan)
ODEProblem with uType ArrayPartition{Float64,Tuple{Array{Float64,1},Array{Float64,1}}} and tType Float64. In-place: true
timespan: (0.0, 100.0)
u0: [1.0, 0.0][0.0]
julia> sol = solve(prob,Tsit5());
julia> sol = solve(prob,AutoTsit5(Rosenbrock23()));
ERROR: MethodError: no method matching ldiv!(::LinearAlgebra.LU{Float64,Array{Float64,2}}, ::ArrayPartition{Float64,Tuple{Array{Float64,1},Array{Float64,1}}})
Closest candidates are:
ldiv!(::LinearAlgebra.Transpose{#s561,#s560} where #s560<:LinearAlgebra.LowerTriangular where #s561, ::AbstractArray{T,1} where T) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/LinearAlgebra/src/triangular.jl:1217
ldiv!(::LinearAlgebra.Transpose{#s561,#s560} where #s560<:LinearAlgebra.LowerTriangular where #s561, ::AbstractArray{T,1} where T, ::AbstractArray{T,1} where T) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/LinearAlgebra/src/triangular.jl:1201
ldiv!(::LinearAlgebra.Transpose{#s561,#s560} where #s560<:LinearAlgebra.UnitLowerTriangular where #s561, ::AbstractArray{T,1} where T) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/LinearAlgebra/src/triangular.jl:1235
...
(Everything works fine without ArrayPartition
, i.e. u0 = [1.0, 0.0, 0.0]
)
I'm using DifferentialEquations v5.3.1, RecursiveArrayTools v0.18.3, and Julia 1.0.1 on Ubuntu 16.04.
Metadata
Metadata
Assignees
Labels
No labels