LORENE
|
() More...
Functions | |
Tensor | Lorene::operator* (const Tensor &a, const Tensor &b) |
Tensorial product. More... | |
Tensor_sym | Lorene::operator* (const Tensor &a, const Tensor_sym &b) |
Tensorial product with symmetries. More... | |
Tensor_sym | Lorene::operator* (const Tensor_sym &a, const Tensor &b) |
Tensorial product with symmetries. More... | |
Tensor_sym | Lorene::operator* (const Tensor_sym &a, const Tensor_sym &b) |
Tensorial product of two symmetric tensors. More... | |
Tensor | Lorene::contract (const Tensor &t1, int ind1, const Tensor &t2, int ind2, bool desaliasing=false) |
Contraction of two tensors. More... | |
Tensor | Lorene::contract (const Tensor &t1, int ind_i1, int ind_j1, const Tensor &t2, int ind_i2, int ind_j2, bool desaliasing=false) |
Double contraction of two tensors. More... | |
Tensor | Lorene::contract (const Tensor &t1, int ind1, int ind2) |
Contraction on two indices of a single tensor (trace). More... | |
Tbl | Lorene::max (const Tensor &aa, const char *comment=0x0, ostream &ost=cout) |
Maxima in each domain of the values of the tensor components. More... | |
Tbl | Lorene::min (const Tensor &aa, const char *comment=0x0, ostream &ost=cout) |
Minima in each domain of the values of the tensor components. More... | |
Tbl | Lorene::maxabs (const Tensor &aa, const char *comment=0x0, ostream &ost=cout, bool verb=true) |
Maxima in each domain of the absolute values of the tensor components. More... | |
Tbl | Lorene::diffrel (const Tensor &aa, const Tensor &bb, const char *comment=0x0, ostream &ost=cout) |
Relative difference between two Tensor ( version). More... | |
Tbl | Lorene::diffrelmax (const Tensor &aa, const Tensor &bb, const char *comment=0x0, ostream &ost=cout) |
Relative difference between two Tensor (max version). More... | |
Tbl | Lorene::central_value (const Tensor &aa, const char *comment=0x0, ostream &ost=cout) |
Central value of each component of a tensor. More... | |
Tbl | Lorene::max_all_domains (const Tensor &aa, int l_excluded=-1, const char *comment=0x0, ostream &ost=cout) |
Maximum value of each component of a tensor over all the domains. More... | |
Tbl | Lorene::min_all_domains (const Tensor &aa, int l_excluded=-1, const char *comment=0x0, ostream &ost=cout) |
Minimum value of each component of a tensor over all the domains. More... | |
Tbl | Lorene::maxabs_all_domains (const Tensor &aa, int l_excluded=-1, const char *comment=0x0, ostream &ost=cout, bool verb=true) |
Maximum of the absolute value of each component of a tensor over all the domains. More... | |
()
Central value of each component of a tensor.
aa | tensor |
comment | comment to be printed on ost (default: 0x0 = nothing printed) |
ost | output stream for a formatted output of the result; used only if comment != 0x0 . |
Tbl
of size the number of independent components (aa.get_ncomp()
), the elements of which are the central values of the various components. Definition at line 655 of file tensor_calculus_ext.C.
References Lorene::Tensor::get_n_comp(), Lorene::Tensor::get_valence(), Lorene::Tensor::indices(), Lorene::Tbl::set(), and Lorene::Tbl::set_etat_qcq().
Tensor Lorene::contract | ( | const Tensor & | t1, |
int | ind1, | ||
const Tensor & | t2, | ||
int | ind2, | ||
bool | desaliasing = false |
||
) |
Contraction of two tensors.
t1 | [input] first tensor |
ind1 | [input] index of the first tensor for the contraction, obeying to the following convention :
|
t2 | [input] second tensor |
ind2 | [input] index of the second tensor for the contraction, with the same convention as ind1 |
desaliasing | [input] determines whether the products are performed with desaliasing or not |
ind1
of t1
with the index ind2
of t2
. NB: the types (COV
or CON
) of the indices ind1
and ind2
must be different. Definition at line 166 of file tensor_calculus_ext.C.
References Lorene::Tensor::get_index_type(), Lorene::Tensor::get_mp(), Lorene::Tensor::get_triad(), Lorene::Tensor::get_valence(), Lorene::Itbl::set(), Lorene::Tensor::set(), and Lorene::Scalar::set_etat_zero().
Tensor Lorene::contract | ( | const Tensor & | t1, |
int | ind_i1, | ||
int | ind_j1, | ||
const Tensor & | t2, | ||
int | ind_i2, | ||
int | ind_j2, | ||
bool | desaliasing = false |
||
) |
Double contraction of two tensors.
t1 | [input] first tensor |
ind_i1 | [input] position of the first index i1 in the first tensor for the contraction, obeying to the following convention :
|
ind_j1 | [input] position of the second index j1 in the first tensor for the contraction; one must have ind_i1 < ind_ j1 |
t2 | [input] second tensor |
ind_i2 | [input] position of the first index i2 in the second tensor for the contraction |
ind_j2 | [input] position of the second index j2 in the second tensor for the contraction; one must have ind_i2 < ind_ j2 |
desaliasing | [input] determines whether the products are performed with desaliasing or not |
ind_i1
t1
with the index ind_i2
of t2
and of the contraction of the index ind_j1
t1
with the index ind_j2
of t2
NB: the types (COV
or CON
) of the indices ind_i1
and ind_i2
(resp. ind_j1
and ind_j2
) must be different. Definition at line 244 of file tensor_calculus_ext.C.
References Lorene::Tensor::get_index_type(), Lorene::Tensor::get_mp(), Lorene::Tensor::get_triad(), Lorene::Tensor::get_valence(), Lorene::Itbl::set(), Lorene::Tensor::set(), and Lorene::Scalar::set_etat_zero().
Contraction on two indices of a single tensor (trace).
t1 | [input] tensor |
ind1 | [input] first index of the tensor for the contraction, obeying to the following convention :
|
ind2 | [input] second index of the tensor for the contraction, with the same convention as ind1 |
COV
or CON
) of the indices ind1
and ind2
must be different. Definition at line 346 of file tensor_calculus_ext.C.
References Lorene::Tensor::get_index_type(), Lorene::Tensor::get_mp(), Lorene::Tensor::get_triad(), Lorene::Tensor::get_valence(), Lorene::Itbl::set(), Lorene::Tensor::set(), and Lorene::Scalar::set_etat_zero().
Tbl Lorene::diffrel | ( | const Tensor & | aa, |
const Tensor & | bb, | ||
const char * | comment = 0x0 , |
||
ostream & | ost = cout |
||
) |
Relative difference between two Tensor
( version).
aa | first tensor |
bb | second tensor |
comment | comment to be printed on ost before the result (default: 0x0 = nothing printed) |
ost | output stream for a formatted output of the result |
Tbl
of size the number of independent components times the number of domains, the elements
(i,l) of which are norme
[a(l)-b(l)]/norme[b(l)] if b(l)!=0
and norme
[a(l)-b(l)] if b(l)=0
, where a(l)
and b(l)
denote symbolically the values of aa
and bb
l
and for component no.i
. Definition at line 414 of file tensor_calculus_ext.C.
References Lorene::diffrel(), Lorene::Map::get_mg(), Lorene::Tensor::get_mp(), Lorene::Tensor::get_n_comp(), Lorene::Mg3d::get_nzone(), Lorene::Tensor::get_valence(), Lorene::Tensor::indices(), Lorene::Tbl::set(), and Lorene::Tbl::set_etat_qcq().
Tbl Lorene::diffrelmax | ( | const Tensor & | aa, |
const Tensor & | bb, | ||
const char * | comment = 0x0 , |
||
ostream & | ost = cout |
||
) |
Relative difference between two Tensor
(max version).
aa | first tensor |
bb | second tensor |
comment | comment to be printed on ost before the result (default: 0x0 = nothing printed) |
ost | output stream for a formatted output of the result |
Tbl
of size the number of independent components times the number of domains, the elements
(i,l) of which are max
[abs(a(l)-b(l))]/max[abs(b(l))] if b(l)!=0
and max
[abs(a(l)-b(l))] if b(l)=0
, where a(l)
and b(l)
denote symbolically the values of aa
and bb
l
and for component no.i
. Definition at line 470 of file tensor_calculus_ext.C.
References Lorene::diffrelmax(), Lorene::Map::get_mg(), Lorene::Tensor::get_mp(), Lorene::Tensor::get_n_comp(), Lorene::Mg3d::get_nzone(), Lorene::Tensor::get_valence(), Lorene::Tensor::indices(), Lorene::Tbl::set(), and Lorene::Tbl::set_etat_qcq().
Maxima in each domain of the values of the tensor components.
aa | tensor |
comment | comment to be printed on ost before the result (default: 0x0 = nothing printed) |
ost | output stream for a formatted output of the result |
Tbl
of size the number of independent components times the number of domains, the elements
(i,l) of which are max(a(l))
, where a(l)
aa
l
and for component no.i
. Definition at line 527 of file tensor_calculus_ext.C.
References Lorene::Map::get_mg(), Lorene::Tensor::get_mp(), Lorene::Tensor::get_n_comp(), Lorene::Mg3d::get_nzone(), Lorene::Tensor::get_valence(), Lorene::Tensor::indices(), Lorene::max(), Lorene::Tbl::set(), and Lorene::Tbl::set_etat_qcq().
Tbl Lorene::max_all_domains | ( | const Tensor & | aa, |
int | l_excluded = -1 , |
||
const char * | comment = 0x0 , |
||
ostream & | ost = cout |
||
) |
Maximum value of each component of a tensor over all the domains.
aa | tensor |
l_excluded | index of domain to be excluded from the computation: the default = -1 corresponds to no excluded domain |
comment | comment to be printed on ost (default: 0x0 = nothing printed) |
ost | output stream for a formatted output of the result; used only if comment != 0x0 . |
Tbl
of size the number of independent components (aa.get_ncomp()
), the elements of which are the maximum values of the various components. Definition at line 693 of file tensor_calculus_ext.C.
References Lorene::Map::get_mg(), Lorene::Tensor::get_mp(), Lorene::Tensor::get_n_comp(), Lorene::Mg3d::get_nzone(), Lorene::Tensor::get_valence(), Lorene::Tensor::indices(), Lorene::max(), Lorene::Tbl::set(), and Lorene::Tbl::set_etat_qcq().
Tbl Lorene::maxabs | ( | const Tensor & | aa, |
const char * | comment = 0x0 , |
||
ostream & | ost = cout , |
||
bool | verb = true |
||
) |
Maxima in each domain of the absolute values of the tensor components.
aa | tensor |
comment | comment to be printed on ost before the result (default: 0x0 = nothing printed) |
ost | output stream for a formatted output of the result |
Tbl
of size the number of independent components times the number of domains, the elements
(i,l) of which are max
[abs(a(l))] , where a(l)
aa
l
and for component no.i
. Definition at line 612 of file tensor_calculus_ext.C.
References Lorene::abs(), Lorene::Map::get_mg(), Lorene::Tensor::get_mp(), Lorene::Tensor::get_n_comp(), Lorene::Mg3d::get_nzone(), Lorene::Tensor::get_valence(), Lorene::Tensor::indices(), Lorene::max(), Lorene::Tbl::set(), and Lorene::Tbl::set_etat_qcq().
Tbl Lorene::maxabs_all_domains | ( | const Tensor & | aa, |
int | l_excluded = -1 , |
||
const char * | comment = 0x0 , |
||
ostream & | ost = cout , |
||
bool | verb = true |
||
) |
Maximum of the absolute value of each component of a tensor over all the domains.
aa | tensor |
l_excluded | index of domain to be excluded from the computation: the default = -1 corresponds to no excluded domain |
comment | comment to be printed on ost (default: 0x0 = nothing printed) |
ost | output stream for a formatted output of the result; used only if comment != 0x0 . |
Tbl
of size the number of independent components (aa.get_ncomp()
), the elements of which are the maximum of of the absolute value of the various components. Definition at line 794 of file tensor_calculus_ext.C.
References Lorene::Map::get_mg(), Lorene::Tensor::get_mp(), Lorene::Tensor::get_n_comp(), Lorene::Mg3d::get_nzone(), Lorene::Tensor::get_valence(), Lorene::Tensor::indices(), Lorene::maxabs(), Lorene::Tbl::set(), and Lorene::Tbl::set_etat_qcq().
Minima in each domain of the values of the tensor components.
aa | tensor |
comment | comment to be printed on ost before the result (default: 0x0 = nothing printed) |
ost | output stream for a formatted output of the result |
Tbl
of size the number of independent components times the number of domains, the elements
(i,l) of which are min(a(l))
, where a(l)
aa
l
and for component no.i
. Definition at line 570 of file tensor_calculus_ext.C.
References Lorene::Map::get_mg(), Lorene::Tensor::get_mp(), Lorene::Tensor::get_n_comp(), Lorene::Mg3d::get_nzone(), Lorene::Tensor::get_valence(), Lorene::Tensor::indices(), Lorene::min(), Lorene::Tbl::set(), and Lorene::Tbl::set_etat_qcq().
Tbl Lorene::min_all_domains | ( | const Tensor & | aa, |
int | l_excluded = -1 , |
||
const char * | comment = 0x0 , |
||
ostream & | ost = cout |
||
) |
Minimum value of each component of a tensor over all the domains.
aa | tensor |
l_excluded | index of domain to be excluded from the computation: the default = -1 corresponds to no excluded domain |
comment | comment to be printed on ost (default: 0x0 = nothing printed) |
ost | output stream for a formatted output of the result; used only if comment != 0x0 . |
Tbl
of size the number of independent components (aa.get_ncomp()
), the elements of which are the minimum values of the various components. Definition at line 743 of file tensor_calculus_ext.C.
References Lorene::Map::get_mg(), Lorene::Tensor::get_mp(), Lorene::Tensor::get_n_comp(), Lorene::Mg3d::get_nzone(), Lorene::Tensor::get_valence(), Lorene::Tensor::indices(), Lorene::min(), Lorene::Tbl::set(), and Lorene::Tbl::set_etat_qcq().
Tensorial product.
Definition at line 113 of file tensor_calculus_ext.C.
References Lorene::Tensor::get_triad(), Lorene::Tensor::indices(), Lorene::Tensor::mp, Lorene::Tensor::n_comp, Lorene::Itbl::set(), Lorene::Tensor::set(), Lorene::Tensor::type_indice, and Lorene::Tensor::valence.
Tensor_sym Lorene::operator* | ( | const Tensor & | a, |
const Tensor_sym & | b | ||
) |
Tensorial product with symmetries.
Definition at line 111 of file tensor_sym_calculus.C.
References Lorene::Tensor::get_triad(), Lorene::Tensor_sym::indices(), Lorene::Tensor::mp, Lorene::Tensor::n_comp, Lorene::Itbl::set(), Lorene::Tensor::set(), Lorene::Tensor_sym::sym_index1(), Lorene::Tensor_sym::sym_index2(), Lorene::Tensor::type_indice, and Lorene::Tensor::valence.
Tensor_sym Lorene::operator* | ( | const Tensor_sym & | a, |
const Tensor & | b | ||
) |
Tensorial product with symmetries.
Definition at line 71 of file tensor_sym_calculus.C.
References Lorene::Tensor::get_triad(), Lorene::Tensor::mp, Lorene::Itbl::set(), Lorene::Tensor_sym::sym_index1(), Lorene::Tensor_sym::sym_index2(), Lorene::Tensor::type_indice, and Lorene::Tensor::valence.
Tensor_sym Lorene::operator* | ( | const Tensor_sym & | a, |
const Tensor_sym & | b | ||
) |
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 154 of file tensor_sym_calculus.C.
References Lorene::Tensor::get_triad(), Lorene::Tensor::mp, Lorene::Itbl::set(), Lorene::Tensor_sym::sym_index1(), Lorene::Tensor_sym::sym_index2(), Lorene::Tensor::type_indice, and Lorene::Tensor::valence.