78 assert(ci.
get_etat() != ETATNONDEF) ;
88 resu =
sin(
double(1)) ;
110 assert(ci.
get_etat() != ETATNONDEF) ;
122 co =
cos(
double(1)) ;
142 assert(ci.
get_etat() != ETATNONDEF) ;
152 resu =
tan(
double(1)) ;
173 assert(ci.
get_etat() != ETATNONDEF) ;
205 assert(ci.
get_etat() != ETATNONDEF) ;
212 co.
va = double(0.5) * M_PI ;
237 assert(ci.
get_etat() != ETATNONDEF) ;
269 assert(ci.
get_etat() != ETATNONDEF) ;
299 assert(ci.
get_etat() != ETATNONDEF) ;
329 assert(ci.
get_etat() != ETATNONDEF) ;
361 assert(ci.
get_etat() != ETATNONDEF) ;
391 assert(ci.
get_etat() != ETATNONDEF) ;
395 cout <<
"Argument of log is ZERO in log(Scalar) !" << endl ;
424 assert(ci.
get_etat() != ETATNONDEF) ;
428 cout <<
"Argument of log10 is ZERO in log10(Scalar) !" << endl ;
457 assert(ci.
get_etat() != ETATNONDEF) ;
465 cout <<
"pow(Scalar, int) : ETATZERO^n with n <= 0 !" << endl ;
493 assert(ci.
get_etat() != ETATNONDEF) ;
501 cout <<
"pow(Scalar, double) : ETATZERO^x with x <= 0 !" << endl ;
529 assert(ci.
get_etat() != ETATNONDEF) ;
559 assert(ci.
get_etat() != ETATNONDEF) ;
588 assert(ci.
get_etat() != ETATNONDEF) ;
617 assert(ci.
get_etat() != ETATNONDEF) ;
619 Tbl resu( ci.
get_mp().get_mg()->get_nzone() ) ;
631 resu =
max( ci.
va ) ;
645 assert(ci.
get_etat() != ETATNONDEF) ;
647 Tbl resu( ci.
get_mp().get_mg()->get_nzone() ) ;
659 resu =
min( ci.
va ) ;
673 assert(ci.
get_etat() != ETATNONDEF) ;
675 Tbl resu( ci.
get_mp().get_mg()->get_nzone() ) ;
701 assert(c1.
get_etat() != ETATNONDEF) ;
702 assert(c2.
get_etat() != ETATNONDEF) ;
704 int nz = c1.
get_mp().get_mg()->get_nzone() ;
712 assert(normdiff.
get_etat() == ETATQCQ) ;
713 assert(norme2.
get_etat() == ETATQCQ) ;
716 for (
int l=0; l<nz; l++) {
717 if ( norme2(l) ==
double(0) ) {
718 resu.
set(l) = normdiff(l) ;
721 resu.
set(l) = normdiff(l) / norme2(l) ;
736 assert(c1.
get_etat() != ETATNONDEF) ;
737 assert(c2.
get_etat() != ETATNONDEF) ;
739 int nz = c1.
get_mp().get_mg()->get_nzone() ;
748 assert(maxdiff.
get_etat() == ETATQCQ) ;
749 assert(max2.
get_etat() == ETATQCQ) ;
752 for (
int l=0; l<nz; l++) {
753 if ( max2(l) ==
double(0) ) {
754 resu.
set(l) = maxdiff(l) ;
757 resu.
set(l) = maxdiff(l) / max2(l) ;
void set_etat_one()
Sets the logical state to ETATUN (one).
virtual void set_etat_qcq()
Sets the logical state to ETATQCQ (ordinary state).
virtual void set_etat_zero()
Sets the logical state to ETATZERO (zero).
Scalar(const Map &mpi)
Constructor from mapping.
int get_etat() const
Returns the logical state ETATNONDEF (undefined), ETATZERO (null) or ETATQCQ (ordinary).
Valeur va
The numerical value of the Scalar.
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.
Mtbl Heaviside(const Mtbl &)
Heaviside function.
double totalmin(const Mtbl &)
Minimum value of the Mtbl elements in all domain.
double totalmax(const Mtbl &)
Maximum value of the Mtbl elements in all domains.
const Map & get_mp() const
Returns the mapping.
Coord x
x coordinate centered on the grid