31char tensor_calculus_ext_C[] =
"$Header: /cvsroot/Lorene/C++/Source/Tensor/tensor_calculus_ext.C,v 1.14 2014/10/13 08:53:44 j_novak Exp $" ;
115 for (
int i=0 ;
i<
t1.valence ;
i++)
117 for (
int i=0 ;
i<
t2.valence ;
i++)
121 if ( (
t1.valence != 0) && (
t2.valence != 0) ) {
122 assert ( *(
t1.get_triad()) == *(
t2.get_triad()) ) ;
126 if (
t1.valence != 0) {
138 for (
int i=0 ;
i<
res.n_comp ;
i++) {
140 for (
int j=0 ;
j<
t1.valence ;
j++)
142 for (
int j=0 ;
j<
t2.valence ;
j++)
163 int val1 =
t1.get_valence() ;
164 int val2 =
t2.get_valence() ;
173 assert ( *(
t1.get_triad()) == *(
t2.get_triad()) ) ;
182 tipe.set(
i) =
t1.get_index_type(
i) ;
184 tipe.set(
i) =
t1.get_index_type(
i+1) ;
199 for (
int i=0 ;
i<
res.get_n_comp() ;
i++) {
216 work.set_etat_zero() ;
218 for (
int j=1 ;
j<=3 ;
j++) {
242 int val1 =
t1.get_valence() ;
243 int val2 =
t2.get_valence() ;
253 assert( *(
t1.get_triad()) == *(
t2.get_triad()) ) ;
261 for (
int i=0 ;
i<
i1 ;
i++)
262 tipe.set(
i) =
t1.get_index_type(
i) ;
265 tipe.set(
i) =
t1.get_index_type(
i+1) ;
268 tipe.set(
i) =
t1.get_index_type(
i+2) ;
288 for (
int ic=0 ;
ic<
res.get_n_comp() ;
ic++) {
292 for (
int k=0 ;
k<
i1 ;
k++)
301 for (
int k=0 ;
k<
i2 ;
k++)
311 work.set_etat_zero() ;
313 for (
int i=1 ;
i<=3 ;
i++) {
318 for (
int j=1 ;
j<=3 ;
j++) {
342 int val =
source.get_valence() ;
375 for (
int i=0 ;
i<
res.get_n_comp() ;
i++) {
387 work.set_etat_zero() ;
389 for (
int j=1 ;
j<=3 ;
j++) {
431 int nz = aa.
get_mp().get_mg()->get_nzone() ;
433 resu.set_etat_qcq() ;
442 for (
int j=0 ;
j<val ;
j++) {
447 for (
int l=0;
l<nz;
l++) {
487 int nz = aa.
get_mp().get_mg()->get_nzone() ;
489 resu.set_etat_qcq() ;
498 for (
int j=0 ;
j<val ;
j++) {
503 for (
int l=0;
l<nz;
l++) {
529 int nz = aa.
get_mp().get_mg()->get_nzone() ;
531 resu.set_etat_qcq() ;
535 for (
int ic=0;
ic<n_comp;
ic++) {
540 if (val > 0)
ost <<
" Comp." ;
541 for (
int j=0 ;
j<val ;
j++) {
544 if (val > 0)
ost <<
" : " ;
546 for (
int l=0;
l<nz;
l++) {
572 int nz = aa.
get_mp().get_mg()->get_nzone() ;
574 resu.set_etat_qcq() ;
578 for (
int ic=0;
ic<n_comp;
ic++) {
583 if (val > 0)
ost <<
" Comp." ;
584 for (
int j=0 ;
j<val ;
j++) {
587 if (val > 0)
ost <<
" : " ;
589 for (
int l=0;
l<nz;
l++) {
614 int nz = aa.
get_mp().get_mg()->get_nzone() ;
616 resu.set_etat_qcq() ;
620 for (
int ic=0;
ic<n_comp;
ic++) {
626 if (val > 0)
ost <<
" Comp." ;
627 for (
int j=0 ;
j<val ;
j++) {
630 if (val > 0 )
ost <<
" : " ;
633 for (
int l=0;
l<nz;
l++) {
657 resu.set_etat_qcq() ;
661 for (
int ic=0;
ic<n_comp;
ic++) {
664 double aa_c = aa(
idx).val_grid_point(0,0,0,0) ;
668 if ( val > 0 )
ost <<
" Comp." ;
669 for (
int j=0 ;
j<val ;
j++) {
672 if (val > 0 )
ost <<
" : " ;
696 int nz = aa.
get_mp().get_mg()->get_nzone() ;
699 resu.set_etat_qcq() ;
703 for (
int ic=0;
ic<n_comp;
ic++) {
708 for (
int l=0;
l<nz;
l++) {
717 if ( val > 0 )
ost <<
" Comp." ;
719 for (
int j=0 ;
j<val ;
j++) {
722 if (val > 0 )
ost <<
" : " ;
746 int nz = aa.
get_mp().get_mg()->get_nzone() ;
749 resu.set_etat_qcq() ;
753 for (
int ic=0;
ic<n_comp;
ic++) {
758 for (
int l=0;
l<nz;
l++) {
767 if ( val > 0 )
ost <<
" Comp." ;
769 for (
int j=0 ;
j<val ;
j++) {
772 if (val > 0 )
ost <<
" : " ;
797 int nz = aa.
get_mp().get_mg()->get_nzone() ;
800 resu.set_etat_qcq() ;
804 for (
int ic=0;
ic<n_comp;
ic++) {
809 for (
int l=0;
l<nz;
l++) {
818 if ( val > 0 )
ost <<
" Comp." ;
820 for (
int j=0 ;
j<val ;
j++) {
823 if (val > 0 )
ost <<
" : " ;
Vectorial bases (triads) with respect to which the tensorial components are defined.
Time evolution with partial storage (*** under development ***).
Basic integer array class.
Tensor field of valence 0 (or component of a tensorial field).
Base_val operator*(const Base_val &, const Base_val &)
This operator is used when calling multiplication or division of Valeur .
Tbl diffrel(const Cmp &a, const Cmp &b)
Relative difference between two Cmp (norme version).
Tbl min(const Cmp &)
Minimum values of a Cmp in each domain.
Tbl max(const Cmp &)
Maximum values of a Cmp in each domain.
Cmp abs(const Cmp &)
Absolute value.
Tbl diffrelmax(const Cmp &a, const Cmp &b)
Relative difference between two Cmp (max version).
const Map & get_mp() const
Returns the mapping.
int get_valence() const
Returns the valence.
virtual Itbl indices(int pos) const
Returns the indices of a component given by its position in the array cmp .
int get_n_comp() const
Returns the number of stored components.
Tenseur contract(const Tenseur &, int id1, int id2)
Self contraction of two indices of a Tenseur .
Tbl 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.
Tbl 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.
Tbl 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.
Tbl central_value(const Tensor &aa, const char *comment=0x0, ostream &ost=cout)
Central value of each component of a tensor.
Tbl 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.