31char tensor_calculus_C[] =
"$Header: /cvsroot/Lorene/C++/Source/Tensor/tensor_calculus.C,v 1.10 2014/10/13 08:53:44 j_novak Exp $" ;
127 for (
int i=0 ;
i<
res.get_n_comp() ;
i++) {
139 work.set_etat_zero() ;
141 for (
int j=1 ;
j<=3 ;
j++) {
161 cout <<
"Tensor::trace(int, int, const Metric&) : Warning : \n"
162 <<
" the two indices for the trace have opposite types,\n"
163 <<
" hence the metric is useless !\n" ;
187 res.set_etat_zero() ;
189 for (
int i=1;
i<=3;
i++) {
202 cout <<
"Tensor::trace(const Metric&) : Warning : \n"
203 <<
" the two indices have opposite types,\n"
204 <<
" hence the metric is useless to get the trace !\n" ;
245 for (
int i=0 ;
i<
res.n_comp ;
i++) {
284 for (
int i=0 ;
i<
res.n_comp ;
i++) {
356 fmet = &(
mp->flat_met_spher()) ;
364 fmet = &(
mp->flat_met_spher()) ;
370 fmet = &(
mp->flat_met_cart()) ;
373 cerr <<
"Tensor::compute_derive_lie : unknown triad type !\n" ;
392 cout <<
"######## WARNING #######\n" ;
393 cout <<
" Tensor::compute_derive_lie: the tensor components \n"
394 <<
" do not have all the same dzpuis ! : \n"
395 <<
" ic, dzpuis(ic), dz_in : " <<
ic <<
" "
431 for (
int id=0;
id<
valence;
id++) {
438 for (
int k=1;
k<=3;
k++) {
446 for (
int k=1;
k<=3;
k++) {
455 "Tensor::compute_derive_lie: unexpected type of index !\n" ;
Cartesian vectorial bases (triads).
Spherical orthonormal vectorial bases (triads).
Time evolution with partial storage (*** under development ***).
Basic integer array class.
Flat metric for tensor calculation.
Metric for tensor calculation.
virtual const Sym_tensor & con() const
Read-only access to the contravariant representation.
virtual const Sym_tensor & cov() const
Read-only access to the covariant representation.
Tensor field of valence 0 (or component of a tensorial field).
int get_dzpuis() const
Returns dzpuis.
Tensor field of valence 1.
const Map *const mp
Mapping on which the numerical values at the grid points are defined.
Tensor up_down(const Metric &gam) const
Computes a new tensor by raising or lowering all the indices of *this .
Scalar trace() const
Trace on two different type indices for a valence 2 tensor.
virtual int position(const Itbl &ind) const
Returns the position in the array cmp of a component given by its indices.
int valence
Valence of the tensor (0 = scalar, 1 = vector, etc...)
Tensor down(int ind, const Metric &gam) const
Computes a new tensor by lowering an index of *this.
const Scalar & operator()(const Itbl &ind) const
Returns the value of a component (read-only version).
Scalar ** cmp
Array of size n_comp of pointers onto the components.
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...
int n_comp
Number of stored components, depending on the symmetry.
Tensor derive_lie(const Vector &v) const
Computes the Lie derivative of this with respect to some vector field v.
const Tensor & derive_cov(const Metric &gam) const
Returns the covariant derivative 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.
Itbl type_indice
1D array of integers (class Itbl ) of size valence containing the type of each index: COV for a cov...
const Base_vect * triad
Vectorial basis (triad) with respect to which the tensor components are defined.
Tenseur contract(const Tenseur &, int id1, int id2)
Self contraction of two indices of a Tenseur .