27char mtbl_cf_math_C[] =
"$Header: /cvsroot/Lorene/C++/Source/Mtbl_cf/mtbl_cf_math.C,v 1.3 2014/10/13 08:53:08 j_novak Exp $" ;
73 assert(ti.
get_etat() != ETATNONDEF) ;
90 for (
int l=0 ; l<nzone ; l++) {
91 *(to.
t[l]) =
abs( *(ti.
t[l]) ) ;
107 assert(mti.
get_etat() != ETATNONDEF) ;
121 for (
int l=0 ; l<nz ; l++) {
122 resu.
set(l) =
max( *(mti.
t[l]) ) ;
136 assert(mti.
get_etat() != ETATNONDEF) ;
150 for (
int l=0 ; l<nz ; l++) {
151 resu.
set(l) =
min( *(mti.
t[l]) ) ;
165 assert(mti.
get_etat() != ETATNONDEF) ;
179 for (
int l=0 ; l<nz ; l++) {
194 assert(mt1.
get_etat() != ETATNONDEF) ;
195 assert(mt2.
get_etat() != ETATNONDEF) ;
205 assert(normdiff.
get_etat() == ETATQCQ) ;
206 assert(norme2.
get_etat() == ETATQCQ) ;
209 for (
int l=0; l<nz; l++) {
210 if ( norme2(l) ==
double(0) ) {
211 resu.
set(l) = normdiff(l) ;
214 resu.
set(l) = normdiff(l) / norme2(l) ;
229 assert(mt1.
get_etat() != ETATNONDEF) ;
230 assert(mt2.
get_etat() != ETATNONDEF) ;
240 assert(maxdiff.
get_etat() == ETATQCQ) ;
241 assert(max2.
get_etat() == ETATQCQ) ;
244 for (
int l=0; l<nz; l++) {
245 if ( max2(l) ==
double(0) ) {
246 resu.
set(l) = maxdiff(l) ;
249 resu.
set(l) = maxdiff(l) / max2(l) ;
Coefficients storage for the multi-domain spectral method.
Base_val base
Bases of the spectral expansions.
int get_etat() const
Returns the logical state.
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.
Tbl ** t
Array (size nzone ) of pointers on the Tbl 's which contain the spectral coefficients in each domain.
void set_etat_qcq()
Sets the logical state to ETATQCQ (ordinary state).
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)
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.
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 abs(const Cmp &)
Absolute value.
Tbl diffrelmax(const Cmp &a, const Cmp &b)
Relative difference between two Cmp (max version).