Tensor arithmetics
Tensorial fields

() More...

## Functions

| Lorene::Tensor::Tensor (const Map &map, int val, const Itbl &tipe, const Base_vect &triad_i)
| Standard constructor.
| Lorene::Tensor::Tensor (const Map &map, int val, const Itbl &tipe, const Base_vect *triad_i)
| Standard constructor with the triad passed as a pointer.
| Lorene::Tensor::Tensor (const Map &map, int val, int tipe, const Base_vect &triad_i)
| Standard constructor when all the indices are of the same type.
| Lorene::Tensor::Tensor (const Tensor &)
| Copy constructor.
| Lorene::Tensor::Tensor (const Map &map, const Base_vect &triad_i, FILE *fich)
| Constructor from a file (see `sauve(FILE*)` ).
| Lorene::Tensor::Tensor (const Map &map)
| Constructor for a scalar field: to be used only by the derived class `Scalar` .
| Lorene::Tensor::Tensor (const Map &map, int val, const Itbl &tipe, int n_comp_i, const Base_vect &triad_i)
| Constructor to be used by derived classes, with symmetries among the components.
| Lorene::Tensor::Tensor (const Map &map, int val, int tipe, int n_comp_i, const Base_vect &triad_i)
| Constructor used by derived classes, with symmetries among the components, when all the indices are of the same type.
virtual | Lorene::Tensor::~Tensor ()
| Destructor.
virtual void | Lorene::Tensor::del_deriv () const
| Deletes the derived quantities.
void | Lorene::Tensor::set_der_0x0 () const
| Sets the pointers on derived quantities to 0x0.
virtual void | Lorene::Tensor::del_derive_met (int) const
| Logical destructor of the derivatives depending on the i-th element of `met_depend` .
void | Lorene::Tensor::set_der_met_0x0 (int) const
| Sets all the i-th components of `met_depend` , `p_derive_cov` , etc... to 0x0.
void | Lorene::Tensor::set_dependance (const Metric &) const
| To be used to describe the fact that the derivatives members have been calculated with `met` .
int | Lorene::Tensor::get_place_met (const Metric &) const
| Returns the position of the pointer on `metre` in the array `met_depend` .
virtual void | Lorene::Tensor::set_etat_nondef ()
| Sets the logical state of all components to `ETATNONDEF` (undefined state).
virtual void | Lorene::Tensor::set_etat_zero ()
| Sets the logical state of all components to `ETATZERO` (zero state).
virtual void | Lorene::Tensor::set_etat_qcq ()
| Sets the logical state of all components to `ETATQCQ` (ordinary state).
virtual void | Lorene::Tensor::allocate_all ()
| Performs the memory allocation of all the elements, down to the `double` arrays of the `Tbl` s.
virtual void | Lorene::Tensor::change_triad (const Base_vect &new_triad)
| Sets a new vectorial basis (triad) of decomposition and modifies the components accordingly.
void | Lorene::Tensor::set_triad (const Base_vect &new_triad)
| Assigns a new vectorial basis (triad) of decomposition.
virtual void | Lorene::Tensor::operator= (const Tensor &)
| Assignment to a `Tensor`.
Scalar & | Lorene::Tensor::set (const Itbl &ind)
| Returns the value of a component (read/write version).
Scalar & | Lorene::Tensor::set (int i1, int i2)
| Returns the value of a component for a tensor of valence 2 (read/write version).
Scalar & | Lorene::Tensor::set (int i1, int i2, int i3)
| Returns the value of a component for a tensor of valence 3 (read/write version).
Scalar & | Lorene::Tensor::set (int i1, int i2, int i3, int i4)
| Returns the value of a component for a tensor of valence 4 (read/write version).
void | Lorene::Tensor::annule_domain (int l)
| Sets the `Tensor` to zero in a given domain.
virtual void | Lorene::Tensor::annule (int l_min, int l_max)
| Sets the `Tensor` to zero in several domains.
void | Lorene::Tensor::annule_extern_cn (int l_0, int deg)
| Performs a smooth (C^n) transition in a given domain to zero.
virtual void | Lorene::Tensor::std_spectral_base ()
| Sets the standard spectal bases of decomposition for each component.
virtual void | Lorene::Tensor::std_spectral_base_odd ()
| Sets the standard odd spectal bases of decomposition for each component.
virtual void | Lorene::Tensor::dec_dzpuis (int dec=1)
| Decreases by `dec` units the value of `dzpuis` and changes accordingly the values in the compactified external domain (CED).
virtual void | Lorene::Tensor::inc_dzpuis (int inc=1)
| Increases by `inc` units the value of `dzpuis` and changes accordingly the values in the compactified external domain (CED).
virtual void | Lorene::Tensor::exponential_filter_r (int lzmin, int lzmax, int p, double alpha=-16.)
| Applies exponential filters to all components (see `Scalar::exponential_filter_r` ).
virtual void | Lorene::Tensor::exponential_filter_ylm (int lzmin, int lzmax, int p, double alpha=-16.)
| Applies exponential filters to all components (see `Scalar::exponential_filter_ylm` ).
void | Lorene::Tensor::compute_derive_lie (const Vector &v, Tensor &resu) const
| Computes the Lie derivative of `this` with respect to some vector field `v` (protected method; the public interface is method `derive_lie` ).
const Tensor & | Lorene::Tensor::derive_cov (const Metric &gam) const
| Returns the covariant derivative of `this` with respect to some metric .
const Tensor & | Lorene::Tensor::derive_con (const Metric &gam) const
| Returns the "contravariant" derivative of `this` with respect to some metric , by raising the last index of the covariant derivative (cf.
const Tensor & | Lorene::Tensor::divergence (const Metric &gam) const
| Computes the divergence of `this` with respect to some metric .
Tensor | Lorene::Tensor::derive_lie (const Vector &v) const
| Computes the Lie derivative of `this` with respect to some vector field `v`.
Tensor | Lorene::Tensor::up (int ind, const Metric &gam) const
| Computes a new tensor by raising an index of `*this`.
Tensor | Lorene::Tensor::down (int ind, const Metric &gam) const
| Computes a new tensor by lowering an index of `*this`.
Tensor | Lorene::Tensor::up_down (const Metric &gam) const
| Computes a new tensor by raising or lowering all the indices of `*this` .
Tensor | Lorene::Tensor::trace (int ind1, int ind2) const
| Trace on two different type indices.
Tensor | Lorene::Tensor::trace (int ind1, int ind2, const Metric &gam) const
| Trace with respect to a given metric.
Scalar | Lorene::Tensor::trace () const
| Trace on two different type indices for a valence 2 tensor.
Scalar | Lorene::Tensor::trace (const Metric &gam) const
| Trace with respect to a given metric for a valence 2 tensor.
virtual int | Lorene::Tensor::position (const Itbl &ind) const
| Returns the position in the array `cmp` of a component given by its indices.
virtual Itbl | Lorene::Tensor::indices (int pos) const
| Returns the indices of a component given by its position in the array `cmp` .
const Map & | Lorene::Tensor::get_mp () const
| Returns the mapping.
const Base_vect * | Lorene::Tensor::get_triad () const
| Returns the vectorial basis (triad) on which the components are defined.
int | Lorene::Tensor::get_valence () const
| Returns the valence.
int | Lorene::Tensor::get_n_comp () const
| Returns the number of stored components.
int | Lorene::Tensor::get_index_type (int i) const
| Gives the type (covariant or contravariant) of the index number `i` .
Itbl | Lorene::Tensor::get_index_type () const
| Returns the types of all the indices.
int & | Lorene::Tensor::set_index_type (int i)
| Sets the type of the index number `i` .
Itbl & | Lorene::Tensor::set_index_type ()
| Sets the types of all the indices.
const Scalar & | Lorene::Tensor::operator() (const Itbl &ind) const
| Returns the value of a component (read-only version).
const Scalar & | Lorene::Tensor::operator() (int i1, int i2) const
| Returns the value of a component for a tensor of valence 2 (read-only version).
const Scalar & | Lorene::Tensor::operator() (int i1, int i2, int i3) const
| Returns the value of a component for a tensor of valence 3 (read-only version).
const Scalar & | Lorene::Tensor::operator() (int i1, int i2, int i3, int i4) const
| Returns the value of a component for a tensor of valence 4 (read-only version).
void | Lorene::Tensor::operator+= (const Tensor &)
| += Tensor
void | Lorene::Tensor::operator-= (const Tensor &)
| -= Tensor
virtual void | Lorene::Tensor::sauve (FILE *) const
| Save in a binary file.
virtual void | Lorene::Tensor::spectral_display (const char *comment=0x0, double threshold=1.e-7, int precision=4, ostream &ostr=cout) const
| Displays the spectral coefficients and the associated basis functions of each component.
| Lorene::Tensor_sym::Tensor_sym (const Map &map, int val, const Itbl &tipe, const Base_vect &triad_i, int index_sym1, int index_sym2)
| Standard constructor.
| Lorene::Tensor_sym::Tensor_sym (const Map &map, int val, int tipe, const Base_vect &triad_i, int index_sym1, int index_sym2)
| Standard constructor when all the indices are of the same type.
| Lorene::Tensor_sym::Tensor_sym (const Map &map, int tipe0, int tipe1, int tipe2, const Base_vect &triad_i, int index_sym1, int index_sym2)
| Constructor for a valence 3 symmetric tensor.
| Lorene::Tensor_sym::Tensor_sym (const Tensor_sym &a)
| Copy constructor.
| Lorene::Tensor_sym::Tensor_sym (const Map &map, const Base_vect &triad_i, FILE *fich)
| Constructor from a file (see `sauve(FILE*)` ).
virtual | Lorene::Tensor_sym::~Tensor_sym ()
| Destructor.
virtual void | Lorene::Tensor_sym::operator= (const Tensor_sym &a)
| Assignment to another `Tensor_sym`.
virtual void | Lorene::Tensor_sym::operator= (const Tensor &a)
| Assignment to a `Tensor` NB: the symmetry about the indices `id_sym1` and `id_sym2` of the input tensor is assumed but is not checked.
int | Lorene::Tensor_sym::sym_index1 () const
| Number of the first symmetric index (`0<=` `id_sym1` < `valence` ).
int | Lorene::Tensor_sym::sym_index2 () const
| Number of the second symmetric index (`id_sym1` < `id_sym2` < `valence` ).
virtual int | Lorene::Tensor_sym::position (const Itbl &ind) const
| Returns the position in the array `cmp` of a component given by its indices.
virtual Itbl | Lorene::Tensor_sym::indices (int pos) const
| Returns the indices of a component given by its position in the array `cmp` .
virtual void | Lorene::Tensor_sym::sauve (FILE *) const
| Save in a binary file.
const Tensor_sym & | Lorene::Tensor_sym::derive_cov (const Metric &gam) const
| Returns the covariant derivative of `this` with respect to some metric .
const Tensor_sym & | Lorene::Tensor_sym::derive_con (const Metric &gam) const
| Returns the "contravariant" derivative of `this` with respect to some metric , by raising the last index of the covariant derivative (cf.
Tensor_sym | Lorene::Tensor_sym::derive_lie (const Vector &v) const
| Computes the Lie derivative of `this` with respect to some vector field `v`.
Tensor | Lorene::operator+ (const Tensor &)
Tensor | Lorene::operator- (const Tensor &)
| `-` Tensor
Tensor | Lorene::operator+ (const Tensor &a, const Tensor &b)
| Tensor + Tensor.
Scalar | Lorene::operator+ (const Tensor &a, const Scalar &b)
| Tensor + Scalar. The `Tensor` must be of valence 0.
Scalar | Lorene::operator+ (const Scalar &a, const Tensor &b)
| Scalar + Tensor. The `Tensor` must be of valence 0.
Tensor | Lorene::operator- (const Tensor &a, const Tensor &b)
| Tensor - Tensor.
Scalar | Lorene::operator- (const Tensor &a, const Scalar &b)
| Tensor - Scalar. The `Tensor` must be of valence 0.
Scalar | Lorene::operator- (const Scalar &a, const Tensor &b)
| Scalar - Tensor. The `Tensor` must be of valence 0.
Tensor | Lorene::operator* (const Scalar &a, const Tensor &b)
| Scalar * Tensor.
Tensor | Lorene::operator* (const Tensor &a, const Scalar &b)
| Tensor * Scalar.
Tensor | Lorene::operator* (double, const Tensor &)
| double * Tensor
Tensor | Lorene::operator* (const Tensor &, double)
| Tensor * double.
Tensor | Lorene::operator* (int, const Tensor &)
| int* Tensor
Tensor | Lorene::operator* (const Tensor &, int)
| Tensor * int.
Tensor | Lorene::operator/ (const Tensor &, const Scalar &)
| Tensor / Scalar.
Tensor | Lorene::operator/ (const Tensor &, double)
| Tensor / double.
Tensor | Lorene::operator/ (const Tensor &, int)
| Tensor / int.

## Variables

const Map *const | Lorene::Tensor::mp
| Mapping on which the numerical values at the grid points are defined.
int | Lorene::Tensor::valence
| Valence of the tensor (0 = scalar, 1 = vector, etc...).
const Base_vect * | Lorene::Tensor::triad
| Vectorial basis (triad) with respect to which the tensor components are defined.
Itbl | Lorene::Tensor::type_indice
| 1D array of integers (class `Itbl` ) of size `valence` containing the type of each index: `COV` for a covariant one and `CON` for a contravariant one.
int | Lorene::Tensor::n_comp
| Number of stored components, depending on the symmetry.
Scalar ** | Lorene::Tensor::cmp
| Array of size `n_comp` of pointers onto the components.
const Metric * | Lorene::Tensor::met_depend [N_MET_MAX]
| Array on the `Metric` 's which were used to compute derived quantities, like `p_derive_cov` , etc... The i-th element of this array is the `Metric` used to compute the i-th element of `p_derive_cov` , etc.
Tensor * | Lorene::Tensor::p_derive_cov [N_MET_MAX]
| Array of pointers on the covariant derivatives of `this` with respect to various metrics.
Tensor * | Lorene::Tensor::p_derive_con [N_MET_MAX]
| Array of pointers on the contravariant derivatives of `this` with respect to various metrics.
Tensor * | Lorene::Tensor::p_divergence [N_MET_MAX]
| Array of pointers on the divergence of `this` with respect to various metrics.
int | Lorene::Tensor_sym::id_sym1
| Number of the first symmetric index (`0<=` `id_sym1` < `valence` ).
int | Lorene::Tensor_sym::id_sym2
| Number of the second symmetric index (`id_sym1` < `id_sym2` < `valence` ).

## Friends

class | Lorene::Tensor::Scalar
class | Lorene::Tensor::Vector
class | Lorene::Tensor::Sym_tensor
class | Lorene::Tensor::Tensor_sym
class | Lorene::Tensor::Metric
ostream & | Lorene::Tensor::operator<< (ostream &flux, const Tensor &source)
Scalar | Lorene::Tensor::operator+ (const Tensor &a, const Scalar &b)
| Tensor + Scalar. The `Tensor` must be of valence 0.
Scalar | Lorene::Tensor::operator+ (const Scalar &a, const Tensor &b)
| Scalar + Tensor. The `Tensor` must be of valence 0.
Scalar | Lorene::Tensor::operator- (const Tensor &a, const Scalar &b)
| Tensor - Scalar. The `Tensor` must be of valence 0.
Scalar | Lorene::Tensor::operator- (const Scalar &a, const Tensor &b)
| Scalar - Tensor. The `Tensor` must be of valence 0.
Tensor | Lorene::Tensor::operator* (const Tensor &a, const Tensor &b)
| Tensorial product.
Tensor_sym | Lorene::Tensor::operator* (const Tensor &a, const Tensor_sym &b)
| Tensorial product with symmetries.
Tensor_sym | Lorene::Tensor::operator* (const Tensor_sym &a, const Tensor &b)
| Tensorial product with symmetries.
Tensor_sym | Lorene::Tensor::operator* (const Tensor_sym &a, const Tensor_sym &b)
| Tensorial product of two symmetric tensors.
Tensor_sym | Lorene::Tensor_sym::operator* (const Tensor &a, const Tensor_sym &b)
| Tensorial product with symmetries.
Tensor_sym | Lorene::Tensor_sym::operator* (const Tensor_sym &a, const Tensor &b)
| Tensorial product with symmetries.

## Tensor_sym arithmetics

Tensor_sym | Lorene::operator+ (const Tensor_sym &)
Tensor_sym | Lorene::operator- (const Tensor_sym &)
Tensor_sym | Lorene::operator+ (const Tensor_sym &, const Tensor_sym &)
| Tensor_sym + Tensor_sym.
Tensor_sym | Lorene::operator- (const Tensor_sym &, const Tensor_sym &)
| Tensor_sym - Tensor_sym.
Tensor_sym | Lorene::operator* (const Scalar &a, const Tensor_sym &b)
| Scalar * Tensor_sym.
Tensor_sym | Lorene::operator* (const Tensor_sym &a, const Scalar &b)
| Tensor_sym * Scalar.
Tensor_sym | Lorene::operator* (double, const Tensor_sym &)
| double * Tensor_sym.
Tensor_sym | Lorene::operator* (const Tensor_sym &, double)
| Tensor_sym * double.
Tensor_sym | Lorene::operator* (int, const Tensor_sym &)
| int * Tensor_sym.
Tensor_sym | Lorene::operator* (const Tensor_sym &, int)
| Tensor_sym * int.
Tensor_sym | Lorene::operator/ (const Tensor_sym &, const Scalar &)
| Tensor_sym / Scalar.
Tensor_sym | Lorene::operator/ (const Tensor_sym &, double)
| Tensor_sym / double.
Tensor_sym | Lorene::operator/ (const Tensor_sym &, int)
| Tensor_sym / int.

## Detailed Description

()

## Function Documentation

## allocate_all()

void Lorene::Tensor::allocate_all | ( |  | ) |

virtual

Performs the memory allocation of all the elements, down to the `double` arrays of the `Tbl` s.

This function performs in fact recursive calls to `set_etat_qcq()` on each element of the chain `Scalar` -> `Valeur` -> `Mtbl` -> `Tbl` .

Reimplemented in Lorene::Scalar.

Definition at line 508 of file tensor.C.

References cmp, del_deriv(), and n_comp.

## annule()

void Lorene::Tensor::annule | ( | int | l_min,
|  | int | l_max )

virtual

Sets the `Tensor` to zero in several domains.

Parameters

  l_min | [input] The `Tensor` will be set (logically) to zero in the domains whose indices are in the range ``[l_min,l_max] .
  l_max | [input] see the comments for `l_min` .

Note that `annule`(0,nz-1) , where `nz` is the total number of domains, is equivalent to `set_etat_zero()` .

Reimplemented in Lorene::Scalar.

Definition at line 671 of file tensor.C.

References cmp, del_deriv(), mp, n_comp, and set_etat_zero().

## annule_domain()

void Lorene::Tensor::annule_domain | ( | int | l | ) |

Sets the `Tensor` to zero in a given domain.

Parameters

  l | [input] Index of the domain in which the `Tensor` will be set (logically) to zero.

Definition at line 666 of file tensor.C.

References annule().

## annule_extern_cn()

void Lorene::Tensor::annule_extern_cn | ( | int | l_0,
|  | int | deg )

Performs a smooth (C^n) transition in a given domain to zero.

Parameters

  l_0 | [input] in the domain of index l0 the tensor is multiplied by the right polynomial (of degree 2n+1), to ensure continuty of the function and its n first derivative at both ends of this domain. The tensor is unchanged in the domains l < l_0 and set to zero in domains l > l_0.
  deg | [input] the degree n of smoothness of the transition.

Definition at line 690 of file tensor.C.

References Lorene::Scalar::allocate_all(), Lorene::Scalar::annule(), Lorene::Itbl::annule_hard(), cmp, del_deriv(), mp, n_comp, Lorene::pow(), Lorene::Itbl::set(), Lorene::Tbl::set(), Lorene::Scalar::set_domain(), Lorene::Tbl::set_etat_qcq(), and Lorene::Scalar::std_spectral_base().

## change_triad()

void Lorene::Tensor::change_triad | ( | const Base_vect & | new_triad | ) |

virtual

Sets a new vectorial basis (triad) of decomposition and modifies the components accordingly.

Reimplemented in Lorene::Scalar, and Lorene::Vector.

Definition at line 77 of file tensor_change_triad.C.

References Lorene::Base_vect_cart::get_align(), mp, set(), Tensor(), triad, type_indice, and valence.

## compute_derive_lie()

void Lorene::Tensor::compute_derive_lie | ( | const Vector & | v,
|  | Tensor & | resu ) const

protected

Computes the Lie derivative of `this` with respect to some vector field `v` (protected method; the public interface is method `derive_lie` ).

Definition at line 339 of file tensor_calculus.C.

References cmp, Lorene::contract(), Lorene::Scalar::dec_dzpuis(), derive_cov(), get_n_comp(), get_triad(), indices(), mp, n_comp, operator()(), Lorene::Itbl::set(), set(), Tensor(), triad, type_indice, and valence.

## dec_dzpuis()

void Lorene::Tensor::dec_dzpuis | ( | int | dec = 1 | ) |

virtual

Decreases by `dec` units the value of `dzpuis` and changes accordingly the values in the compactified external domain (CED).

Reimplemented in Lorene::Scalar.

Definition at line 808 of file tensor.C.

References cmp, dec_dzpuis(), del_deriv(), and n_comp.

## del_deriv()

void Lorene::Tensor::del_deriv | ( |  | ) | const

protected virtual

Deletes the derived quantities.

Reimplemented in Lorene::Scalar, Lorene::Sym_tensor, Lorene::Sym_tensor_trans, Lorene::Sym_tensor_tt, Lorene::Vector, and Lorene::Vector_divfree.

Definition at line 398 of file tensor.C.

References del_derive_met(), and set_der_0x0().

## del_derive_met()

void Lorene::Tensor::del_derive_met | ( | int | j | ) | const

protected virtual

Logical destructor of the derivatives depending on the i-th element of `met_depend` .

Reimplemented in Lorene::Sym_tensor, and Lorene::Vector.

Definition at line 414 of file tensor.C.

References met_depend, p_derive_con, p_derive_cov, p_divergence, and set_der_met_0x0().

## derive_con() [1/2]

const Tensor & Lorene::Tensor::derive_con | ( | const Metric & | gam | ) | const

Returns the "contravariant" derivative of `this` with respect to some metric , by raising the last index of the covariant derivative (cf.

method `derive_cov()` ) with .

Definition at line 1014 of file tensor.C.

References Lorene::Metric::con(), Lorene::contract(), derive_cov(), get_index_type(), get_place_met(), mp, p_derive_con, Lorene::Itbl::set(), set_dependance(), Lorene::Tensor_sym::sym_index1(), Lorene::Tensor_sym::sym_index2(), Tensor(), triad, and valence.

## derive_con() [2/2]

const Tensor_sym & Lorene::Tensor_sym::derive_con | ( | const Metric & | gam | ) | const

Returns the "contravariant" derivative of `this` with respect to some metric , by raising the last index of the covariant derivative (cf.

method `derive_cov()` ) with .

Definition at line 204 of file tensor_sym_calculus.C.

References Lorene::Tensor::derive_con(), and Tensor_sym().

## derive_cov() [1/2]

const Tensor & Lorene::Tensor::derive_cov | ( | const Metric & | gam | ) | const

Returns the covariant derivative of `this` with respect to some metric .

denoting the tensor represented by `this` and its covariant derivative with respect to the metric , the extra index (with respect to the indices of ) of is chosen to be the last one. This convention agrees with that of MTW (see Eq. (10.17) of MTW). For instance, if is a 1-form, whose components w.r.t. the triad are : , then the covariant derivative of is the bilinear form whose components are such that

Parameters

  gam | metric

Returns
  covariant derivative of `this` with respect to the connection associated with the metric

Definition at line 1002 of file tensor.C.

References Lorene::Metric::connect(), get_place_met(), Lorene::Connection::p_derive_cov(), p_derive_cov, set_dependance(), and Tensor().

## derive_cov() [2/2]

const Tensor_sym & Lorene::Tensor_sym::derive_cov | ( | const Metric & | gam | ) | const

Returns the covariant derivative of `this` with respect to some metric .

denoting the tensor represented by `this` and its covariant derivative with respect to the metric , the extra index (with respect to the indices of ) of is chosen to be the last one. This convention agrees with that of MTW (see Eq. (10.17) of MTW).

Parameters

  gam | metric

Returns
  covariant derivative of `this` with respect to the connection associated with the metric

Definition at line 192 of file tensor_sym_calculus.C.

References Lorene::Tensor::derive_cov(), and Tensor_sym().

## derive_lie() [1/2]

Tensor Lorene::Tensor::derive_lie | ( | const Vector & | v | ) | const

Computes the Lie derivative of `this` with respect to some vector field `v`.

Definition at line 481 of file tensor_calculus.C.

References compute_derive_lie(), mp, Tensor(), triad, type_indice, and valence.

## derive_lie() [2/2]

Tensor_sym Lorene::Tensor_sym::derive_lie | ( | const Vector & | v | ) | const

Computes the Lie derivative of `this` with respect to some vector field `v`.

Definition at line 219 of file tensor_sym_calculus.C.

References Lorene::Tensor::compute_derive_lie(), id_sym1, id_sym2, Lorene::Tensor::mp, Tensor_sym(), Lorene::Tensor::triad, Lorene::Tensor::type_indice, and Lorene::Tensor::valence.

## divergence()

const Tensor & Lorene::Tensor::divergence | ( | const Metric & | gam | ) | const

Computes the divergence of `this` with respect to some metric .

The divergence is taken with respect of the last index of `this` which thus must be contravariant. For instance if the tensor represented by `this` is a twice contravariant tensor, whose components w.r.t. the triad are : , the divergence of w.r.t. is the vector

where denotes the connection associated with the metric .

Parameters

  gam | metric

Returns
  divergence of `this` with respect to .

Definition at line 1055 of file tensor.C.

References Lorene::Metric::connect(), get_place_met(), Lorene::Connection::p_divergence(), p_divergence, set_dependance(), and Tensor().

## down()

Tensor Lorene::Tensor::down | ( | int | ind,
|  | const Metric & | gam ) const

Computes a new tensor by lowering an index of `*this`.

Parameters

  ind

  index to be lowered, with the following convention :
  - `ind1` = 0 : first index of the tensor
  - `ind1` = 1 : second index of the tensor
  - and so on... (`ind` must be of covariant type (`CON` )).

  gam | metric used to lower the index (contraction with the twice covariant form of the metric on the index `ind` ).

Definition at line 265 of file tensor_calculus.C.

References Lorene::contract(), Lorene::Metric::cov(), indices(), mp, n_comp, Lorene::Itbl::set(), set(), Tensor(), triad, type_indice, and valence.

## exponential_filter_r()

void Lorene::Tensor::exponential_filter_r | ( | int | lzmin,
|  | int | lzmax,
|  | int | p,
|  | double | alpha = -16. )

virtual

Applies exponential filters to all components (see `Scalar::exponential_filter_r` ).

Works only for Cartesian components.

Reimplemented in Lorene::Scalar, Lorene::Sym_tensor, and Lorene::Vector.

Definition at line 1066 of file tensor.C.

References cmp, exponential_filter_r(), mp, n_comp, and triad.

## exponential_filter_ylm()

void Lorene::Tensor::exponential_filter_ylm | ( | int | lzmin,
|  | int | lzmax,
|  | int | p,
|  | double | alpha = -16. )

virtual

Applies exponential filters to all components (see `Scalar::exponential_filter_ylm` ).

Works only for Cartesian components.

Reimplemented in Lorene::Scalar, Lorene::Sym_tensor, and Lorene::Vector.

Definition at line 1079 of file tensor.C.

References cmp, exponential_filter_ylm(), mp, n_comp, and triad.

## get_index_type() [1/2]

Itbl Lorene::Tensor::get_index_type | ( |  | ) | const

inline

Returns the types of all the indices.

Returns
  1-D array of integers (class `Itbl` ) of size `valence`
  containing the type of each index, `COV` for a covariant one and `CON`
  for a contravariant one.

Definition at line 896 of file tensor.h.

References type_indice.

## get_index_type() [2/2]

int Lorene::Tensor::get_index_type | ( | int | i | ) | const

inline

Gives the type (covariant or contravariant) of the index number `i` .

`i` must be strictly lower than `valence` and obey the following convention:

- `i` = 0 : first index
- `i` = 1 : second index
- and so on...

Returns
  COV for a covariant index, CON for a contravariant one.

Definition at line 886 of file tensor.h.

References type_indice.

## get_mp()

const Map & Lorene::Tensor::get_mp | ( |  | ) | const

inline

Returns the mapping.

Definition at line 861 of file tensor.h.

References Lorene::Map(), and mp.

## get_n_comp()

int Lorene::Tensor::get_n_comp | ( |  | ) | const

inline

Returns the number of stored components.

Definition at line 872 of file tensor.h.

References n_comp.

## get_place_met()

int Lorene::Tensor::get_place_met | ( | const Metric & | metre | ) | const

protected

Returns the position of the pointer on `metre` in the array `met_depend` .

Definition at line 443 of file tensor.C.

References met_depend.

## get_triad()

const Base_vect * Lorene::Tensor::get_triad | ( |  | ) | const

inline

Returns the vectorial basis (triad) on which the components are defined.

Definition at line 866 of file tensor.h.

References triad.

## get_valence()

int Lorene::Tensor::get_valence | ( |  | ) | const

inline

Returns the valence.

Definition at line 869 of file tensor.h.

References valence.

## inc_dzpuis()

void Lorene::Tensor::inc_dzpuis | ( | int | inc = 1 | ) |

virtual

Increases by `inc` units the value of `dzpuis` and changes accordingly the values in the compactified external domain (CED).

Reimplemented in Lorene::Scalar.

Definition at line 816 of file tensor.C.

References cmp, del_deriv(), inc_dzpuis(), and n_comp.

## indices() [1/2]

Itbl Lorene::Tensor::indices | ( | int | pos | ) | const

virtual

Returns the indices of a component given by its position in the array `cmp` .

Parameters

  pos | [input] position in the array `cmp` of the pointer to the `Scalar` representing a component

Returns
  1-D array of integers (class `Itbl` ) of size `valence` giving the value of each index for the component located at the position `pos` in the array `cmp`, with the following storage convention:
  - `Itbl(0)` : value of the first index (1, 2 or 3)
  - `Itbl(1)` : value of the second index (1, 2 or 3)
  - and so on...

Reimplemented in Lorene::Tensor_sym, and Lorene::Vector.

Definition at line 539 of file tensor.C.

References n_comp, Lorene::Itbl::set(), and valence.

## indices() [2/2]

Itbl Lorene::Tensor_sym::indices | ( | int | pos | ) | const

virtual

Returns the indices of a component given by its position in the array `cmp` .

Parameters

  pos | [input] position in the array `cmp` of the pointer to the `Scalar` representing a component

Returns
  1-D array of integers (class `Itbl` ) of size `valence` giving the value of each index for the component located at the position `pos` in the array `cmp`, with the following storage convention:
  - `Itbl(0)` : value of the first index (1, 2 or 3)
  - `Itbl(1)` : value of the second index (1, 2 or 3)
  - and so on...

Reimplemented from Lorene::Tensor.

Definition at line 310 of file tensor_sym.C.

References id_sym1, id_sym2, Lorene::Tensor::n_comp, Lorene::Itbl::set(), and Lorene::Tensor::valence.

## operator()() [1/4]

const Scalar & Lorene::Tensor::operator() | ( | const Itbl & | ind | ) | const

Returns the value of a component (read-only version).

Parameters

  ind

  1-D `Itbl` of size `valence` containing the values of each index specifing the component, with the following storage convention:
  - `ind(0)` : value of the first index (1, 2 or 3)
  - `ind(1)` : value of the second index (1, 2 or 3)
  - and so on...

Returns
  reference on the component specified by `ind`

Definition at line 798 of file tensor.C.

References cmp, Lorene::Itbl::get_dim(), Lorene::Itbl::get_ndim(), position(), and valence.

## operator()() [2/4]

const Scalar & Lorene::Tensor::operator() | ( | int | i1,
|  | int | i2 ) const

Returns the value of a component for a tensor of valence 2 (read-only version).

Parameters

  i1 | value of the first index (1, 2 or 3)
  i2 | value of the second index (1, 2 or 3)

Returns
  reference on the component specified by ``(i1,i2)

Definition at line 760 of file tensor.C.

References cmp, position(), Lorene::Itbl::set(), and valence.

## operator()() [3/4]

const Scalar & Lorene::Tensor::operator() | ( | int | i1,
|  | int | i2,
|  | int | i3 ) const

Returns the value of a component for a tensor of valence 3 (read-only version).

Parameters

  i1 | value of the first index (1, 2 or 3)
  i2 | value of the second index (1, 2 or 3)
  i3 | value of the third index (1, 2 or 3)

Returns
  reference on the component specified by ``(i1,i2,i3)

Definition at line 771 of file tensor.C.

References cmp, position(), Lorene::Itbl::set(), and valence.

## operator()() [4/4]

const Scalar & Lorene::Tensor::operator() | ( | int | i1,
|  | int | i2,
|  | int | i3,
|  | int | i4 ) const

Returns the value of a component for a tensor of valence 4 (read-only version).

Parameters

  i1 | value of the first index (1, 2 or 3)
  i2 | value of the second index (1, 2 or 3)
  i3 | value of the third index (1, 2 or 3)
  i4 | value of the fourth index (1, 2 or 3)

Returns
  reference on the component specified by ``(i1,i2,i3,i4)

Definition at line 783 of file tensor.C.

References cmp, position(), Lorene::Itbl::set(), and valence.

## operator*() [1/12]

Tensor Lorene::operator* | ( | const Scalar & | a,
|  | const Tensor & | b )

Scalar * Tensor.

Definition at line 188 of file tensor_arithm.C.

References Lorene::Scalar::get_etat(), Lorene::Tensor::get_index_type(), Lorene::Tensor::get_mp(), Lorene::Tensor::get_n_comp(), Lorene::Tensor::get_triad(), Lorene::Tensor::get_valence(), Lorene::Tensor::indices(), and Lorene::Tensor::set().

## operator*() [2/12]

Tensor_sym Lorene::operator* | ( | const Scalar & | a,
|  | const Tensor_sym & | b )

Scalar * Tensor_sym.

For efficiency reasons this function is distinct from `Tensor` `operator*`(const Scalar&, const Tensor&) .

Definition at line 152 of file tensor_sym_arithm.C.

References Lorene::Scalar::get_etat(), Lorene::Tensor::get_index_type(), Lorene::Tensor::get_mp(), Lorene::Tensor::get_n_comp(), Lorene::Tensor::get_triad(), Lorene::Tensor::get_valence(), Lorene::Tensor_sym::indices(), Lorene::Tensor::set(), Lorene::Tensor_sym::sym_index1(), and Lorene::Tensor_sym::sym_index2().

## operator*() [3/12]

Tensor Lorene::operator* | ( | const Tensor & | t,
|  | double | x )

Tensor * double.

Definition at line 228 of file tensor_arithm.C.

References x.

## operator*() [4/12]

Tensor Lorene::operator* | ( | const Tensor & | t,
|  | int | m )

Tensor * int.

Definition at line 237 of file tensor_arithm.C.

## operator*() [5/12]

Tensor Lorene::operator* | ( | const Tensor & | a,
|  | const Scalar & | b )

Tensor * Scalar.

Definition at line 206 of file tensor_arithm.C.

## operator*() [6/12]

Tensor_sym Lorene::operator* | ( | const Tensor_sym & | t,
|  | double | x )

Tensor_sym * double.

For efficiency reasons this function is distinct from `Tensor` `operator*`(const Tensor&, double) .

Definition at line 192 of file tensor_sym_arithm.C.

References x.

## operator*() [7/12]

Tensor_sym Lorene::operator* | ( | const Tensor_sym & | t,
|  | int | m )

Tensor_sym * int.

For efficiency reasons this function is distinct from `Tensor` `operator*`(const Tensor&, int) .

Definition at line 202 of file tensor_sym_arithm.C.

## operator*() [8/12]

Tensor_sym Lorene::operator* | ( | const Tensor_sym & | a,
|  | const Scalar & | b )

Tensor_sym * Scalar.

For efficiency reasons this function is distinct from `Tensor` `operator*`(const Tensor&, const Scalar&) .

Definition at line 170 of file tensor_sym_arithm.C.

## operator*() [9/12]

Tensor Lorene::operator* | ( | double | x,
|  | const Tensor & | t )

double * Tensor

Definition at line 213 of file tensor_arithm.C.

References Lorene::Tensor::get_index_type(), Lorene::Tensor::get_mp(), Lorene::Tensor::get_n_comp(), Lorene::Tensor::get_triad(), Lorene::Tensor::get_valence(), Lorene::Tensor::indices(), Lorene::Tensor::set(), and x.

## operator*() [10/12]

Tensor_sym Lorene::operator* | ( | double | x,
|  | const Tensor_sym & | tt )

double * Tensor_sym.

For efficiency reasons this function is distinct from `Tensor` `operator*`(double, const Tensor&) .

Definition at line 177 of file tensor_sym_arithm.C.

References Lorene::Tensor::get_index_type(), Lorene::Tensor::get_mp(), Lorene::Tensor::get_n_comp(), Lorene::Tensor::get_triad(), Lorene::Tensor::get_valence(), Lorene::Tensor_sym::indices(), Lorene::Tensor::set(), Lorene::Tensor_sym::sym_index1(), Lorene::Tensor_sym::sym_index2(), and x.

## operator*() [11/12]

Tensor Lorene::operator* | ( | int | m,
|  | const Tensor & | t )

int* Tensor

Definition at line 232 of file tensor_arithm.C.

## operator*() [12/12]

Tensor_sym Lorene::operator* | ( | int | m,
|  | const Tensor_sym & | t )

int * Tensor_sym.

For efficiency reasons this function is distinct from `Tensor` `operator*`(int, const Tensor&) .

Definition at line 197 of file tensor_sym_arithm.C.

## operator+() [1/6]

Scalar Lorene::operator+ | ( | const Scalar & | a,
|  | const Tensor & | b )

Scalar + Tensor. The `Tensor` must be of valence 0.

Definition at line 129 of file tensor_arithm.C.

## operator+() [2/6]

Tensor Lorene::operator+ | ( | const Tensor & | t | ) |

- Tensor

Definition at line 74 of file tensor_arithm.C.

## operator+() [3/6]

Scalar Lorene::operator+ | ( | const Tensor & | a,
|  | const Scalar & | b )

Tensor + Scalar. The `Tensor` must be of valence 0.

Definition at line 120 of file tensor_arithm.C.

## operator+() [4/6]

Tensor Lorene::operator+ | ( | const Tensor & | a,
|  | const Tensor & | b )

Tensor + Tensor.

Definition at line 97 of file tensor_arithm.C.

References Lorene::Tensor::get_index_type(), Lorene::Tensor::get_mp(), Lorene::Tensor::get_n_comp(), Lorene::Tensor::get_triad(), Lorene::Tensor::get_valence(), Lorene::Tensor::indices(), and Lorene::Tensor::set().

## operator+() [5/6]

Tensor_sym Lorene::operator+ | ( | const Tensor_sym & | t | ) |

- Tensor_sym. For efficiency reasons this function is distinct from `Tensor` `operator+`(const Tensor& ) .

Definition at line 63 of file tensor_sym_arithm.C.

## operator+() [6/6]

Tensor_sym Lorene::operator+ | ( | const Tensor_sym & | t1,
|  | const Tensor_sym & | t2 )

Tensor_sym + Tensor_sym.

For efficiency reasons this function is distinct from `Tensor` `operator+`(const Tensor&, const Tensor& ).

Definition at line 88 of file tensor_sym_arithm.C.

References Lorene::Tensor::get_index_type(), Lorene::Tensor::get_mp(), Lorene::Tensor::get_n_comp(), Lorene::Tensor::get_triad(), Lorene::Tensor::get_valence(), Lorene::Tensor_sym::indices(), Lorene::Tensor::set(), Lorene::Tensor_sym::sym_index1(), and Lorene::Tensor_sym::sym_index2().

## operator+=()

void Lorene::Tensor::operator+= | ( | const Tensor & | t | ) |

+= Tensor

Definition at line 571 of file tensor.C.

References cmp, del_deriv(), indices(), n_comp, position(), Tensor(), triad, type_indice, and valence.

## operator-() [1/6]

Scalar Lorene::operator- | ( | const Scalar & | a,
|  | const Tensor & | b )

Scalar - Tensor. The `Tensor` must be of valence 0.

Definition at line 173 of file tensor_arithm.C.

## operator-() [2/6]

Tensor Lorene::operator- | ( | const Tensor & | t | ) |

`-` Tensor

Definition at line 80 of file tensor_arithm.C.

References Lorene::Tensor::get_index_type(), Lorene::Tensor::get_mp(), Lorene::Tensor::get_n_comp(), Lorene::Tensor::get_triad(), Lorene::Tensor::get_valence(), Lorene::Tensor::indices(), and Lorene::Tensor::set().

## operator-() [3/6]

Scalar Lorene::operator- | ( | const Tensor & | a,
|  | const Scalar & | b )

Tensor - Scalar. The `Tensor` must be of valence 0.

Definition at line 164 of file tensor_arithm.C.

## operator-() [4/6]

Tensor Lorene::operator- | ( | const Tensor & | a,
|  | const Tensor & | b )

Tensor - Tensor.

Definition at line 142 of file tensor_arithm.C.

References Lorene::Tensor::get_index_type(), Lorene::Tensor::get_mp(), Lorene::Tensor::get_n_comp(), Lorene::Tensor::get_triad(), Lorene::Tensor::get_valence(), Lorene::Tensor::indices(), and Lorene::Tensor::set().

## operator-() [5/6]

Tensor_sym Lorene::operator- | ( | const Tensor_sym & | tt | ) |

- Tensor_sym. For efficiency reasons this function is distinct from `Tensor` `operator+`(const Tensor& ).

Definition at line 70 of file tensor_sym_arithm.C.

References Lorene::Tensor::get_index_type(), Lorene::Tensor::get_mp(), Lorene::Tensor::get_n_comp(), Lorene::Tensor::get_triad(), Lorene::Tensor::get_valence(), Lorene::Tensor_sym::indices(), Lorene::Tensor::set(), Lorene::Tensor_sym::sym_index1(), and Lorene::Tensor_sym::sym_index2().

## operator-() [6/6]

Tensor_sym Lorene::operator- | ( | const Tensor_sym & | t1,
|  | const Tensor_sym & | t2 )

Tensor_sym - Tensor_sym.

For efficiency reasons this function is distinct from `Tensor` `operator-`(const Tensor&, const Tensor&) .

Definition at line 119 of file tensor_sym_arithm.C.

References Lorene::Tensor::get_index_type(), Lorene::Tensor::get_mp(), Lorene::Tensor::get_n_comp(), Lorene::Tensor::get_triad(), Lorene::Tensor::get_valence(), Lorene::Tensor_sym::indices(), Lorene::Tensor::set(), Lorene::Tensor_sym::sym_index1(), and Lorene::Tensor_sym::sym_index2().

## operator-=()

void Lorene::Tensor::operator-= | ( | const Tensor & | t | ) |

-= Tensor

Definition at line 587 of file tensor.C.

References cmp, del_deriv(), indices(), n_comp, position(), Tensor(), triad, type_indice, and valence.

## operator/() [1/6]

Tensor Lorene::operator/ | ( | const Tensor & | t1,
|  | const Scalar & | s2 )

Tensor / Scalar.

Definition at line 246 of file tensor_arithm.C.

References Lorene::Scalar::get_etat(), Lorene::Tensor::get_index_type(), Lorene::Tensor::get_mp(), Lorene::Tensor::get_n_comp(), Lorene::Tensor::get_triad(), Lorene::Tensor::get_valence(), Lorene::Tensor::indices(), and Lorene::Tensor::set().

## operator/() [2/6]

Tensor Lorene::operator/ | ( | const Tensor & | t,
|  | double | x )

Tensor / double.

Definition at line 272 of file tensor_arithm.C.

References Lorene::Tensor::get_index_type(), Lorene::Tensor::get_mp(), Lorene::Tensor::get_n_comp(), Lorene::Tensor::get_triad(), Lorene::Tensor::get_valence(), Lorene::Tensor::indices(), Lorene::Tensor::set(), and x.

## operator/() [3/6]

Tensor Lorene::operator/ | ( | const Tensor & | t,
|  | int | m )

Tensor / int.

Definition at line 294 of file tensor_arithm.C.

## operator/() [4/6]

Tensor_sym Lorene::operator/ | ( | const Tensor_sym & | t1,
|  | const Scalar & | s2 )

Tensor_sym / Scalar.

For efficiency reasons this function is distinct from `Tensor` `operator/`(const Tensor&, const Scalar&) .

Definition at line 211 of file tensor_sym_arithm.C.

References Lorene::Scalar::get_etat(), Lorene::Tensor::get_index_type(), Lorene::Tensor::get_mp(), Lorene::Tensor::get_n_comp(), Lorene::Tensor::get_triad(), Lorene::Tensor::get_valence(), Lorene::Tensor_sym::indices(), Lorene::Tensor::set(), Lorene::Tensor_sym::sym_index1(), and Lorene::Tensor_sym::sym_index2().

## operator/() [5/6]

Tensor_sym Lorene::operator/ | ( | const Tensor_sym & | tt,
|  | double | x )

Tensor_sym / double.

For efficiency reasons this function is distinct from `Tensor` `operator/`(const Tensor&, double) .

Definition at line 238 of file tensor_sym_arithm.C.

References Lorene::Tensor::get_index_type(), Lorene::Tensor::get_mp(), Lorene::Tensor::get_n_comp(), Lorene::Tensor::get_triad(), Lorene::Tensor::get_valence(), Lorene::Tensor_sym::indices(), Lorene::Tensor::set(), Lorene::Tensor_sym::sym_index1(), Lorene::Tensor_sym::sym_index2(), and x.

## operator/() [6/6]

Tensor_sym Lorene::operator/ | ( | const Tensor_sym & | t,
|  | int | m )

Tensor_sym / int.

For efficiency reasons this function is distinct from `Tensor` `operator/`(const Tensor&, int) .

Definition at line 261 of file tensor_sym_arithm.C.

## operator=() [1/3]

void Lorene::Tensor::operator= | ( | const Tensor & | t | ) |

virtual

Assignment to a `Tensor`.

Reimplemented in Lorene::Scalar, Lorene::Sym_tensor, Lorene::Sym_tensor_trans, Lorene::Sym_tensor_tt, Lorene::Tensor_sym, Lorene::Vector, and Lorene::Vector_divfree.

Definition at line 553 of file tensor.C.

References cmp, del_deriv(), indices(), n_comp, position(), Tensor(), triad, type_indice, and valence.

## operator=() [2/3]

void Lorene::Tensor_sym::operator= | ( | const Tensor & | a | ) |

virtual

Assignment to a `Tensor` NB: the symmetry about the indices `id_sym1` and `id_sym2` of the input tensor is assumed but is not checked.

Reimplemented from Lorene::Tensor.

Reimplemented in Lorene::Sym_tensor, Lorene::Sym_tensor_trans, and Lorene::Sym_tensor_tt.

Definition at line 218 of file tensor_sym.C.

References Lorene::Tensor::cmp, Lorene::Tensor::del_deriv(), Lorene::Tensor::get_triad(), Lorene::Tensor::get_valence(), id_sym1, id_sym2, indices(), Lorene::Tensor::n_comp, Lorene::Tensor::position(), Lorene::Tensor::Tensor(), Lorene::Tensor::triad, Lorene::Tensor::type_indice, and Lorene::Tensor::valence.

## operator=() [3/3]

void Lorene::Tensor_sym::operator= | ( | const Tensor_sym & | a | ) |

virtual

Assignment to another `Tensor_sym`.

Reimplemented in Lorene::Sym_tensor, Lorene::Sym_tensor_trans, and Lorene::Sym_tensor_tt.

Definition at line 198 of file tensor_sym.C.

References Lorene::Tensor::cmp, Lorene::Tensor::del_deriv(), id_sym1, id_sym2, indices(), Lorene::Tensor::n_comp, position(), Tensor_sym(), Lorene::Tensor::triad, Lorene::Tensor::type_indice, and Lorene::Tensor::valence.

## position() [1/2]

int Lorene::Tensor::position | ( | const Itbl & | ind | ) | const

virtual

Returns the position in the array `cmp` of a component given by its indices.

Parameters

  ind

  [input] 1-D array of integers (class `Itbl` ) of size `valence` giving the values of each index specifing the component, with the following storage convention:
  - `ind(0)` : value of the first index (1, 2 or 3)
  - `ind(1)` : value of the second index (1, 2 or 3)
  - and so on...

Returns
  position in the array `cmp` of the pointer to the `Scalar` containing the component specified by `ind`

Reimplemented in Lorene::Tensor_sym, and Lorene::Vector.

Definition at line 525 of file tensor.C.

References Lorene::Itbl::get_dim(), Lorene::Itbl::get_ndim(), and valence.

## position() [2/2]

int Lorene::Tensor_sym::position | ( | const Itbl & | ind | ) | const

virtual

Returns the position in the array `cmp` of a component given by its indices.

Parameters

  ind

  [input] 1-D array of integers (class `Itbl` ) of size `valence` giving the values of each index specifing the component, with the following storage convention:
  - `ind(0)` : value of the first index (1, 2 or 3)
  - `ind(1)` : value of the second index (1, 2 or 3)
  - and so on...

Returns
  position in the array `cmp` of the pointer to the `Scalar` containing the component specified by `ind`

Reimplemented from Lorene::Tensor.

Definition at line 245 of file tensor_sym.C.

References Lorene::Itbl::get_dim(), Lorene::Itbl::get_ndim(), id_sym1, id_sym2, Lorene::Itbl::set(), and Lorene::Tensor::valence.

## sauve() [1/2]

void Lorene::Tensor::sauve | ( | FILE * | fd | ) | const

virtual

Save in a binary file.

Reimplemented in Lorene::Scalar, and Lorene::Tensor_sym.

Definition at line 906 of file tensor.C.

References cmp, Lorene::fwrite_be(), n_comp, sauve(), triad, type_indice, and valence.

## sauve() [2/2]

void Lorene::Tensor_sym::sauve | ( | FILE * | fd | ) | const

virtual

Save in a binary file.

Reimplemented from Lorene::Tensor.

Definition at line 372 of file tensor_sym.C.

References Lorene::fwrite_be(), id_sym1, id_sym2, and Lorene::Tensor::sauve().

## set() [1/4]

Scalar & Lorene::Tensor::set | ( | const Itbl & | ind | ) |

Returns the value of a component (read/write version).

Parameters

  ind

  1-D `Itbl` of size `valence` containing the values of each index specifing the component, with the following storage convention:
  - `ind(0)` : value of the first index (1, 2 or 3)
  - `ind(1)` : value of the second index (1, 2 or 3)
  - and so on...

Returns
  modifiable reference on the component specified by `ind`

Definition at line 654 of file tensor.C.

References cmp, del_deriv(), Lorene::Itbl::get_dim(), Lorene::Itbl::get_ndim(), position(), and valence.

## set() [2/4]

Scalar & Lorene::Tensor::set | ( | int | i1,
|  | int | i2 )

Returns the value of a component for a tensor of valence 2 (read/write version).

Parameters

  i1 | value of the first index (1, 2 or 3)
  i2 | value of the second index (1, 2 or 3)

Returns
  modifiable reference on the component specified by ``(i1,i2)

Definition at line 606 of file tensor.C.

References cmp, del_deriv(), position(), Lorene::Itbl::set(), and valence.

## set() [3/4]

Scalar & Lorene::Tensor::set | ( | int | i1,
|  | int | i2,
|  | int | i3 )

Returns the value of a component for a tensor of valence 3 (read/write version).

Parameters

  i1 | value of the first index (1, 2 or 3)
  i2 | value of the second index (1, 2 or 3)
  i3 | value of the third index (1, 2 or 3)

Returns
  modifiable reference on the component specified by ``(i1,i2,i3)

Definition at line 621 of file tensor.C.

References cmp, del_deriv(), position(), Lorene::Itbl::set(), and valence.

## set() [4/4]

Scalar & Lorene::Tensor::set | ( | int | i1,
|  | int | i2,
|  | int | i3,
|  | int | i4 )

Returns the value of a component for a tensor of valence 4 (read/write version).

Parameters

  i1 | value of the first index (1, 2 or 3)
  i2 | value of the second index (1, 2 or 3)
  i3 | value of the third index (1, 2 or 3)
  i4 | value of the fourth index (1, 2 or 3)

Returns
  modifiable reference on the component specified by ``(i1,i2,i3,i4)

Definition at line 637 of file tensor.C.

References cmp, del_deriv(), position(), Lorene::Itbl::set(), and valence.

## set_dependance()

void Lorene::Tensor::set_dependance | ( | const Metric & | met | ) | const

protected

To be used to describe the fact that the derivatives members have been calculated with `met` .

First it sets a null element of `met_depend` to `&met` and puts `this` in the list of the dependancies of `met` .

Definition at line 453 of file tensor.C.

References met_depend, and Lorene::Metric::tensor_depend.

## set_der_0x0()

void Lorene::Tensor::set_der_0x0 | ( |  | ) | const

protected

Sets the pointers on derived quantities to 0x0.

Definition at line 407 of file tensor.C.

References set_der_met_0x0().

## set_der_met_0x0()

void Lorene::Tensor::set_der_met_0x0 | ( | int | i | ) | const

protected

Sets all the i-th components of `met_depend` , `p_derive_cov` , etc... to 0x0.

Definition at line 433 of file tensor.C.

References met_depend, p_derive_con, p_derive_cov, and p_divergence.

## set_etat_nondef()

void Lorene::Tensor::set_etat_nondef | ( |  | ) |

virtual

Sets the logical state of all components to `ETATNONDEF`
(undefined state).

Reimplemented in Lorene::Scalar.

Definition at line 489 of file tensor.C.

References cmp, del_deriv(), and n_comp.

## set_etat_qcq()

void Lorene::Tensor::set_etat_qcq | ( |  | ) |

virtual

Sets the logical state of all components to `ETATQCQ`
(ordinary state).

Reimplemented in Lorene::Scalar.

Definition at line 481 of file tensor.C.

References cmp, del_deriv(), and n_comp.

## set_etat_zero()

void Lorene::Tensor::set_etat_zero | ( |  | ) |

virtual

Sets the logical state of all components to `ETATZERO`
(zero state).

Reimplemented in Lorene::Scalar.

Definition at line 497 of file tensor.C.

References cmp, del_deriv(), and n_comp.

## set_index_type() [1/2]

Itbl & Lorene::Tensor::set_index_type | ( |  | ) |

inline

Sets the types of all the indices.

Returns
  a reference on the 1-D array of integers (class `Itbl` ) of size `valence` that can be modified (`COV` for a covariant one and `CON` for a contravariant one)

Definition at line 918 of file tensor.h.

References type_indice.

## set_index_type() [2/2]

int & Lorene::Tensor::set_index_type | ( | int | i | ) |

inline

Sets the type of the index number `i` .

`i` must be strictly lower than `valence` and obey the following convention:

- `i` = 0 : first index
- `i` = 1 : second index
- and so on...

Returns
  reference on the type that can be modified (`COV` for a covariant index, `CON` for a contravariant one)

Definition at line 909 of file tensor.h.

References type_indice.

## set_triad()

void Lorene::Tensor::set_triad | ( | const Base_vect & | new_triad | ) |

Assigns a new vectorial basis (triad) of decomposition.

NB: this function modifies only the member `triad` and leave unchanged the components (member `cmp` ). In order to change them coherently with the new basis, the function `change_triad`(const Base_vect& ) must be called instead.

Definition at line 519 of file tensor.C.

References triad.

## spectral_display()

void Lorene::Tensor::spectral_display | ( | const char * | comment = 0x0,
|  | double | threshold = 1.e-7,
|  | int | precision = 4,
|  | ostream & | ostr = cout ) const

virtual

Displays the spectral coefficients and the associated basis functions of each component.

This function shows only the values greater than a given threshold.

Parameters

  comment | comment to be printed at top of the display (default: 0x0 = nothing printed)
  threshold | [input] Value above which a coefficient is printed (default: 1.e-7)
  precision | [input] Number of printed digits (default: 4)
  ostr | [input] Output stream used for the printing (default: cout)

Reimplemented in Lorene::Scalar.

Definition at line 874 of file tensor.C.

References cmp, indices(), n_comp, and valence.

## std_spectral_base()

void Lorene::Tensor::std_spectral_base | ( |  | ) |

virtual

Sets the standard spectal bases of decomposition for each component.

To be used only with `valence` lower than or equal 2.

Reimplemented in Lorene::Scalar, and Lorene::Vector.

Definition at line 926 of file tensor.C.

References cmp, indices(), mp, n_comp, triad, and valence.

## std_spectral_base_odd()

void Lorene::Tensor::std_spectral_base_odd | ( |  | ) |

virtual

Sets the standard odd spectal bases of decomposition for each component.

Currently only implemented for a scalar.

Reimplemented in Lorene::Scalar.

Definition at line 982 of file tensor.C.

References cmp, and valence.

## sym_index1()

int Lorene::Tensor_sym::sym_index1 | ( |  | ) | const

inline

Number of the first symmetric index (`0<=` `id_sym1` < `valence` ).

Definition at line 1149 of file tensor.h.

References id_sym1.

## sym_index2()

int Lorene::Tensor_sym::sym_index2 | ( |  | ) | const

inline

Number of the second symmetric index (`id_sym1` < `id_sym2` < `valence` ).

Definition at line 1154 of file tensor.h.

References id_sym2.

## Tensor() [1/8]

Lorene::Tensor::Tensor | ( | const Map & | map | ) |

explicit protected

Constructor for a scalar field: to be used only by the derived class `Scalar` .

Definition at line 322 of file tensor.C.

References cmp, Lorene::Map(), mp, n_comp, set_der_0x0(), triad, type_indice, and valence.

## Tensor() [2/8]

Lorene::Tensor::Tensor | ( | const Map & | map,
|  | const Base_vect & | triad_i,
|  | FILE * | fich )

Constructor from a file (see `sauve(FILE*)` ).

Parameters

  map | the mapping
  triad_i | vectorial basis (triad) with respect to which the tensor components are defined. It will be checked that it coincides with the basis saved in the file.
  fich | file which has been created by the function `sauve(FILE*)` .

Definition at line 295 of file tensor.C.

References Lorene::Base_vect::bvect_from_file(), cmp, Lorene::fread_be(), Lorene::Map(), mp, n_comp, set_der_0x0(), triad, type_indice, and valence.

## Tensor() [3/8]

Lorene::Tensor::Tensor | ( | const Map & | map,
|  | int | val,
|  | const Itbl & | tipe,
|  | const Base_vect & | triad_i )

Standard constructor.

Parameters

  map | the mapping
  val | valence of the tensor

  tipe

  1-D array of integers (class `Itbl` ) of size `valence` containing the type of each index, `COV` for a covariant one and `CON` for a contravariant one, with the following storage convention:
  - `tipe(0)` : type of the first index
  - `tipe(1)` : type of the second index
  - and so on...

  triad_i | vectorial basis (triad) with respect to which the tensor components are defined

Definition at line 202 of file tensor.C.

References cmp, Lorene::Itbl::get_dim(), Lorene::Itbl::get_ndim(), Lorene::Map(), mp, n_comp, Lorene::pow(), set_der_0x0(), triad, type_indice, and valence.

## Tensor() [4/8]

Lorene::Tensor::Tensor | ( | const Map & | map,
|  | int | val,
|  | const Itbl & | tipe,
|  | const Base_vect * | triad_i )

Standard constructor with the triad passed as a pointer.

Parameters

  map | the mapping
  val | valence of the tensor

  tipe

  1-D array of integers (class `Itbl` ) of size `valence` containing the type of each index, `COV` for a covariant one and `CON` for a contravariant one, with the following storage convention:
  - `tipe(0)` : type of the first index
  - `tipe(1)` : type of the second index
  - and so on...

  triad_i | pointer on the vectorial basis (triad) with respect to which the tensor components are defined (can be set to 0x0 for a scalar field)

Definition at line 225 of file tensor.C.

References cmp, Lorene::Itbl::get_dim(), Lorene::Itbl::get_ndim(), Lorene::Map(), mp, n_comp, Lorene::pow(), set_der_0x0(), triad, type_indice, and valence.

## Tensor() [5/8]

Lorene::Tensor::Tensor | ( | const Map & | map,
|  | int | val,
|  | const Itbl & | tipe,
|  | int | n_comp_i,
|  | const Base_vect & | triad_i )

protected

Constructor to be used by derived classes, with symmetries among the components.

The number of independent components is given as an argument (`n_comp_i` ), and not computed from the valence, as in the standard constructor.

Parameters

  map | the mapping
  val | valence of the tensor

  tipe

  1-D array of integers (class `Itbl` ) of size `valence` containing the type of each index, `COV` for a covariant one and `CON` for a contravariant one, with the following storage convention:
  - `tipe(0)` : type of the first index
  - `tipe(1)` : type of the second index
  - and so on...

  n_comp_i | number of components to be stored
  triad_i | vectorial basis (triad) with respect to which the tensor components are defined

Definition at line 334 of file tensor.C.

References cmp, Lorene::Itbl::get_dim(), Lorene::Itbl::get_ndim(), Lorene::Map(), mp, n_comp, set_der_0x0(), triad, type_indice, and valence.

## Tensor() [6/8]

Lorene::Tensor::Tensor | ( | const Map & | map,
|  | int | val,
|  | int | tipe,
|  | const Base_vect & | triad_i )

Standard constructor when all the indices are of the same type.

Parameters

  map | the mapping
  val | valence of the tensor
  tipe | the type (`COV` or `CON` ) of the indices.
  triad_i | vectorial basis (triad) with respect to which the tensor components are defined.

Definition at line 251 of file tensor.C.

References cmp, Lorene::Map(), mp, n_comp, Lorene::pow(), set_der_0x0(), triad, type_indice, and valence.

## Tensor() [7/8]

Lorene::Tensor::Tensor | ( | const Map & | map,
|  | int | val,
|  | int | tipe,
|  | int | n_comp_i,
|  | const Base_vect & | triad_i )

protected

Constructor used by derived classes, with symmetries among the components, when all the indices are of the same type.

The number of independent components is given as a argument (`n_comp_i` ), and not computed from the valence, as in the standard constructor.

Parameters

  map | the mapping
  val | valence of the tensor
  tipe | the type of the indices.
  n_comp_i | number of components to be stored
  triad_i | vectorial basis (triad) with respect to which the tensor components are defined

Definition at line 359 of file tensor.C.

References cmp, Lorene::Map(), mp, n_comp, set_der_0x0(), triad, type_indice, and valence.

## Tensor() [8/8]

Lorene::Tensor::Tensor | ( | const Tensor & | source | ) |

Copy constructor.

Definition at line 271 of file tensor.C.

References cmp, indices(), mp, n_comp, position(), Lorene::pow(), set_der_0x0(), Tensor(), triad, type_indice, and valence.

## Tensor_sym() [1/5]

Lorene::Tensor_sym::Tensor_sym | ( | const Map & | map,
|  | const Base_vect & | triad_i,
|  | FILE * | fich )

Constructor from a file (see `sauve(FILE*)` ).

Parameters

  map | the mapping
  triad_i | vectorial basis (triad) with respect to which the tensor components are defined. It will be checked that it coincides with the basis saved in the file.
  fich | file which has been created by the function `sauve(FILE*)`.

Definition at line 174 of file tensor_sym.C.

References Lorene::fread_be(), id_sym1, id_sym2, Lorene::Map(), Lorene::Tensor::Tensor(), and Lorene::Tensor::type_indice.

## Tensor_sym() [2/5]

Lorene::Tensor_sym::Tensor_sym | ( | const Map & | map,
|  | int | tipe0,
|  | int | tipe1,
|  | int | tipe2,
|  | const Base_vect & | triad_i,
|  | int | index_sym1,
|  | int | index_sym2 )

Constructor for a valence 3 symmetric tensor.

Parameters

  map | the mapping
  tipe0 | type (`COV` or `CON` ) of the first index.
  tipe1 | type (`COV` or `CON` ) of the second index.
  tipe2 | type (`COV` or `CON` ) of the third index.
  triad_i | vectorial basis (triad) with respect to which the tensor components are defined.
  index_sym1 | number of the first symmetric index (`0<=` `index_sym1` `<=2` )
  index_sym2 | number of the second symmetric index (`index_sym1` < `index_sym2` `<=2` )

Definition at line 120 of file tensor_sym.C.

References id_sym1, id_sym2, Lorene::Map(), Lorene::Tensor::Tensor(), and Lorene::Tensor::type_indice.

## Tensor_sym() [3/5]

Lorene::Tensor_sym::Tensor_sym | ( | const Map & | map,
|  | int | val,
|  | const Itbl & | tipe,
|  | const Base_vect & | triad_i,
|  | int | index_sym1,
|  | int | index_sym2 )

Standard constructor.

Parameters

  map | the mapping
  val | valence of the tensor (must be at least 2)

  tipe

  1-D array of integers (class `Itbl` ) of size `valence` containing the type of each index, `COV` for a covariant one and `CON` for a contravariant one, with the following storage convention:
  - `tipe(0)` : type of the first index
  - `tipe(1)` : type of the second index
  - and so on...

  triad_i | vectorial basis (triad) with respect to which the tensor components are defined
  index_sym1 | number of the first symmetric index (`0<=` `index_sym1` < `valence` )
  index_sym2 | number of the second symmetric index (`index_sym1` < `index_sym2` < `valence` )

Definition at line 69 of file tensor_sym.C.

References id_sym1, id_sym2, Lorene::Map(), Lorene::pow(), Lorene::Tensor::Tensor(), and Lorene::Tensor::valence.

## Tensor_sym() [4/5]

Lorene::Tensor_sym::Tensor_sym | ( | const Map & | map,
|  | int | val,
|  | int | tipe,
|  | const Base_vect & | triad_i,
|  | int | index_sym1,
|  | int | index_sym2 )

Standard constructor when all the indices are of the same type.

Parameters

  map | the mapping
  val | valence of the tensor (must be at least 2)
  tipe | the type (`COV` or `CON` ) of the indices.
  triad_i | vectorial basis (triad) with respect to which the tensor components are defined.
  index_sym1 | number of the first symmetric index (`0<=` `index_sym1` < `valence` )
  index_sym2 | number of the second symmetric index (`index_sym1` < `index_sym2` < `valence` )

Definition at line 97 of file tensor_sym.C.

References id_sym1, id_sym2, Lorene::Map(), Lorene::pow(), Lorene::Tensor::Tensor(), and Lorene::Tensor::valence.

## Tensor_sym() [5/5]

Lorene::Tensor_sym::Tensor_sym | ( | const Tensor_sym & | a | ) |

Copy constructor.

Definition at line 152 of file tensor_sym.C.

References Lorene::Tensor::cmp, id_sym1, id_sym2, indices(), Lorene::Tensor::mp, Lorene::Tensor::n_comp, position(), Lorene::pow(), Lorene::Tensor::Tensor(), Tensor_sym(), Lorene::Tensor::triad, Lorene::Tensor::type_indice, and Lorene::Tensor::valence.

## trace() [1/4]

Scalar Lorene::Tensor::trace | ( |  | ) | const

Trace on two different type indices for a valence 2 tensor.

Definition at line 180 of file tensor_calculus.C.

References mp, operator()(), Lorene::Scalar::set_etat_zero(), type_indice, and valence.

## trace() [2/4]

Scalar Lorene::Tensor::trace | ( | const Metric & | gam | ) | const

Trace with respect to a given metric for a valence 2 tensor.

Parameters

  gam | metric used to raise or lower one of the indices, in order to take the trace

Definition at line 197 of file tensor_calculus.C.

References Lorene::Metric::con(), Lorene::contract(), Lorene::Metric::cov(), trace(), type_indice, and valence.

## trace() [3/4]

Tensor Lorene::Tensor::trace | ( | int | ind1,
|  | int | ind2 ) const

Trace on two different type indices.

Parameters

  ind1

  first index for the contraction, with the following convention :
  - `ind1` = 0 : first index of the tensor
  - `ind1` = 1 : second index of the tensor
  - and so on...

  ind2 | second index for the contraction

Definition at line 94 of file tensor_calculus.C.

References cmp, get_n_comp(), indices(), mp, position(), Lorene::Itbl::set(), set(), Lorene::Scalar::set_etat_zero(), Tensor(), triad, type_indice, and valence.

## trace() [4/4]

Tensor Lorene::Tensor::trace | ( | int | ind1,
|  | int | ind2,
|  | const Metric & | gam ) const

Trace with respect to a given metric.

Parameters

  ind1

  first index for the contraction, with the following convention :
  - `ind1` = 0 : first index of the tensor
  - `ind1` = 1 : second index of the tensor
  - and so on...

  ind2 | second index for the contraction
  gam | metric used to raise or lower ind1 in order that it has a opposite type than ind2

Definition at line 153 of file tensor_calculus.C.

References Lorene::Metric::con(), Lorene::contract(), Lorene::Metric::cov(), Tensor(), trace(), type_indice, and valence.

## up()

Tensor Lorene::Tensor::up | ( | int | ind,
|  | const Metric & | gam ) const

Computes a new tensor by raising an index of `*this`.

Parameters

  ind

  index to be raised, with the following convention :
  - `ind1` = 0 : first index of the tensor
  - `ind1` = 1 : second index of the tensor
  - and so on... (`ind` must be of covariant type (`COV` )).

  gam | metric used to raise the index (contraction with the twice contravariant form of the metric on the index `ind` ).

Definition at line 225 of file tensor_calculus.C.

References Lorene::Metric::con(), Lorene::contract(), indices(), mp, n_comp, Lorene::Itbl::set(), set(), Tensor(), triad, type_indice, and valence.

## up_down()

Tensor Lorene::Tensor::up_down | ( | const Metric & | gam | ) | const

Computes a new tensor by raising or lowering all the indices of `*this` .

Parameters

  gam | metric used to lower the contravariant indices and raising the covariant ones.

Definition at line 305 of file tensor_calculus.C.

References down(), Tensor(), type_indice, up(), and valence.

## ~Tensor()

Lorene::Tensor::~Tensor | ( |  | ) |

virtual

Destructor.

Definition at line 385 of file tensor.C.

References cmp, del_deriv(), and n_comp.

## ~Tensor_sym()

Lorene::Tensor_sym::~Tensor_sym | ( |  | ) |

virtual

Destructor.

Definition at line 189 of file tensor_sym.C.

## Variable Documentation

## cmp

Scalar** Lorene::Tensor::cmp

protected

Array of size `n_comp` of pointers onto the components.

Definition at line 315 of file tensor.h.

## id_sym1

int Lorene::Tensor_sym::id_sym1

protected

Number of the first symmetric index (`0<=` `id_sym1` < `valence` ).

Definition at line 1044 of file tensor.h.

## id_sym2

int Lorene::Tensor_sym::id_sym2

protected

Number of the second symmetric index (`id_sym1` < `id_sym2` < `valence` ).

Definition at line 1049 of file tensor.h.

## met_depend

const Metric* Lorene::Tensor::met_depend[N_MET_MAX]

mutable protected

Array on the `Metric` 's which were used to compute derived quantities, like `p_derive_cov` , etc... The i-th element of this array is the `Metric` used to compute the i-th element of `p_derive_cov` , etc.

Definition at line 327 of file tensor.h.

## mp

const Map* const Lorene::Tensor::mp

protected

Mapping on which the numerical values at the grid points are defined.

Definition at line 295 of file tensor.h.

## n_comp

int Lorene::Tensor::n_comp

protected

Number of stored components, depending on the symmetry.

Definition at line 312 of file tensor.h.

## p_derive_con

Tensor* Lorene::Tensor::p_derive_con[N_MET_MAX]

mutable protected

Array of pointers on the contravariant derivatives of `this` with respect to various metrics.

See the comments of `met_depend` . See also the comments of method `derive_con()` for a precise definition of a "contravariant" derivative.

Definition at line 343 of file tensor.h.

## p_derive_cov

Tensor* Lorene::Tensor::p_derive_cov[N_MET_MAX]

mutable protected

Array of pointers on the covariant derivatives of `this` with respect to various metrics.

See the comments of `met_depend` . See also the comments of method `derive_cov()` for the index convention of the covariant derivation.

Definition at line 335 of file tensor.h.

## p_divergence

Tensor* Lorene::Tensor::p_divergence[N_MET_MAX]

mutable protected

Array of pointers on the divergence of `this` with respect to various metrics.

See the comments of `met_depend` . See also the comments of method `divergence()` for a precise definition of a the divergence with respect to a given metric.

Definition at line 351 of file tensor.h.

## triad

const Base_vect* Lorene::Tensor::triad

protected

Vectorial basis (triad) with respect to which the tensor components are defined.

Definition at line 303 of file tensor.h.

## type_indice

Itbl Lorene::Tensor::type_indice

protected

1D array of integers (class `Itbl` ) of size `valence`
containing the type of each index: `COV` for a covariant one and `CON` for a contravariant one.

Definition at line 310 of file tensor.h.

## valence

int Lorene::Tensor::valence

protected

Valence of the tensor (0 = scalar, 1 = vector, etc...).

Definition at line 298 of file tensor.h.

## Friends

## Metric

friend class Metric

friend

Definition at line 1004 of file tensor.h.

## operator* [1/6]

Tensor operator* | ( | const Tensor & | a,
|  | const Tensor & | b )

friend

Tensorial product.

Definition at line 107 of file tensor_calculus_ext.C.

References get_triad(), indices(), mp, n_comp, Lorene::Itbl::set(), set(), Tensor(), type_indice, and valence.

## operator* [2/6]

Tensor_sym operator* | ( | const Tensor & | a,
|  | const Tensor_sym & | b )

friend

Tensorial product with symmetries.

Definition at line 108 of file tensor_sym_calculus.C.

References get_triad(), Lorene::Tensor_sym::indices(), mp, n_comp, Lorene::Itbl::set(), set(), Lorene::Tensor_sym::sym_index1(), Lorene::Tensor_sym::sym_index2(), Tensor(), type_indice, and valence.

## operator* [3/6]

Tensor_sym operator* | ( | const Tensor_sym & | a,
|  | const Tensor & | b )

friend

Tensorial product with symmetries.

Definition at line 68 of file tensor_sym_calculus.C.

References get_triad(), Lorene::Tensor_sym::indices(), mp, n_comp, Lorene::Itbl::set(), set(), Lorene::Tensor_sym::sym_index1(), Lorene::Tensor_sym::sym_index2(), Tensor(), type_indice, and valence.

## operator* [4/6]

Tensor_sym operator* | ( | const Tensor_sym & | a,
|  | const Tensor_sym & | b )

friend

Tensorial product of two symmetric tensors.

NB: the output is an object of class `Tensor_sym` , with the two symmetric indices corresponding to the symmetric indices of tensor `a` . This means that the symmetries of tensor `b` indices are not used in the storage, since there is currently no class in Lorene to manage tensors with more than two symmetric indices.

Definition at line 151 of file tensor_sym_calculus.C.

References get_triad(), Lorene::Tensor_sym::indices(), mp, n_comp, Lorene::Itbl::set(), set(), Lorene::Tensor_sym::sym_index1(), Lorene::Tensor_sym::sym_index2(), type_indice, and valence.

## operator* [5/6]

Tensor_sym operator* | ( | const Tensor & | a,
|  | const Tensor_sym & | b )

friend

Tensorial product with symmetries.

Definition at line 108 of file tensor_sym_calculus.C.

## operator* [6/6]

Tensor_sym operator* | ( | const Tensor_sym & | a,
|  | const Tensor & | b )

friend

Tensorial product with symmetries.

Definition at line 68 of file tensor_sym_calculus.C.

## operator+ [1/2]

Scalar operator+ | ( | const Scalar & | a,
|  | const Tensor & | b )

friend

Scalar + Tensor. The `Tensor` must be of valence 0.

Definition at line 129 of file tensor_arithm.C.

References cmp, get_mp(), get_valence(), and Tensor().

## operator+ [2/2]

Scalar operator+ | ( | const Tensor & | a,
|  | const Scalar & | b )

friend

Tensor + Scalar. The `Tensor` must be of valence 0.

Definition at line 120 of file tensor_arithm.C.

References cmp, get_mp(), get_valence(), and Tensor().

## operator- [1/2]

Scalar operator- | ( | const Scalar & | a,
|  | const Tensor & | b )

friend

Scalar - Tensor. The `Tensor` must be of valence 0.

Definition at line 173 of file tensor_arithm.C.

References cmp, get_mp(), get_valence(), and Tensor().

## operator- [2/2]

Scalar operator- | ( | const Tensor & | a,
|  | const Scalar & | b )

friend

Tensor - Scalar. The `Tensor` must be of valence 0.

Definition at line 164 of file tensor_arithm.C.

References cmp, get_mp(), get_valence(), and Tensor().

## operator<<

ostream & operator<< | ( | ostream & | flux,
|  | const Tensor & | source )

friend

Definition at line 826 of file tensor.C.

## Scalar

friend class Scalar

friend

Definition at line 1000 of file tensor.h.

## Sym_tensor

friend class Sym_tensor

friend

Definition at line 1002 of file tensor.h.

## Tensor_sym

friend class Tensor_sym

friend

Definition at line 1003 of file tensor.h.

## Vector

friend class Vector

friend

Definition at line 1001 of file tensor.h.