Skip to content

Commit

Permalink
Allow derivatives to work even if the symbol they're acting on hasn't…
Browse files Browse the repository at this point in the history
… been defined as a tensor
  • Loading branch information
barrywardell committed Mar 7, 2014
1 parent e3c0992 commit 95d6782
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Tools/CodeGen/xTensorKranc.m
Expand Up @@ -185,6 +185,8 @@
pd_?CovDQ[i__][pd_?CovDQ[j__][t_]] :> pd[j, i][t],
nd_[pd_?CovDQ[i : (_?CIndexQ ..)][t_?xTensorQ[inds___]]] :>
NumericalDiscretisation[nd][krancForm[t[inds]], Sequence @@ ({i}[[All, 1]])],
nd_[pd_?CovDQ[i : (_?CIndexQ ..)][t_Symbol]] :>
NumericalDiscretisation[nd][krancForm[t], Sequence @@ ({i}[[All, 1]])],
t_Symbol?xTensorQ[i : (_?CIndexQ ..)] :>
SymbolJoin[t, Sequence @@ ToString /@ {i}[[All, 1]]],
t_Symbol?xTensorQ[] :> t
Expand Down

0 comments on commit 95d6782

Please sign in to comment.