30char cmp_arithm_C[] =
"$Header: /cvsroot/Lorene/C++/Source/Cmp/cmp_arithm.C,v 1.5 2014/10/13 08:52:47 j_novak Exp $" ;
97#include "type_parite.h"
153 cout <<
"Operation Cmp + Cmp forbidden in the external " << endl;
154 cout <<
" compactified domain ! " << endl ;
178 assert(t1.
get_etat() != ETATNONDEF) ;
181 if (x ==
double(0)) {
193 assert(resu.
get_etat() == ETATQCQ) ;
194 resu.
va = resu.
va + x ;
213 return t1 + double(m) ;
220 return t1 + double(m) ;
255 cout <<
"Operation Cmp - Cmp forbidden in the external " << endl;
256 cout <<
" compactified domain ! " << endl ;
280 assert(t1.
get_etat() != ETATNONDEF) ;
283 if (x ==
double(0)) {
295 assert(resu.
get_etat() == ETATQCQ) ;
296 resu.
va = resu.
va - x ;
315 return t1 - double(m) ;
322 return double(m) - t1 ;
409 if ( a ==
double(0) ) {
434 return t1 * double(m) ;
441 return double(m) * t1 ;
460 assert(c1.
get_etat() != ETATNONDEF) ;
461 assert(c2.
get_etat() != ETATNONDEF) ;
466 cout <<
"Division by 0 in Cmp / Cmp !" << endl ;
497 if ( x ==
double(0) ) {
498 cout <<
"Division by 0 in Cmp / double !" << endl ;
527 cout <<
"Division by 0 in Cmp / Cmp !" << endl ;
537 if ( x ==
double(0) ) {
554 return c1 / double(m) ;
563 return double(m) / c2 ;
579 if (
etat == ETATNONDEF)
597 cout <<
"Operation += Cmp forbidden in the external " << endl;
598 cout <<
" compactified domain ! " << endl ;
603 if (
etat == ETATZERO) {
627 if (
etat == ETATNONDEF)
643 cout <<
"Operation -= Cmp forbidden in the external " << endl;
644 cout <<
" compactified domain ! " << endl ;
650 if (
etat == ETATZERO) {
672 if (
etat == ETATNONDEF)
681 if (
etat == ETATZERO) {
692 assert(
etat == ETATQCQ) ;
Component of a tensorial field *** DEPRECATED : use class Scalar instead ***.
const Map * mp
Reference mapping.
int dzpuis
Power of r by which the quantity represented by this must be divided in the external compactified z...
int get_etat() const
Returns the logical state.
Valeur va
The numerical value of the Cmp
int etat
Logical state (ETATNONDEF , ETATQCQ or ETATZERO ).
void set_etat_qcq()
Sets the logical state to ETATQCQ (ordinary state).
int get_dzpuis() const
Returns dzpuis.
void operator+=(const Cmp &)
+= Cmp
bool dz_nonzero() const
Returns true if the last domain is compactified and *this is not zero in this domain.
void set_etat_zero()
Sets the logical state to ETATZERO (zero).
void operator*=(const Cmp &)
*= Cmp
void set_dzpuis(int)
Set a value to dzpuis.
bool check_dzpuis(int dzi) const
Returns false if the last domain is compactified and *this is not zero in this domain and dzpuis is n...
const Map * get_mp() const
Returns the mapping.
void del_deriv()
Logical destructor of the derivatives.
void operator-=(const Cmp &)
-= Cmp
void set_etat_nondef()
Sets the logical state to ETATNONDEF (undefined).
Base_val operator*(const Base_val &, const Base_val &)
This operator is used when calling multiplication or division of Valeur .
Cmp operator-(const Cmp &)
- Cmp
Cmp operator/(const Cmp &, const Cmp &)
Cmp / Cmp.
Cmp operator%(const Cmp &, const Cmp &)
Cmp * Cmp with desaliasing.
Cmp operator+(const Cmp &)