30char mtbl_cf_arithm_C[] =
"$Header: /cvsroot/Lorene/C++/Source/Mtbl_cf/mtbl_cf_arithm.C,v 1.4 2014/10/13 08:53:08 j_novak Exp $" ;
93 assert(t1.
get_etat() != ETATNONDEF) ;
105 assert(t1.
get_etat() != ETATNONDEF) ;
117 *(r.
t)[i] = -(*(t1.
t)[i]) ;
131 assert(t1.
get_etat() != ETATNONDEF) ;
132 assert(t2.
get_etat() != ETATNONDEF) ;
151 for (
int i=0 ; i<nz ; i++) {
152 *(r.
t)[i] += *(t2.
t)[i] ;
169 assert(t1.
get_etat() != ETATNONDEF) ;
170 assert(t2.
get_etat() != ETATNONDEF) ;
189 for (
int i=0 ; i<nz ; i++) {
190 *(r.
t)[i] -= *(t2.
t)[i] ;
208 assert(t1.
get_etat() != ETATNONDEF) ;
211 if ((t1.
get_etat() == ETATZERO) || ( x ==
double(1) )) {
220 if ( x ==
double(0) ) {
225 for (
int i=0 ; i<nz ; i++) {
244 return t1 * double(m) ;
251 return t1 * double(m) ;
266 assert(t1.
get_etat() != ETATNONDEF) ;
267 if ( x ==
double(0) ) {
268 cout <<
"Mtbl_cf division by 0 !" << endl ;
273 if ((t1.
get_etat() == ETATZERO) || ( x ==
double(1) )) {
282 for (
int i=0 ; i<nz ; i++) {
293 return t1/double(n) ;
307 assert(
etat != ETATNONDEF) ;
308 assert(mi.
get_etat() != ETATNONDEF) ;
317 if (
etat == ETATZERO) {
320 for (
int i=0 ; i<
nzone ; i++) {
321 *(
t[i]) += *(mi.
t[i]) ;
330 assert(
etat != ETATNONDEF) ;
331 assert(mi.
get_etat() != ETATNONDEF) ;
340 if (
etat == ETATZERO) {
343 for (
int i=0 ; i<
nzone ; i++) {
344 *(
t[i]) -= *(mi.
t[i]) ;
Coefficients storage for the multi-domain spectral method.
Base_val base
Bases of the spectral expansions.
void set_etat_zero()
Sets the logical state to ETATZERO (zero).
int get_etat() const
Returns the logical state.
const Mg3d * mg
Pointer on the multi-grid Mgd3 on which this is defined.
void operator-=(const Mtbl_cf &)
-= Mtbl_cf
int get_nzone() const
Returns the number of zones (domains)
const Mg3d * get_mg() const
Returns the Mg3d on which the Mtbl_cf is defined.
int etat
Logical state (ETATNONDEF , ETATQCQ or ETATZERO ).
Tbl ** t
Array (size nzone ) of pointers on the Tbl 's which contain the spectral coefficients in each domain.
void operator+=(const Mtbl_cf &)
+= Mtbl_cf
void annule_hard()
Sets the Mtbl_cf to zero in a hard way.
int nzone
Number of domains (zones)
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 &)