@@ -21,21 +21,21 @@ function expand_derivatives(O::Operation)
2121 D = O. op
2222 o = O. args[1 ]
2323 isa (o, Operation) || return O
24- return simplify_constants (sum (i-> Derivative (o,i)* expand_derivatives (D (o. args[i])),1 : length (o. args)))
24+ return simplify_constants (sum (i-> derivative (o,i)* expand_derivatives (D (o. args[i])),1 : length (o. args)))
2525 end
2626
2727 return O
2828end
2929expand_derivatives (x) = x
3030
3131# Don't specialize on the function here
32- Derivative (O:: Operation , idx) = Derivative (O. op, (O. args... ,), Val (idx))
32+ derivative (O:: Operation , idx) = derivative (O. op, (O. args... ,), Val (idx))
3333
3434# Pre-defined derivatives
3535import DiffRules, SpecialFunctions, NaNMath
3636for (modu, fun, arity) ∈ DiffRules. diffrules ()
3737 for i ∈ 1 : arity
38- @eval function Derivative (:: typeof ($ modu.$ fun), args:: NTuple{$arity,Any} , :: Val{$i} )
38+ @eval function derivative (:: typeof ($ modu.$ fun), args:: NTuple{$arity,Any} , :: Val{$i} )
3939 M, f = $ (modu, fun)
4040 partials = DiffRules. diffrule (M, f, args... )
4141 dx = @static $ arity == 1 ? partials : partials[$ i]
@@ -60,7 +60,7 @@ function _differential_macro(x)
6060 lhss = Symbol[]
6161 x = flatten_expr! (x)
6262 for di in x
63- @assert di isa Expr && di. args[1 ] == :~ " @Deriv expects a form that looks like `@Deriv D''~t E'~t`"
63+ @assert di isa Expr && di. args[1 ] == :~ " @deriv expects a form that looks like `@deriv D''~t E'~t`"
6464 lhs = di. args[2 ]
6565 rhs = di. args[3 ]
6666 order, lhs = count_order (lhs)
@@ -72,12 +72,12 @@ function _differential_macro(x)
7272 ex
7373end
7474
75- macro Deriv (x... )
75+ macro deriv (x... )
7676 esc (_differential_macro (x))
7777end
7878
7979function calculate_jacobian (eqs,vars)
8080 Expression[Differential (vars[j])(eqs[i]) for i in 1 : length (eqs), j in 1 : length (vars)]
8181end
8282
83- export Differential, expand_derivatives, @Deriv , calculate_jacobian
83+ export Differential, expand_derivatives, @deriv , calculate_jacobian
0 commit comments