172 #include "base_val.h" 293 void annule(
int l_min,
int l_max) ;
306 assert(
etat == ETATQCQ) ;
318 assert(
etat == ETATQCQ) ;
329 double&
set(
int l,
int k,
int j,
int i) {
331 assert(
etat == ETATQCQ) ;
332 return (
t[l])->set(k, j, i) ;
343 assert(
etat != ETATNONDEF) ;
345 if (
etat == ETATZERO) {
349 else return (*
t[l])(k, j, i) ;
362 double val_point(
int l,
double x,
double theta,
double phi)
const ;
375 double val_point_symy(
int l,
double x,
double theta,
double phi)
const ;
388 double val_point_asymy(
int l,
double x,
double theta,
double phi)
const ;
402 double val_point_jk(
int l,
double x,
int j,
int k)
const ;
477 void sauve(FILE *)
const ;
486 void display(
double threshold = 1.e-7,
int precision = 4,
487 ostream& ostr = cout)
const ;
496 double threshold = 1.e-7)
const ;
629 ostream& operator<<(ostream& ,
const Mtbl_cf& ) ;
642 Mtbl_cf
operator+(
const Mtbl_cf&,
const Mtbl_cf& ) ;
644 Mtbl_cf
operator-(
const Mtbl_cf&,
const Mtbl_cf& ) ;
646 Mtbl_cf
operator*(
const Mtbl_cf&,
double ) ;
648 Mtbl_cf
operator*(
double,
const Mtbl_cf& ) ;
650 Mtbl_cf
operator*(
const Mtbl_cf&,
int ) ;
652 Mtbl_cf
operator*(
int,
const Mtbl_cf& ) ;
654 Mtbl_cf
operator/(
const Mtbl_cf&,
double ) ;
656 Mtbl_cf
operator/(
const Mtbl_cf&,
int ) ;
659 Mtbl_cf
abs(
const Mtbl_cf& ) ;
666 Tbl
max(
const Mtbl_cf& ) ;
673 Tbl
min(
const Mtbl_cf& ) ;
680 Tbl
norme(
const Mtbl_cf& ) ;
690 Tbl
diffrel(
const Mtbl_cf& a,
const Mtbl_cf& b) ;
700 Tbl
diffrelmax(
const Mtbl_cf& a,
const Mtbl_cf& b) ;
void poisson_angu(double lambda=0)
Resolution of the generalized angular Poisson equation.
void operator/=(double)
/= double
const Tbl & operator()(int l) const
Read-only of the Tbl containing the coefficients in a given domain.
void display(double threshold=1.e-7, int precision=4, ostream &ostr=cout) const
Prints the coefficients whose values are greater than a given threshold, as well as the corresponding...
Base_val operator*(const Base_val &, const Base_val &)
This operator is used when calling multiplication or division of Valeur .
const Mg3d * mg
Pointer on the multi-grid Mgd3 on which this is defined.
void mult_xp1_shell(int i)
Id (r sampling = RARE, UNSURR ) \ (r -sampling = FIN )
double operator()(int l, int k, int j, int i) const
Read-only of a particular element.
Cmp operator/(const Cmp &, const Cmp &)
Cmp / Cmp.
Tbl min(const Cmp &)
Minimum values of a Cmp in each domain.
void sx2()
(r -sampling = RARE ) \ Id (r sampling = FIN ) \ (r -sampling = UNSURR )
int get_etat() const
Returns the logical state.
Tbl diffrel(const Cmp &a, const Cmp &b)
Relative difference between two Cmp (norme version).
const Mg3d * get_mg() const
Returns the Mg3d on which the Mtbl_cf is defined.
double val_out_bound_jk(int l, int j, int k) const
Computes the angular coefficient of index j,k of the field represented by *this at by means of the s...
void operator*=(double)
*= double
void set_etat_nondef()
Sets the logical state to ETATNONDEF (undefined).
double val_in_bound_jk(int l, int j, int k) const
Computes the angular coefficient of index j,k of the field represented by *this at by means of the s...
void mult_x()
(r -sampling = RARE ) \ Id (r sampling = FIN ) \ (r -sampling = UNSURR )
double val_point_jk(int l, double x, int j, int k) const
Computes the value of the field represented by *this at an arbitrary point in , but collocation point...
void mult_x_shell(int i)
Id (r sampling = RARE, UNSURR ) \ (r -sampling = FIN )
Tbl norme(const Cmp &)
Sums of the absolute values of all the values of the Cmp in each domain.
int etat
Logical state (ETATNONDEF , ETATQCQ or ETATZERO ).
Mtbl_cf(const Mg3d &mgrid, const Base_val &basis)
Constructor.
double val_point_jk_asymy(int l, double x, int j, int k) const
Computes the value of the field represented by *this at an arbitrary point in , but collocation point...
Cmp operator+(const Cmp &)
friend ostream & operator<<(ostream &, const Mtbl_cf &)
Display.
void sauve(FILE *) const
Save in a file.
void annule(int l_min, int l_max)
Sets the Mtbl_cf to zero in some domains.
Tbl max(const Cmp &)
Maximum values of a Cmp in each domain.
void set_etat_qcq()
Sets the logical state to ETATQCQ (ordinary state).
void affiche_seuil(ostream &ostr, int precision=4, double threshold=1.e-7) const
Prints only the values greater than a given threshold.
void operator+=(const Mtbl_cf &)
+= Mtbl_cf
int get_nzone() const
Returns the number of zones (domains)
int nzone
Number of domains (zones)
void operator-=(const Mtbl_cf &)
-= Mtbl_cf
double val_point(int l, double x, double theta, double phi) const
Computes the value of the field represented by *this at an arbitrary point, by means of the spectral ...
void set_etat_zero()
Sets the logical state to ETATZERO (zero).
void del_t()
Logical destructor: dellocates the memory occupied by the Tbl array t .
void mult_xm1_zec()
Id (r sampling = RARE, FIN ) \ (r -sampling = UNSURR )
Bases of the spectral expansions.
double val_point_symy(int l, double x, double theta, double phi) const
Computes the value of the field represented by *this at an arbitrary point, by means of the spectral ...
void annule_hard()
Sets the Mtbl_cf to zero in a hard way.
void sx()
(r -sampling = RARE ) \ Id (r sampling = FIN ) \ (r -sampling = UNSURR )
void operator=(const Mtbl_cf &)
Assignement to another Mtbl_cf.
Cmp abs(const Cmp &)
Absolute value.
Coefficients storage for the multi-domain spectral method.
void sxm1_zec()
Id (r sampling = RARE, FIN ) \ (r -sampling = UNSURR )
void mult2_xm1_zec()
Id (r sampling = RARE, FIN ) \ (r -sampling = UNSURR )
Base_val base
Bases of the spectral expansions.
Cmp operator-(const Cmp &)
- Cmp
double val_point_jk_symy(int l, double x, int j, int k) const
Computes the value of the field represented by *this at an arbitrary point in , but collocation point...
double val_point_asymy(int l, double x, double theta, double phi) const
Computes the value of the field represented by *this at an arbitrary point, by means of the spectral ...
Tbl ** t
Array (size nzone ) of pointers on the Tbl 's which contain the spectral coefficients in each domain...
Tbl diffrelmax(const Cmp &a, const Cmp &b)
Relative difference between two Cmp (max version).
void lapang()
Angular Laplacian.
void mult_xm1_shell(int i)
Id (r sampling = RARE, UNSURR ) \ (r -sampling = FIN )