23char cmp_manip_C[] =
"$Header: /cvsroot/Lorene/C++/Source/Cmp/cmp_manip.C,v 1.6 2014/10/13 08:52:47 j_novak Exp $" ;
76 assert (
etat != ETATNONDEF) ;
90 for (
int k=0 ; k<np+1 ; k++)
92 for (
int j=0 ; j<nt ; j++)
93 for (
int i=nr-1 ; i>nr-1-n ; i--)
102 assert (
etat != ETATNONDEF) ;
103 if (
etat == ETATZERO)
114 for (
int k=np+1-n ; k<np+1 ; k++)
115 for (
int j=0 ; j<nt ; j++)
116 for (
int i=0 ; i<nr ; i++)
128 assert (
etat != ETATNONDEF) ;
129 if (
etat == ETATZERO) {
149 for (
int k=0 ; k<np ; k++)
150 for (
int j=0 ; j<nt ; j++)
151 va.
set(nz-1, k, j, nr-1) = val ;
161 assert (
etat != ETATNONDEF) ;
162 if (
etat == ETATZERO) {
168 assert (zone < mp->get_mg()->get_nzone()) ;
177 for (
int k=0 ; k<np ; k++)
178 for (
int j=0 ; j<nt ; j++)
179 va.
set(zone, k, j, 0) = val ;
202 cout <<
"Le mapping doit etre affine" << endl ;
208 Cmp courant (*
this) ;
213 for (
int conte=0 ; conte<nbre ; conte++) {
220 double* coloc =
new double [nr] ;
221 int * deg =
new int[3] ;
226 for (
int i=0 ; i<nr ; i++)
227 coloc[i] =
pow(alpha,
double(conte))*
228 pow(-1-
cos(M_PI*i/(nr-1)),
double(conte)) ;
230 cfrcheb(deg, deg, coloc, deg, coloc) ;
232 for (
int k=0 ; k<np+1 ; k++)
234 for (
int j=0 ; j<nt ; j++) {
237 double* coef =
new double [nr] ;
238 double* auxi =
new double[1] ;
239 for (
int i=0 ; i<nr ; i++)
240 coef[i] = (*courant.
va.
c_cf)(nz-1, k, j, i) ;
243 som_r_chebu (coef, nr, 1, 1, 1, auxi) ;
246 som_r_pas_prevu (coef, nr, 1, 1, 1, auxi) ;
253 courant.
va.
c_cf->
set(nz-1, k, j, 0) -= *auxi ;
255 for (
int i=0 ; i<nr ; i++)
256 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.
Component of a tensorial field *** DEPRECATED : use class Scalar instead ***.
const Map * mp
Reference mapping.
void mult_r_zec()
Multiplication by r in the external compactified domain (ZEC)
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.
const Mg3d * get_mg() const
Gives the Mg3d on which the mapping is defined.
int get_np(int l) const
Returns the number of points in the azimuthal direction ( ) in domain no. l.
int get_nt(int l) const
Returns the number of points in the co-latitude direction ( ) in domain no. l.
int get_nzone() const
Returns the number of domains.
int get_nr(int l) const
Returns the number of points in the radial direction ( ) in domain no. l.
int get_type_r(int l) const
Returns the type of sampling in the radial direction in domain no.
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...
void set_etat_c_qcq()
Sets the logical state to ETATQCQ (ordinary state) for values in the configuration space (Mtbl c ).
Tbl & set(int l)
Read/write of the value in a given domain (configuration space).
void coef_i() const
Computes the physical value of *this.
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