79 assert (
etat != ETATNONDEF) ;
93 for (
int k=0 ; k<np+1 ; k++)
95 for (
int j=0 ; j<nt ; j++)
96 for (
int i=nr-1 ; i>nr-1-n ; i--)
105 assert (
etat != ETATNONDEF) ;
106 if (
etat == ETATZERO)
117 for (
int k=np+1-n ; k<np+1 ; k++)
118 for (
int j=0 ; j<nt ; j++)
119 for (
int i=0 ; i<nr ; i++)
131 assert (
etat != ETATNONDEF) ;
132 if (
etat == ETATZERO) {
152 for (
int k=0 ; k<np ; k++)
153 for (
int j=0 ; j<nt ; j++)
154 va.
set(nz-1, k, j, nr-1) = val ;
164 assert (
etat != ETATNONDEF) ;
165 if (
etat == ETATZERO) {
171 assert (zone < mp->get_mg()->get_nzone()) ;
180 for (
int k=0 ; k<np ; k++)
181 for (
int j=0 ; j<nt ; j++)
182 va.
set(zone, k, j, 0) = val ;
205 cout <<
"Le mapping doit etre affine" << endl ;
211 Cmp courant (*
this) ;
216 for (
int conte=0 ; conte<nbre ; conte++) {
223 double* coloc =
new double [nr] ;
224 int * deg =
new int[3] ;
229 for (
int i=0 ; i<nr ; i++)
230 coloc[i] =
pow(alpha,
double(conte))*
231 pow(-1-
cos(M_PI*i/(nr-1)),
double(conte)) ;
233 cfrcheb(deg, deg, coloc, deg, coloc) ;
235 for (
int k=0 ; k<np+1 ; k++)
237 for (
int j=0 ; j<nt ; j++) {
240 double* coef =
new double [nr] ;
241 double* auxi =
new double[1] ;
242 for (
int i=0 ; i<nr ; i++)
243 coef[i] = (*courant.
va.
c_cf)(nz-1, k, j, i) ;
246 som_r_chebu (coef, nr, 1, 1, 1, auxi) ;
249 som_r_pas_prevu (coef, nr, 1, 1, 1, auxi) ;
256 courant.
va.
c_cf->
set(nz-1, k, j, 0) -= *auxi ;
258 for (
int i=0 ; i<nr ; i++)
259 this->
va.
c_cf->
set(nz-1, k, j, i) -= *auxi * coloc[i] ;
Mtbl_cf * c_cf
Coefficients of the spectral expansion of the function.
Component of a tensorial field *** DEPRECATED : use class Scalar instead ***.
const double * get_alpha() const
Returns the pointer on the array alpha.
int get_np(int l) const
Returns the number of points in the azimuthal direction ( ) in domain no. l.
void set_etat_cf_qcq()
Sets the logical state to ETATQCQ (ordinary state) for values in the configuration space (Mtbl_cf c_c...
void coef() const
Computes the coeffcients of *this.
Tbl & set(int l)
Read/write of the Tbl containing the coefficients in a given domain.
const Mg3d * get_mg() const
Gives the Mg3d on which the mapping is defined.
void coef_i() const
Computes the physical value of *this.
int etat
Logical state (ETATNONDEF , ETATQCQ or ETATZERO ).
void mult_r_zec()
Multiplication by r in the external compactified domain (ZEC)
void del_deriv()
Logical destructor of the derivatives.
void annule_hard()
Sets the Cmp to zero in a hard way.
void filtre_phi(int n, int zone)
Sets the n lasts coefficients in to 0 in the domain zone .
Cmp cos(const Cmp &)
Cosine.
int get_base_r(int l) const
Returns the expansion basis for r ( ) functions in the domain of index l (e.g.
void filtre(int n)
Sets the n lasts coefficients in r to 0 in the external domain.
int dzpuis
Power of r by which the quantity represented by this must be divided in the external compactified zo...
Base_val base
Bases on which the spectral expansion is performed.
void set_val_inf(double val)
Sets the value of the Cmp to val at infinity.
int get_nzone() const
Returns the number of domains.
void fixe_decroissance(int puis)
Substracts all the components behaving like in the external domain, with n strictly lower than puis ...
Cmp pow(const Cmp &, int)
Power .
void set_val_hor(double val, int zone)
Sets the value of the Cmp to val on the inner boudary of the shell number zone .This is usefull for d...
int get_nr(int l) const
Returns the number of points in the radial direction ( ) in domain no. l.
const Map * mp
Reference mapping.
void set_etat_c_qcq()
Sets the logical state to ETATQCQ (ordinary state) for values in the configuration space (Mtbl c )...
int get_nt(int l) const
Returns the number of points in the co-latitude direction ( ) in domain no. l.
#define R_CHEBU
base de Chebychev ordinaire (fin), dev. en 1/r
int get_type_r(int l) const
Returns the type of sampling in the radial direction in domain no.
Valeur va
The numerical value of the Cmp.
Tbl & set(int l)
Read/write of the value in a given domain (configuration space).