98 assert(t1.
get_etat() != ETATNONDEF) ;
109 assert(t1.
get_etat() != ETATNONDEF) ;
120 for (
int i=0 ; i<r.get_nzone() ; i++) {
121 *(r.t)[i] = -(*(t1.
t)[i]) ;
135 assert(t1.
get_etat() != ETATNONDEF) ;
136 assert(t2.
get_etat() != ETATNONDEF) ;
154 for (
int i=0 ; i<nz ; i++) {
155 *(r.
t)[i] += *(t2.
t)[i] ;
166 assert(t1.
get_etat() != ETATNONDEF) ;
169 if (x ==
double(0)) {
180 for (
int i=0 ; i<nz ; i++) {
188 for (
int i=0 ; i<nz ; i++) {
207 return t1 + double(m) ;
214 return t1 + double(m) ;
227 assert(t1.
get_etat() != ETATNONDEF) ;
228 assert(t2.
get_etat() != ETATNONDEF) ;
246 for (
int i=0 ; i<nz ; i++) {
247 *(r.
t)[i] -= *(t2.
t)[i] ;
259 assert(t1.
get_etat() != ETATNONDEF) ;
262 if (x ==
double(0)) {
273 for (
int i=0 ; i<nz ; i++) {
281 for (
int i=0 ; i<nz ; i++) {
300 return t1 - double(m) ;
307 return double(m) - t1 ;
319 assert(t1.
get_etat() != ETATNONDEF) ;
320 assert(t2.
get_etat() != ETATNONDEF) ;
338 for (
int i=0 ; i<nz ; i++) {
339 *(r.t)[i] *= (*(t2.
t)[i]) ;
351 assert(t1.
get_etat() != ETATNONDEF) ;
354 if ((t1.
get_etat() == ETATZERO) || ( x ==
double(1) )) {
363 if ( x ==
double(0) ) {
368 for (
int i=0 ; i<nz ; i++) {
387 return t1 * double(m) ;
394 return t1 * double(m) ;
407 assert(t1.
get_etat() != ETATNONDEF) ;
408 assert(t2.
get_etat() != ETATNONDEF) ;
413 cout <<
"Mtbl division by 0 !" << endl ;
427 for (
int i=0 ; i<nz ; i++) {
428 *(r.t)[i] /= (*(t2.
t)[i]) ;
440 assert(t1.
get_etat() != ETATNONDEF) ;
441 if ( x ==
double(0) ) {
442 cout <<
"Mtbl division by 0 !" << endl ;
447 if ((t1.
get_etat() == ETATZERO) || ( x ==
double(1) )) {
456 for (
int i=0 ; i<nz ; i++) {
467 return t1/double(n) ;
476 assert(t1.
get_etat() != ETATNONDEF) ;
480 cout <<
"Division by 0 in double / Mtbl !" << endl ;
489 if ( x ==
double(0) ) {
495 for (
int i=0 ; i<nz ; i++) {
496 *(r.t)[i] = x / (*(t1.
t)[i]) ;
508 return double(m)/t1 ;
520 assert(
etat != ETATNONDEF) ;
521 assert(mi.
get_etat() != ETATNONDEF) ;
530 if (
etat == ETATZERO) {
533 for (
int i=0 ; i<
nzone ; i++) {
534 *(
t[i]) += *(mi.
t[i]) ;
542 assert(
etat != ETATNONDEF) ;
543 assert(mi.
get_etat() != ETATNONDEF) ;
552 if (
etat == ETATZERO) {
555 for (
int i=0 ; i<
nzone ; i++) {
556 *(
t[i]) -= *(mi.
t[i]) ;
564 assert(
etat != ETATNONDEF) ;
565 assert(mi.
get_etat() != ETATNONDEF) ;
568 if (
etat == ETATZERO) {
577 for (
int i=0 ; i<
nzone ; i++) {
578 *(
t[i]) *= *(mi.
t[i]) ;
Base_val operator*(const Base_val &, const Base_val &)
This operator is used when calling multiplication or division of Valeur .
Cmp operator/(const Cmp &, const Cmp &)
Cmp / Cmp.
void operator*=(const Mtbl &)
*= Mtbl
int get_etat() const
Gives the logical state.
void operator+=(const Mtbl &)
+= Mtbl
int get_nzone() const
Gives the number of zones (domains)
void set_etat_zero()
Sets the logical state to ETATZERO (zero).
Cmp operator+(const Cmp &)
const Mg3d * mg
Pointer on the multi-grid Mgd3 on which this is defined.
int etat
Logical state (ETATNONDEF , ETATQCQ or ETATZERO ).
int nzone
Number of domains (zones)
void set_etat_qcq()
Sets the logical state to ETATQCQ (ordinary state).
void set_etat_zero()
Sets the logical state to ETATZERO (zero).
void annule_hard()
Sets the Mtbl to zero in a hard way.
Cmp operator-(const Cmp &)
- Cmp
void operator-=(const Mtbl &)
-= Mtbl
Tbl ** t
Array (size nzone ) of pointers on the Tbl 's.
const Mg3d * get_mg() const
Gives the Mg3d on which the Mtbl is defined.