Skip to content

Commit f6cea4a

Browse files
committed
Relax the test
1 parent c262fae commit f6cea4a

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/systems/nonlinear/nonlinearsystem.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ function NonlinearFunctionExpr{iip}(sys::NonlinearSystem, dvs = states(sys),
257257
_jac = :nothing
258258
end
259259

260-
jp_expr = sparse ? :(similar($(sys.jac[]),Float64)) : :nothing
260+
jp_expr = sparse ? :(similar($(get_jac(sys)[]),Float64)) : :nothing
261261

262262
ex = quote
263263
f = $f

test/structural_transformation/index_reduction.jl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,5 +148,6 @@ p = [
148148
g => 9.8
149149
]
150150

151-
prob_auto = DAEProblem(sys,zeros(length(u0)),u0,(0.0,10.0),p)
152-
@test_nowarn solve(prob_auto, DFBDF())
151+
prob_auto = DAEProblem(sys,zeros(length(u0)),u0,(0.0,0.2),p)
152+
sol = solve(prob_auto, DFBDF())
153+
@test norm(sol[x].^2 + sol[y].^2 .- 1) < 1e-2

0 commit comments

Comments
 (0)