Bug in calculation of epsilon tensor of metric in CTensor

97 views
Skip to first unread message

Leo Stein

unread,
May 11, 2015, 2:16:10 PM5/11/15
to xAct Tensor Computer Algebra
Hi,

I have just discovered a bug in xCoba. This is in the computation of the epsilon tensor associated to a CTensor metric (by the way, the CTensor approach is so easy compared to the old way :)

In xCoba.nb, Sec. 4.4.3, we have the code:
(computation : epsilon[CTensor[matrix_?MatrixQ, {-basis_, -basis_},
      addweight_]]) ^:= xCobaCache[
   computation,
   With[{dim = Length[matrix]},
    CTensor[Sqrt[Det[matrix]] LeviCivitaTensor[dim],
     ConstantArray[-basis, {dim}], addweight]
    ] ];
The important thing to note is the factor of Sqrt[Det[matrix]]. Currently this only makes sense for a Riemannian metric. If however we have a Lorentzian metric (or a degenerate metric?) then this expression will be incorrect.

Perhaps a quick fix for now would be to use Sqrt@Abs@Det@matrix.

A slightly better approach would be to give a definition to 
  SignDetOfMetric[CTensor[...]].
Currently, SignDetOfMetric will complain if you feed it a CTensor metric. It might in general be complicated to automatically determine the sign from a complicated coordinate expression ... but it should at least be possible for the user to specify what the signature is. That could be an option in SetCMetric, for example, which would then assign a value to SignDetOfMetric[met].

Cheers
Leo

Jose

unread,
Feb 25, 2018, 2:10:36 PM2/25/18
to xAct Tensor Computer Algebra
Hi Leo,

This was fixed by defining SignDetOfMetric and SignatureOfMetric on CTensor metrics, and then multiplying Det[metric] by SignDetOfMetric[metric].

This fix will be available in the next version of xCoba.

Cheers,
Jose.
Reply all
Reply to author
Forward
0 new messages