Tenseur calculus
Old tensorial fields (*** Deprecated ***)

() More...

## Functions

Tenseur | Lorene::operator* (const Tenseur &t1, const Tenseur &t2)
| Tensorial product.
Tenseur | Lorene::operator% (const Tenseur &t1, const Tenseur &t2)
| Tensorial product with desaliasing.
Tenseur | Lorene::contract (const Tenseur &source, int id1, int id2)
| Self contraction of two indices of a `Tenseur` .
Tenseur | Lorene::contract (const Tenseur &t1, int id1, const Tenseur &t2, int id2)
| Contraction of two `Tenseur` .
Tenseur | Lorene::flat_scalar_prod (const Tenseur &t1, const Tenseur &t2)
| Scalar product of two `Tenseur` when the metric is : performs the contraction of the last index of `t1` with the first one of `t2` , irrespective of the type of these indices.
Tenseur | Lorene::flat_scalar_prod_desal (const Tenseur &t1, const Tenseur &t2)
| Same as `flat_scalar_prod` but with desaliasing.
Tenseur | Lorene::manipule (const Tenseur &t1, const Metrique &met, int idx)
| Raise or lower the index `idx` depending on its type, using the given `Metrique` .
Tenseur | Lorene::manipule (const Tenseur &t1, const Metrique &met)
| Raise or lower all the indices, depending on their type, using the given `Metrique` .
Tenseur | Lorene::skxk (const Tenseur &source)
| Contraction of the last index of (*this) with or , depending on the type of S .
Tenseur | Lorene::lie_derive (const Tenseur &t, const Tenseur &x, const Metrique *met=0x0)
| Lie Derivative of `t` with respect to `x` .
Tenseur | Lorene::sans_trace (const Tenseur &tens, const Metrique &metre)
| Computes the traceless part of a `Tenseur` of valence 2.

## Detailed Description

()

## Function Documentation

## contract() [1/2]

Tenseur Lorene::contract | ( | const Tenseur & | source,
|  | int | id1,
|  | int | id2 )

Self contraction of two indices of a `Tenseur` .

The two indices must be of different type, i.e. covariant and contravariant, or contravariant and covariant.

Parameters

  id1

  [input] number of the first index for the contraction; `id1` must be strictly lower than the valence of the tensor and obeys the following convention:
  - `id1` = 0 : first index
  - `id1` = 1 : second index
  - and so on...

  id2

  [input] number of the second index for the contraction; `id2` must be strictly lower than the valence of the tensor and obeys the following convention:
  - `id2` = 0 : first index
  - `id2` = 1 : second index
  - and so on...

Definition at line 279 of file tenseur_operateur.C.

## contract() [2/2]

Tenseur Lorene::contract | ( | const Tenseur & | t1,
|  | int | id1,
|  | const Tenseur & | t2,
|  | int | id2 )

Contraction of two `Tenseur` .

The two indices must be of different type, i.e. covariant and contravariant, or contravariant and covariant.

Parameters

  id1

  [input] number of the index of contraction for the first `Tenseur` ; `id1` must be strictly lower than the valence of the tensor and obeys the following convention:
  - `id1` = 0 : first index
  - `id1` = 1 : second index
  - and so on...

  id2

  [input] number of index of contraction for the second one; `id2` must be strictly lower than the valence of the tensor and obeys the following convention:
  - `id2` = 0 : first index
  - `id2` = 1 : second index
  - and so on...

Definition at line 348 of file tenseur_operateur.C.

## flat_scalar_prod()

Tenseur Lorene::flat_scalar_prod | ( | const Tenseur & | t1,
|  | const Tenseur & | t2 )

Scalar product of two `Tenseur` when the metric is : performs the contraction of the last index of `t1` with the first one of `t2` , irrespective of the type of these indices.

Definition at line 653 of file tenseur_operateur.C.

## flat_scalar_prod_desal()

Tenseur Lorene::flat_scalar_prod_desal | ( | const Tenseur & | t1,
|  | const Tenseur & | t2 )

Same as `flat_scalar_prod` but with desaliasing.

Definition at line 735 of file tenseur_operateur.C.

## lie_derive()

Tenseur Lorene::lie_derive | ( | const Tenseur & | t,
|  | const Tenseur & | x,
|  | const Metrique * | met = 0x0 )

Lie Derivative of `t` with respect to `x` .

If no other argument is given, it uses partial derivatives with respect to cartesian coordinates to calculate the result (this is the default). Otherwise, it uses the covariant derivative associated to the metric given as last argument.

Definition at line 816 of file tenseur_operateur.C.

## manipule() [1/2]

Tenseur Lorene::manipule | ( | const Tenseur & | t1,
|  | const Metrique & | met )

Raise or lower all the indices, depending on their type, using the given `Metrique` .

Definition at line 562 of file tenseur_operateur.C.

## manipule() [2/2]

Tenseur Lorene::manipule | ( | const Tenseur & | t1,
|  | const Metrique & | met,
|  | int | idx )

Raise or lower the index `idx` depending on its type, using the given `Metrique` .

Definition at line 509 of file tenseur_operateur.C.

## operator%()

Tenseur Lorene::operator% | ( | const Tenseur & | t1,
|  | const Tenseur & | t2 )

Tensorial product with desaliasing.

Definition at line 199 of file tenseur_operateur.C.

## operator*()

Tenseur Lorene::operator* | ( | const Tenseur & | t1,
|  | const Tenseur & | t2 )

Tensorial product.

Definition at line 119 of file tenseur_operateur.C.

## sans_trace()

Tenseur Lorene::sans_trace | ( | const Tenseur & | tens,
|  | const Metrique & | metre )

Computes the traceless part of a `Tenseur` of valence 2.

Parameters

  tens | [input] the `Tenseur` of valence 2
  metre | [input] the metric used to raise or lower the indices

Returns
  The traceless part of the input `Tenseur`

Definition at line 897 of file tenseur_operateur.C.

References contract(), Lorene::Tenseur::get_etat(), Lorene::Tenseur::get_metric(), Lorene::Tenseur::get_mp(), Lorene::Tenseur::get_poids(), Lorene::Tenseur::get_triad(), Lorene::Tenseur::get_type_indice(), Lorene::Tenseur::get_valence(), manipule(), Lorene::Itbl::set(), Lorene::Tenseur::set(), Lorene::Itbl::set_etat_qcq(), Lorene::Tenseur::set_etat_qcq(), and Lorene::Tenseur::set_std_base().

## skxk()

Tenseur Lorene::skxk | ( | const Tenseur & | source | ) |

Contraction of the last index of (*this) with or , depending on the type of S .

The calculation is performed to avoid singularities in the external zone. This is done only for a flat metric.

Definition at line 580 of file tenseur_operateur.C.