90 assert (
etat != ETATNONDEF) ;
97 cout <<
"Le mapping doit etre affine" << endl ;
107 double r_cont = -1./2./alpha ;
110 Tbl coef (nbre+2*lmax, nr) ;
113 int* deg =
new int[3] ;
114 deg[0] = 1 ; deg[1] = 1 ; deg[2] = nr ;
115 double* auxi =
new double[nr] ;
117 for (
int conte=0 ; conte<nbre+2*lmax ; conte++) {
118 for (
int i=0 ; i<nr ; i++)
119 auxi[i] =
pow(-1-
cos(M_PI*i/(nr-1)), (conte+puis)) ;
121 cfrcheb(deg, deg, auxi, deg, auxi) ;
122 for (
int i=0 ; i<nr ; i++)
123 coef.
set(conte, i) = auxi[i]*
pow (alpha, conte+puis) ;
128 Tbl valeurs (nbre, nt, np+1) ;
131 Cmp courant (*
this) ;
132 double* res_val =
new double[1] ;
134 for (
int conte=0 ; conte<nbre ; conte++) {
141 for (
int k=0 ; k<np+1 ; k++)
142 for (
int j=0 ; j<nt ; j++)
143 if (nullite_plm(j, nt, k, np, courant.
va.
base) == 1) {
145 for (
int i=0 ; i<nr ; i++)
146 auxi[i] = (*courant.
va.
c_cf)(nz-2, k, j, i) ;
150 som_r_cheb (auxi, nr, 1, 1, 1, res_val) ;
153 cout <<
"Cas non prevu dans raccord_zec" << endl ;
157 valeurs.
set(conte, k, j) = res_val[0] ;
159 Cmp copie (courant) ;
161 courant = copie.
dsdr() ;
175 int base_r, l_quant, m_quant ;
176 for (
int k=0 ; k<np+1 ; k++)
177 for (
int j=0 ; j<nt ; j++)
178 if (nullite_plm(j, nt, k, np,
va.
base) == 1) {
180 donne_lm (nz, nz-1, j, k, base, m_quant, l_quant, base_r) ;
187 for (
int col=0 ; col<nbre ; col++)
188 for (
int lig=0 ; lig<nbre ; lig++) {
190 int facteur = (lig%2==0) ? 1 : -1 ;
191 for (
int conte=0 ; conte<lig ; conte++)
192 facteur *= puis+col+conte+2*l_quant ;
193 systeme.
set(lig, col) = facteur/
pow(r_cont, puis+col+lig+2*l_quant) ;
199 Tbl sec_membre (nbre) ;
201 for (
int conte=0 ; conte<nbre ; conte++)
202 sec_membre.
set(conte) = valeurs(conte, k, j) ;
206 for (
int conte=0 ; conte<nbre ; conte++)
207 for (
int i=0 ; i<nr ; i++)
209 inv(conte)*coef(conte+2*l_quant, i) ;
211 else for (
int i=0 ; i<nr ; i++)
const Cmp & dsdr() const
Returns of *this .
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.
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.
void set_lu() const
Calculate the LU-representation, assuming the band-storage has been done.
Tbl & set(int l)
Read/write of the Tbl containing the coefficients in a given domain.
Tbl inverse(const Tbl &sec_membre) const
Solves the linear system represented by the matrix.
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)
int etat
Logical state (ETATNONDEF , ETATQCQ or ETATZERO ).
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 set_etat_qcq()
Sets the logical state to ETATQCQ (ordinary state).
void raccord_c1_zec(int puis, int nbre, int lmax)
Performs the matching of the external domain with respect to the last shell using function like wit...
Base_val base
Bases on which the spectral expansion is performed.
int get_nzone() const
Returns the number of domains.
void dec2_dzpuis()
Decreases by 2 the value of dzpuis and changes accordingly the values of the Cmp in the external comp...
Cmp pow(const Cmp &, int)
Power .
double & set(int j, int i)
Read/write of a particuliar element.
void set_band(int up, int low) const
Calculate the band storage of *std.
int get_nr(int l) const
Returns the number of points in the radial direction ( ) in domain no. l.
Bases of the spectral expansions.
const Map * mp
Reference mapping.
void set_etat_qcq()
Sets the logical state to ETATQCQ (ordinary state).
void set_dzpuis(int)
Set a value to dzpuis.
int get_nt(int l) const
Returns the number of points in the co-latitude direction ( ) in domain no. l.
void annule_hard()
Sets the Tbl to zero in a hard way.
Valeur va
The numerical value of the Cmp.
Tbl ** t
Array (size nzone ) of pointers on the Tbl 's which contain the spectral coefficients in each domain...
#define R_CHEB
base de Chebychev ordinaire (fin)