2
$\begingroup$

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}]]

S[i,j]r[-i]r[-j]

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

$\endgroup$

1 Answer 1

2
$\begingroup$

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}]
Sp[i,j]r[-i]r[-j]

works!

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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