Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sundials and SecondOrderODEProblem (OrdinaryDiffEq) not compatible #353

Open
magix2 opened this issue Jan 27, 2021 · 0 comments
Open

Sundials and SecondOrderODEProblem (OrdinaryDiffEq) not compatible #353

magix2 opened this issue Jan 27, 2021 · 0 comments

Comments

@magix2
Copy link

magix2 commented Jan 27, 2021

To reproduce the problem:

using OrdinaryDiffEq
ω = 1
x₀ = [0.0]
dx₀ =/2]
tspan = (0.0, 2π)

function harmonic_oscillator(ddu,du,u,ω,t)
    ddu .= -ω^2 * u
end

prob = SecondOrderODEProblem(harmonic_oscillator, dx₀, x₀, tspan, ω)

#Tsit 5 works
sol = solve(prob, Tsit5())

using Sundials
# error using CVODE_BDF
sol = solve(prob, CVODE_BDF())

Error:

ERROR: LoadError: MethodError: Cannot `convert` an object of type Array{Float64,1} to an object of type RecursiveArrayTools.ArrayPartition{Float64,Tuple{Array{Float64,1},Array{Float64,1}}}

Current workaround: Formulate the problem as an ODEProblem

@ChrisRackauckas ChrisRackauckas transferred this issue from SciML/OrdinaryDiffEq.jl Apr 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant