79 assert (
etat != ETATNONDEF) ;
83 int nz =
mp->get_mg()->get_nzone() ;
84 int np =
mp->get_mg()->get_np(nz-1) ;
85 int nt =
mp->get_mg()->get_nt(nz-1) ;
86 int nr =
mp->get_mg()->get_nr(nz-1) ;
91 va.set_etat_cf_qcq() ;
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--)
97 va.c_cf->set(nz-1, k, j, i) = 0 ;
105 assert (
etat != ETATNONDEF) ;
106 if (
etat == ETATZERO)
112 va.set_etat_cf_qcq() ;
113 int np =
mp->get_mg()->get_np(nz) ;
114 int nt =
mp->get_mg()->get_nt(nz) ;
115 int nr =
mp->get_mg()->get_nr(nz) ;
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++)
120 va.c_cf->set(nz, k, j, i) = 0 ;
131 assert (
etat != ETATNONDEF) ;
132 if (
etat == ETATZERO) {
140 int nz =
mp->get_mg()->get_nzone() ;
143 assert (
mp->get_mg()->get_type_r(nz-1) == UNSURR) ;
145 int nr =
mp->get_mg()->get_nr(nz-1) ;
146 int nt =
mp->get_mg()->get_nt(nz-1) ;
147 int np =
mp->get_mg()->get_np(nz-1) ;
150 va.set_etat_c_qcq() ;
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()) ;
174 int nt =
mp->get_mg()->get_nt(zone) ;
175 int np =
mp->get_mg()->get_np(zone) ;
178 va.set_etat_c_qcq() ;
180 for (
int k=0 ; k<np ; k++)
181 for (
int j=0 ; j<nt ; j++)
182 va.set(zone, k, j, 0) = val ;
198 int nz =
mp->get_mg()->get_nzone() ;
199 int np =
mp->get_mg()->get_np(nz-1) ;
200 int nt =
mp->get_mg()->get_nt(nz-1) ;
201 int nr =
mp->get_mg()->get_nr(nz-1) ;
205 cout <<
"Le mapping doit etre affine" << endl ;
211 Cmp courant (*
this) ;
214 va.set_etat_cf_qcq() ;
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] ;
int get_base_r(int l) const
Returns the expansion basis for r ( ) functions in the domain of index l (e.g.
const Map * mp
Reference mapping.
void mult_r_zec()
Multiplication by r in the external compactified domain (ZEC).
Cmp(const Map &map)
Constructor from mapping.
int dzpuis
Power of r by which the quantity represented by this must be divided in the external compactified z...
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...
Valeur va
The numerical value of the Cmp.
void filtre_phi(int n, int zone)
Sets the n lasts coefficients in to 0 in the domain zone .
int etat
Logical state (ETATNONDEF , ETATQCQ or ETATZERO ).
void filtre(int n)
Sets the n lasts coefficients in r to 0 in the external domain.
void set_val_inf(double val)
Sets the value of the Cmp to val at infinity.
void del_deriv()
Logical destructor of the derivatives.
void fixe_decroissance(int puis)
Substracts all the components behaving like in the external domain, with n strictly lower than puis ...
void annule_hard()
Sets the Cmp to zero in a hard way.
const double * get_alpha() const
Returns the pointer on the array alpha.
Tbl & set(int l)
Read/write of the Tbl containing the coefficients in a given domain.
void set_etat_cf_qcq()
Sets the logical state to ETATQCQ (ordinary state) for values in the configuration space (Mtbl_cf c_c...
Mtbl_cf * c_cf
Coefficients of the spectral expansion of the function.
void coef() const
Computes the coeffcients of *this.
Base_val base
Bases on which the spectral expansion is performed.
Cmp pow(const Cmp &, int)
Power .
Cmp cos(const Cmp &)
Cosine.
#define R_CHEBU
base de Chebychev ordinaire (fin), dev. en 1/r
const Mg3d * get_mg() const
Gives the Mg3d on which the mapping is defined.