Skip to content

Commit 82dcaac

Browse files
Merge pull request #1047 from SciML/ChrisRackauckas-patch-2
Uncomment parameter observables_autodiff.jl part
2 parents 80a0fb7 + d6d2e85 commit 82dcaac

File tree

1 file changed

+12
-13
lines changed

1 file changed

+12
-13
lines changed

test/downstream/observables_autodiff.jl

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -117,16 +117,15 @@ end
117117
end
118118
end
119119

120-
# @testset "Adjoints with DAE" begin
121-
# gs_mtkp, gs_p_new = gradient(prob.p, prob.p.tunable) do p, new_tunables
122-
# new_p = SS.replace(SS.Tunable(), p, new_tunables)
123-
# new_prob = remake(prob, p = new_p)
124-
# sol = solve(new_prob, Rodas4())
125-
# @show size(sol)
126-
# # mean(abs.(sol[sys.ampermeter.i] .- gt))
127-
# sum(sol[sys.ampermeter.i])
128-
# end
129-
#
130-
# @test isnothing(gs_mtkp)
131-
# @test length(gs_p_new) == length(p_new)
132-
# end
120+
@testset "Adjoints with DAE" begin
121+
gs_mtkp, gs_p_new = gradient(prob.p, prob.p.tunable) do p, new_tunables
122+
new_p = SS.replace(SS.Tunable(), p, new_tunables)
123+
new_prob = remake(prob, p = new_p)
124+
sol = solve(new_prob, Rodas4())
125+
mean(abs.(sol[sys.ampermeter.i] .- gt))
126+
sum(sol[sys.ampermeter.i])
127+
end
128+
129+
@test isnothing(gs_mtkp)
130+
@test length(gs_p_new) == length(p_new)
131+
end

0 commit comments

Comments
 (0)