Skip to content

Commit 5ad8691

Browse files
committed
Set checkbounds=true in tests that call iip J and W with invalid sparse matrices
1 parent 9ea5906 commit 5ad8691

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/jacobiansparsity.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ prob = ODEProblem(sys, u0, (0, 11.5), sparse = true, jac = true)
108108
u0 = [x => 1, y => 0]
109109
prob = ODEProblem(
110110
pend, [u0; [g => 1]], (0, 11.5), guesses ==> 1], sparse = true, jac = true)
111-
jac, jac! = generate_jacobian(pend; expression = Val{false}, sparse = true)
111+
jac, jac! = generate_jacobian(pend; expression = Val{false}, sparse = true, checkbounds = true)
112112
jac_prototype = ModelingToolkit.jacobian_sparsity(pend)
113113
W_prototype = ModelingToolkit.W_sparsity(pend)
114114
@test nnz(W_prototype) == nnz(jac_prototype) + 2
@@ -121,7 +121,7 @@ prob = ODEProblem(sys, u0, (0, 11.5), sparse = true, jac = true)
121121
t = 0.0
122122
@test_throws AssertionError jac!(similar(jac_prototype, Float64), u, p, t)
123123

124-
W, W! = generate_W(pend; expression = Val{false}, sparse = true)
124+
W, W! = generate_W(pend; expression = Val{false}, sparse = true, checkbounds = true)
125125
γ = 0.1
126126
M = sparse(calculate_massmatrix(pend))
127127
@test_throws AssertionError W!(similar(jac_prototype, Float64), u, p, γ, t)

0 commit comments

Comments
 (0)