63 int cnp (
int n,
int p) ;
75 int base_r, m_quant, l_quant ;
86 cout <<
"Le mapping doit etre affine" << endl ;
92 double beta = map->
get_beta()[zone] ;
95 double new_alpha = -alpha/(beta*beta-alpha*alpha) ;
96 double new_beta = beta/(beta*beta-alpha*alpha) ;
99 double alpha_zec = map->
get_alpha()[zone+1] ;
107 tksi.
set(0, 0) =
sqrt(
double(2)) ;
108 for (
int i=1 ; i<nbre ; i++)
113 tksi.
set(1, 1) =
sqrt(
double(2)) ;
114 for (
int i=2 ; i<nbre ; i++)
118 for (
int lig=2 ; lig<nbre ; lig++) {
119 tksi.
set(lig, 0) = -tksi(lig-2, 0) ;
120 for (
int col=1 ; col<nbre ; col++)
121 tksi.
set(lig, col) = 2*tksi(lig-1, col-1)-tksi(lig-2, col) ;
128 for (
int lig=0 ; lig<nbre ; lig++) {
129 for (
int col=0 ; col<=lig ; col++)
130 ksiu.
set(lig, col) = cnp(lig, col)*
131 pow(-new_beta/new_alpha, lig-col) ;
132 for (
int col = lig+1 ; col<nbre ; col++)
133 ksiu.
set(lig, col) = 0 ;
140 for (
int lig=0 ; lig<nbre ; lig++)
141 for (
int col=0 ; col<nbre ; col++) {
143 for (
int m=0 ; m<nbre ; m++)
144 somme += tksi(lig, m)*ksiu(m, col) ;
145 tu.
set(lig, col) = somme ;
149 Tbl coef_u (nbre+lmax, nr) ;
151 int* dege =
new int [3] ;
152 dege[0] = 1 ; dege[1] = 1 ; dege[2] = nr ;
153 double* ti =
new double [nr] ;
155 for (
int puiss=0 ; puiss<nbre+lmax ; puiss++) {
156 for (
int i=0 ; i<nr ; i++)
157 ti[i] =
pow(-
cos(M_PI*i/(nr-1))-1, puiss) ;
158 cfrcheb (dege, dege, ti, dege, ti) ;
159 for (
int i=0 ; i<nr ; i++)
160 coef_u.
set(puiss, i) = ti[i] ;
165 double *coloc =
new double[nbre] ;
166 double *auxi =
new double [1] ;
168 Tbl coef_zec (np+2, nt, nr) ;
173 for (
int k=0 ; k<np+2 ; k++)
174 for (
int j=0 ; j<nt ; j++)
175 if (nullite_plm (j, nt, k, np, base_devel)==1) {
176 donne_lm (zone+2, zone+1, j, k, base_devel, m_quant,
178 if (l_quant <= lmax) {
183 for (
int i=0 ; i<nbre ; i++) {
184 ksi = -
cos(M_PI*i/(nbre-1)) ;
185 air = 1./(new_alpha*ksi+new_beta) ;
186 ksi = (air-beta)/alpha ;
187 for (
int m=0 ; m<nr ; m++)
188 ti[m] = (*
va.
c_cf)(zone, k, j, m) ;
189 som_r_cheb (ti, nr, 1, 1, ksi, auxi) ;
191 pow (-new_alpha*
cos(M_PI*i/(nbre-1))+new_beta, power+l_quant);
194 cfrcheb (dege, dege, coloc, dege, coloc) ;
196 Tbl expansion (nbre) ;
198 for (
int i=0 ; i<nbre ; i++) {
200 for (
int m=0 ; m<nbre ; m++)
201 somme += coloc[m]*tu(m, i) ;
202 expansion.
set(i) = somme ;
205 for (
int i=0 ; i<nr ; i++) {
207 for (
int m=0 ; m<nbre ; m++)
208 somme += coef_u(m+l_quant, i)*expansion(m)*
209 pow(alpha_zec, m+l_quant)/
211 coef_zec.
set(k, j, i) = somme ;
220 for (
int k=0 ; k<np+2 ; k++)
221 for (
int j=0 ; j<nt ; j++)
222 for (
int i=0 ; i<nr ; i++)
223 va.
c_cf->
set(zone+1, k, j, i) = coef_zec(k, j, i) ;
Mtbl_cf * c_cf
Coefficients of the spectral expansion of the function.
const double * get_alpha() const
Returns the pointer on the array alpha.
void ylm_i()
Inverse of ylm()
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.
void ylm()
Computes the coefficients of *this.
const Mg3d * get_mg() const
Gives the Mg3d on which the mapping is defined.
double & set(int i)
Read/write of a particular element (index i) (1D case)
friend Scalar sqrt(const Scalar &)
Square root.
void set_dzpuis(int)
Modifies the dzpuis flag.
void set_etat_qcq()
Sets the logical state to ETATQCQ (ordinary state).
friend Scalar pow(const Scalar &, int)
Power .
friend Scalar cos(const Scalar &)
Cosine.
Base_val base
Bases on which the spectral expansion is performed.
const double * get_beta() const
Returns the pointer on the array beta.
int get_nzone() const
Returns the number of domains.
Valeur va
The numerical value of the Scalar.
void set_etat_qcq()
Sets the logical state to ETATQCQ (ordinary state).
double & set(int j, int i)
Read/write of a particuliar element.
int get_nr(int l) const
Returns the number of points in the radial direction ( ) in domain no. l.
Bases of the spectral expansions.
void set_etat_qcq()
Sets the logical state to ETATQCQ (ordinary state).
int get_nt(int l) const
Returns the number of points in the co-latitude direction ( ) in domain no. l.
const Map *const mp
Mapping on which the numerical values at the grid points are defined.
void annule_hard()
Sets the Tbl to zero in a hard way.
void raccord_externe(int puis, int nbre, int lmax)
Matching of the external domain with the outermost shell.
Tbl ** t
Array (size nzone ) of pointers on the Tbl 's which contain the spectral coefficients in each domain...