I'm trying to contract two tensors that I made in xAct to get a simple result. First I set up a Cartesian space

DefManifold[M, 3, {i, j, k, l, m, n}];
DefChart[ch, M, {1, 2, 3}, {x[], y[], z[]}, ChartColor -> Black];
met = CTensor[IdentityMatrix[3], {-ch, -ch}];
SetCMetric[met, ch, SignatureOfMetric -> {3, 0, 0}];

(*define a CTensor and a regular symmetric tensor*)
r = CTensor[{x[], y[], z[]}, {ch}];
DefTensor[S[-i, -j], M, Symmetric[{-i, -j}]]


I expected $S_{11}x^2+\dots$ but it refuses to contract. How do I get the desired result?


1 Answer 1


I answered this question myself while asking it. I have not defined a co-ordinate system for $S$. Doing so requires converting to a CTensor

Sp = ToCTensor[S, {-ch, -ch}]



Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.