3
$\begingroup$

I do not understand why the output of the two commands:

metric[-c, -d] (CD[d][RicciScalar[CD][]]) (CD[c][RicciScalar[CD][]]) // Simplify,

(CD[-c][RicciScalar[CD][]]) (CD[c][RicciScalar[CD][]]) // Simplify,

is different. The first one outputs a scalar function, as expected, whereas the second gives an expression

enter image description here

that I do not know how to contract.

$\endgroup$
1
  • 1
    $\begingroup$ Can you provide a minimal version of your code that reproduces the error when run on a "clean" kernel? It may help in tracking down the problem. $\endgroup$ Commented Oct 8, 2021 at 19:47

1 Answer 1

3
$\begingroup$

You have a product of a Basis[-c, {1, B}], for some basis B, and a CTensor[comps, {B}][c] object.

You can use ContractBasis to force the contraction of a Basis[...] object with anything.

Or you can use FromBasisExpand to convert a Basis[...] object into a CTensor object, and the two CTensor objects will then be automatically contracted.

$\endgroup$
1
  • 1
    $\begingroup$ Oh wow, this is the guy that made the package :o I'm wondering if you've answered my questions in the past :D $\endgroup$
    – akozi
    Commented Jan 13, 2023 at 17:58

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.