Skip to content

Commit 993e978

Browse files
test: adjoint no longer ODESolution
1 parent fb83768 commit 993e978

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/downstream/adjoints.jl

+2-2
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ idx_vecsym = SymbolicIndexingInterface.variable_index.(Ref(sys), [lorenz1.x, lor
5252
true_grad_vecsym = zeros(length(ModelingToolkit.unknowns(sys)))
5353
true_grad_vecsym[idx_vecsym] .= 1.0
5454

55-
@test all(map(x -> x == true_grad_vecsym, gs_vec))
55+
@test all(map(x -> x == true_grad_vecsym, gs_vec.u))
5656

5757
gs_tup, = Zygote.gradient(sol) do sol
5858
sum(sum.(collect.(sol[(lorenz1.x, lorenz2.x)])))
@@ -61,7 +61,7 @@ idx_tupsym = SymbolicIndexingInterface.variable_index.(Ref(sys), [lorenz1.x, lor
6161
true_grad_tupsym = zeros(length(ModelingToolkit.unknowns(sys)))
6262
true_grad_tupsym[idx_tupsym] .= 1.0
6363

64-
@test all(map(x -> x == true_grad_tupsym, gs_tup))
64+
@test all(map(x -> x == true_grad_tupsym, gs_tup.u))
6565

6666
gs_ts, = Zygote.gradient(sol) do sol
6767
sum(sum.(sol[[lorenz1.x, lorenz2.x], :]))

0 commit comments

Comments
 (0)