Skip to content

Commit a1a6d5d

Browse files
committed
Use sol[capacitor.v] rather than sol.u directly
Tearing could choose to solve for `-v` instead of `v`, so use the observable API rather than assuming what tearing does.
1 parent f7caceb commit a1a6d5d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/Electrical/analog.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ end
189189
sol = solve(prob, Tsit5())
190190
y(x, st) = (x .> st) .* abs.(collect(x) .- st)
191191
@test sol.retcode == Success
192-
@test sum(reduce(vcat, sol.u) .- y(sol.t, start_time))0 atol=1e-2
192+
@test sum(reduce(vcat, sol[capacitor.v]) .- y(sol.t, start_time))0 atol=1e-2
193193
end
194194

195195
@testset "Integrator" begin

0 commit comments

Comments
 (0)