We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8b7b7ae commit 263e2dfCopy full SHA for 263e2df
test/derivatives.jl
@@ -44,3 +44,19 @@ jac = ModelingToolkit.calculate_jacobian(sys)
44
# Variable dependence checking in differentiation
45
@Unknown a(t) b(a)
46
@test D(b) ≠ Constant(0)
47
+
48
49
+# Regression test for PR #84
50
+let
51
+ # Define some variables
52
+ @Param t σ ρ β
53
+ @Unknown x(t) y(t) z(t)
54
55
+ f(x,y,z) = z*x+y
56
+ # This used to seg fault, now raises MethodError
57
+ @test_throws MethodError Derivative(f, x, 1)
58
+ @Deriv D'~t
59
+ op = expand_derivatives(D(f(x,y,z)))
60
+ op.args[1].args[2].name == :z
61
+ op.args[1].args[2].diff.x.name == :t
62
+end
0 commit comments