From f966e37ae73fff7821176e18bd76a97a491bb56e Mon Sep 17 00:00:00 2001 From: Chris Rackauckas Date: Fri, 21 Jan 2022 16:15:12 -0500 Subject: [PATCH] require ODEProblem --- src/alg_utils.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/alg_utils.jl b/src/alg_utils.jl index 7b9326181d..6c3a767ce1 100644 --- a/src/alg_utils.jl +++ b/src/alg_utils.jl @@ -167,8 +167,8 @@ function DiffEqBase.prepare_alg(alg::Union{OrdinaryDiffEqAdaptiveImplicitAlgorit (prob.f isa SplitFunction && prob.f.f1 isa SciMLBase.AbstractDiffEqOperator) linsolve = LinearSolve.defaultalg(prob.f.f,u0) - elseif prob.f.mass_matrix === nothing || (prob.f.mass_matrix !== nothing && - typeof(prob.f.mass_matrix) == prob.f.jac_prototype) + elseif prob isa ODEProblem && (prob.f.mass_matrix === nothing || (prob.f.mass_matrix !== nothing && + typeof(prob.f.mass_matrix) == prob.f.jac_prototype)) linsolve = LinearSolve.defaultalg(prob.f.jac_prototype,u0) else # If mm is a sparse matrix and A is a DiffEqArrayOperator, then let linear