Skip to content

Commit 2d62c86

Browse files
Merge pull request #2607 from vyudu/discrete
Use `AbstractDiscreteProblem` instead of `DiscreteProblem` in `solve`
2 parents 0933fe9 + 10b62aa commit 2d62c86

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

lib/OrdinaryDiffEqCore/src/solve.jl

+6-6
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ function DiffEqBase.__init(
8989
if any(mm != I for mm in prob.f.mass_matrix)
9090
error("This solver is not able to use mass matrices. For compatible solvers see https://docs.sciml.ai/DiffEqDocs/stable/solvers/dae_solve/")
9191
end
92-
elseif !(prob isa DiscreteProblem) &&
92+
elseif !(prob isa SciMLBase.AbstractDiscreteProblem) &&
9393
!(prob isa DiffEqBase.AbstractDAEProblem) &&
9494
!is_mass_matrix_alg(alg) &&
9595
prob.f.mass_matrix != I
@@ -135,7 +135,7 @@ function DiffEqBase.__init(
135135
throw(ArgumentError("Fixed timestep methods can not be run with adaptive=true"))
136136
end
137137

138-
isdae = alg isa DAEAlgorithm || (!(prob isa DiscreteProblem) &&
138+
isdae = alg isa DAEAlgorithm || (!(prob isa SciMLBase.AbstractDiscreteProblem) &&
139139
prob.f.mass_matrix != I &&
140140
!(prob.f.mass_matrix isa Tuple) &&
141141
ArrayInterface.issingular(prob.f.mass_matrix))
@@ -230,7 +230,7 @@ function DiffEqBase.__init(
230230
uEltypeNoUnits = recursive_unitless_eltype(u)
231231
tTypeNoUnits = typeof(one(tType))
232232

233-
if prob isa DiscreteProblem
233+
if prob isa SciMLBase.AbstractDiscreteProblem
234234
abstol_internal = false
235235
elseif abstol === nothing
236236
if uBottomEltypeNoUnits == uBottomEltype
@@ -244,7 +244,7 @@ function DiffEqBase.__init(
244244
abstol_internal = real.(abstol)
245245
end
246246

247-
if prob isa DiscreteProblem
247+
if prob isa SciMLBase.AbstractDiscreteProblem
248248
reltol_internal = false
249249
elseif reltol === nothing
250250
if uBottomEltypeNoUnits == uBottomEltype
@@ -379,7 +379,7 @@ function DiffEqBase.__init(
379379

380380
QT, EEstT = if tTypeNoUnits <: Integer
381381
typeof(qmin), typeof(qmin)
382-
elseif prob isa DiscreteProblem
382+
elseif prob isa SciMLBase.AbstractDiscreteProblem
383383
# The QT fields are not used for DiscreteProblems
384384
constvalue(tTypeNoUnits), constvalue(tTypeNoUnits)
385385
else
@@ -520,7 +520,7 @@ function DiffEqBase.__init(
520520
do_error_check = true
521521
event_last_time = 0
522522
vector_event_last_time = 1
523-
last_event_error = prob isa DiscreteProblem ? false :
523+
last_event_error = prob isa SciMLBase.AbstractDiscreteProblem ? false :
524524
(Base.isbitstype(uBottomEltypeNoUnits) ? zero(uBottomEltypeNoUnits) :
525525
0.0)
526526
dtchangeable = isdtchangeable(_alg)

0 commit comments

Comments
 (0)