65 Matrice matrice_raccord_pair (
int cont,
double alpha_kernel) {
67 Matrice systeme (cont, cont) ;
68 systeme.set_etat_qcq() ;
69 for (
int i=0 ; i<cont ; i++)
70 for (
int j=0 ; j<cont ; j++)
71 systeme.set(i, j) = 0 ;
74 for (
int i=0 ; i<cont ; i++)
75 for (
int k=0 ; k<cont ; k++)
78 for (
int boucle=0 ; boucle<k ; boucle++)
79 somme *= (4*i*i-boucle*boucle)/(2.*boucle+1.)/alpha_kernel ;
80 systeme.set(k, i) = somme ;
82 int inf = (cont%2 == 1) ? (cont-1)/2 : (cont-2)/2 ;
83 systeme.set_band (cont-1, inf) ;
88 Matrice matrice_raccord_impair (
int cont,
double alpha_kernel) {
90 Matrice systeme (cont, cont) ;
91 systeme.set_etat_qcq() ;
92 for (
int i=0 ; i<cont ; i++)
93 for (
int j=0 ; j<cont ; j++)
94 systeme.set(i, j) = 0 ;
97 for (
int i=0 ; i<cont ; i++)
98 for (
int k=0 ; k<cont ; k++)
101 for (
int boucle=0 ; boucle<k ; boucle++)
102 somme *= (
pow(2*i+1, 2.)-boucle*boucle)/(2.*boucle+1.)/alpha_kernel ;
103 systeme.set(k, i) = somme ;
105 int inf = (cont%2 == 0) ? cont/2 : (cont-1)/2 ;
106 systeme.set_band (cont-1, inf) ;
112 Tbl sec_membre_raccord (Tbl coef,
int cont,
double alpha_shell) {
114 assert (coef.get_etat() != ETATNONDEF) ;
117 Tbl sec_membre(cont) ;
118 sec_membre.set_etat_qcq() ;
119 for (
int i=0 ; i<cont ; i++)
120 sec_membre.set(i) = 0 ;
123 for (
int i=0 ; i<nr ; i++)
124 for (
int k=0 ; k<cont ; k++)
127 for (
int boucle=0 ; boucle<k ; boucle++)
128 somme *= (i*i-boucle*boucle)/(2.*boucle+1.)/alpha_shell ;
130 sec_membre.set(k) += coef(i)*somme ;
132 sec_membre.set(k) -= coef(i)*somme ;
139 Tbl regularise (Tbl coef,
int nr,
int base_r) {
142 assert (coef.get_etat() != ETATNONDEF) ;
143 int cont = coef.get_dim(0) ;
144 assert (nr >= cont) ;
147 resu.set_etat_qcq() ;
149 double* x4coef =
new double[nr] ;
150 for (
int i=0 ; i<cont ; i++)
151 x4coef[i] = coef(i) ;
152 for (
int i=cont ; i<nr ; i++)
154 double* x6coef =
new double[nr] ;
156 multx2_1d (nr, &x4coef, base_r) ;
157 multx2_1d (nr, &x4coef, base_r) ;
158 for (
int i=0 ; i<nr ; i++)
159 x6coef[i] = x4coef[i] ;
160 multx2_1d (nr, &x6coef, base_r) ;
162 for (
int i=0 ; i<nr ; i++)
163 resu.set(i) = 3*x4coef[i]-2*x6coef[i] ;
174 assert (
etat != ETATNONDEF) ;
181 if (mapping == 0x0) {
183 "raccord : The mapping does not belong to the class Map_af !" 208 double alpha_kernel = mapping->
get_alpha()[0] ;
209 double alpha_shell = mapping->
get_alpha()[1] ;
211 int base_r, m_quant, l_quant ;
213 for (
int k=0 ; k<nbrep_kernel+1 ; k++)
214 for (
int j=0 ; j<nbret_kernel ; j++)
215 if (nullite_plm(j, nbret_kernel, k,nbrep_kernel,
va.
base) == 1)
216 if (nullite_plm(j, nbret_shell, k, nbrep_shell,
va.
base) == 1)
219 donne_lm(nz, 0, j, k,
va.
base, m_quant, l_quant, base_r) ;
224 Tbl facteur (nbrer_kernel) ;
226 for (
int i=0 ; i<nbrer_shell ; i++)
228 facteur.
set(i) = (*
va.
c_cf)(1, k, j, i) ;
230 Tbl sec_membre (sec_membre_raccord (facteur, cont, alpha_shell)) ;
233 systeme = matrice_raccord_pair (cont, alpha_kernel) ;
235 systeme = matrice_raccord_impair (cont, alpha_kernel) ;
238 Tbl regulier (nbrer_kernel) ;
241 for (
int i=0 ; i<cont ; i++)
245 regulier = regularise (soluce, nbrer_kernel,
R_CHEBP) ;
247 regulier = regularise (soluce, nbrer_kernel,
R_CHEBI) ;
249 for (
int i=0 ; i<nbrer_kernel ; i++)
const Map * get_mp() const
Returns the mapping.
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.
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 ).
#define R_CHEBI
base de Cheb. impaire (rare) seulement
#define R_CHEBP
base de Cheb. paire (rare) seulement
Base_val base
Bases on which the spectral expansion is performed.
int get_nzone() const
Returns the number of domains.
int get_dim(int i) const
Gives the i-th dimension (ie dim.dim[i])
Cmp pow(const Cmp &, int)
Power .
int get_nr(int l) const
Returns the number of points in the radial direction ( ) in domain no. l.
void raccord(int n)
Performs the matching of the nucleus with respect to the first shell.
int get_nt(int l) const
Returns the number of points in the co-latitude direction ( ) in domain no. l.
int get_type_r(int l) const
Returns the type of sampling in the radial direction in domain no.
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...