Lorene::Tensor_sym Class Reference
Tensorial fields

Symmetric tensors (with respect to two of their arguments). More...

`#include <tensor.h>`

Inheritance diagram for Lorene::Tensor_sym:

## Public Member Functions

| Tensor_sym (const Map &map, int val, const Itbl &tipe, const Base_vect &triad_i, int index_sym1, int index_sym2)
| Standard constructor.
| 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.
| 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.
| Tensor_sym (const Tensor_sym &a)
| Copy constructor.
| Tensor_sym (const Map &map, const Base_vect &triad_i, FILE *fich)
| Constructor from a file (see `sauve(FILE*)` ).
virtual | ~Tensor_sym ()
| Destructor.
virtual void | operator= (const Tensor_sym &a)
| Assignment to another `Tensor_sym`.
virtual void | 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 | sym_index1 () const
| Number of the first symmetric index (`0<=` `id_sym1` < `valence` ).
int | sym_index2 () const
| Number of the second symmetric index (`id_sym1` < `id_sym2` < `valence` ).
virtual int | position (const Itbl &ind) const
| Returns the position in the array `cmp` of a component given by its indices.
virtual Itbl | indices (int pos) const
| Returns the indices of a component given by its position in the array `cmp` .
virtual void | sauve (FILE *) const
| Save in a binary file.
const Tensor_sym & | derive_cov (const Metric &gam) const
| Returns the covariant derivative of `this` with respect to some metric .
const 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 | derive_lie (const Vector &v) const
| Computes the Lie derivative of `this` with respect to some vector field `v`.
virtual void | set_etat_nondef ()
| Sets the logical state of all components to `ETATNONDEF` (undefined state).
virtual void | set_etat_zero ()
| Sets the logical state of all components to `ETATZERO` (zero state).
virtual void | set_etat_qcq ()
| Sets the logical state of all components to `ETATQCQ` (ordinary state).
virtual void | allocate_all ()
| Performs the memory allocation of all the elements, down to the `double` arrays of the `Tbl` s.
virtual void | change_triad (const Base_vect &new_triad)
| Sets a new vectorial basis (triad) of decomposition and modifies the components accordingly.
void | set_triad (const Base_vect &new_triad)
| Assigns a new vectorial basis (triad) of decomposition.
Scalar & | set (const Itbl &ind)
| Returns the value of a component (read/write version).
Scalar & | set (int i1, int i2)
| Returns the value of a component for a tensor of valence 2 (read/write version).
Scalar & | set (int i1, int i2, int i3)
| Returns the value of a component for a tensor of valence 3 (read/write version).
Scalar & | 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 | annule_domain (int l)
| Sets the `Tensor` to zero in a given domain.
virtual void | annule (int l_min, int l_max)
| Sets the `Tensor` to zero in several domains.
void | annule_extern_cn (int l_0, int deg)
| Performs a smooth (C^n) transition in a given domain to zero.
virtual void | std_spectral_base ()
| Sets the standard spectal bases of decomposition for each component.
virtual void | std_spectral_base_odd ()
| Sets the standard odd spectal bases of decomposition for each component.
virtual void | 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 | 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 | 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 | exponential_filter_ylm (int lzmin, int lzmax, int p, double alpha=-16.)
| Applies exponential filters to all components (see `Scalar::exponential_filter_ylm` ).
const Tensor & | divergence (const Metric &gam) const
| Computes the divergence of `this` with respect to some metric .
Tensor | up (int ind, const Metric &gam) const
| Computes a new tensor by raising an index of `*this`.
Tensor | down (int ind, const Metric &gam) const
| Computes a new tensor by lowering an index of `*this`.
Tensor | up_down (const Metric &gam) const
| Computes a new tensor by raising or lowering all the indices of `*this` .
Tensor | trace (int ind1, int ind2) const
| Trace on two different type indices.
Tensor | trace (int ind1, int ind2, const Metric &gam) const
| Trace with respect to a given metric.
Scalar | trace () const
| Trace on two different type indices for a valence 2 tensor.
Scalar | trace (const Metric &gam) const
| Trace with respect to a given metric for a valence 2 tensor.
const Map & | get_mp () const
| Returns the mapping.
const Base_vect * | get_triad () const
| Returns the vectorial basis (triad) on which the components are defined.
int | get_valence () const
| Returns the valence.
int | get_n_comp () const
| Returns the number of stored components.
int | get_index_type (int i) const
| Gives the type (covariant or contravariant) of the index number `i` .
Itbl | get_index_type () const
| Returns the types of all the indices.
int & | set_index_type (int i)
| Sets the type of the index number `i` .
Itbl & | set_index_type ()
| Sets the types of all the indices.
const Scalar & | operator() (const Itbl &ind) const
| Returns the value of a component (read-only version).
const Scalar & | operator() (int i1, int i2) const
| Returns the value of a component for a tensor of valence 2 (read-only version).
const Scalar & | 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 & | 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 | operator+= (const Tensor &)
| += Tensor
void | operator-= (const Tensor &)
| -= Tensor
virtual void | 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.

## Protected Member Functions

virtual void | del_deriv () const
| Deletes the derived quantities.
void | set_der_0x0 () const
| Sets the pointers on derived quantities to 0x0.
virtual void | del_derive_met (int) const
| Logical destructor of the derivatives depending on the i-th element of `met_depend` .
void | set_der_met_0x0 (int) const
| Sets all the i-th components of `met_depend` , `p_derive_cov` , etc... to 0x0.
void | set_dependance (const Metric &) const
| To be used to describe the fact that the derivatives members have been calculated with `met` .
int | get_place_met (const Metric &) const
| Returns the position of the pointer on `metre` in the array `met_depend` .
void | 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` ).

## Protected Attributes

int | id_sym1
| Number of the first symmetric index (`0<=` `id_sym1` < `valence` ).
int | id_sym2
| Number of the second symmetric index (`id_sym1` < `id_sym2` < `valence` ).
const Map *const | mp
| Mapping on which the numerical values at the grid points are defined.
int | valence
| Valence of the tensor (0 = scalar, 1 = vector, etc...).
const Base_vect * | triad
| Vectorial basis (triad) with respect to which the tensor components are defined.
Itbl | 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 | n_comp
| Number of stored components, depending on the symmetry.
Scalar ** | cmp
| Array of size `n_comp` of pointers onto the components.
const Metric * | 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 * | p_derive_cov [N_MET_MAX]
| Array of pointers on the covariant derivatives of `this` with respect to various metrics.
Tensor * | p_derive_con [N_MET_MAX]
| Array of pointers on the contravariant derivatives of `this` with respect to various metrics.
Tensor * | p_divergence [N_MET_MAX]
| Array of pointers on the divergence of `this` with respect to various metrics.

## Friends

Tensor_sym | operator* (const Tensor &a, const Tensor_sym &b)
| Tensorial product with symmetries.
Tensor_sym | operator* (const Tensor_sym &a, const Tensor &b)
| Tensorial product with symmetries.

## Detailed Description

Symmetric tensors (with respect to two of their arguments).

This subclass of `Tensor` is intended to store the components of a tensorial field with respect to a specific basis (triad), in the case the tensor has a valence at least 2 and is symmetric with respect to two of its arguments (or in other words, the components are symmetric with respect to two of their indices).
()

Definition at line 1037 of file tensor.h.

The documentation for this class was generated from the following files:

- tensor.h
- tensor_sym.C
- tensor_sym_calculus.C