Skip to content

Commit 3bf1d81

Browse files
Fix DefaultInit references in solve.jl
- Changed DiffEqBase.DefaultInit() to DefaultInit() - This uses the local temporary definitions until DiffEqBase 6.190.2 is available
1 parent 37a17be commit 3bf1d81

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

src/common_interface/solve.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ function DiffEqBase.__init(prob::DiffEqBase.AbstractODEProblem{uType, tupType, i
128128
stop_at_next_tstop = false,
129129
userdata = nothing,
130130
alias_u0 = false,
131-
initializealg = DiffEqBase.DefaultInit(),
131+
initializealg = DefaultInit(),
132132
kwargs...) where {uType, tupType, isinplace, Method, LinearSolver
133133
}
134134
tType = eltype(tupType)
@@ -507,7 +507,7 @@ function DiffEqBase.__init(prob::DiffEqBase.AbstractODEProblem{uType, tupType, i
507507
stop_at_next_tstop = false,
508508
userdata = nothing,
509509
alias_u0 = false,
510-
initializealg = DiffEqBase.DefaultInit(),
510+
initializealg = DefaultInit(),
511511
kwargs...) where {uType, tupType, isinplace, Method,
512512
LinearSolver,
513513
MassLinearSolver}

test_basic.jl

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
using Pkg
2+
Pkg.instantiate()
3+
using Sundials
4+
5+
function lorenz(du, u, p, t)
6+
du[1] = 10.0(u[2] - u[1])
7+
du[2] = u[1] * (28.0 - u[3]) - u[2]
8+
du[3] = u[1] * u[2] - (8/3) * u[3]
9+
end
10+
11+
using SciMLBase
12+
prob = ODEProblem(lorenz, [1.0; 0.0; 0.0], (0.0, 1.0))
13+
sol = solve(prob, CVODE_BDF())
14+
println("Success! Solution at t=0.5: ", sol(0.5))

0 commit comments

Comments
 (0)