32 char scalar_math_C[] =
"$Header: /cvsroot/Lorene/C++/Source/Tensor/Scalar/scalar_math.C,v 1.6 2014/10/13 08:53:46 j_novak Exp $" ;
75 assert(ci.
get_etat() != ETATNONDEF) ;
85 resu =
sin(
double(1)) ;
107 assert(ci.
get_etat() != ETATNONDEF) ;
119 co =
cos(
double(1)) ;
139 assert(ci.
get_etat() != ETATNONDEF) ;
149 resu =
tan(
double(1)) ;
170 assert(ci.
get_etat() != ETATNONDEF) ;
202 assert(ci.
get_etat() != ETATNONDEF) ;
209 co.
va = double(0.5) * M_PI ;
234 assert(ci.
get_etat() != ETATNONDEF) ;
266 assert(ci.
get_etat() != ETATNONDEF) ;
296 assert(ci.
get_etat() != ETATNONDEF) ;
326 assert(ci.
get_etat() != ETATNONDEF) ;
358 assert(ci.
get_etat() != ETATNONDEF) ;
388 assert(ci.
get_etat() != ETATNONDEF) ;
392 cout <<
"Argument of log is ZERO in log(Scalar) !" << endl ;
421 assert(ci.
get_etat() != ETATNONDEF) ;
425 cout <<
"Argument of log10 is ZERO in log10(Scalar) !" << endl ;
454 assert(ci.
get_etat() != ETATNONDEF) ;
462 cout <<
"pow(Scalar, int) : ETATZERO^n with n <= 0 !" << endl ;
490 assert(ci.
get_etat() != ETATNONDEF) ;
498 cout <<
"pow(Scalar, double) : ETATZERO^x with x <= 0 !" << endl ;
526 assert(ci.
get_etat() != ETATNONDEF) ;
556 assert(ci.
get_etat() != ETATNONDEF) ;
585 assert(ci.
get_etat() != ETATNONDEF) ;
614 assert(ci.
get_etat() != ETATNONDEF) ;
628 resu =
max( ci.
va ) ;
642 assert(ci.
get_etat() != ETATNONDEF) ;
656 resu =
min( ci.
va ) ;
670 assert(ci.
get_etat() != ETATNONDEF) ;
698 assert(c1.
get_etat() != ETATNONDEF) ;
699 assert(c2.
get_etat() != ETATNONDEF) ;
709 assert(normdiff.
get_etat() == ETATQCQ) ;
710 assert(norme2.
get_etat() == ETATQCQ) ;
713 for (
int l=0; l<nz; l++) {
714 if ( norme2(l) ==
double(0) ) {
715 resu.
set(l) = normdiff(l) ;
718 resu.
set(l) = normdiff(l) / norme2(l) ;
733 assert(c1.
get_etat() != ETATNONDEF) ;
734 assert(c2.
get_etat() != ETATNONDEF) ;
745 assert(maxdiff.
get_etat() == ETATQCQ) ;
746 assert(max2.
get_etat() == ETATQCQ) ;
749 for (
int l=0; l<nz; l++) {
750 if ( max2(l) ==
double(0) ) {
751 resu.
set(l) = maxdiff(l) ;
754 resu.
set(l) = maxdiff(l) / max2(l) ;
Cmp racine_cubique(const Cmp &)
Cube root.
double & set(int i)
Read/write of a particular element (index i) (1D case)
void set_etat_one()
Sets the logical state to ETATUN (one).
Valeur va
The numerical value of the Scalar
double totalmin(const Mtbl &)
Minimum value of the Mtbl elements in all domain.
Cmp log(const Cmp &)
Neperian logarithm.
Mtbl Heaviside(const Mtbl &)
Heaviside function.
Cmp exp(const Cmp &)
Exponential.
Tbl diffrel(const Cmp &a, const Cmp &b)
Relative difference between two Cmp (norme version).
void annule_hard()
Sets the Tbl to zero in a hard way.
const Mg3d * get_mg() const
Gives the Mg3d on which the mapping is defined.
Tbl diffrelmax(const Cmp &a, const Cmp &b)
Relative difference between two Cmp (max version).
Tbl norme(const Cmp &)
Sums of the absolute values of all the values of the Cmp in each domain.
Tbl max(const Cmp &)
Maximum values of a Cmp in each domain.
Cmp abs(const Cmp &)
Absolute value.
Cmp atan(const Cmp &)
Arctangent.
Tensor field of valence 0 (or component of a tensorial field).
const Map & get_mp() const
Returns the mapping.
Cmp pow(const Cmp &, int)
Power .
void set_etat_qcq()
Sets the logical state to ETATQCQ (ordinary state).
Cmp asin(const Cmp &)
Arcsine.
Tbl min(const Cmp &)
Minimum values of a Cmp in each domain.
int get_nzone() const
Returns the number of domains.
Cmp log10(const Cmp &)
Basis 10 logarithm.
virtual void set_etat_qcq()
Sets the logical state to ETATQCQ (ordinary state).
Cmp acos(const Cmp &)
Arccosine.
Cmp sqrt(const Cmp &)
Square root.
virtual void set_etat_zero()
Sets the logical state to ETATZERO (zero).
double totalmax(const Mtbl &)
Maximum value of the Mtbl elements in all domains.
int get_etat() const
Returns the logical state ETATNONDEF (undefined), ETATZERO (null) or ETATQCQ (ordinary).
Cmp cos(const Cmp &)
Cosine.
Cmp tan(const Cmp &)
Tangent.
int get_etat() const
Gives the logical state.
Cmp sin(const Cmp &)
Sine.