30char cmp_math_C[] =
"$Header: /cvsroot/Lorene/C++/Source/Cmp/cmp_math.C,v 1.3 2014/10/13 08:52:47 j_novak Exp $" ;
72 assert(ci.
get_etat() != ETATNONDEF) ;
97 assert(ci.
get_etat() != ETATNONDEF) ;
123 assert(ci.
get_etat() != ETATNONDEF) ;
147 assert(ci.
get_etat() != ETATNONDEF) ;
172 assert(ci.
get_etat() != ETATNONDEF) ;
179 co.
va = double(0.5) * M_PI ;
198 assert(ci.
get_etat() != ETATNONDEF) ;
223 assert(ci.
get_etat() != ETATNONDEF) ;
248 assert(ci.
get_etat() != ETATNONDEF) ;
273 assert(ci.
get_etat() != ETATNONDEF) ;
299 assert(ci.
get_etat() != ETATNONDEF) ;
303 cout <<
"Argument of log is ZERO in log(Cmp) !" << endl ;
325 assert(ci.
get_etat() != ETATNONDEF) ;
329 cout <<
"Argument of log10 is ZERO in log10(Cmp) !" << endl ;
351 assert(ci.
get_etat() != ETATNONDEF) ;
359 cout <<
"pow(Cmp, int) : ETATZERO^n with n <= 0 !" << endl ;
382 assert(ci.
get_etat() != ETATNONDEF) ;
390 cout <<
"pow(Cmp, double) : ETATZERO^x with x <= 0 !" << endl ;
413 assert(ci.
get_etat() != ETATNONDEF) ;
438 assert(ci.
get_etat() != ETATNONDEF) ;
448 resu =
max( ci.
va ) ;
461 assert(ci.
get_etat() != ETATNONDEF) ;
471 resu =
min( ci.
va ) ;
484 assert(ci.
get_etat() != ETATNONDEF) ;
507 assert(c1.
get_etat() != ETATNONDEF) ;
508 assert(c2.
get_etat() != ETATNONDEF) ;
518 assert(normdiff.
get_etat() == ETATQCQ) ;
519 assert(norme2.
get_etat() == ETATQCQ) ;
522 for (
int l=0; l<nz; l++) {
523 if ( norme2(l) ==
double(0) ) {
524 resu.
set(l) = normdiff(l) ;
527 resu.
set(l) = normdiff(l) / norme2(l) ;
542 assert(c1.
get_etat() != ETATNONDEF) ;
543 assert(c2.
get_etat() != ETATNONDEF) ;
554 assert(maxdiff.
get_etat() == ETATQCQ) ;
555 assert(max2.
get_etat() == ETATQCQ) ;
558 for (
int l=0; l<nz; l++) {
559 if ( max2(l) ==
double(0) ) {
560 resu.
set(l) = maxdiff(l) ;
563 resu.
set(l) = maxdiff(l) / max2(l) ;
Component of a tensorial field *** DEPRECATED : use class Scalar instead ***.
int get_etat() const
Returns the logical state.
Valeur va
The numerical value of the Cmp
void set_etat_qcq()
Sets the logical state to ETATQCQ (ordinary state).
const Map * get_mp() const
Returns the mapping.
const Mg3d * get_mg() const
Gives the Mg3d on which the mapping is defined.
int get_nzone() const
Returns the number of domains.
int get_etat() const
Gives the logical state.
void annule_hard()
Sets the Tbl to zero in a hard way.
void set_etat_qcq()
Sets the logical state to ETATQCQ (ordinary state).
double & set(int i)
Read/write of a particular element (index i) (1D case)
Cmp atan(const Cmp &)
Arctangent.
Cmp sqrt(const Cmp &)
Square root.
Cmp log10(const Cmp &)
Basis 10 logarithm.
Cmp exp(const Cmp &)
Exponential.
Cmp sin(const Cmp &)
Sine.
Tbl diffrel(const Cmp &a, const Cmp &b)
Relative difference between two Cmp (norme version).
Tbl norme(const Cmp &)
Sums of the absolute values of all the values of the Cmp in each domain.
Cmp acos(const Cmp &)
Arccosine.
Cmp asin(const Cmp &)
Arcsine.
Cmp racine_cubique(const Cmp &)
Cube root.
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 pow(const Cmp &, int)
Power .
Cmp cos(const Cmp &)
Cosine.
Cmp abs(const Cmp &)
Absolute value.
Tbl diffrelmax(const Cmp &a, const Cmp &b)
Relative difference between two Cmp (max version).
Cmp tan(const Cmp &)
Tangent.
Cmp log(const Cmp &)
Neperian logarithm.