#19823: Addcode for computation of the Schouten, Cotton, and Cotton-York 
tensors of
a riemannian metric
-------------------------------------+-------------------------------------
       Reporter:  pang               |        Owner:  pang
           Type:  enhancement        |       Status:  needs_work
       Priority:  trivial            |    Milestone:
      Component:  geometry           |   Resolution:
       Keywords:  differentiable     |    Merged in:
  manifold, Riemannian metric,       |    Reviewers:  Eric Gourgoulhon
  Cotton tensor, Cotton-York         |  Work issues:
  tensor, Schouten tensor            |       Commit:
        Authors:  pang               |  99edbe55fa1793f1db80c11c129716d96794bd08
Report Upstream:  N/A                |     Stopgaps:
         Branch:                     |
  public/manifolds/Schouten_Cotton_York|
   Dependencies:  #19209             |
-------------------------------------+-------------------------------------
Changes (by egourgoulhon):

 * status:  needs_review => needs_work


Comment:

 The introduction of a class attribute for the derived objects is a good
 idea! However, I would suggest that its name is changed from
 `DERIVED_OBJECTS` to `_derived_objects`. Indeed, it seems that in Sage,
 capital letters are not used for attributes. Moreover, the heading
 underscore indicates a "private" attribute, not exposed to a tab search.
 Otherwise, a user searching for some derivative via `g.der` + TAB, might
 find this attribute.

 Here are some remarks about each of the three tensors:

 - '''Schouten tensor:'''
   The LaTeX formula defining the Schouten tensor in the documentation
 should
   use the same notations than in the rest of the documentation of class
 `PseudoRiemannianMetric`:
   Ricci should be denoted by 'Ric' (cf. method `ricci`) and the Ricci
 scalar should be denoted by
   'r', not by 's' (cf. method `ricci_scalar`)

 - '''Cotton tensor:'''
   The LaTeX formula defining the Cotton tensor in the documentation is not
   correct: it should be
   {{{
    C_{ijk} = \nabla_k S_{ij} - \nabla_j S_{ik}
   }}}
   (the Cotton tensor is antisymmetric in its last two indices).
   Besides, in the code, the line
   {{{
   cot = nabla(s).antisymmetrize(0,2)
   }}}
   must be replaced by
   {{{
   cot = 2 * nabla(s).antisymmetrize(1,2)
   }}}
   Indeed, the convention for the index positions of a covariant derivative
 is
   `(nabla(s))_{ijk} = \nabla_k s_{ij}`, i.e. the derivation index is the
 last one, cf. the note
   at
 
http://sagemanifolds.obspm.fr/doc/19209/reference/manifolds/sage/manifolds/differentiable/affine_connection.html
 . Note also the factor 2 to compensate for the 1/2 factor introduced by
 the
   antisymmetrization.
   Besides, I have the impression that in the literature, the Cotton tensor
   is generaly defined by
   {{{
   C_{ijk} = (n-2) ( \nabla_k S_{ij} - \nabla_j S_{ik} )
   }}}
   i.e. it differs from your definition by a factor n-2, cf. for instance
   https://en.wikipedia.org/wiki/Cotton_tensor.
   Of course in dimension 3, both definitions coincide, but could you
 please
   check the literature for n > 3 ?

 - '''Cotton-York tensor:'''
   Since in the rest of the documentation, $\epsilon$ stands for the Levi-
 Civita
   tensor (cf. the method `volume_form`), there should be no $\sqrt{\det
 g}$ in the LaTeX formula
   defining the Cotton-York tensor. Moreover, the indices seem ill-placed;
 the
   correct formula is (cf. Eq. (4) in York's paper, Phys. Rev. Lett.
 '''26''', 1656 (1971)
   or https://en.wikipedia.org/wiki/Cotton_tensor)
   {{{
    CY_{ij} = \frac{1}{2} \epsilon^{kl}_{\quad i} C_{jlk}
            = \epsilon^{kl}_{\quad i} \nabla_k S_{lj}
   }}}
   Accordingly, in the code, the ligne
   {{{
   cy = -cot.contract(0,2,eps,0,1)
   }}}
   must be replaced by
   {{{
   cy = (1/2) * eps.contract(0, 1, cot, 2, 1)
   }}}
   Besides, the test
   {{{
    if n < 3:
   }}}
   must be replaced by
   {{{
    if n != 3:
   }}}

--
Ticket URL: <http://trac.sagemath.org/ticket/19823#comment:12>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.

Reply via email to