Skip to content

Commit

Permalink
Add support for DefineDerivative with two arguments to TensorTools
Browse files Browse the repository at this point in the history
  • Loading branch information
barrywardell committed Mar 11, 2014
1 parent 8b42593 commit d83c700
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Tools/CodeGen/TensorTools.m
Expand Up @@ -292,6 +292,8 @@
TensorAttributes[T] = {TensorWeight -> 0, Symmetries -> {}};
T];

DefineDerivative[pd_, nd_] := (pd = nd; DefineDerivative[nd]);

DefineDerivative[pd_Symbol] :=
If[!DerivativeOperatorQ[pd], AppendTo[$Derivatives, pd]];

Expand Down

0 comments on commit d83c700

Please sign in to comment.