Hi,
I wonder if anyone can help. I am trying to evaluate variations with respect to the metric for specific metrics. I can calculate them in general using XTensor and VarL:
VarL[metric[-a, -b], cd][Expression]
but once I specify a metric using CTensor I can't use VarL anymore. So that's fine, I can copy across the expressions I get, like
-Riccicd[a, b] + (metric[a, b]*RicciScalarcd[])/2
But this is not the right form for CTensor calculations, I need to change things as in
CTensorconvert = {Riccicd -> Ricci[cd],
RicciScalarcd[] -> RicciScalar[cd][], Riccicd -> Ricci[cd]}
But while this seems to work sometimes, for things that require contraction of indices I get nonsense, even though the answer is simple if I simply rewrite them by hand:
metric[a, c] metric[b, d] Riccicd[-c, -d] RicciScalarcd[]^3 /. CTensorconvert
does not give the expected
metric[a, c]metric[b, d]Ricci[cd][-c, -d] RicciScalar[cd][]^3
I must be doing something wrong - can anyone help? Alternatively is there a way to use VarL with CTensor?
Many thanks
Rhiannon