Skip to content

Commit 9d176a7

Browse files
refactor: mark sparse form of SemilinearODEProblem as unavailable
1 parent 0decd0e commit 9d176a7

File tree

2 files changed

+13
-5
lines changed

2 files changed

+13
-5
lines changed

src/problems/odeproblem.jl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,11 @@ end
177177
iip, spec}
178178
check_complete(sys, SemilinearODEProblem)
179179
check_compatibility && check_compatible_system(SemilinearODEProblem, sys)
180+
if sparse
181+
error("""
182+
The sparse form for `SemilinearODEProblem` is currently unavailable.
183+
""")
184+
end
180185

181186
A, B, C = semiquadratic_form = calculate_semiquadratic_form(sys; sparse)
182187
eqs = equations(sys)

test/semilinearodeproblem.jl

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -198,14 +198,17 @@ using ModelingToolkit: t_nounits as t, D_nounits as D
198198
end
199199

200200
@testset "Sparse" begin
201-
prob = SemilinearODEProblem(sys, nothing, tspan; sparse = true, kwargs...)
202-
sol = solve(prob, KenCarp47())
203-
@test SciMLBase.successful_retcode(sol)
204-
@test refsol(sol.t).usol.u atol=1e-8 rtol=1e-8
201+
@test_throws ["sparse form", "unavailable"] SemilinearODEProblem(
202+
sys, nothing, tspan; sparse = true, kwargs...)
203+
@test_skip begin
204+
sol = solve(prob, KenCarp47())
205+
@test SciMLBase.successful_retcode(sol)
206+
@test refsol(sol.t).usol.u atol=1e-8 rtol=1e-8
207+
end
205208
end
206209

207210
@testset "Sparsejac" begin
208-
@test_throws ["not implemented"] SemilinearODEProblem(
211+
@test_throws ["sparse form", "unavailable"] SemilinearODEProblem(
209212
sys, nothing, tspan; jac = true, sparse = true, kwargs...)
210213
end
211214
end

0 commit comments

Comments
 (0)