Skip to content

Commit

Permalink
Make TensorTools style indices work with xTensor interface
Browse files Browse the repository at this point in the history
  • Loading branch information
barrywardell committed Mar 6, 2014
1 parent 3d333bf commit bfbc669
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Tools/CodeGen/xTensorKranc.m
Expand Up @@ -30,6 +30,10 @@
pd::usage = "pd[t, i] represents the i component of the partial derivative of the tensor t.";

$KrancIndices = Symbol /@ CharacterRange["a", "q"];
Do[
Evaluate[Symbol["l"<>ToString[ind]]] = -ind;
Evaluate[Symbol["u"<>ToString[ind]]] = ind;
, {ind, $KrancIndices}];

Begin["`Private`"];

Expand Down

0 comments on commit bfbc669

Please sign in to comment.