Skip to content

Commit 393af60

Browse files
refactor: mark sparse form of SemilinearODEProblem as unavailable
1 parent 5619120 commit 393af60

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
@@ -176,6 +176,11 @@ end
176176
iip, spec}
177177
check_complete(sys, SemilinearODEProblem)
178178
check_compatibility && check_compatible_system(SemilinearODEProblem, sys)
179+
if sparse
180+
error("""
181+
The sparse form for `SemilinearODEProblem` is currently unavailable.
182+
""")
183+
end
179184

180185
A, B, C = semiquadratic_form = calculate_semiquadratic_form(sys; sparse)
181186
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)