23char cmp_raccord_zec_C[] =
"$Header: /cvsroot/Lorene/C++/Source/Cmp/cmp_raccord_zec.C,v 1.4 2014/10/13 08:52:48 j_novak Exp $" ;
87 assert (
etat != ETATNONDEF) ;
94 cout <<
"Le mapping doit etre affine" << endl ;
104 double r_cont = -1./2./alpha ;
107 Tbl coef (nbre+2*lmax, nr) ;
110 int* deg =
new int[3] ;
111 deg[0] = 1 ; deg[1] = 1 ; deg[2] = nr ;
112 double* auxi =
new double[nr] ;
114 for (
int conte=0 ; conte<nbre+2*lmax ; conte++) {
115 for (
int i=0 ; i<nr ; i++)
116 auxi[i] =
pow(-1-
cos(M_PI*i/(nr-1)), (conte+puis)) ;
118 cfrcheb(deg, deg, auxi, deg, auxi) ;
119 for (
int i=0 ; i<nr ; i++)
120 coef.
set(conte, i) = auxi[i]*
pow (alpha, conte+puis) ;
125 Tbl valeurs (nbre, nt, np+1) ;
128 Cmp courant (*
this) ;
129 double* res_val =
new double[1] ;
131 for (
int conte=0 ; conte<nbre ; conte++) {
138 for (
int k=0 ; k<np+1 ; k++)
139 for (
int j=0 ; j<nt ; j++)
140 if (nullite_plm(j, nt, k, np, courant.
va.
base) == 1) {
142 for (
int i=0 ; i<nr ; i++)
143 auxi[i] = (*courant.
va.
c_cf)(nz-2, k, j, i) ;
147 som_r_cheb (auxi, nr, 1, 1, 1, res_val) ;
150 cout <<
"Cas non prevu dans raccord_zec" << endl ;
154 valeurs.
set(conte, k, j) = res_val[0] ;
156 Cmp copie (courant) ;
158 courant = copie.
dsdr() ;
172 int base_r, l_quant, m_quant ;
173 for (
int k=0 ; k<np+1 ; k++)
174 for (
int j=0 ; j<nt ; j++)
175 if (nullite_plm(j, nt, k, np,
va.
base) == 1) {
177 donne_lm (nz, nz-1, j, k, base, m_quant, l_quant, base_r) ;
184 for (
int col=0 ; col<nbre ; col++)
185 for (
int lig=0 ; lig<nbre ; lig++) {
187 int facteur = (lig%2==0) ? 1 : -1 ;
188 for (
int conte=0 ; conte<lig ; conte++)
189 facteur *= puis+col+conte+2*l_quant ;
190 systeme.
set(lig, col) = facteur/
pow(r_cont, puis+col+lig+2*l_quant) ;
196 Tbl sec_membre (nbre) ;
198 for (
int conte=0 ; conte<nbre ; conte++)
199 sec_membre.
set(conte) = valeurs(conte, k, j) ;
203 for (
int conte=0 ; conte<nbre ; conte++)
204 for (
int i=0 ; i<nr ; i++)
206 inv(conte)*coef(conte+2*l_quant, i) ;
208 else for (
int i=0 ; i<nr ; i++)
Bases of the spectral expansions.
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 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...
Valeur va
The numerical value of the Cmp
int etat
Logical state (ETATNONDEF , ETATQCQ or ETATZERO ).
void set_dzpuis(int)
Set a value to dzpuis.
void dec2_dzpuis()
Decreases by 2 the value of dzpuis and changes accordingly the values of the Cmp in the external comp...
const Cmp & dsdr() const
Returns of *this .
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.
void set_etat_qcq()
Sets the logical state to ETATQCQ (ordinary state).
double & set(int j, int i)
Read/write of a particuliar element.
Tbl inverse(const Tbl &sec_membre) const
Solves the linear system represented by the matrix.
void set_band(int up, int low) const
Calculate the band storage of *std.
void set_lu() const
Calculate the LU-representation, assuming the band-storage has been done.
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.
Tbl & set(int l)
Read/write of the Tbl containing the coefficients in a given domain.
Tbl ** t
Array (size nzone ) of pointers on the Tbl 's which contain the spectral coefficients in each domain.
void annule_hard()
Sets the Tbl to zero in a hard way.
void set_etat_qcq()
Sets the logical state to ETATQCQ (ordinary state).
double & set(int i)
Read/write of a particular element (index i) (1D case)
void set_etat_cf_qcq()
Sets the logical state to ETATQCQ (ordinary state) for values in the configuration space (Mtbl_cf c_c...
void ylm()
Computes the coefficients of *this.
Mtbl_cf * c_cf
Coefficients of the spectral expansion of the function.
void coef() const
Computes the coeffcients of *this.
void ylm_i()
Inverse of ylm()
Base_val base
Bases on which the spectral expansion is performed.
Cmp pow(const Cmp &, int)
Power .
Cmp cos(const Cmp &)
Cosine.
#define R_CHEB
base de Chebychev ordinaire (fin)